diff options
author | Martin Kelly <mkelly@xevo.com> | 2017-11-27 15:49:16 -0800 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2017-12-01 11:27:14 +0100 |
commit | 1cb35a33a28394fd711bb26ddf3a564f4e9d9125 (patch) | |
tree | 1cfa7d9ffc5d796da820fb9a5be9a4f5d0c2a068 /drivers/net | |
parent | 3fed8dbbc42c0639ac03d2361ab5f0606dd49e28 (diff) |
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')
-rw-r--r-- | drivers/net/can/usb/mcba_usb.c | 1 |
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; |