aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2016-04-08 09:25:06 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-13 14:55:56 -0400
commit671ffdff5b13314b1fc65d62cf7604b873fb5dc4 (patch)
tree47e8cd94ba52bf8d3b3e3de3a4a8f84fd285ebcd
parent0d46faca6f887a849efb07c1655b5a9f7c288b45 (diff)
xhci: resume USB 3 roothub first
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. Cc: <stable@vger.kernel.org> Tested-by: Mike Murdoch <main.haarp@gmail.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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index d51ee0c3cf9f..b60928802686 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1108,8 +1108,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
1108 /* Resume root hubs only when have pending events. */ 1108 /* Resume root hubs only when have pending events. */
1109 status = readl(&xhci->op_regs->status); 1109 status = readl(&xhci->op_regs->status);
1110 if (status & STS_EINT) { 1110 if (status & STS_EINT) {
1111 usb_hcd_resume_root_hub(hcd);
1112 usb_hcd_resume_root_hub(xhci->shared_hcd); 1111 usb_hcd_resume_root_hub(xhci->shared_hcd);
1112 usb_hcd_resume_root_hub(hcd);
1113 } 1113 }
1114 } 1114 }
1115 1115
@@ -1124,10 +1124,10 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
1124 1124
1125 /* Re-enable port polling. */ 1125 /* Re-enable port polling. */
1126 xhci_dbg(xhci, "%s: starting port polling.\n", __func__); 1126 xhci_dbg(xhci, "%s: starting port polling.\n", __func__);
1127 set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
1128 usb_hcd_poll_rh_status(hcd);
1129 set_bit(HCD_FLAG_POLL_RH, &xhci->shared_hcd->flags); 1127 set_bit(HCD_FLAG_POLL_RH, &xhci->shared_hcd->flags);
1130 usb_hcd_poll_rh_status(xhci->shared_hcd); 1128 usb_hcd_poll_rh_status(xhci->shared_hcd);
1129 set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
1130 usb_hcd_poll_rh_status(hcd);
1131 1131
1132 return retval; 1132 return retval;
1133} 1133}