ramips: fix cd-poll sd card remove randomly
[openwrt/staging/chunkeey.git] / target / linux / generic / patches-3.18 / 071-bgmac-activate-irqs-only-if-there-is-nothing-to-poll.patch
1 From 43f159c60a99318b1ef7d1d7c16c4dfdd06bfd90 Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Sun, 18 Jan 2015 19:49:59 +0100
4 Subject: [PATCH] bgmac: activate irqs only if there is nothing to poll
5
6 IRQs should only get activated when there is nothing to poll in the
7 queue any more and to after every poll.
8
9 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
10 Signed-off-by: David S. Miller <davem@davemloft.net>
11 ---
12 drivers/net/ethernet/broadcom/bgmac.c | 6 +++---
13 1 file changed, 3 insertions(+), 3 deletions(-)
14
15 --- a/drivers/net/ethernet/broadcom/bgmac.c
16 +++ b/drivers/net/ethernet/broadcom/bgmac.c
17 @@ -1167,10 +1167,10 @@ static int bgmac_poll(struct napi_struct
18 bgmac->int_status = 0;
19 }
20
21 - if (handled < weight)
22 + if (handled < weight) {
23 napi_complete(napi);
24 -
25 - bgmac_chip_intrs_on(bgmac);
26 + bgmac_chip_intrs_on(bgmac);
27 + }
28
29 return handled;
30 }