diff options
author | Andrew Lunn <andrew@lunn.ch> | 2020-04-28 19:58:33 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-28 14:33:19 -0700 |
commit | 790ab249b55d75fdb427b92f81964cd7cb525eec (patch) | |
tree | a7a239a53b77d316964e1c08d848137cc314327a /drivers/base/arch_topology.c | |
parent | 88fb831f773e6c51ec528eacb524f00f518f7e54 (diff) |
net: ethernet: fec: Prevent MII event after MII_SPEED write
The change to polled IO for MDIO completion assumes that MII events
are only generated for MDIO transactions. However on some SoCs writing
to the MII_SPEED register can also trigger an MII event. As a result,
the next MDIO read has a pending MII event, and immediately reads the
data registers before it contains useful data. When the read does
complete, another MII event is posted, which results in the next read
also going wrong, and the cycle continues.
By writing 0 to the MII_DATA register before writing to the speed
register, this MII event for the MII_SPEED is suppressed, and polled
IO works as expected.
Fixes: 29ae6bd1b0d8 ("net: ethernet: fec: Replace interrupt driven MDIO with polled IO")
Reported-by: Andy Duan <fugang.duan@nxp.com>
Suggested-by: Andy Duan <fugang.duan@nxp.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/base/arch_topology.c')
0 files changed, 0 insertions, 0 deletions