diff options
author | Zhuang Jin Can <jin.can.zhuang@intel.com> | 2015-07-21 17:20:29 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-10 12:21:56 -0700 |
commit | 6f0433c52944a822f338f300fff672fa2fd43ac5 (patch) | |
tree | de22be6b739ade71470b6055f05b547787ed0d6c /drivers/usb | |
parent | eb9a669517a2eeb2e55fff733191c128b2f55830 (diff) | |
download | linux-stable-6f0433c52944a822f338f300fff672fa2fd43ac5.tar.gz linux-stable-6f0433c52944a822f338f300fff672fa2fd43ac5.tar.bz2 linux-stable-6f0433c52944a822f338f300fff672fa2fd43ac5.zip |
xhci: report U3 when link is in resume state
commit 243292a2ad3dc365849b820a64868927168894ac upstream.
xhci_hub_report_usb3_link_state() returns pls as U0 when the link
is in resume state, and this causes usb core to think the link is in
U0 while actually it's in resume state. When usb core transfers
control request on the link, it fails with TRB error as the link
is not ready for transfer.
To fix the issue, report U3 when the link is in resume state, thus
usb core knows the link it's not ready for transfer.
Signed-off-by: Zhuang Jin Can <jin.can.zhuang@intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/xhci-hub.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 0827d7c96527..9e71c5880913 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c @@ -484,10 +484,13 @@ static void xhci_hub_report_usb3_link_state(struct xhci_hcd *xhci, u32 pls = status_reg & PORT_PLS_MASK; /* resume state is a xHCI internal state. - * Do not report it to usb core. + * Do not report it to usb core, instead, pretend to be U3, + * thus usb core knows it's not ready for transfer */ - if (pls == XDEV_RESUME) + if (pls == XDEV_RESUME) { + *status |= USB_SS_PORT_LS_U3; return; + } /* When the CAS bit is set then warm reset * should be performed on port |