Commit 67638980 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: s_nsBulkInUsbIoCompleteRead Replace error handling.

Use switch on urb->status
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1882c19c
...@@ -473,21 +473,22 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb) ...@@ -473,21 +473,22 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkInUsbIoCompleteRead\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkInUsbIoCompleteRead\n");
if (urb->status) { switch (urb->status) {
pDevice->ulBulkInError++; case 0:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BULK In failed %d\n", urb->status); pDevice->ulBulkInContCRCError = 0;
//todo...xxxxxx pDevice->ulBulkInBytesRead += urb->actual_length;
// if (status == USBD_STATUS_CRC) { break;
// pDevice->ulBulkInContCRCError++; case -ECONNRESET:
// } case -ENOENT:
// if (status == STATUS_DEVICE_NOT_CONNECTED ) case -ESHUTDOWN:
// { return;
// MP_SET_FLAG(pDevice, fMP_DISCONNECTED); case -ETIMEDOUT:
// } default:
} else { pDevice->ulBulkInError++;
pDevice->ulBulkInContCRCError = 0; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
pDevice->ulBulkInBytesRead += urb->actual_length; "BULK In failed %d\n", urb->status);
} break;
}
if (urb->actual_length) { if (urb->actual_length) {
spin_lock(&pDevice->lock); spin_lock(&pDevice->lock);
......
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