diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-23 14:24:37 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-23 14:24:37 +0200 |
commit | 0520d37bb3d49f8e62e30c80b001e0003b3f3ca9 (patch) | |
tree | decc3a87d59b4eec5ec8c8c9c3f8378c35a29c7b /drivers/usb/core/hub.c | |
parent | 8dd8d2c95d0252bc64aa8e061a5fb4fbcd05f826 (diff) | |
parent | bb176f67090ca54869fc1262c913aa69d2ede070 (diff) | |
download | linux-0520d37bb3d49f8e62e30c80b001e0003b3f3ca9.tar.bz2 |
Merge 4.14-rc6 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r-- | drivers/usb/core/hub.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 941968f011df..196a0a5540ed 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -2710,13 +2710,16 @@ static int hub_port_wait_reset(struct usb_hub *hub, int port1, if (!(portstatus & USB_PORT_STAT_CONNECTION)) return -ENOTCONN; - /* bomb out completely if the connection bounced. A USB 3.0 - * connection may bounce if multiple warm resets were issued, + /* Retry if connect change is set but status is still connected. + * A USB 3.0 connection may bounce if multiple warm resets were issued, * but the device may have successfully re-connected. Ignore it. */ if (!hub_is_superspeed(hub->hdev) && - (portchange & USB_PORT_STAT_C_CONNECTION)) - return -ENOTCONN; + (portchange & USB_PORT_STAT_C_CONNECTION)) { + usb_clear_port_feature(hub->hdev, port1, + USB_PORT_FEAT_C_CONNECTION); + return -EAGAIN; + } if (!(portstatus & USB_PORT_STAT_ENABLE)) return -EBUSY; |