projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cns3xxx: fix an rx irq handling corner case
[openwrt.git]
/
target
/
linux
/
cns3xxx
/
files
/
drivers
/
net
/
ethernet
/
cavium
/
cns3xxx_eth.c
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
7ffff68
..
7309d9e
100644
(file)
--- 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);
}
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);
wmb();
enable_rx_dma(sw);