Skip to content

Commit bbbbfac

Browse files
author
Fox Snowpatch
committed
1 parent d88a1b4 commit bbbbfac

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/net/wan/fsl_ucc_hdlc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,12 +523,12 @@ static int hdlc_rx_done(struct ucc_hdlc_private *priv, int rx_work_limit)
523523
u16 length, howmany = 0;
524524
u8 *bdbuffer;
525525

526-
dma_rmb();
527526
bd = priv->currx_bd;
528527
bd_status = be16_to_cpu(bd->status);
529528

530529
/* while there are received buffers and BD is full (~R_E) */
531530
while (!((bd_status & (R_E_S)) || (--rx_work_limit < 0))) {
531+
dma_rmb();
532532
if (bd_status & (RX_BD_ERRORS)) {
533533
dev->stats.rx_errors++;
534534

@@ -610,7 +610,6 @@ static int hdlc_rx_done(struct ucc_hdlc_private *priv, int rx_work_limit)
610610

611611
bd_status = be16_to_cpu(bd->status);
612612
}
613-
dma_rmb();
614613

615614
priv->currx_bd = bd;
616615
return howmany;

0 commit comments

Comments
 (0)