diff options
author | Hemmo Nieminen <hemmo.nieminen@iki.fi> | 2016-02-19 21:02:24 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-20 15:18:33 -0800 |
commit | b900d5793733c2035324051934be2cb3b714ba46 (patch) | |
tree | 990d6b6e353f856eabedea7b530891e3d7df77e4 /drivers/staging | |
parent | f99ca86646cf7dea405af114f182cf7cbbe4d0f6 (diff) | |
download | linux-b900d5793733c2035324051934be2cb3b714ba46.tar.gz linux-b900d5793733c2035324051934be2cb3b714ba46.tar.bz2 linux-b900d5793733c2035324051934be2cb3b714ba46.zip |
staging: rtl8712: Improve suspend/resume functionality.
Fix a driver hang caused by earlier suspend/resume cycles. By handling a
ENODEV error during suspend as a real error we eventually end up stopping
the whole driver.
Fix this by handling the ENODEV error (during suspend) essentially by
retrying.
Signed-off-by: Hemmo Nieminen <hemmo.nieminen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rtl8712/usb_ops_linux.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/staging/rtl8712/usb_ops_linux.c b/drivers/staging/rtl8712/usb_ops_linux.c index e77be2af62fa..c2ac5818a18d 100644 --- a/drivers/staging/rtl8712/usb_ops_linux.c +++ b/drivers/staging/rtl8712/usb_ops_linux.c @@ -228,16 +228,18 @@ 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: padapter->bDriverStopped = true; break; + case -ENOENT: + if (!padapter->bSuspended) { + padapter->bDriverStopped = true; + break; + } + /* Fall through. */ case -EPROTO: precvbuf->reuse = true; r8712_read_port(padapter, precvpriv->ff_hwaddr, 0, |