[OpenWrt-Devel] [PATCH 1/2] ar71xx: fix ethernet for 4.0
Roman Yeryomin
leroi.lists at gmail.com
Sun Jun 14 13:15:13 EDT 2015
Tested on UAP-PRO. Doesn't break 3.18
Signed-off-by: Roman Yeryomin <roman at advem.lv>
---
.../files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index 5ef324e..269be75 100644
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -1060,12 +1060,16 @@ static int ag71xx_poll(struct napi_struct *napi, int limit)
}
if (rx_done < limit) {
- if (status & RX_STATUS_PR)
+ if (status & RX_STATUS_PR) {
+ rx_done = limit;
goto more;
+ }
status = ag71xx_rr(ag, AG71XX_REG_TX_STATUS);
- if (status & TX_STATUS_PS)
+ if (status & TX_STATUS_PS) {
+ rx_done = limit;
goto more;
+ }
DBG("%s: disable polling mode, rx=%d, tx=%d,limit=%d\n",
dev->name, rx_done, tx_done, limit);
--
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list