* [patch 2.6.14-rc3] epic100: fix counting of work_done in epic_poll
@ 2005-10-19 1:31 John W. Linville
2005-10-19 2:26 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: John W. Linville @ 2005-10-19 1:31 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: jgarzik
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>
---
drivers/net/epic100.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c
--- a/drivers/net/epic100.c
+++ b/drivers/net/epic100.c
@@ -1334,7 +1334,7 @@ static void epic_rx_err(struct net_devic
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 2.6.14-rc3] epic100: fix counting of work_done in epic_poll
2005-10-19 1:31 [patch 2.6.14-rc3] epic100: fix counting of work_done in epic_poll John W. Linville
@ 2005-10-19 2:26 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2005-10-19 2:26 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-kernel, netdev
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-10-19 2:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-19 1:31 [patch 2.6.14-rc3] epic100: fix counting of work_done in epic_poll John W. Linville
2005-10-19 2:26 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).