aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2014-07-17 15:40:57 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-17 16:59:27 -0700
commit1299cff9fa39811cd1b3f1731527b062425f0541 (patch)
tree4a936c2b2435d1dcf0f5a3d380e78ef942f5b8ff /drivers/usb
parentMerge tag 'usb-serial-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next (diff)
downloadlinux-dev-1299cff9fa39811cd1b3f1731527b062425f0541.tar.xz
linux-dev-1299cff9fa39811cd1b3f1731527b062425f0541.zip
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: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/driver.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 4aeb10034de7..9bffd26cea05 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -417,10 +417,11 @@ static int usb_unbind_interface(struct device *dev)
*/
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);
driver->disconnect(intf);