kernel: backport rest of bgmac patches to 4.0
[openwrt/openwrt.git] / target / linux / generic / patches-4.0 / 072-15-bgmac-fix-requests-for-extra-polling-calls-from-NAPI.patch
1 From 047f89922c6381432501f248d08226ff9adc4ee3 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
3 Date: Thu, 23 Apr 2015 20:45:25 +0200
4 Subject: [PATCH][FIX 4.1] bgmac: fix requests for extra polling calls from
5 NAPI
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 After d75b1ade567f ("net: less interrupt masking in NAPI") polling
11 function has to return whole budget when it wants NAPI to call it again.
12
13 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
14 Cc: Felix Fietkau <nbd@openwrt.org>
15 Fixes: eb64e2923a886 ("bgmac: leave interrupts disabled as long as there is work to do")
16 ---
17 drivers/net/ethernet/broadcom/bgmac.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20 diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
21 index de77d3a..21e3c38 100644
22 --- a/drivers/net/ethernet/broadcom/bgmac.c
23 +++ b/drivers/net/ethernet/broadcom/bgmac.c
24 @@ -1260,7 +1260,7 @@ static int bgmac_poll(struct napi_struct *napi, int weight)
25
26 /* Poll again if more events arrived in the meantime */
27 if (bgmac_read(bgmac, BGMAC_INT_STATUS) & (BGMAC_IS_TX0 | BGMAC_IS_RX))
28 - return handled;
29 + return weight;
30
31 if (handled < weight) {
32 napi_complete(napi);
33 --
34 1.8.4.5
35