Skip to content

Commit

Permalink
bgmac: activate irqs only if there is nothing to poll
Browse files Browse the repository at this point in the history
IRQs should only get activated when there is nothing to poll in the
queue any more and to after every poll.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hauke Mehrtens authored and David S. Miller committed Jan 19, 2015
1 parent 6216642 commit 43f159c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/broadcom/bgmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1167,10 +1167,10 @@ static int bgmac_poll(struct napi_struct *napi, int weight)
bgmac->int_status = 0;
}

if (handled < weight)
if (handled < weight) {
napi_complete(napi);

bgmac_chip_intrs_on(bgmac);
bgmac_chip_intrs_on(bgmac);
}

return handled;
}
Expand Down

0 comments on commit 43f159c

Please sign in to comment.