提交 9b3320ef 编写于 作者: B Ben Hutchings 提交者: David S. Miller

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: NBen Hutchings <ben.hutchings@codethink.co.uk>
Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 28f323b3
...@@ -439,6 +439,9 @@ int phy_start_aneg(struct phy_device *phydev) ...@@ -439,6 +439,9 @@ int phy_start_aneg(struct phy_device *phydev)
if (AUTONEG_DISABLE == phydev->autoneg) if (AUTONEG_DISABLE == phydev->autoneg)
phy_sanitize_settings(phydev); phy_sanitize_settings(phydev);
/* Invalidate LP advertising flags */
phydev->lp_advertising = 0;
err = phydev->drv->config_aneg(phydev); err = phydev->drv->config_aneg(phydev);
if (err < 0) if (err < 0)
goto out_unlock; goto out_unlock;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册