Commit d377e2de authored by Zhuang Jin Can's avatar Zhuang Jin Can Committed by Luis Henriques

xhci: report U3 when link is in resume state

commit 243292a2 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: default avatarZhuang Jin Can <jin.can.zhuang@intel.com>
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 5375185a
...@@ -477,10 +477,13 @@ static void xhci_hub_report_usb3_link_state(struct xhci_hcd *xhci, ...@@ -477,10 +477,13 @@ static void xhci_hub_report_usb3_link_state(struct xhci_hcd *xhci,
u32 pls = status_reg & PORT_PLS_MASK; u32 pls = status_reg & PORT_PLS_MASK;
/* resume state is a xHCI internal state. /* 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; return;
}
/* When the CAS bit is set then warm reset /* When the CAS bit is set then warm reset
* should be performed on port * should be performed on port
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment