Commit 7d5e1dd4 authored by Simon Arlott's avatar Simon Arlott Committed by Greg Kroah-Hartman

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: default avatarSimon Arlott <simon@fire.lp0.eu>
Cc: Duncan Sands <duncan.sands@math.u-psud.fr>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5c975acb
...@@ -274,6 +274,9 @@ static void usbatm_complete(struct urb *urb) ...@@ -274,6 +274,9 @@ static void usbatm_complete(struct urb *urb)
(!(channel->usbatm->flags & UDSL_IGNORE_EILSEQ) || (!(channel->usbatm->flags & UDSL_IGNORE_EILSEQ) ||
urb->status != -EILSEQ )) urb->status != -EILSEQ ))
{ {
if (urb->status == -ESHUTDOWN)
return;
if (printk_ratelimit()) if (printk_ratelimit())
atm_warn(channel->usbatm, "%s: urb 0x%p failed (%d)!\n", atm_warn(channel->usbatm, "%s: urb 0x%p failed (%d)!\n",
__func__, urb, urb->status); __func__, urb, urb->status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment