diff options
author | Jonas Gorski <jogo@openwrt.org> | 2015-02-28 19:59:46 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2015-02-28 19:59:46 +0000 |
commit | 0dbd48d3ca7310017d53f8a3f6b2e84f946bd06d (patch) | |
tree | 833aebd15cefbc4894d84aad80f06e0d8ef243f1 | |
parent | 479b835df802a2ca6df7d5e8bb0e617022439dcb (diff) | |
download | upstream-0dbd48d3ca7310017d53f8a3f6b2e84f946bd06d.tar.gz upstream-0dbd48d3ca7310017d53f8a3f6b2e84f946bd06d.tar.bz2 upstream-0dbd48d3ca7310017d53f8a3f6b2e84f946bd06d.zip |
brcm63xx: fix ethernet breakage in 3.18
Linux commit d75b1ade567ffab ("net: less interrupt masking in NAPI")
chose the samantics of the napi poll return value, which caused napi to
not resume interrups/polling anymore.
Fix the return value to restore expected behaviour.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44576 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | target/linux/brcm63xx/patches-3.14/426-bcm63xx_enet-fix-napi-poll-return-value.patch | 27 | ||||
-rw-r--r-- | target/linux/brcm63xx/patches-3.18/426-bcm63xx_enet-fix-napi-poll-return-value.patch | 27 |
2 files changed, 54 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-3.14/426-bcm63xx_enet-fix-napi-poll-return-value.patch b/target/linux/brcm63xx/patches-3.14/426-bcm63xx_enet-fix-napi-poll-return-value.patch new file mode 100644 index 0000000000..af34c23ea4 --- /dev/null +++ b/target/linux/brcm63xx/patches-3.14/426-bcm63xx_enet-fix-napi-poll-return-value.patch @@ -0,0 +1,27 @@ +From d150ac8f353cb1ab59288829db006300120c9daf Mon Sep 17 00:00:00 2001 +From: Jonas Gorski <jogo@openwrt.org> +Date: Sat, 28 Feb 2015 20:23:13 +0100 +Subject: [PATCH] bcm63xx_enet: fix napi poll return value + +Commit d75b1ade567ffab ("net: less interrupt masking in NAPI") changed +the way how napi treated a returnvalue < budget, which causes hangs when +there there was tx_work_done, but rx_work_done is less than budget. + +To fix this, return budget instead of rx_done to ensure repolling. + +Signed-off-by: Jonas Gorski <jogo@openwrt.org> +--- + drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c ++++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c +@@ -508,7 +508,7 @@ static int bcm_enet_poll(struct napi_str + + if (rx_work_done >= budget || tx_work_done > 0) { + /* rx/tx queue is not yet empty/clean */ +- return rx_work_done; ++ return budget; + } + + /* no more packet in rx/tx queue, remove device from poll diff --git a/target/linux/brcm63xx/patches-3.18/426-bcm63xx_enet-fix-napi-poll-return-value.patch b/target/linux/brcm63xx/patches-3.18/426-bcm63xx_enet-fix-napi-poll-return-value.patch new file mode 100644 index 0000000000..af34c23ea4 --- /dev/null +++ b/target/linux/brcm63xx/patches-3.18/426-bcm63xx_enet-fix-napi-poll-return-value.patch @@ -0,0 +1,27 @@ +From d150ac8f353cb1ab59288829db006300120c9daf Mon Sep 17 00:00:00 2001 +From: Jonas Gorski <jogo@openwrt.org> +Date: Sat, 28 Feb 2015 20:23:13 +0100 +Subject: [PATCH] bcm63xx_enet: fix napi poll return value + +Commit d75b1ade567ffab ("net: less interrupt masking in NAPI") changed +the way how napi treated a returnvalue < budget, which causes hangs when +there there was tx_work_done, but rx_work_done is less than budget. + +To fix this, return budget instead of rx_done to ensure repolling. + +Signed-off-by: Jonas Gorski <jogo@openwrt.org> +--- + drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c ++++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c +@@ -508,7 +508,7 @@ static int bcm_enet_poll(struct napi_str + + if (rx_work_done >= budget || tx_work_done > 0) { + /* rx/tx queue is not yet empty/clean */ +- return rx_work_done; ++ return budget; + } + + /* no more packet in rx/tx queue, remove device from poll |