Commit 80f1d0ee authored by Mathias Nyman's avatar Mathias Nyman Committed by Kamal Mostafa

xhci: resume USB 3 roothub first

commit 671ffdff upstream.

Give USB3 devices a better chance to enumerate at USB 3 speeds if
they are connected to a suspended host.
Solves an issue with NEC uPD720200 host hanging when partially
enumerating a USB3 device as USB2 after host controller runtime resume.
Tested-by: default avatarMike Murdoch <main.haarp@gmail.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 avatarKamal Mostafa <kamal@canonical.com>
parent 28441c2d
...@@ -1116,8 +1116,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) ...@@ -1116,8 +1116,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
/* Resume root hubs only when have pending events. */ /* Resume root hubs only when have pending events. */
status = readl(&xhci->op_regs->status); status = readl(&xhci->op_regs->status);
if (status & STS_EINT) { if (status & STS_EINT) {
usb_hcd_resume_root_hub(hcd);
usb_hcd_resume_root_hub(xhci->shared_hcd); usb_hcd_resume_root_hub(xhci->shared_hcd);
usb_hcd_resume_root_hub(hcd);
} }
} }
...@@ -1132,10 +1132,10 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) ...@@ -1132,10 +1132,10 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
/* Re-enable port polling. */ /* Re-enable port polling. */
xhci_dbg(xhci, "%s: starting port polling.\n", __func__); xhci_dbg(xhci, "%s: starting port polling.\n", __func__);
set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
usb_hcd_poll_rh_status(hcd);
set_bit(HCD_FLAG_POLL_RH, &xhci->shared_hcd->flags); set_bit(HCD_FLAG_POLL_RH, &xhci->shared_hcd->flags);
usb_hcd_poll_rh_status(xhci->shared_hcd); usb_hcd_poll_rh_status(xhci->shared_hcd);
set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
usb_hcd_poll_rh_status(hcd);
return retval; return retval;
} }
......
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