Skip to content

Commit

Permalink
ftgmac100: Add missing barrier in ftgmac100_rx_packet()
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Benjamin Herrenschmidt authored and David S. Miller committed Apr 6, 2017
1 parent 7b49cd1 commit 027f426
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/faraday/ftgmac100.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 027f426

Please sign in to comment.