]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: phy: bcm7xxx: Fixed indirect MMD operations
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 28 Sep 2021 20:32:33 +0000 (13:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Oct 2021 08:19:48 +0000 (10:19 +0200)
commit403c71f36d4acff4741218f3136da06402ff9562
tree407465cba2c1cbfc98b5e735f69897f9e70f610b
parent3f8a27f9e27bd78604c0709224cec0ec85a8b106
net: phy: bcm7xxx: Fixed indirect MMD operations

commit d88fd1b546ff19c8040cfaea76bf16aed1c5a0bb upstream.

When EEE support was added to the 28nm EPHY it was assumed that it would
be able to support the standard clause 45 over clause 22 register access
method. It turns out that the PHY does not support that, which is the
very reason for using the indirect shadow mode 2 bank 3 access method.

Implement {read,write}_mmd to allow the standard PHY library routines
pertaining to EEE querying and configuration to work correctly on these
PHYs. This forces us to implement a __phy_set_clr_bits() function that
does not grab the MDIO bus lock since the PHY driver's {read,write}_mmd
functions are always called with that lock held.

Fixes: 83ee102a6998 ("net: phy: bcm7xxx: add support for 28nm EPHY")
[florian: adjust locking since phy_{read,write}_mmd are called with no
PHYLIB locks held]
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/phy/bcm7xxx.c