[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170406010252.29208-9-benh@kernel.crashing.org>
Date: Thu, 6 Apr 2017 11:02:50 +1000
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: netdev@...r.kernel.org
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: [PATCH 08/10] ftgmac100: Add missing barrier in ftgmac100_rx_packet()
Signed-off-by: Benjamin Herrenschmidt <benh@...nel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index 86bda0a..594af30 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -442,6 +442,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)))
--
2.9.3
Powered by blists - more mailing lists