Skip to content

Commit

Permalink
[PATCH] epic100: fix counting of work_done in epic_poll
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
John W. Linville authored and Jeff Garzik committed Oct 19, 2005
1 parent 6ba98d3 commit b7b1d20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/epic100.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -1343,7 +1343,7 @@ static int epic_poll(struct net_device *dev, int *budget)

epic_tx(dev, ep);

work_done = epic_rx(dev, *budget);
work_done += epic_rx(dev, *budget);

epic_rx_err(dev, ep);

Expand Down

0 comments on commit b7b1d20

Please sign in to comment.