mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-04 20:23:04 +09:00
can: mcba_usb: fix device disconnect bug
commit 1cb35a33a2 upstream.
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>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4dc9c1cfa9
commit
ba4eed1bd4
@@ -592,6 +592,7 @@ static void mcba_usb_read_bulk_callback(struct urb *urb)
|
||||
break;
|
||||
|
||||
case -ENOENT:
|
||||
case -EPIPE:
|
||||
case -ESHUTDOWN:
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user