aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c b/target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c
index 7ffff684de..7309d9ea77 100644
--- a/target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c
+++ b/target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c
@@ -706,15 +706,15 @@ static int eth_poll(struct napi_struct *napi, int budget)
}
}
- cns3xxx_alloc_rx_buf(sw, received);
-
- rx_ring->cur_index = i;
-
- if (received != budget) {
+ if (!received) {
napi_complete(napi);
enable_irq(IRQ_CNS3XXX_SW_R0RXC);
}
+ cns3xxx_alloc_rx_buf(sw, received);
+
+ rx_ring->cur_index = i;
+
wmb();
enable_rx_dma(sw);