Author: nbd
Date: 2016-01-18 23:38:14 +0100 (Mon, 18 Jan 2016)
New Revision: 48333

Modified:
   trunk/target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c
Log:
cns3xxx: fix a ethernet driver napi poll handling bug

Signed-off-by: Felix Fietkau <[email protected]>

Modified: 
trunk/target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c
===================================================================
--- trunk/target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c  
2016-01-18 22:38:09 UTC (rev 48332)
+++ trunk/target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c  
2016-01-18 22:38:14 UTC (rev 48333)
@@ -717,6 +717,7 @@
        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 @@
        wmb();
        enable_rx_dma(sw);
 
-       return received;
+       return budget;
 }
 
 static void eth_set_desc(struct sw *sw, struct _tx_ring *tx_ring, int index,
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to