[OpenWrt-Devel] [PATCH 7/7] ramips: fix for kernel 4.0 napi repoll need return budgets number

Michael Lee igvtee at gmail.com
Tue Sep 22 09:26:03 EDT 2015


From: michael lee <igvtee at gmail.com>

Signed-off-by: Michael Lee <igvtee at gmail.com>
---
 .../linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
index 4b31b56..608b16a 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
@@ -984,8 +984,11 @@ static int fe_poll(struct napi_struct *napi, int budget)
 
 	if (!tx_again && (rx_done < budget)) {
 		status = fe_reg_r32(FE_REG_FE_INT_STATUS);
-		if (status & (tx_intr | rx_intr ))
+		if (status & (tx_intr | rx_intr)) {
+			/* let napi poll again */
+			rx_done = budget;
 			goto poll_again;
+		}
 
 		napi_complete(napi);
 		fe_int_enable(tx_intr | rx_intr);
-- 
2.3.6
_______________________________________________
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