diff options
author | Simon Arlott <simon@fire.lp0.eu> | 2007-04-26 03:38:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-27 16:28:41 -0400 |
commit | 7d5e1dd40bd5ced457be178e4f0b1267a3df2142 (patch) | |
tree | f5586fdac621f0729c0833a110da72f5dc8ba579 /drivers/usb | |
parent | 5c975acb99168827a8ce5453be0e44ad2e4b70b2 (diff) |
usbatm: Detect usb device shutdown and ignore failed urbs
Detect usb device shutdown and ignore failed urbs. This happens when the
driver is unloaded or the device is unplugged.
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.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Cc: Duncan Sands <duncan.sands@math.u-psud.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | 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 746d30ffb732..b3f779f5933a 100644 --- a/drivers/usb/atm/usbatm.c +++ b/drivers/usb/atm/usbatm.c | |||
@@ -274,6 +274,9 @@ static void usbatm_complete(struct urb *urb) | |||
274 | (!(channel->usbatm->flags & UDSL_IGNORE_EILSEQ) || | 274 | (!(channel->usbatm->flags & UDSL_IGNORE_EILSEQ) || |
275 | urb->status != -EILSEQ )) | 275 | urb->status != -EILSEQ )) |
276 | { | 276 | { |
277 | if (urb->status == -ESHUTDOWN) | ||
278 | return; | ||
279 | |||
277 | if (printk_ratelimit()) | 280 | if (printk_ratelimit()) |
278 | atm_warn(channel->usbatm, "%s: urb 0x%p failed (%d)!\n", | 281 | atm_warn(channel->usbatm, "%s: urb 0x%p failed (%d)!\n", |
279 | __func__, urb, urb->status); | 282 | __func__, urb, urb->status); |