mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-04-14 09:57:39 +02:00
r8152: check budget for r8152_poll()
[ Upstream commita7b8d60b37] According to the document of napi, there is no rx process when the budget is 0. Therefore, r8152_poll() has to return 0 directly when the budget is equal to 0. Fixes:d2187f8e44("r8152: divide the tx and rx bottom functions") Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fbdc4e9908
commit
864da4a5d5
@@ -2625,6 +2625,9 @@ static int r8152_poll(struct napi_struct *napi, int budget)
|
||||
struct r8152 *tp = container_of(napi, struct r8152, napi);
|
||||
int work_done;
|
||||
|
||||
if (!budget)
|
||||
return 0;
|
||||
|
||||
work_done = rx_bottom(tp, budget);
|
||||
|
||||
if (work_done < budget) {
|
||||
|
||||
Reference in New Issue
Block a user