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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 09:54:31 +0000 (10:54 +0100)
commit38c798384b903e0c38f7978c1fbf942e36213b8d
tree07ea01ff51e70a356fee52a032436f8a32a71109
parent734f4b0f831e6d5fdad819a8832fb562b6cb8291
net/fsl: xgmac_mdio: Add workaround for erratum A-009885

commit 6198c722019774d38018457a8bfb9ba3ed8c931e upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/freescale/xgmac_mdio.c