mxs: remove linux 3.14 support
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / patches-3.14 / 426-bcm63xx_enet-fix-napi-poll-return-value.patch
1 From d150ac8f353cb1ab59288829db006300120c9daf Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jogo@openwrt.org>
3 Date: Sat, 28 Feb 2015 20:23:13 +0100
4 Subject: [PATCH] bcm63xx_enet: fix napi poll return value
5
6 Commit d75b1ade567ffab ("net: less interrupt masking in NAPI") changed
7 the way how napi treated a returnvalue < budget, which causes hangs when
8 there there was tx_work_done, but rx_work_done is less than budget.
9
10 To fix this, return budget instead of rx_done to ensure repolling.
11
12 Signed-off-by: Jonas Gorski <jogo@openwrt.org>
13 ---
14 drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17 --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
18 +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
19 @@ -508,7 +508,7 @@ static int bcm_enet_poll(struct napi_str
20
21 if (rx_work_done >= budget || tx_work_done > 0) {
22 /* rx/tx queue is not yet empty/clean */
23 - return rx_work_done;
24 + return budget;
25 }
26
27 /* no more packet in rx/tx queue, remove device from poll