staging: vt6656: s_nsInterruptUsbIoCompleteRead add urb status returns

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>
This commit is contained in:
Malcolm Priestley 2014-02-17 21:16:20 +00:00 committed by Greg Kroah-Hartman
parent 247b4b68b1
commit c98fbf9075
1 changed files with 13 additions and 0 deletions

View 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);