[patch 2.6.14-rc3] epic100: fix counting of work_done in epic_poll
From: John W. Linville (linville_at_tuxdriver.com)
Date: 10/19/05
- Previous message: John W. Linville: "[patch 2.6.14-rc3 3/3] sundance: expand reset mask"
- Next in thread: Jeff Garzik: "Re: [patch 2.6.14-rc3] epic100: fix counting of work_done in epic_poll"
- Reply: Jeff Garzik: "Re: [patch 2.6.14-rc3] epic100: fix counting of work_done in epic_poll"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 18 Oct 2005 21:31:01 -0400 To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: John W. Linville: "[patch 2.6.14-rc3 3/3] sundance: expand reset mask"
- Next in thread: Jeff Garzik: "Re: [patch 2.6.14-rc3] epic100: fix counting of work_done in epic_poll"
- Reply: Jeff Garzik: "Re: [patch 2.6.14-rc3] epic100: fix counting of work_done in epic_poll"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|