usbatm: Detect usb device shutdown and ignore failed urbs.
Subsystems (3)
PATCH 1/1 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.
Signed-off-by Simon Arlott <[email protected]>
Cc Duncan Sands <[email protected]>
---
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(-)
drivers/usb/atm/usbatm.c +0 -0
@@ -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);Signature · 4 lines
1.5.0.1 -- Simon Arlott
Quoted 5 lines · On Sunday 15 April 2007 02:18:39 Simon Arlott wrote:
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 <[email protected]>Cc Duncan Sands <[email protected]>
Acked-by Duncan Sands <[email protected]>