Lines Matching refs:hcd

84 static int xhci_pci_setup(struct usb_hcd *hcd);
85 static int xhci_pci_run(struct usb_hcd *hcd);
86 static int xhci_pci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev,
97 struct usb_hcd *hcd = xhci_to_hcd(xhci);
99 if (hcd->msix_enabled) {
100 struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
110 struct usb_hcd *hcd = xhci_to_hcd(xhci);
111 struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
114 if (hcd->irq > 0)
119 hcd->msix_enabled = 0;
123 static int xhci_try_enable_msi(struct usb_hcd *hcd)
125 struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
126 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
137 if (hcd->irq)
138 free_irq(hcd->irq, hcd);
139 hcd->irq = 0;
165 hcd->msi_enabled = 1;
166 hcd->msix_enabled = pdev->msix_enabled;
180 if (!strlen(hcd->irq_descr))
181 snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d",
182 hcd->driver->description, hcd->self.busnum);
185 ret = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED, hcd->irq_descr, hcd);
190 hcd->irq = pdev->irq;
194 static int xhci_pci_run(struct usb_hcd *hcd)
198 if (usb_hcd_is_primary_hcd(hcd)) {
199 ret = xhci_try_enable_msi(hcd);
204 return xhci_run(hcd);
207 static void xhci_pci_stop(struct usb_hcd *hcd)
209 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
211 xhci_stop(hcd);
213 if (usb_hcd_is_primary_hcd(hcd))
496 static void xhci_find_lpm_incapable_ports(struct usb_hcd *hcd, struct usb_device *hdev)
498 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
504 if (hcd != rhub->hcd)
526 static void xhci_find_lpm_incapable_ports(struct usb_hcd *hcd, struct usb_device *hdev) { }
530 static int xhci_pci_setup(struct usb_hcd *hcd)
533 struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
536 xhci = hcd_to_xhci(hcd);
543 retval = xhci_gen_setup(hcd, xhci_pci_quirks);
547 if (!usb_hcd_is_primary_hcd(hcd))
559 static int xhci_pci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev,
564 xhci_find_lpm_incapable_ports(hcd, hdev);
566 return xhci_update_hub_device(hcd, hdev, tt, mem_flags);
577 struct usb_hcd *hcd;
608 hcd = dev_get_drvdata(&dev->dev);
609 xhci = hcd_to_xhci(hcd);
612 pci_name(dev), hcd);
684 static void xhci_ssic_port_unused_quirk(struct usb_hcd *hcd, bool suspend)
686 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
719 static void xhci_pme_quirk(struct usb_hcd *hcd)
721 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
731 static void xhci_sparse_control_quirk(struct usb_hcd *hcd)
735 reg = readl(hcd->regs + SPARSE_CNTL_ENABLE);
737 writel(reg, hcd->regs + SPARSE_CNTL_ENABLE);
740 static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
742 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
743 struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
761 xhci_pme_quirk(hcd);
764 xhci_ssic_port_unused_quirk(hcd, true);
767 xhci_sparse_control_quirk(hcd);
775 xhci_ssic_port_unused_quirk(hcd, false);
780 static int xhci_pci_resume(struct usb_hcd *hcd, pm_message_t msg)
782 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
783 struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
810 xhci_ssic_port_unused_quirk(hcd, false);
813 xhci_pme_quirk(hcd);
819 static int xhci_pci_poweroff_late(struct usb_hcd *hcd, bool do_wakeup)
821 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
848 port->slot_id, port->rhub->hcd->self.busnum,
860 port->rhub->hcd->self.busnum, port->hcd_portnum + 1);
868 static void xhci_pci_shutdown(struct usb_hcd *hcd)
870 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
871 struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
873 xhci_shutdown(hcd);