If autosuspend is set to zero the usb-2 roothub will try to suspend the controller before usb-3 parts are initialized. Prevent this by incrementing the usage counter before usb-2 registers its roothub. Decrement the counter when usb-3 roothub is allocated. Signed-off-by: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx> --- drivers/usb/host/xhci.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 6fe577d..9301aff 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -4753,6 +4753,8 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks) * companion controller. */ hcd->has_tt = 1; + /* prevent USB2 runtime pm until USB3 parts are initialized */ + pm_runtime_get_noresume(hcd->self.controller); } else { /* xHCI private pointer was set in xhci_pci_probe for the second * registered roothub. @@ -4765,6 +4767,9 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks) if (xhci->hci_version < 0x100) hcd->self.no_sg_constraint = 1; + /* USB3 initialized far enough to allow runtime pm suspend */ + pm_runtime_put_noidle(hcd->self.controller); + return 0; } -- 1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html