Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: stmmac: Do not cut down 1G modes

Some glue logic drivers support 1G without having GMAC/GMAC4/XGMAC.

Let's allow this speed by default.

Reported-by: Ondrej Jirman <megi@xff.cz>
Tested-by: Ondrej Jirman <megi@xff.cz>
Fixes: 5b0d7d7da64b ("net: stmmac: Add the missing speeds that XGMAC supports")
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jose Abreu and committed by
David S. Miller
df7699c7 01ad7fac

+3 -8
+3 -8
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
··· 814 814 phylink_set(mac_supported, 10baseT_Full); 815 815 phylink_set(mac_supported, 100baseT_Half); 816 816 phylink_set(mac_supported, 100baseT_Full); 817 + phylink_set(mac_supported, 1000baseT_Half); 818 + phylink_set(mac_supported, 1000baseT_Full); 819 + phylink_set(mac_supported, 1000baseKX_Full); 817 820 818 821 phylink_set(mac_supported, Autoneg); 819 822 phylink_set(mac_supported, Pause); 820 823 phylink_set(mac_supported, Asym_Pause); 821 824 phylink_set_port_modes(mac_supported); 822 - 823 - if (priv->plat->has_gmac || 824 - priv->plat->has_gmac4 || 825 - priv->plat->has_xgmac) { 826 - phylink_set(mac_supported, 1000baseT_Half); 827 - phylink_set(mac_supported, 1000baseT_Full); 828 - phylink_set(mac_supported, 1000baseKX_Full); 829 - } 830 825 831 826 /* Cut down 1G if asked to */ 832 827 if ((max_speed > 0) && (max_speed < 1000)) {