aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-pci.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 20:06:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 20:06:09 -0400
commit3e75c6de1ac33fe3500f44573d9212dc82c99f59 (patch)
treeef10932e204ba8a9885051b06d4524d284207d61 /drivers/usb/host/xhci-pci.c
parentcb1595563880a81dab6eab9a5ecb4520d2e76077 (diff)
parent940ab8f1ef9369da5b58a1bec6820bfd4a7b9042 (diff)
Merge tag 'usb-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB patches from Greg KH: "Here's the big USB pull request for 3.15-rc1. The normal set of patches, lots of controller driver updates, and a smattering of individual USB driver updates as well. All have been in linux-next for a while" * tag 'usb-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (249 commits) xhci: Transition maintainership to Mathias Nyman. USB: disable reset-resume when USB_QUIRK_RESET is set USB: unbind all interfaces before rebinding any usb: phy: Add ulpi IDs for SMSC USB3320 and TI TUSB1210 usb: gadget: tcm_usb_gadget: stop format strings usb: gadget: f_fs: add missing spinlock and mutex unlock usb: gadget: composite: switch over to ERR_CAST() usb: gadget: inode: switch over to memdup_user() usb: gadget: f_subset: switch over to PTR_RET usb: gadget: lpc32xx_udc: fix wrong clk_put() sequence USB: keyspan: remove dead debugging code USB: serial: add missing newlines to dev_<level> messages. USB: serial: add missing braces USB: serial: continue to write on errors USB: serial: continue to read on errors USB: serial: make bulk_out_size a lower limit USB: cypress_m8: fix potential scheduling while atomic devicetree: bindings: document lsi,zevio-usb usb: chipidea: add support for USB OTG controller on LSI Zevio SoCs usb: chipidea: imx: Use dev_name() for ci_hdrc name to distinguish USBs ...
Diffstat (limited to 'drivers/usb/host/xhci-pci.c')
-rw-r--r--drivers/usb/host/xhci-pci.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 04f986d9234f..47390e369cd4 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -190,6 +190,10 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
190 struct usb_hcd *hcd; 190 struct usb_hcd *hcd;
191 191
192 driver = (struct hc_driver *)id->driver_data; 192 driver = (struct hc_driver *)id->driver_data;
193
194 /* Prevent runtime suspending between USB-2 and USB-3 initialization */
195 pm_runtime_get_noresume(&dev->dev);
196
193 /* Register the USB 2.0 roothub. 197 /* Register the USB 2.0 roothub.
194 * FIXME: USB core must know to register the USB 2.0 roothub first. 198 * FIXME: USB core must know to register the USB 2.0 roothub first.
195 * This is sort of silly, because we could just set the HCD driver flags 199 * 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)
199 retval = usb_hcd_pci_probe(dev, id); 203 retval = usb_hcd_pci_probe(dev, id);
200 204
201 if (retval) 205 if (retval)
202 return retval; 206 goto put_runtime_pm;
203 207
204 /* USB 2.0 roothub is stored in the PCI device now. */ 208 /* USB 2.0 roothub is stored in the PCI device now. */
205 hcd = dev_get_drvdata(&dev->dev); 209 hcd = dev_get_drvdata(&dev->dev);
@@ -222,11 +226,11 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
222 goto put_usb3_hcd; 226 goto put_usb3_hcd;
223 /* Roothub already marked as USB 3.0 speed */ 227 /* Roothub already marked as USB 3.0 speed */
224 228
225 /* We know the LPM timeout algorithms for this host, let the USB core 229 if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
226 * enable and disable LPM for devices under the USB 3.0 roothub. 230 xhci->shared_hcd->can_do_streams = 1;
227 */ 231
228 if (xhci->quirks & XHCI_LPM_SUPPORT) 232 /* USB-2 and USB-3 roothubs initialized, allow runtime pm suspend */
229 hcd_to_bus(xhci->shared_hcd)->root_hub->lpm_capable = 1; 233 pm_runtime_put_noidle(&dev->dev);
230 234
231 return 0; 235 return 0;
232 236
@@ -234,6 +238,8 @@ put_usb3_hcd:
234 usb_put_hcd(xhci->shared_hcd); 238 usb_put_hcd(xhci->shared_hcd);
235dealloc_usb2_hcd: 239dealloc_usb2_hcd:
236 usb_hcd_pci_remove(dev); 240 usb_hcd_pci_remove(dev);
241put_runtime_pm:
242 pm_runtime_put_noidle(&dev->dev);
237 return retval; 243 return retval;
238} 244}
239 245