summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorhayeswang <hayeswang@realtek.com>2017-01-23 14:18:43 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-04 09:45:09 +0100
commite674c70bafe78f96ca63b645b7881744c82b5586 (patch)
treed03313821ee79d6bd41d297ad38a51df6b75ae0c /drivers
parent980b9afd9eccc113edbba359d361ff4c89ab3607 (diff)
r8152: don't execute runtime suspend if the tx is not empty
[ Upstream commit 6a0b76c04ec157c88ca943debf78a8ee58469f2d ] Runtime suspend shouldn't be executed if the tx queue is not empty, because the device is not idle. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/usb/r8152.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index ed512a41c5c9..fbb1867ff25c 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -3442,6 +3442,8 @@ static bool delay_autosuspend(struct r8152 *tp)
*/
if (!sw_linking && tp->rtl_ops.in_nway(tp))
return true;
+ else if (!skb_queue_empty(&tp->tx_queue))
+ return true;
else
return false;
}