diff options
author | Stanislaw Ledwon <staszek.ledwon@linux.jf.intel.com> | 2012-06-18 09:20:00 -0400 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2012-07-02 15:51:24 -0400 |
commit | 8bea2bd37df08aaa599aa361a9f8b836ba98e554 (patch) | |
tree | 512482947a1d4a69796443d7f28fb968d8e52236 /drivers/usb/host/xhci.h | |
parent | 6887a4131da3adaab011613776d865f4bcfb5678 (diff) |
usb: Add support for root hub port status CAS
The host controller port status register supports CAS (Cold Attach
Status) bit. This bit could be set when USB3.0 device is connected
when system is in Sx state. When the system wakes to S0 this port
status with CAS bit is reported and this port can't be used by any
device.
When CAS bit is set the port should be reset by warm reset. This
was not supported by xhci driver.
The issue was found when pendrive was connected to suspended
platform. The link state of "Compliance Mode" was reported together
with CAS bit. This link state was also not supported by xhci and
core/hub.c.
The CAS bit is defined only for xhci root hub port and it is
not supported on regular hubs. The link status is used to force
warm reset on port. Make the USB core issue a warm reset when port
is in ether the 'inactive' or 'compliance mode'. Change the xHCI driver
to report 'compliance mode' when the CAS is set. This force warm reset
on the root hub port.
This patch should be backported to stable kernels as old as 3.2, that
contain the commit 10d674a82e553cb8a1f41027bb3c3e309b3f6804 "USB: When
hot reset for USB3 fails, try warm reset."
Signed-off-by: Stanislaw Ledwon <staszek.ledwon@linux.intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Acked-by: Andiry Xu <andiry.xu@amd.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r-- | drivers/usb/host/xhci.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index de3d6e3e57be..55c0785810c9 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -341,7 +341,11 @@ struct xhci_op_regs { | |||
341 | #define PORT_PLC (1 << 22) | 341 | #define PORT_PLC (1 << 22) |
342 | /* port configure error change - port failed to configure its link partner */ | 342 | /* port configure error change - port failed to configure its link partner */ |
343 | #define PORT_CEC (1 << 23) | 343 | #define PORT_CEC (1 << 23) |
344 | /* bit 24 reserved */ | 344 | /* Cold Attach Status - xHC can set this bit to report device attached during |
345 | * Sx state. Warm port reset should be perfomed to clear this bit and move port | ||
346 | * to connected state. | ||
347 | */ | ||
348 | #define PORT_CAS (1 << 24) | ||
345 | /* wake on connect (enable) */ | 349 | /* wake on connect (enable) */ |
346 | #define PORT_WKCONN_E (1 << 25) | 350 | #define PORT_WKCONN_E (1 << 25) |
347 | /* wake on disconnect (enable) */ | 351 | /* wake on disconnect (enable) */ |