|
@@ -190,6 +190,10 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
|
|
struct usb_hcd *hcd;
|
|
struct usb_hcd *hcd;
|
|
|
|
|
|
|
|
driver = (struct hc_driver *)id->driver_data;
|
|
driver = (struct hc_driver *)id->driver_data;
|
|
|
|
|
+
|
|
|
|
|
+ /* Prevent runtime suspending between USB-2 and USB-3 initialization */
|
|
|
|
|
+ pm_runtime_get_noresume(&dev->dev);
|
|
|
|
|
+
|
|
|
/* Register the USB 2.0 roothub.
|
|
/* Register the USB 2.0 roothub.
|
|
|
* FIXME: USB core must know to register the USB 2.0 roothub first.
|
|
* FIXME: USB core must know to register the USB 2.0 roothub first.
|
|
|
* This is sort of silly, because we could just set the HCD driver flags
|
|
* This is sort of silly, because we could just set the HCD driver flags
|
|
@@ -199,7 +203,7 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
|
|
retval = usb_hcd_pci_probe(dev, id);
|
|
retval = usb_hcd_pci_probe(dev, id);
|
|
|
|
|
|
|
|
if (retval)
|
|
if (retval)
|
|
|
- return retval;
|
|
|
|
|
|
|
+ goto put_runtime_pm;
|
|
|
|
|
|
|
|
/* USB 2.0 roothub is stored in the PCI device now. */
|
|
/* USB 2.0 roothub is stored in the PCI device now. */
|
|
|
hcd = dev_get_drvdata(&dev->dev);
|
|
hcd = dev_get_drvdata(&dev->dev);
|
|
@@ -225,12 +229,17 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
|
|
if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
|
|
if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
|
|
|
xhci->shared_hcd->can_do_streams = 1;
|
|
xhci->shared_hcd->can_do_streams = 1;
|
|
|
|
|
|
|
|
|
|
+ /* USB-2 and USB-3 roothubs initialized, allow runtime pm suspend */
|
|
|
|
|
+ pm_runtime_put_noidle(&dev->dev);
|
|
|
|
|
+
|
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
|
|
put_usb3_hcd:
|
|
put_usb3_hcd:
|
|
|
usb_put_hcd(xhci->shared_hcd);
|
|
usb_put_hcd(xhci->shared_hcd);
|
|
|
dealloc_usb2_hcd:
|
|
dealloc_usb2_hcd:
|
|
|
usb_hcd_pci_remove(dev);
|
|
usb_hcd_pci_remove(dev);
|
|
|
|
|
+put_runtime_pm:
|
|
|
|
|
+ pm_runtime_put_noidle(&dev->dev);
|
|
|
return retval;
|
|
return retval;
|
|
|
}
|
|
}
|
|
|
|
|
|