|
@@ -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);
|