cns3xxx: fix a ethernet driver napi poll handling bug

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48333
owl
Felix Fietkau 2016-01-18 22:38:14 +00:00
parent 136747c564
commit 91278df70e
1 changed files with 2 additions and 1 deletions

View File

@ -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,