Skip to content

Commit 6a0b76c

Browse files
hayesorzdavem330
authored andcommitted
r8152: don't execute runtime suspend if the tx is not empty
Runtime suspend shouldn't be executed if the tx queue is not empty, because the device is not idle. Signed-off-by: Hayes Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7630ea4 commit 6a0b76c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/usb/r8152.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#define NETNEXT_VERSION "08"
3333

3434
/* Information for net */
35-
#define NET_VERSION "6"
35+
#define NET_VERSION "7"
3636

3737
#define DRIVER_VERSION "v1." NETNEXT_VERSION "." NET_VERSION
3838
#define DRIVER_AUTHOR "Realtek linux nic maintainers <[email protected]>"
@@ -3574,6 +3574,8 @@ static bool delay_autosuspend(struct r8152 *tp)
35743574
*/
35753575
if (!sw_linking && tp->rtl_ops.in_nway(tp))
35763576
return true;
3577+
else if (!skb_queue_empty(&tp->tx_queue))
3578+
return true;
35773579
else
35783580
return false;
35793581
}

0 commit comments

Comments
 (0)