can: mcba_usb: fix device disconnect bug
Currently, when you disconnect the device, the driver infinitely resubmits all URBs, so you see: Rx URB aborted (-32) in an infinite loop. Fix this by catching -EPIPE (what we get in urb->status when the device disconnects) and not resubmitting. With this patch, I can plug and unplug many times and the driver recovers correctly. Signed-off-by: Martin Kelly <mkelly@xevo.com> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
3fed8dbbc4
commit
1cb35a33a2
|
@ -592,6 +592,7 @@ static void mcba_usb_read_bulk_callback(struct urb *urb)
|
|||
break;
|
||||
|
||||
case -ENOENT:
|
||||
case -EPIPE:
|
||||
case -ESHUTDOWN:
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue