summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhuang Jin Can <jin.can.zhuang@intel.com>2015-07-21 17:20:29 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-22 14:19:36 -0700
commit243292a2ad3dc365849b820a64868927168894ac (patch)
tree143a63e00534420658bf5898516f356f2eecf909
parent326124a027abc9a7f43f72dc94f6f0f7a55b02b3 (diff)
downloadop-kernel-dev-243292a2ad3dc365849b820a64868927168894ac.zip
op-kernel-dev-243292a2ad3dc365849b820a64868927168894ac.tar.gz
xhci: report U3 when link is in resume state
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. Cc: <stable@vger.kernel.org> 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>
-rw-r--r--drivers/usb/host/xhci-hub.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index e75c565..7df8878 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
OpenPOWER on IntegriCloud