]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
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)
committerSomasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Fri, 25 Aug 2017 17:21:51 +0000 (10:21 -0700)
Orabug: 26668125

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>
(cherry picked from commit 134a92659f9382f00f94b880183472b0769ad53e)
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
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)