Commit 5fbc861a authored by hayeswang's avatar hayeswang Committed by Sasha Levin

r8152: re-schedule napi for tx

[ Upstream commit 248b213a ]

Re-schedule napi after napi_complete() for tx, if it is necessay.

In r8152_poll(), if the tx is completed after tx_bottom() and before
napi_complete(), the scheduling of napi would be lost. Then, no
one handles the next tx until the next napi_schedule() is called.
Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent 41e0083c
...@@ -1837,6 +1837,9 @@ static int r8152_poll(struct napi_struct *napi, int budget) ...@@ -1837,6 +1837,9 @@ static int r8152_poll(struct napi_struct *napi, int budget)
napi_complete(napi); napi_complete(napi);
if (!list_empty(&tp->rx_done)) if (!list_empty(&tp->rx_done))
napi_schedule(napi); napi_schedule(napi);
else if (!skb_queue_empty(&tp->tx_queue) &&
!list_empty(&tp->tx_free))
napi_schedule(napi);
} }
return work_done; return work_done;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment