提交 b7b1d202 编写于 作者: J John W. Linville 提交者: Jeff Garzik

[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: NJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
上级 6ba98d31
......@@ -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 @@ 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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册