summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorhayeswang <hayeswang@realtek.com>2017-01-26 01:38:33 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-17 04:41:55 (GMT)
commit9507910ca46d5b549198a6bf1787e3db5b3a651b (patch)
tree3a6b036267439b514d8e1a7ac16b7cb554d6fb0b /drivers
parent4242f0bce47e744d28b3c98c34f5c792fefb62ef (diff)
downloadlinux-9507910ca46d5b549198a6bf1787e3db5b3a651b.tar.xz
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/usb/r8152.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 32f1a4c..8b8343b 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -1936,6 +1936,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;