From: Ben Hutchings Date: Tue, 27 Jan 2015 00:58:15 +0000 (+0000) Subject: net: phy: Invalidate LP advertising flags when restarting or disabling AN X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9b3320ef702d1c7daf165d5c72c945f0be6b2bed;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git net: phy: Invalidate LP advertising flags when restarting or disabling AN It is possible to see the old value of the LP advertising flags through ethtool after reconfiguring the PHY and before autonegotiation completes. If autonegotiation is turned off then the last value seen will persist indefinitely. Signed-off-by: Ben Hutchings Acked-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 767cd110f496..cdcac6aa4260 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -439,6 +439,9 @@ int phy_start_aneg(struct phy_device *phydev) if (AUTONEG_DISABLE == phydev->autoneg) phy_sanitize_settings(phydev); + /* Invalidate LP advertising flags */ + phydev->lp_advertising = 0; + err = phydev->drv->config_aneg(phydev); if (err < 0) goto out_unlock;