summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712/usb_ops_linux.c
diff options
context:
space:
mode:
authorHemmo Nieminen2015-12-03 23:11:32 +0100
committerGreg Kroah-Hartman2016-02-08 04:52:30 +0100
commit39e9526cec50358725d6f68f271b35c041986800 (patch)
tree32d75ee059a0355243a9517afe86881525781e4f /drivers/staging/rtl8712/usb_ops_linux.c
parentstaging: rtl8712: Cleanup _io_ops wrappers (diff)
downloadkernel-qcow2-linux-39e9526cec50358725d6f68f271b35c041986800.tar.gz
kernel-qcow2-linux-39e9526cec50358725d6f68f271b35c041986800.tar.xz
kernel-qcow2-linux-39e9526cec50358725d6f68f271b35c041986800.zip
staging: rtl8712: Improve suspend/resume functionality.
Cancel pending URBs during suspend operation to avoid receiving ESHUTDOWN in read/write completion callbacks while the device is suspended. Receiving ESHUTDOWN in read/write completion callbacks will cause the driver to enter a non-functioning "stopped" state from which the driver is unable to recover without reloading the module. Signed-off-by: Hemmo Nieminen <hemmo.nieminen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/usb_ops_linux.c')
-rw-r--r--drivers/staging/rtl8712/usb_ops_linux.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/rtl8712/usb_ops_linux.c b/drivers/staging/rtl8712/usb_ops_linux.c
index 489a9e6d52fc..e77be2af62fa 100644
--- a/drivers/staging/rtl8712/usb_ops_linux.c
+++ b/drivers/staging/rtl8712/usb_ops_linux.c
@@ -228,11 +228,14 @@ static void r8712_usb_read_port_complete(struct urb *purb)
}
} else {
switch (purb->status) {
+ case -ENOENT:
+ if (padapter->bSuspended)
+ break;
+ /* Fall through. */
case -EINVAL:
case -EPIPE:
case -ENODEV:
case -ESHUTDOWN:
- case -ENOENT:
padapter->bDriverStopped = true;
break;
case -EPROTO: