usbip: don't call stub_device_reset() during stub_disconnect()
authorAlexander Popov <alpopov@ptsecurity.com>
Fri, 20 May 2016 09:37:28 +0000 (12:37 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jun 2016 05:18:39 +0000 (22:18 -0700)
stub_disconnect() calls stub_device_reset() during usb_unbind_device() when
usb device is locked. So usb_lock_device_for_reset() in stub_device_reset()
in that case polls for one second and returns -EBUSY anyway.

Remove useless flag USBIP_EH_RESET from SDEV_EVENT_REMOVED.

Signed-off-by: Alexander Popov <alpopov@ptsecurity.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usbip/usbip_common.h

index c7508cbce3ce8b519edb5ad7cdbe5713e0d20196..9f490375ac92362dce2174fb246a2e1425dd25b7 100644 (file)
@@ -245,7 +245,7 @@ enum usbip_side {
 #define USBIP_EH_RESET         (1 << 2)
 #define USBIP_EH_UNUSABLE      (1 << 3)
 
-#define SDEV_EVENT_REMOVED   (USBIP_EH_SHUTDOWN | USBIP_EH_RESET | USBIP_EH_BYE)
+#define        SDEV_EVENT_REMOVED      (USBIP_EH_SHUTDOWN | USBIP_EH_BYE)
 #define        SDEV_EVENT_DOWN         (USBIP_EH_SHUTDOWN | USBIP_EH_RESET)
 #define        SDEV_EVENT_ERROR_TCP    (USBIP_EH_SHUTDOWN | USBIP_EH_RESET)
 #define        SDEV_EVENT_ERROR_SUBMIT (USBIP_EH_SHUTDOWN | USBIP_EH_RESET)