OSDN Git Service

net: pcs: xpcs: avoid reading STAT1 more than once
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 23 May 2023 10:16:29 +0000 (11:16 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 24 May 2023 16:13:23 +0000 (09:13 -0700)
commit883a98ede4b67369569f2bd163015b31b03c3278
tree7ed216a7158421a553e402be60908b64fd563c2f
parent21234ef16665a78cf8b07182453a8395463865c8
net: pcs: xpcs: avoid reading STAT1 more than once

Avoid reading the STAT1 registers more than once while getting the PCS
state, as this register contains latching-low bits that are lost after
the first read.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/pcs/pcs-xpcs.c