Skip to content

Commit 671ffdf

Browse files
matnymangregkh
authored andcommitted
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>
1 parent 0d46fac commit 671ffdf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/usb/host/xhci.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,8 +1108,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
11081108
/* Resume root hubs only when have pending events. */
11091109
status = readl(&xhci->op_regs->status);
11101110
if (status & STS_EINT) {
1111-
usb_hcd_resume_root_hub(hcd);
11121111
usb_hcd_resume_root_hub(xhci->shared_hcd);
1112+
usb_hcd_resume_root_hub(hcd);
11131113
}
11141114
}
11151115

@@ -1124,10 +1124,10 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
11241124

11251125
/* Re-enable port polling. */
11261126
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);
11291127
set_bit(HCD_FLAG_POLL_RH, &xhci->shared_hcd->flags);
11301128
usb_hcd_poll_rh_status(xhci->shared_hcd);
1129+
set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
1130+
usb_hcd_poll_rh_status(hcd);
11311131

11321132
return retval;
11331133
}

0 commit comments

Comments
 (0)