staging: vt6656: s_nsInterruptUsbIoCompleteRead add urb status returns
authorMalcolm Priestley <tvboxspy@gmail.com>
Mon, 17 Feb 2014 21:16:20 +0000 (21:16 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Feb 2014 19:01:01 +0000 (11:01 -0800)
Drop out of urb return on usb errors and set intBuf.bInUse to false.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/usbpipe.c

index 258eec13b8dfdebe583f8ba156d7867311408f5e..d18cb2f0fb41965323b76e6a6927a9f5b6d7837b 100644 (file)
@@ -364,6 +364,19 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb)
     //      4) The irp was cancelled.
     //      5) Some other failure from the USB device object.
     //
+       switch (urb->status) {
+       case 0:
+       case -ETIMEDOUT:
+               break;
+       case -ECONNRESET:
+       case -ENOENT:
+       case -ESHUTDOWN:
+               pDevice->intBuf.bInUse = false;
+               return;
+       default:
+               break;
+       }
+
     ntStatus = urb->status;
 
     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_nsInterruptUsbIoCompleteRead Status %d\n", ntStatus);