Lines Matching full:hcd
89 static int xhci_pci_setup(struct usb_hcd *hcd);
90 static int xhci_pci_run(struct usb_hcd *hcd);
91 static int xhci_pci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev,
106 struct usb_hcd *hcd = xhci_to_hcd(xhci); in xhci_msix_sync_irqs() local
108 if (hcd->msix_enabled) { in xhci_msix_sync_irqs()
109 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); in xhci_msix_sync_irqs()
119 struct usb_hcd *hcd = xhci_to_hcd(xhci); in xhci_cleanup_msix() local
120 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); in xhci_cleanup_msix()
122 if (hcd->irq > 0) in xhci_cleanup_msix()
127 hcd->msix_enabled = 0; in xhci_cleanup_msix()
131 static int xhci_try_enable_msi(struct usb_hcd *hcd) in xhci_try_enable_msi() argument
133 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); in xhci_try_enable_msi()
134 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_try_enable_msi()
145 if (hcd->irq) in xhci_try_enable_msi()
146 free_irq(hcd->irq, hcd); in xhci_try_enable_msi()
147 hcd->irq = 0; in xhci_try_enable_msi()
170 hcd->msi_enabled = 1; in xhci_try_enable_msi()
171 hcd->msix_enabled = pdev->msix_enabled; in xhci_try_enable_msi()
185 if (!strlen(hcd->irq_descr)) in xhci_try_enable_msi()
186 snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d", in xhci_try_enable_msi()
187 hcd->driver->description, hcd->self.busnum); in xhci_try_enable_msi()
190 ret = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED, hcd->irq_descr, hcd); in xhci_try_enable_msi()
195 hcd->irq = pdev->irq; in xhci_try_enable_msi()
199 static int xhci_pci_run(struct usb_hcd *hcd) in xhci_pci_run() argument
203 if (usb_hcd_is_primary_hcd(hcd)) { in xhci_pci_run()
204 ret = xhci_try_enable_msi(hcd); in xhci_pci_run()
209 return xhci_run(hcd); in xhci_pci_run()
212 static void xhci_pci_stop(struct usb_hcd *hcd) in xhci_pci_stop() argument
214 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_pci_stop()
216 xhci_stop(hcd); in xhci_pci_stop()
218 if (usb_hcd_is_primary_hcd(hcd)) in xhci_pci_stop()
503 static void xhci_find_lpm_incapable_ports(struct usb_hcd *hcd, struct usb_device *hdev) in xhci_find_lpm_incapable_ports() argument
505 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_find_lpm_incapable_ports()
511 if (hcd != rhub->hcd) in xhci_find_lpm_incapable_ports()
533 static void xhci_find_lpm_incapable_ports(struct usb_hcd *hcd, struct usb_device *hdev) { } in xhci_find_lpm_incapable_ports() argument
537 static int xhci_pci_setup(struct usb_hcd *hcd) in xhci_pci_setup() argument
540 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); in xhci_pci_setup()
544 xhci = hcd_to_xhci(hcd); in xhci_pci_setup()
549 retval = xhci_gen_setup(hcd, xhci_pci_quirks); in xhci_pci_setup()
553 if (!usb_hcd_is_primary_hcd(hcd)) in xhci_pci_setup()
566 static int xhci_pci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev, in xhci_pci_update_hub_device() argument
571 xhci_find_lpm_incapable_ports(hcd, hdev); in xhci_pci_update_hub_device()
573 return xhci_update_hub_device(hcd, hdev, tt, mem_flags); in xhci_pci_update_hub_device()
584 struct usb_hcd *hcd; in xhci_pci_common_probe() local
597 * This is sort of silly, because we could just set the HCD driver flags in xhci_pci_common_probe()
599 * the other parts of the HCD code. in xhci_pci_common_probe()
607 hcd = dev_get_drvdata(&dev->dev); in xhci_pci_common_probe()
608 xhci = hcd_to_xhci(hcd); in xhci_pci_common_probe()
611 pci_name(dev), hcd); in xhci_pci_common_probe()
707 static void xhci_ssic_port_unused_quirk(struct usb_hcd *hcd, bool suspend) in xhci_ssic_port_unused_quirk() argument
709 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_ssic_port_unused_quirk()
742 static void xhci_pme_quirk(struct usb_hcd *hcd) in xhci_pme_quirk() argument
744 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_pme_quirk()
754 static void xhci_sparse_control_quirk(struct usb_hcd *hcd) in xhci_sparse_control_quirk() argument
758 reg = readl(hcd->regs + SPARSE_CNTL_ENABLE); in xhci_sparse_control_quirk()
760 writel(reg, hcd->regs + SPARSE_CNTL_ENABLE); in xhci_sparse_control_quirk()
763 static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup) in xhci_pci_suspend() argument
765 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_pci_suspend()
766 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); in xhci_pci_suspend()
784 xhci_pme_quirk(hcd); in xhci_pci_suspend()
787 xhci_ssic_port_unused_quirk(hcd, true); in xhci_pci_suspend()
790 xhci_sparse_control_quirk(hcd); in xhci_pci_suspend()
798 xhci_ssic_port_unused_quirk(hcd, false); in xhci_pci_suspend()
803 static int xhci_pci_resume(struct usb_hcd *hcd, pm_message_t msg) in xhci_pci_resume() argument
805 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_pci_resume()
806 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); in xhci_pci_resume()
832 xhci_ssic_port_unused_quirk(hcd, false); in xhci_pci_resume()
835 xhci_pme_quirk(hcd); in xhci_pci_resume()
840 static int xhci_pci_poweroff_late(struct usb_hcd *hcd, bool do_wakeup) in xhci_pci_poweroff_late() argument
842 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_pci_poweroff_late()
869 port->slot_id, port->rhub->hcd->self.busnum, in xhci_pci_poweroff_late()
881 port->rhub->hcd->self.busnum, port->hcd_portnum + 1); in xhci_pci_poweroff_late()
889 static void xhci_pci_shutdown(struct usb_hcd *hcd) in xhci_pci_shutdown() argument
891 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_pci_shutdown()
892 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); in xhci_pci_shutdown()
894 xhci_shutdown(hcd); in xhci_pci_shutdown()