OSDN Git Service

usb: hub: Allow reset retry for USB2 devices on connect bounce
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 17 Oct 2017 13:07:33 +0000 (16:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Oct 2017 07:49:11 +0000 (09:49 +0200)
commit1ac7db63333db1eeff901bfd6bbcd502b4634fa4
treeefa033e16f6c0f33a71eb606c6f3427e4705bb6b
parente7d6a32f0d1505695d4417caf93e4a64c06ffe9f
usb: hub: Allow reset retry for USB2 devices on connect bounce

If the connect status change is set during reset signaling, but
the status remains connected just retry port reset.

This solves an issue with connecting a 90W HP Thunderbolt 3 dock
with a Lenovo Carbon x1 (5th generation) which causes a 30min loop
of a high speed device being re-discovererd before usb ports starts
working.

[...]
[ 389.023845] usb 3-1: new high-speed USB device number 55 using xhci_hcd
[ 389.491841] usb 3-1: new high-speed USB device number 56 using xhci_hcd
[ 389.959928] usb 3-1: new high-speed USB device number 57 using xhci_hcd
[...]

This is caused by a high speed device that doesn't successfully go to the
enabled state after the second port reset. Instead the connection bounces
(connected, with connect status change), bailing out completely from
enumeration just to restart from scratch.

Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1716332
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c