Commit b900d579 authored by Hemmo Nieminen's avatar Hemmo Nieminen Committed by Greg Kroah-Hartman

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: default avatarHemmo Nieminen <hemmo.nieminen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f99ca866
...@@ -228,16 +228,18 @@ static void r8712_usb_read_port_complete(struct urb *purb) ...@@ -228,16 +228,18 @@ static void r8712_usb_read_port_complete(struct urb *purb)
} }
} else { } else {
switch (purb->status) { switch (purb->status) {
case -ENOENT:
if (padapter->bSuspended)
break;
/* Fall through. */
case -EINVAL: case -EINVAL:
case -EPIPE: case -EPIPE:
case -ENODEV: case -ENODEV:
case -ESHUTDOWN: case -ESHUTDOWN:
padapter->bDriverStopped = true; padapter->bDriverStopped = true;
break; break;
case -ENOENT:
if (!padapter->bSuspended) {
padapter->bDriverStopped = true;
break;
}
/* Fall through. */
case -EPROTO: case -EPROTO:
precvbuf->reuse = true; precvbuf->reuse = true;
r8712_read_port(padapter, precvpriv->ff_hwaddr, 0, r8712_read_port(padapter, precvpriv->ff_hwaddr, 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment