diff options
author | hayeswang <hayeswang@realtek.com> | 2017-01-26 09:38:33 +0800 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2017-06-25 22:02:21 -0400 |
commit | 5fbc861ad7eba34a9d27408797c912d104f3da1f (patch) | |
tree | 26113b50cc5ffd6a8d0551972a6874aa865d3bf3 /drivers/net | |
parent | 41e0083c7ddbfe9137471ddabdbd72c2ef4d27bc (diff) |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/usb/r8152.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index ce6fad1c43e6..e387af61e0d3 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -1837,6 +1837,9 @@ static int r8152_poll(struct napi_struct *napi, int budget) napi_complete(napi); if (!list_empty(&tp->rx_done)) napi_schedule(napi); + else if (!skb_queue_empty(&tp->tx_queue) && + !list_empty(&tp->tx_free)) + napi_schedule(napi); } return work_done; |