1
0

071-bgmac-activate-irqs-only-if-there-is-nothing-to-poll.patch 885 B

123456789101112131415161718192021222324252627282930
  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. IRQs should only get activated when there is nothing to poll in the
  6. queue any more and to after every poll.
  7. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
  8. Signed-off-by: David S. Miller <davem@davemloft.net>
  9. ---
  10. drivers/net/ethernet/broadcom/bgmac.c | 6 +++---
  11. 1 file changed, 3 insertions(+), 3 deletions(-)
  12. --- a/drivers/net/ethernet/broadcom/bgmac.c
  13. +++ b/drivers/net/ethernet/broadcom/bgmac.c
  14. @@ -1167,10 +1167,10 @@ static int bgmac_poll(struct napi_struct
  15. bgmac->int_status = 0;
  16. }
  17. - if (handled < weight)
  18. + if (handled < weight) {
  19. napi_complete(napi);
  20. -
  21. - bgmac_chip_intrs_on(bgmac);
  22. + bgmac_chip_intrs_on(bgmac);
  23. + }
  24. return handled;
  25. }