]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: use BMSR_ANEGCOMPLETE bit for filling an_complete
authorMarek Behún <kabel@kernel.org>
Tue, 7 Jun 2022 11:28:42 +0000 (12:28 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 9 Jun 2022 03:58:30 +0000 (20:58 -0700)
commitf28d12406063b7310b5331408fbbbfff46357709
tree7ca12cffa0e45ed44c0e68de3abe4d67b1283b14
parentab94d076a036d43eb9638c7f235bf8e9e758dd73
net: dsa: mv88e6xxx: use BMSR_ANEGCOMPLETE bit for filling an_complete

Commit 71c825811410 ("net: dsa: mv88e6xxx: Link in pcs_get_state() if AN
is bypassed") added the ability to link if AN was bypassed, and added
filling of state->an_complete field, but set it to true if AN was
enabled in BMCR, not when AN was reported complete in BMSR.

This was done because for some reason, when I wanted to use BMSR value
to infer an_complete, I was looking at BMSR_ANEGCAPABLE bit (which was
always 1), instead of BMSR_ANEGCOMPLETE bit.

Use BMSR_ANEGCOMPLETE for filling state->an_complete.

Fixes: 71c825811410 ("net: dsa: mv88e6xxx: Link in pcs_get_state() if AN is bypassed")
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/mv88e6xxx/serdes.c