23 #include <linux/pci.h>
24 #include <linux/slab.h>
25 #include <linux/module.h>
30 #define PCI_VENDOR_ID_FRESCO_LOGIC 0x1b73
31 #define PCI_DEVICE_ID_FRESCO_LOGIC_PDK 0x1000
32 #define PCI_DEVICE_ID_FRESCO_LOGIC_FL1400 0x1400
34 #define PCI_VENDOR_ID_ETRON 0x1b6f
35 #define PCI_DEVICE_ID_ASROCK_P67 0x7023
37 static const char hcd_name[] =
"xhci_hcd";
52 xhci_dbg(xhci,
"Finished xhci_pci_reinit\n");
67 xhci_dbg(xhci,
"QUIRK: Fresco Logic xHC needs configure"
68 " endpoint cmd after reset endpoint\n");
75 xhci_dbg(xhci,
"QUIRK: Fresco Logic revision %u "
76 "has broken MSI implementation\n",
114 xhci_dbg(xhci,
"QUIRK: Resetting on resume\n");
122 static int xhci_pci_setup(
struct usb_hcd *hcd)
132 xhci = hcd_to_xhci(hcd);
137 xhci_dbg(xhci,
"Got SBRN %u\n", (
unsigned int) xhci->
sbrn);
140 retval = xhci_pci_reinit(xhci, pdev);
173 xhci = hcd_to_xhci(hcd);
178 goto dealloc_usb2_hcd;
196 hcd_to_bus(xhci->
shared_hcd)->root_hub->lpm_capable = 1;
207 static void xhci_pci_remove(
struct pci_dev *dev)
211 xhci = hcd_to_xhci(pci_get_drvdata(dev));
221 static int xhci_pci_suspend(
struct usb_hcd *hcd,
bool do_wakeup)
223 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
226 if (hcd->state != HC_STATE_SUSPENDED ||
227 xhci->
shared_hcd->state != HC_STATE_SUSPENDED)
235 static int xhci_pci_resume(
struct usb_hcd *hcd,
bool hibernated)
237 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
265 static const struct hc_driver xhci_pci_hc_driver = {
266 .description = hcd_name,
267 .product_desc =
"xHCI Host Controller",
268 .hcd_priv_size =
sizeof(
struct xhci_hcd *),
274 .
flags = HCD_MEMORY | HCD_USB3 | HCD_SHARED,
279 .reset = xhci_pci_setup,
282 .pci_suspend = xhci_pci_suspend,
283 .pci_resume = xhci_pci_resume,
331 .driver_data = (
unsigned long) &xhci_pci_hc_driver,
339 .name = (
char *) hcd_name,
342 .
probe = xhci_pci_probe,
343 .
remove = xhci_pci_remove,
347 #ifdef CONFIG_PM_SLEEP
349 .pm = &usb_hcd_pci_pm_ops
356 return pci_register_driver(&xhci_pci_driver);