net/fsl: xgmac_mdio: Add workaround for erratum A-009885
authorTobias Waldekranz <tobias@waldekranz.com>
Tue, 18 Jan 2022 21:50:50 +0000 (22:50 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 19 Jan 2022 16:14:17 +0000 (08:14 -0800)
commit6198c722019774d38018457a8bfb9ba3ed8c931e
tree11af575a68735d3321f21e517589a1e2ec74ebac
parentbaa59504c1cd0cca7d41954a45ee0b3dc78e41a0
net/fsl: xgmac_mdio: Add workaround for erratum A-009885

Once an MDIO read transaction is initiated, we must read back the data
register within 16 MDC cycles after the transaction completes. Outside
of this window, reads may return corrupt data.

Therefore, disable local interrupts in the critical section, to
maximize the probability that we can satisfy this requirement.

Fixes: d55ad2967d89 ("powerpc/mpc85xx: Create dts components for the FSL QorIQ DPAA FMan")
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/xgmac_mdio.c