* [PATCH] usbatm: Detect usb device shutdown and ignore failed urbs.
@ 2007-04-15 0:18 Simon Arlott
2007-04-15 9:11 ` Duncan Sands
0 siblings, 1 reply; 2+ messages in thread
From: Simon Arlott @ 2007-04-15 0:18 UTC (permalink / raw)
To: Linux Kernel Mailing List
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>
Cc: Duncan Sands <duncan.sands@math.u-psud.fr>
---
I'm not sure what other urb statuses should be ignored,
and the warning message doesn't need to be shown when
the module is unloaded or the device is removed.
drivers/usb/atm/usbatm.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
index d0f1976..6b31175 100644
--- a/drivers/usb/atm/usbatm.c
+++ b/drivers/usb/atm/usbatm.c
@@ -274,6 +274,9 @@ static void usbatm_complete(struct urb *urb)
(!(channel->usbatm->flags & UDSL_IGNORE_EILSEQ) ||
urb->status != -EILSEQ ))
{
+ if (urb->status == -ESHUTDOWN)
+ return;
+
if (printk_ratelimit())
atm_warn(channel->usbatm, "%s: urb 0x%p failed (%d)!\n",
__func__, urb, urb->status);
--
1.5.0.1
--
Simon Arlott
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-15 9:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-15 0:18 [PATCH] usbatm: Detect usb device shutdown and ignore failed urbs Simon Arlott
2007-04-15 9:11 ` Duncan Sands
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