]> asedeno.scripts.mit.edu Git - linux.git/commit
can: mcba_usb: fix device disconnect bug
authorMartin Kelly <mkelly@xevo.com>
Mon, 27 Nov 2017 23:49:16 +0000 (15:49 -0800)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 1 Dec 2017 10:27:14 +0000 (11:27 +0100)
commit1cb35a33a28394fd711bb26ddf3a564f4e9d9125
tree1cfa7d9ffc5d796da820fb9a5be9a4f5d0c2a068
parent3fed8dbbc42c0639ac03d2361ab5f0606dd49e28
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>
drivers/net/can/usb/mcba_usb.c