Commit 623bfb58 authored by Grygorii Strashko's avatar Grygorii Strashko Committed by Greg Kroah-Hartman

net: phy: micrel: ksz9031: reconfigure autoneg after phy autoneg workaround


[ Upstream commit c1a8d0a3 ]

Under some circumstances driver will perform PHY reset in
ksz9031_read_status() to fix autoneg failure case (idle error count =
0xFF). When this happens ksz9031 will not detect link status change any
more when connecting to Netgear 1G switch (link can be recovered sometimes by
restarting netdevice "ifconfig down up"). Reproduced with TI am572x board
equipped with ksz9031 PHY while connecting to Netgear 1G switch.

Fix the issue by reconfiguring autonegotiation after PHY reset in
ksz9031_read_status().

Fixes: d2fd719b ("net/phy: micrel: Add workaround for bad autoneg")
Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5854ca90
...@@ -541,6 +541,7 @@ static int ksz9031_read_status(struct phy_device *phydev) ...@@ -541,6 +541,7 @@ static int ksz9031_read_status(struct phy_device *phydev)
phydev->link = 0; phydev->link = 0;
if (phydev->drv->config_intr && phy_interrupt_is_valid(phydev)) if (phydev->drv->config_intr && phy_interrupt_is_valid(phydev))
phydev->drv->config_intr(phydev); phydev->drv->config_intr(phydev);
return genphy_config_aneg(phydev);
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment