]> git.baikalelectronics.ru Git - kernel.git/commit
net: socionext: Add dummy PHY register read in phy_write()
authorMasahisa Kojima <masahisa.kojima@linaro.org>
Tue, 23 Oct 2018 11:24:27 +0000 (20:24 +0900)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Oct 2018 17:55:34 +0000 (10:55 -0700)
commit3a0782a5baaac20c2c54e901d6097d73d1d7b177
treefe227c8ae819f18998d8012e5cae4fd4282d987f
parentbe515903fa81d1b079a3f9a462b1f6d568d2f4d4
net: socionext: Add dummy PHY register read in phy_write()

There is a compatibility issue between RTL8211E implemented
in Developerbox and netsec ethernet controller IP.

Our MDIO controller stops MDC clock right after the write
access, but RTL8211E expects MDC clock must be kept toggling
for several clock cycle with MDIO high before entering
the IDLE state. Without keeping clock after write access,
write access is not correctly handled and register is not
updated.

To meet this requirement, netsec driver needs to issue dummy
read(e.g. read PHYID1(offset 0x2) register) right after write
access, to keep MDC clock.

We think this compatibility issue is a problem specific to
our MDIO controller and RTL8211E.

Fixes: 0d326cdbc883 ("net: socionext: Add Synquacer NetSec driver")
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: Yoshitoyo Osaki <osaki.yoshitoyo@socionext.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/socionext/netsec.c