diff options
author | Julius Werner <jwerner@chromium.org> | 2013-11-07 13:59:14 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-20 10:45:08 -0500 |
commit | 9126f1f5d338fed3f492b4d49f64178231dce76d (patch) | |
tree | 07ae5df3957997a09ac65709e69b53297b0d8533 /drivers/usb/core | |
parent | fbaa929d862503b59110081efb57a40213193a6d (diff) |
usb: hub: Use correct reset for wedged USB3 devices that are NOTATTACHED
commit 2d51f3cd11f414c56a87dc018196b85fd50b04a4 upstream.
This patch adds a check for USB_STATE_NOTATTACHED to the
hub_port_warm_reset_required() workaround for ports that end up in
Compliance Mode in hub_events() when trying to decide which reset
function to use. Trying to call usb_reset_device() with a NOTATTACHED
device will just fail and leave the port broken.
Signed-off-by: Julius Werner <jwerner@chromium.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/hub.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 1424a8988849..4d25bff2dac1 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -4808,8 +4808,9 @@ static void hub_events(void) | |||
4808 | hub->ports[i - 1]->child; | 4808 | hub->ports[i - 1]->child; |
4809 | 4809 | ||
4810 | dev_dbg(hub_dev, "warm reset port %d\n", i); | 4810 | dev_dbg(hub_dev, "warm reset port %d\n", i); |
4811 | if (!udev || !(portstatus & | 4811 | if (!udev || |
4812 | USB_PORT_STAT_CONNECTION)) { | 4812 | !(portstatus & USB_PORT_STAT_CONNECTION) || |
4813 | udev->state == USB_STATE_NOTATTACHED) { | ||
4813 | status = hub_port_reset(hub, i, | 4814 | status = hub_port_reset(hub, i, |
4814 | NULL, HUB_BH_RESET_TIME, | 4815 | NULL, HUB_BH_RESET_TIME, |
4815 | true); | 4816 | true); |