]> www.infradead.org Git - users/dwmw2/linux.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:18 +0000 (23:03 +0900)
commit07782db81e080989b24b634741eed20d2bf161c5
treeb8dcbaa45f917a803bae640a6b1e9941ef933c87
parent157c84b793e721ddede6de5ced52f9394ea1a2c0
net: pcs: xpcs: remove double-read of link state when using AN

[ Upstream commit ef63461caf427a77a04620d74ba90035a712af9c ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/pcs/pcs-xpcs.c