]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Oct 2021 08:42:33 +0000 (10:42 +0200)
commitb49a2bd9734fdbddb94c36f39ad48a10fdb5b742
treedae133cbb1f1941ef48abcaf6db9afd982296205
parent1deec179772667230db77e5e2d99b0141f38f91d
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: 01ac6b7524ea ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/phy/bcm7xxx.c