提交 9a3de255 编写于 作者: J Jarek Poplawski 提交者: David S. Miller

drivers/net: starfire: Fix napi ->poll() weight handling

starfire napi ->poll() handler can return work == weight after calling
netif_rx_complete() (if there is no more work). It is illegal and this
patch fixes it.
Reported-by: NAlexander Huemer <alexander.huemer@sbg.ac.at>
Tested-by: NAlexander Huemer <alexander.huemer@sbg.ac.at>
Signed-off-by: NJarek Poplawski <jarkao2@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 bb5f133d
......@@ -1509,6 +1509,11 @@ static int __netdev_rx(struct net_device *dev, int *quota)
desc->status = 0;
np->rx_done = (np->rx_done + 1) % DONE_Q_SIZE;
}
if (*quota == 0) { /* out of rx quota */
retcode = 1;
goto out;
}
writew(np->rx_done, np->base + CompletionQConsumerIdx);
out:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册