net: axienet: add missing memory barriers
authorRobert Hancock <robert.hancock@calian.com>
Tue, 18 Jan 2022 21:41:27 +0000 (15:41 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:05:32 +0000 (11:05 +0100)
commite8893b1f8899b6fa161b83ee93e8cc04e17df1e6
treec917ecbbc5c78f9309cffa5ac09e2c53fb0d727d
parent07a6ec97c1ef56c4ef1e5187af2edcfe7afec8f8
net: axienet: add missing memory barriers

commit 95978df6fa328df619c15312e65ece469c2be2d2 upstream.

This driver was missing some required memory barriers:

Use dma_rmb to ensure we see all updates to the descriptor after we see
that an entry has been completed.

Use wmb and rmb to avoid stale descriptor status between the TX path and
TX complete IRQ path.

Fixes: 8a3b7a252dca9 ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver")
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/xilinx/xilinx_axienet_main.c