diff options
author | Alexander Kochetkov <al.kochet@gmail.com> | 2017-04-20 13:00:04 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-26 20:32:00 +0200 |
commit | f555f34fdc586a56204cd16d9a7c104ec6cb6650 (patch) | |
tree | f6abfba711996bbd96e8d60659837cfdaa906166 /drivers/net/phy/micrel.c | |
parent | net/packet: check length in getsockopt() called with PACKET_HDRLEN (diff) | |
download | linux-f555f34fdc586a56204cd16d9a7c104ec6cb6650.tar.xz linux-f555f34fdc586a56204cd16d9a7c104ec6cb6650.zip |
net: phy: fix auto-negotiation stall due to unavailable interrupt
The Ethernet link on an interrupt driven PHY was not coming up if the Ethernet
cable was plugged before the Ethernet interface was brought up.
The patch trigger PHY state machine to update link state if PHY was requested to
do auto-negotiation and auto-negotiation complete flag already set.
During power-up cycle the PHY do auto-negotiation, generate interrupt and set
auto-negotiation complete flag. Interrupt is handled by PHY state machine but
doesn't update link state because PHY is in PHY_READY state. After some time
MAC bring up, start and request PHY to do auto-negotiation. If there are no new
settings to advertise genphy_config_aneg() doesn't start PHY auto-negotiation.
PHY continue to stay in auto-negotiation complete state and doesn't fire
interrupt. At the same time PHY state machine expect that PHY started
auto-negotiation and is waiting for interrupt from PHY and it won't get it.
Fixes: 321beec5047a ("net: phy: Use interrupts when available in NOLINK state")
Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
Cc: stable <stable@vger.kernel.org> # v4.9+
Tested-by: Roger Quadros <rogerq@ti.com>
Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/micrel.c')
0 files changed, 0 insertions, 0 deletions