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 1/6] can: mcba_usb: cancel urb on -EPROTO
Date: Fri, 8 Dec 2017 16:58:12 +0100 [thread overview]
Message-ID: <20171208155817.9364-2-mkl@pengutronix.de> (raw)
In-Reply-To: <20171208155817.9364-1-mkl@pengutronix.de>
From: Martin Kelly <mkelly@xevo.com>
When we unplug the device, we can see both -EPIPE and -EPROTO depending
on exact timing and what system we run on. If we continue to resubmit
URBs, they will immediately fail, and they can cause stalls, especially
on slower CPUs.
Fix this by not resubmitting on -EPROTO, as we already do on -EPIPE.
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 | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/can/usb/mcba_usb.c b/drivers/net/can/usb/mcba_usb.c
index ef417dcddbf7..8d8c2086424d 100644
--- a/drivers/net/can/usb/mcba_usb.c
+++ b/drivers/net/can/usb/mcba_usb.c
@@ -593,6 +593,7 @@ static void mcba_usb_read_bulk_callback(struct urb *urb)
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 ` Marc Kleine-Budde [this message]
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 ` [PATCH 5/6] can: usb_8dev: " Marc Kleine-Budde
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-2-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).