Skip to content

Commit a4877e5

Browse files
hayesorzgregkh
authored andcommitted
r8152: re-schedule napi for tx
[ Upstream commit 248b213ad908b88db15941202ef7cb7eb137c1a0 ] 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: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 10bfb4c commit a4877e5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/net/usb/r8152.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,6 +1851,9 @@ static int r8152_poll(struct napi_struct *napi, int budget)
18511851
napi_complete(napi);
18521852
if (!list_empty(&tp->rx_done))
18531853
napi_schedule(napi);
1854+
else if (!skb_queue_empty(&tp->tx_queue) &&
1855+
!list_empty(&tp->tx_free))
1856+
napi_schedule(napi);
18541857
}
18551858

18561859
return work_done;

0 commit comments

Comments
 (0)