From: Benjamin Herrenschmidt Date: Thu, 6 Apr 2017 01:02:50 +0000 (+1000) Subject: ftgmac100: Add missing barrier in ftgmac100_rx_packet() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=027f426d547967cd1b6899597367aa64af51c28e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ftgmac100: Add missing barrier in ftgmac100_rx_packet() Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller --- 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)))