summaryrefslogtreecommitdiff
path: root/drivers/net/can/usb
diff options
context:
space:
mode:
authorMartin Kelly <mkelly@xevo.com>2017-11-28 02:49:16 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2017-12-01 13:27:14 +0300
commit1cb35a33a28394fd711bb26ddf3a564f4e9d9125 (patch)
tree1cfa7d9ffc5d796da820fb9a5be9a4f5d0c2a068 /drivers/net/can/usb
parent3fed8dbbc42c0639ac03d2361ab5f0606dd49e28 (diff)
downloadlinux-1cb35a33a28394fd711bb26ddf3a564f4e9d9125.tar.xz
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>
Diffstat (limited to 'drivers/net/can/usb')
-rw-r--r--drivers/net/can/usb/mcba_usb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/usb/mcba_usb.c b/drivers/net/can/usb/mcba_usb.c
index c4355f0a20d5..ef417dcddbf7 100644
--- a/drivers/net/can/usb/mcba_usb.c
+++ b/drivers/net/can/usb/mcba_usb.c
@@ -592,6 +592,7 @@ static void mcba_usb_read_bulk_callback(struct urb *urb)
break;
case -ENOENT:
+ case -EPIPE:
case -ESHUTDOWN:
return;