diff options
author | hayeswang <hayeswang@realtek.com> | 2017-01-23 14:18:43 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-04 09:47:10 +0100 |
commit | 37b27b20a8a948ce5dfbd6e47272fd59e8bd0232 (patch) | |
tree | 2bb1ee94e9dfddbac75e5684638a7fbbdf6f2c67 /drivers/net | |
parent | ad864d9fce0ec56cc8f6afe5c6a0e6d7f484b9eb (diff) | |
download | linux-rpi3-37b27b20a8a948ce5dfbd6e47272fd59e8bd0232.tar.gz linux-rpi3-37b27b20a8a948ce5dfbd6e47272fd59e8bd0232.tar.bz2 linux-rpi3-37b27b20a8a948ce5dfbd6e47272fd59e8bd0232.zip |
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/net')
-rw-r--r-- | drivers/net/usb/r8152.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index be4c86faba4f..90b426c5ffce 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -32,7 +32,7 @@ #define NETNEXT_VERSION "08" /* Information for net */ -#define NET_VERSION "6" +#define NET_VERSION "7" #define DRIVER_VERSION "v1." NETNEXT_VERSION "." NET_VERSION #define DRIVER_AUTHOR "Realtek linux nic maintainers <nic_swsd@realtek.com>" @@ -3572,6 +3572,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; } |