Message ID | E1o0jg9-000JY6-Vx@rmk-PC.armlinux.org.uk (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: dsa: mv88e6xxx: convert to phylink pcs | expand |
On Mon, Jun 13, 2022 at 02:00:25PM +0100, Russell King (Oracle) wrote: > When we are operating in SGMII inband mode, it implies that there is a > PHY connected, and the ethtool advertisement for autoneg applies to > the PHY, not the SGMII link. When in 1000base-X mode, then this applies > to the 802.3z link and needs to be applied to the PCS. > > Fix this. > > Fixes: 92817dad7dcb ("net: phylink: Support disabling autonegotiation for PCS") > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index 066684b80919..5bc58e50e318 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -3030,7 +3030,9 @@ int phylink_mii_c22_pcs_config(struct mdio_device *pcs, unsigned int mode, /* Ensure ISOLATE bit is disabled */ if (mode == MLO_AN_INBAND && - linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, advertising)) + (interface == PHY_INTERFACE_MODE_SGMII || + interface == PHY_INTERFACE_MODE_QSGMII || + linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, advertising))) bmcr = BMCR_ANENABLE; else bmcr = 0;
When we are operating in SGMII inband mode, it implies that there is a PHY connected, and the ethtool advertisement for autoneg applies to the PHY, not the SGMII link. When in 1000base-X mode, then this applies to the 802.3z link and needs to be applied to the PCS. Fix this. Fixes: 92817dad7dcb ("net: phylink: Support disabling autonegotiation for PCS") Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> --- drivers/net/phy/phylink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)