Subject: [PATCH net] net: stmmac: Add memory barrier

From: Jose Abreu <[email-masked]>
Date: Mon, 22 Jul 2019 13:37:51 +0200

Signed-off-by: Jose Abreu <[email-masked]>

---
Cc: Giuseppe Cavallaro <[email-masked]>
Cc: Alexandre Torgue <[email-masked]>
Cc: Jose Abreu <[email-masked]>
Cc: "David S. Miller" <[email-masked]>
Cc: Maxime Coquelin <[email-masked]>
Cc: [email-masked]
Cc: [email-masked]
Cc: [email-masked]
Cc: [email-masked]
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 7a6920098dd0..207c3755bcc5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3425,6 +3425,9 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
 				continue;
 			}
 
+			/* Full memory barrier */
+			mb();
+
 			dma_sync_single_for_cpu(priv->device, buf->addr,
 						frame_len, DMA_FROM_DEVICE);
 			skb_copy_to_linear_data(skb, page_address(buf->page),
-- 
2.7.4