OSDN Git Service

net: pcs: xpcs: remove double-read of link state when using AN
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 15 Mar 2023 14:46:43 +0000 (14:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Mar 2023 08:19:03 +0000 (08:19 +0000)
commitef63461caf427a77a04620d74ba90035a712af9c
tree7d3bb2405e8040719e894148ac179284f0f91d9b
parentabf36703d7046cd0aaf5ac5524d321851fb6bf03
net: pcs: xpcs: remove double-read of link state when using AN

Phylink does not want the current state of the link when reading the
PCS link state - it wants the latched state. Don't double-read the
MII status register. Phylink will re-read as necessary to capture
transient link-down events as of dbae3388ea9c ("net: phylink: Force
retrigger in case of latched link-fail indicator").

The above referenced commit is a dependency for this change, and thus
this change should not be backported to any kernel that does not
contain the above referenced commit.

Fixes: fcb26bd2b6ca ("net: phy: Add Synopsys DesignWare XPCS MDIO module")
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/pcs/pcs-xpcs.c