From: John W. Linville Date: Wed, 19 Oct 2005 01:31:01 +0000 (-0400) Subject: [PATCH] epic100: fix counting of work_done in epic_poll X-Git-Tag: v2.6.15-rc1~733^2~1^2~20 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7b1d2021452d0a3562807b6a90dfa5124147a79;p=linux-2.6 [PATCH] epic100: fix counting of work_done in epic_poll work_done is overwritten each time through the rx_action loop in epic_poll. This screws-up the NAPI accounting if the loop is executed more than once. Signed-off-by: John W. Linville Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c index 87f522738b..f119ec4e89 100644 --- a/drivers/net/epic100.c +++ b/drivers/net/epic100.c @@ -1334,7 +1334,7 @@ static void epic_rx_err(struct net_device *dev, struct epic_private *ep) static int epic_poll(struct net_device *dev, int *budget) { struct epic_private *ep = dev->priv; - int work_done, orig_budget; + int work_done = 0, orig_budget; long ioaddr = dev->base_addr; orig_budget = (*budget > dev->quota) ? dev->quota : *budget; @@ -1343,7 +1343,7 @@ rx_action: epic_tx(dev, ep); - work_done = epic_rx(dev, *budget); + work_done += epic_rx(dev, *budget); epic_rx_err(dev, ep);