]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: micrel: ksz9031: reconfigure autoneg after phy autoneg workaround
authorGrygorii Strashko <grygorii.strashko@ti.com>
Thu, 21 Dec 2017 00:45:10 +0000 (18:45 -0600)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Dec 2017 17:26:43 +0000 (12:26 -0500)
commitb95c8f75877ef3fd17621af5377e6eb7cb03f91a
tree85dc6fc5ae2f6d481656168be288a4798aba4d4a
parentc715a828d5aa4a02b0ba77f3b674020126e14053
net: phy: micrel: ksz9031: reconfigure autoneg after phy autoneg workaround

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: 74adacb23914 ("net/phy: micrel: Add workaround for bad autoneg")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/micrel.c