aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2005-10-18 21:31:01 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-18 22:26:01 -0400
commitb7b1d2021452d0a3562807b6a90dfa5124147a79 (patch)
tree9c18a41353b2d40dfa844e955619e7d931ce853d /drivers/net
parent6ba98d311d0a4ff7dc36d8f435ce60174f4c30ec (diff)
[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 <linville@tuxdriver.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/epic100.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c
index 87f522738bfc..f119ec4e89ea 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)
1334static int epic_poll(struct net_device *dev, int *budget) 1334static int epic_poll(struct net_device *dev, int *budget)
1335{ 1335{
1336 struct epic_private *ep = dev->priv; 1336 struct epic_private *ep = dev->priv;
1337 int work_done, orig_budget; 1337 int work_done = 0, orig_budget;
1338 long ioaddr = dev->base_addr; 1338 long ioaddr = dev->base_addr;
1339 1339
1340 orig_budget = (*budget > dev->quota) ? dev->quota : *budget; 1340 orig_budget = (*budget > dev->quota) ? dev->quota : *budget;
@@ -1343,7 +1343,7 @@ rx_action:
1343 1343
1344 epic_tx(dev, ep); 1344 epic_tx(dev, ep);
1345 1345
1346 work_done = epic_rx(dev, *budget); 1346 work_done += epic_rx(dev, *budget);
1347 1347
1348 epic_rx_err(dev, ep); 1348 epic_rx_err(dev, ep);
1349 1349