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 09:54:32 +0000 (10:54 +0100)
commit2f548489d64debf093f2299e38a8d0fc655f87b9
treeefea1b6380a4966a6d2af596350ff7c9af9a8c44
parentbcc5d57e6091ef2346eabcd6e2169353a8770ec8
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