Re: [PATCH net] net: phy: fix race in genphy_update_link

From
David Miller <davem@davemloft.net>
Date
2019-08-03 01:15:21
Reply to
Heiner Kallweit, 2019-07-31
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Wed, 31 Jul 2019 23:05:10 +0200
In phy_start_aneg() autoneg is started, and immediately after that
link and autoneg status are read. As reported in [0] it can happen that
at time of this read the PHY has reset the "aneg complete" bit but not
yet the "link up" bit, what can result in a false link-up detection.
To fix this don't report link as up if we're in aneg mode and PHY
doesn't signal "aneg complete".

[0] https://marc.info/?t=156413509900003&r=1&w=2

Fixes: 4950c2ba49cc ("net: phy: fix autoneg mismatch case in genphy_read_status")
Reported-by: liuyonglong <redacted>
Tested-by: liuyonglong <redacted>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Applied.
Thread (2 messages) 2 messages, 2 authors, last reply 2019-08-03
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help