Commit 1299cff9 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman
Browse files

USB: shutdown all URBs after controller death



When a host controller dies, we don't need to wait for a driver to
time out.  We can shut down its URBs immediately.  Without this
change, we can end up waiting 30 seconds for a mass-storage transfer
to time out.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 46865bf3
...@@ -417,10 +417,11 @@ static int usb_unbind_interface(struct device *dev) ...@@ -417,10 +417,11 @@ static int usb_unbind_interface(struct device *dev)
*/ */
lpm_disable_error = usb_unlocked_disable_lpm(udev); lpm_disable_error = usb_unlocked_disable_lpm(udev);
/* Terminate all URBs for this interface unless the driver /*
* supports "soft" unbinding. * Terminate all URBs for this interface unless the driver
* supports "soft" unbinding and the device is still present.
*/ */
if (!driver->soft_unbind) if (!driver->soft_unbind || udev->state == USB_STATE_NOTATTACHED)
usb_disable_interface(udev, intf, false); usb_disable_interface(udev, intf, false);
driver->disconnect(intf); driver->disconnect(intf);
......
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