summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/amd/amd8111e.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-03-14 22:53:35 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-14 22:53:35 -0400
commite7ef085d0a9dc1cc72e7d8108ed3b4e1a5e8d938 (patch)
treef8ae35945d4100401117f32d27d776c16c0cd086 /drivers/net/ethernet/amd/amd8111e.c
parent1c79a5a8f4faec88f9f4632d0ef9b0365bff8e28 (diff)
parent75363a4676cdb046242d06dca6e8a9c0a20d6c4a (diff)
Merge branch 'napi_budget_zero'
Eric W. Biederman says: ==================== Don't receive packets when the napi budget == 0 After reading through all 120 drivers supporting netpoll I have found 16 more that process at least received packet when the napi budget == 0. Processing more packets than your budget has always been a bug but we haven't cared before so it looks like these drivers slipped through, and need fixes. As netpoll will shortly be using a budget of 0 to get the tx queue processing with the rx queue processing we now care. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/amd8111e.c')
-rw-r--r--drivers/net/ethernet/amd/amd8111e.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c
index 2061b471fd16..26efaaa5e73f 100644
--- a/drivers/net/ethernet/amd/amd8111e.c
+++ b/drivers/net/ethernet/amd/amd8111e.c
@@ -720,6 +720,9 @@ static int amd8111e_rx_poll(struct napi_struct *napi, int budget)
int rx_pkt_limit = budget;
unsigned long flags;
+ if (rx_pkt_limit <= 0)
+ goto rx_not_empty;
+
do{
/* process receive packets until we use the quota*/
/* If we own the next entry, it's a new packet. Send it up. */