All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/5] staging: vt6656: s_nsInterruptUsbIoCompleteRead add urb status returns
@ 2014-02-17 21:16 Malcolm Priestley
  0 siblings, 0 replies; only message in thread
From: Malcolm Priestley @ 2014-02-17 21:16 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless

Drop out of urb return on usb errors and set intBuf.bInUse to false.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/usbpipe.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index 258eec1..d18cb2f 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -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);
-- 
1.9.rc1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-17 21:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-17 21:16 [PATCH 2/5] staging: vt6656: s_nsInterruptUsbIoCompleteRead add urb status returns Malcolm Priestley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.