Skip to content

Commit e674c70

Browse files
hayesorzgregkh
authored andcommitted
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>
1 parent 980b9af commit e674c70

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/net/usb/r8152.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3442,6 +3442,8 @@ static bool delay_autosuspend(struct r8152 *tp)
34423442
*/
34433443
if (!sw_linking && tp->rtl_ops.in_nway(tp))
34443444
return true;
3445+
else if (!skb_queue_empty(&tp->tx_queue))
3446+
return true;
34453447
else
34463448
return false;
34473449
}

0 commit comments

Comments
 (0)