From: Simon Arlott <simon@arlott.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] usbatm: Detect usb device shutdown and ignore failed urbs.
Date: Wed, 21 Feb 2007 21:39:50 +0000 [thread overview]
Message-ID: <45DCBC26.1050308@simon.arlott.org.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 855 bytes --]
Detect usb device shutdown and ignore failed urbs. This happens when the driver is unloaded or the device is unplugged.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
---
drivers/usb/atm/usbatm.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
index 83cea01..1f5faee 100644
--- a/drivers/usb/atm/usbatm.c
+++ b/drivers/usb/atm/usbatm.c
@@ -274,6 +274,10 @@ static void usbatm_complete(struct urb *
(!(channel->usbatm->flags & UDSL_IGNORE_EILSEQ) ||
urb->status != -EILSEQ ))
{
+ /* the module/device has probably been removed */
+ if (urb->status == -ESHUTDOWN)
+ return;
+
if (printk_ratelimit())
atm_warn(channel->usbatm, "%s: urb 0x%p failed (%d)!\n",
__func__, urb, urb->status);
--
1.4.3.1
--
Simon Arlott
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 829 bytes --]
next reply other threads:[~2007-02-21 21:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-21 21:39 Simon Arlott [this message]
2007-02-22 10:43 ` Duncan Sands
2007-02-22 23:53 ` Pete Zaitcev
2007-02-23 9:36 ` Duncan Sands
2007-02-23 16:16 ` [linux-usb-devel] " Alan Stern
2007-02-23 17:05 ` Duncan Sands
2007-02-23 18:11 ` Alan Stern
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=45DCBC26.1050308@simon.arlott.org.uk \
--to=simon@arlott.org \
--cc=254ad70138dc1cdf241hjzcr0007jhhw@thunder.lp0.eu \
--cc=linux-kernel@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
Powered by JetHome