From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, linux-can@vger.kernel.org,
kernel@pengutronix.de, Martin Kelly <mkelly@xevo.com>,
linux-stable <stable@vger.kernel.org>,
Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH 5/6] can: usb_8dev: cancel urb on -EPIPE and -EPROTO
Date: Fri, 8 Dec 2017 16:58:16 +0100 [thread overview]
Message-ID: <20171208155817.9364-6-mkl@pengutronix.de> (raw)
In-Reply-To: <20171208155817.9364-1-mkl@pengutronix.de>
From: Martin Kelly <mkelly@xevo.com>
In mcba_usb, we have observed that when you unplug the device, the driver will
endlessly resubmit failing URBs, which can cause CPU stalls. This issue
is fixed in mcba_usb by catching the codes seen on device disconnect
(-EPIPE and -EPROTO).
This driver also resubmits in the case of -EPIPE and -EPROTO, so fix it
in the same way.
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/usb_8dev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/can/usb/usb_8dev.c b/drivers/net/can/usb/usb_8dev.c
index d000cb62d6ae..27861c417c94 100644
--- a/drivers/net/can/usb/usb_8dev.c
+++ b/drivers/net/can/usb/usb_8dev.c
@@ -524,6 +524,8 @@ static void usb_8dev_read_bulk_callback(struct urb *urb)
break;
case -ENOENT:
+ case -EPIPE:
+ case -EPROTO:
case -ESHUTDOWN:
return;
--
2.15.0
next prev parent reply other threads:[~2017-12-08 15:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-08 15:58 pull-request: can 2017-12-08 Marc Kleine-Budde
2017-12-08 15:58 ` [PATCH 1/6] can: mcba_usb: cancel urb on -EPROTO Marc Kleine-Budde
2017-12-08 15:58 ` [PATCH 2/6] can: ems_usb: cancel urb on -EPIPE and -EPROTO Marc Kleine-Budde
2017-12-08 15:58 ` [PATCH 3/6] can: esd_usb2: " Marc Kleine-Budde
2017-12-08 15:58 ` [PATCH 4/6] can: kvaser_usb: " Marc Kleine-Budde
2017-12-08 15:58 ` Marc Kleine-Budde [this message]
2017-12-08 15:58 ` [PATCH 6/6] can: peak/pcie_fd: fix potential bug in restarting tx queue Marc Kleine-Budde
2017-12-08 19:54 ` pull-request: can 2017-12-08 David Miller
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=20171208155817.9364-6-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=mkelly@xevo.com \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).