Skip to content

Commit 027f426

Browse files
ozbenhdavem330
authored andcommitted
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>
1 parent 7b49cd1 commit 027f426

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/faraday/ftgmac100.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,9 @@ static bool ftgmac100_rx_packet(struct ftgmac100 *priv, int *processed)
444444
if (!ftgmac100_rxdes_packet_ready(rxdes))
445445
return false;
446446

447+
/* Order subsequent reads with the test for the ready bit */
448+
dma_rmb();
449+
447450
/* We don't cope with fragmented RX packets */
448451
if (unlikely(!ftgmac100_rxdes_first_segment(rxdes) ||
449452
!ftgmac100_rxdes_last_segment(rxdes)))

0 commit comments

Comments
 (0)