mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 07:13:34 +00:00
net: phy: fix aneg restart in phy_ethtool_set_eee
[ Upstream commit9de5d235b6
] phy_restart_aneg() enables aneg in the PHY. That's not what we want if phydev->autoneg is disabled. In this case still update EEE advertisement register, but don't enable aneg and don't trigger an aneg restart. Fixes:f75abeb833
("net: phy: restart phy autonegotiation after EEE advertisment change") Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0f5ae0f5b2
commit
bc0002eebd
1 changed files with 5 additions and 3 deletions
|
@ -1257,9 +1257,11 @@ int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data)
|
|||
/* Restart autonegotiation so the new modes get sent to the
|
||||
* link partner.
|
||||
*/
|
||||
ret = phy_restart_aneg(phydev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
if (phydev->autoneg == AUTONEG_ENABLE) {
|
||||
ret = phy_restart_aneg(phydev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue