Skip to content

Commit 2d51f3c

Browse files
jwerner-chromiumgregkh
authored andcommitted
usb: hub: Use correct reset for wedged USB3 devices that are NOTATTACHED
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> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9876388 commit 2d51f3c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎drivers/usb/core/hub.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4832,8 +4832,9 @@ static void hub_events(void)
48324832
hub->ports[i - 1]->child;
48334833

48344834
dev_dbg(hub_dev, "warm reset port %d\n", i);
4835-
if (!udev || !(portstatus &
4836-
USB_PORT_STAT_CONNECTION)) {
4835+
if (!udev ||
4836+
!(portstatus & USB_PORT_STAT_CONNECTION) ||
4837+
udev->state == USB_STATE_NOTATTACHED) {
48374838
status = hub_port_reset(hub, i,
48384839
NULL, HUB_BH_RESET_TIME,
48394840
true);

0 commit comments

Comments
 (0)