From: Martin Kelly <mkelly@xevo.com>
To: linux-can@vger.kernel.org
Cc: "Marc Kleine-Budde" <mkl@pengutronix.de>,
"Wolfgang Grandegger" <wg@grandegger.com>,
"Stefan Mätje" <Stefan.Maetje@esd.eu>,
"Jimmy Assarsson" <jimmyassarsson@gmail.com>,
"Martin Kelly" <mkelly@xevo.com>
Subject: [PATCH 0/4] URB disconnect bug fixes
Date: Tue, 5 Dec 2017 11:15:46 -0800 [thread overview]
Message-ID: <20171205191550.703-1-mkelly@xevo.com> (raw)
This patch series is to fix a common bug I found in mcba_usb that appears to
also exist in these drivers. Because I don't own the hardware, I cannot test the
changes, but I wanted to send the change so that others could do so.
The bug is that, when you disconnect the device, you get -EPIPE and -EPROTO
error codes (exactly which depends on the timing and the system) in the URB read
callback. The driver then resubmits the URB, which immediately fails because the
device is unplugged. On a slower system like a Raspberry Pi, this can cause a
kernel stall, while on a desktop, the disconnect code runs fast enough to
prevent a stall and it's easy not to notice the issue.
Fix this by not resubmitting an URB that receives an -EPIPE/-EPROTO code.
Martin Kelly (4):
can: ems_usb: cancel urb on -EPIPE and -EPROTO
can: esd_usb2: cancel urb on -EPIPE and -EPROTO
can: kvaser_usb: cancel urb on -EPIPE and -EPROTO
can: usb_8dev: cancel urb on -EPIPE and -EPROTO
drivers/net/can/usb/ems_usb.c | 2 ++
drivers/net/can/usb/esd_usb2.c | 2 ++
drivers/net/can/usb/kvaser_usb.c | 2 ++
drivers/net/can/usb/usb_8dev.c | 2 ++
4 files changed, 8 insertions(+)
--
2.11.0
next reply other threads:[~2017-12-05 19:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-05 19:15 Martin Kelly [this message]
2017-12-05 19:15 ` [PATCH 1/4] can: ems_usb: cancel urb on -EPIPE and -EPROTO Martin Kelly
2017-12-05 19:15 ` [PATCH 2/4] can: esd_usb2: " Martin Kelly
2017-12-05 19:15 ` [PATCH 3/4] can: kvaser_usb: " Martin Kelly
2017-12-05 19:15 ` [PATCH 4/4] can: usb_8dev: " Martin Kelly
2017-12-06 9:20 ` [PATCH 0/4] URB disconnect bug fixes Marc Kleine-Budde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171205191550.703-1-mkelly@xevo.com \
--to=mkelly@xevo.com \
--cc=Stefan.Maetje@esd.eu \
--cc=jimmyassarsson@gmail.com \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=wg@grandegger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox