Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Hemmo Nieminen and committed by
Greg Kroah-Hartman
b900d579 f99ca866

+6 -4
+6 -4
drivers/staging/rtl8712/usb_ops_linux.c
··· 228 228 } 229 229 } else { 230 230 switch (purb->status) { 231 - case -ENOENT: 232 - if (padapter->bSuspended) 233 - break; 234 - /* Fall through. */ 235 231 case -EINVAL: 236 232 case -EPIPE: 237 233 case -ENODEV: 238 234 case -ESHUTDOWN: 239 235 padapter->bDriverStopped = true; 240 236 break; 237 + case -ENOENT: 238 + if (!padapter->bSuspended) { 239 + padapter->bDriverStopped = true; 240 + break; 241 + } 242 + /* Fall through. */ 241 243 case -EPROTO: 242 244 precvbuf->reuse = true; 243 245 r8712_read_port(padapter, precvpriv->ff_hwaddr, 0,