]> git.baikalelectronics.ru Git - kernel.git/commit
USB: Handle warm reset failure on empty port.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Thu, 15 Nov 2012 01:58:04 +0000 (17:58 -0800)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Thu, 3 Jan 2013 22:10:28 +0000 (14:10 -0800)
commit29ffad23f10f313a2d3294902842f0ca8ace79f8
treef9c1663e31b0dda69dce000e9940a9f1b31c5a70
parent9a9b25ae0c7ec71d286a5700398936a239d8ea52
USB: Handle warm reset failure on empty port.

An empty port can transition to either Inactive or Compliance Mode if a
newly connected USB 3.0 device fails to link train.  In that case, we
issue a warm reset.  Some devices, such as John's Roseweil eusb3
enclosure, slip back into Compliance Mode after the warm reset.

The current warm reset code does not check for device connect status on
warm reset completion, and it incorrectly reports the warm reset
succeeded.  This causes the USB core to attempt to send a Set Address
control transfer to a port in Compliance Mode, which will always fail.

Make hub_port_wait_reset check the current connect status and link state
after the warm reset completes.  Return a failure status if the device
is disconnected or the link state is Compliance Mode or SS.Inactive.

Make hub_events disable the port if warm reset fails.  This will disable
the port, and then bring it back into the RxDetect state.  Make the USB
core ignore the connect change until the device reconnects.

Note that this patch does NOT handle connected devices slipping into the
Inactive state very well.  This is a concern, because devices can go
into the Inactive state on U1/U2 exit failure.  However, the fix for
that case is too large for stable, so it will be submitted in a separate
patch.

This patch should be backported to kernels as old as 3.2, contain the
commit ID 62a7d6e6dd8ad115124772ee98e3ec788aa10dca "usbcore: refine warm
reset logic"

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: John Covici <covici@ccs.covici.com>
Cc: stable@vger.kernel.org
drivers/usb/core/hub.c