]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Sep 2021 10:36:38 +0000 (11:36 +0100)
commitd88fd1b546ff19c8040cfaea76bf16aed1c5a0bb
tree0e0882fb72761238d3a4007c382afcd4ebca539c
parent251ffc07730305c0dd9b0786240577319cc560e0
net: phy: bcm7xxx: Fixed indirect MMD operations

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")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/bcm7xxx.c