aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/cns3xxx
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-18 22:38:14 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-01-18 22:38:14 +0000
commit91278df70e2139cfea3357fa9053bb69dd76cf66 (patch)
treed191f79bf0ed0c0e0b5502f18f89d1c0879c3863 /target/linux/cns3xxx
parent136747c564c3a73b28eb9283d4d97f1c07d101a5 (diff)
downloadupstream-91278df70e2139cfea3357fa9053bb69dd76cf66.tar.gz
upstream-91278df70e2139cfea3357fa9053bb69dd76cf66.tar.bz2
upstream-91278df70e2139cfea3357fa9053bb69dd76cf66.zip
cns3xxx: fix a ethernet driver napi poll handling bug
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48333
Diffstat (limited to 'target/linux/cns3xxx')
-rw-r--r--target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c3
1 files changed, 2 insertions, 1 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 e85e1bef9f..74a3ca0905 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
@@ -717,6 +717,7 @@ static int eth_poll(struct napi_struct *napi, int budget)
if (!received) {
napi_complete(napi);
enable_irq(sw->rx_irq);
+ budget = 0;
/* if rx descriptors are full schedule another poll */
if (rx_ring->desc[(i-1) & (RX_DESCS-1)].cown)
@@ -732,7 +733,7 @@ static int eth_poll(struct napi_struct *napi, int budget)
wmb();
enable_rx_dma(sw);
- return received;
+ return budget;
}
static void eth_set_desc(struct sw *sw, struct _tx_ring *tx_ring, int index,