Skip to content

Commit

Permalink
usbatm: Detect usb device shutdown and ignore failed urbs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Simon Arlott authored and Greg Kroah-Hartman committed Apr 27, 2007
1 parent 5c975ac commit 7d5e1dd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/usb/atm/usbatm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7d5e1dd

Please sign in to comment.