summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/faraday
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2017-04-06 11:02:50 +1000
committerDavid S. Miller <davem@davemloft.net>2017-04-06 15:39:45 -0700
commit027f426d547967cd1b6899597367aa64af51c28e (patch)
tree9339109d86fc8b7c28cc366a74c0b3ab359401d5 /drivers/net/ethernet/faraday
parent7b49cd1c9eca4acd4dc36b6c2c532cad3576171d (diff)
downloadlinux-027f426d547967cd1b6899597367aa64af51c28e.tar.bz2
ftgmac100: Add missing barrier in ftgmac100_rx_packet()
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/faraday')
-rw-r--r--drivers/net/ethernet/faraday/ftgmac100.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index 5cd854e740a9..535e8a00d404 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -444,6 +444,9 @@ static bool ftgmac100_rx_packet(struct ftgmac100 *priv, int *processed)
if (!ftgmac100_rxdes_packet_ready(rxdes))
return false;
+ /* Order subsequent reads with the test for the ready bit */
+ dma_rmb();
+
/* We don't cope with fragmented RX packets */
if (unlikely(!ftgmac100_rxdes_first_segment(rxdes) ||
!ftgmac100_rxdes_last_segment(rxdes)))