xhci-pci.c 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * xHCI host controller driver PCI Bus Glue.
  4. *
  5. * Copyright (C) 2008 Intel Corp.
  6. *
  7. * Author: Sarah Sharp
  8. * Some code borrowed from the Linux EHCI driver.
  9. */
  10. #include <linux/pci.h>
  11. #include <linux/slab.h>
  12. #include <linux/module.h>
  13. #include <linux/acpi.h>
  14. #include <linux/reset.h>
  15. #include <linux/suspend.h>
  16. #include "xhci.h"
  17. #include "xhci-trace.h"
  18. #include "xhci-pci.h"
  19. #define SSIC_PORT_NUM 2
  20. #define SSIC_PORT_CFG2 0x880c
  21. #define SSIC_PORT_CFG2_OFFSET 0x30
  22. #define PROG_DONE (1 << 30)
  23. #define SSIC_PORT_UNUSED (1 << 31)
  24. #define SPARSE_DISABLE_BIT 17
  25. #define SPARSE_CNTL_ENABLE 0xC12C
  26. /* Device for a quirk */
  27. #define PCI_VENDOR_ID_FRESCO_LOGIC 0x1b73
  28. #define PCI_DEVICE_ID_FRESCO_LOGIC_PDK 0x1000
  29. #define PCI_DEVICE_ID_FRESCO_LOGIC_FL1009 0x1009
  30. #define PCI_DEVICE_ID_FRESCO_LOGIC_FL1100 0x1100
  31. #define PCI_DEVICE_ID_FRESCO_LOGIC_FL1400 0x1400
  32. #define PCI_VENDOR_ID_ETRON 0x1b6f
  33. #define PCI_DEVICE_ID_EJ168 0x7023
  34. #define PCI_DEVICE_ID_EJ188 0x7052
  35. #define PCI_DEVICE_ID_INTEL_LYNXPOINT_XHCI 0x8c31
  36. #define PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI 0x9c31
  37. #define PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_XHCI 0x9cb1
  38. #define PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI 0x22b5
  39. #define PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_XHCI 0xa12f
  40. #define PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_XHCI 0x9d2f
  41. #define PCI_DEVICE_ID_INTEL_BROXTON_M_XHCI 0x0aa8
  42. #define PCI_DEVICE_ID_INTEL_BROXTON_B_XHCI 0x1aa8
  43. #define PCI_DEVICE_ID_INTEL_APOLLO_LAKE_XHCI 0x5aa8
  44. #define PCI_DEVICE_ID_INTEL_DENVERTON_XHCI 0x19d0
  45. #define PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI 0x8a13
  46. #define PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI 0x9a13
  47. #define PCI_DEVICE_ID_INTEL_TIGER_LAKE_PCH_XHCI 0xa0ed
  48. #define PCI_DEVICE_ID_INTEL_COMET_LAKE_XHCI 0xa3af
  49. #define PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI 0x51ed
  50. #define PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_PCH_XHCI 0x54ed
  51. #define PCI_VENDOR_ID_PHYTIUM 0x1db7
  52. #define PCI_DEVICE_ID_PHYTIUM_XHCI 0xdc27
  53. /* Thunderbolt */
  54. #define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI 0x1138
  55. #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_2C_XHCI 0x15b5
  56. #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_4C_XHCI 0x15b6
  57. #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_LP_XHCI 0x15c1
  58. #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_C_2C_XHCI 0x15db
  59. #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_C_4C_XHCI 0x15d4
  60. #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_2C_XHCI 0x15e9
  61. #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_XHCI 0x15ec
  62. #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_DD_XHCI 0x15f0
  63. #define PCI_DEVICE_ID_AMD_RENOIR_XHCI 0x1639
  64. #define PCI_DEVICE_ID_AMD_PROMONTORYA_4 0x43b9
  65. #define PCI_DEVICE_ID_AMD_PROMONTORYA_3 0x43ba
  66. #define PCI_DEVICE_ID_AMD_PROMONTORYA_2 0x43bb
  67. #define PCI_DEVICE_ID_AMD_PROMONTORYA_1 0x43bc
  68. #define PCI_DEVICE_ID_ASMEDIA_1042_XHCI 0x1042
  69. #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142
  70. #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242
  71. #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142
  72. #define PCI_DEVICE_ID_ASMEDIA_3042_XHCI 0x3042
  73. #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI 0x3242
  74. #define PCI_DEVICE_ID_CADENCE 0x17CD
  75. #define PCI_DEVICE_ID_CADENCE_SSP 0x0200
  76. static const char hcd_name[] = "xhci_hcd";
  77. static struct hc_driver __read_mostly xhci_pci_hc_driver;
  78. static int xhci_pci_setup(struct usb_hcd *hcd);
  79. static int xhci_pci_run(struct usb_hcd *hcd);
  80. static int xhci_pci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev,
  81. struct usb_tt *tt, gfp_t mem_flags);
  82. static const struct xhci_driver_overrides xhci_pci_overrides __initconst = {
  83. .reset = xhci_pci_setup,
  84. .start = xhci_pci_run,
  85. .update_hub_device = xhci_pci_update_hub_device,
  86. };
  87. /*
  88. * Primary Legacy and MSI IRQ are synced in suspend_common().
  89. * All MSI-X IRQs and secondary MSI IRQs should be synced here.
  90. */
  91. static void xhci_msix_sync_irqs(struct xhci_hcd *xhci)
  92. {
  93. struct usb_hcd *hcd = xhci_to_hcd(xhci);
  94. if (hcd->msix_enabled) {
  95. struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
  96. /* for now, the driver only supports one primary interrupter */
  97. synchronize_irq(pci_irq_vector(pdev, 0));
  98. }
  99. }
  100. /* Legacy IRQ is freed by usb_remove_hcd() or usb_hcd_pci_shutdown() */
  101. static void xhci_cleanup_msix(struct xhci_hcd *xhci)
  102. {
  103. struct usb_hcd *hcd = xhci_to_hcd(xhci);
  104. struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
  105. if (hcd->irq > 0)
  106. return;
  107. free_irq(pci_irq_vector(pdev, 0), xhci_to_hcd(xhci));
  108. pci_free_irq_vectors(pdev);
  109. hcd->msix_enabled = 0;
  110. }
  111. /* Try enabling MSI-X with MSI and legacy IRQ as fallback */
  112. static int xhci_try_enable_msi(struct usb_hcd *hcd)
  113. {
  114. struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
  115. struct xhci_hcd *xhci = hcd_to_xhci(hcd);
  116. int ret;
  117. /*
  118. * Some Fresco Logic host controllers advertise MSI, but fail to
  119. * generate interrupts. Don't even try to enable MSI.
  120. */
  121. if (xhci->quirks & XHCI_BROKEN_MSI)
  122. goto legacy_irq;
  123. /* unregister the legacy interrupt */
  124. if (hcd->irq)
  125. free_irq(hcd->irq, hcd);
  126. hcd->irq = 0;
  127. /*
  128. * calculate number of MSI-X vectors supported.
  129. * - HCS_MAX_INTRS: the max number of interrupts the host can handle,
  130. * with max number of interrupters based on the xhci HCSPARAMS1.
  131. * - num_online_cpus: maximum MSI-X vectors per CPUs core.
  132. * Add additional 1 vector to ensure always available interrupt.
  133. */
  134. xhci->nvecs = min(num_online_cpus() + 1,
  135. HCS_MAX_INTRS(xhci->hcs_params1));
  136. /* TODO: Check with MSI Soc for sysdev */
  137. xhci->nvecs = pci_alloc_irq_vectors(pdev, 1, xhci->nvecs,
  138. PCI_IRQ_MSIX | PCI_IRQ_MSI);
  139. if (xhci->nvecs < 0) {
  140. xhci_dbg_trace(xhci, trace_xhci_dbg_init,
  141. "failed to allocate IRQ vectors");
  142. goto legacy_irq;
  143. }
  144. ret = request_irq(pci_irq_vector(pdev, 0), xhci_msi_irq, 0, "xhci_hcd",
  145. xhci_to_hcd(xhci));
  146. if (ret)
  147. goto free_irq_vectors;
  148. hcd->msi_enabled = 1;
  149. hcd->msix_enabled = pdev->msix_enabled;
  150. return 0;
  151. free_irq_vectors:
  152. xhci_dbg_trace(xhci, trace_xhci_dbg_init, "disable %s interrupt",
  153. pdev->msix_enabled ? "MSI-X" : "MSI");
  154. pci_free_irq_vectors(pdev);
  155. legacy_irq:
  156. if (!pdev->irq) {
  157. xhci_err(xhci, "No msi-x/msi found and no IRQ in BIOS\n");
  158. return -EINVAL;
  159. }
  160. if (!strlen(hcd->irq_descr))
  161. snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d",
  162. hcd->driver->description, hcd->self.busnum);
  163. /* fall back to legacy interrupt */
  164. ret = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED, hcd->irq_descr, hcd);
  165. if (ret) {
  166. xhci_err(xhci, "request interrupt %d failed\n", pdev->irq);
  167. return ret;
  168. }
  169. hcd->irq = pdev->irq;
  170. return 0;
  171. }
  172. static int xhci_pci_run(struct usb_hcd *hcd)
  173. {
  174. int ret;
  175. if (usb_hcd_is_primary_hcd(hcd)) {
  176. ret = xhci_try_enable_msi(hcd);
  177. if (ret)
  178. return ret;
  179. }
  180. return xhci_run(hcd);
  181. }
  182. static void xhci_pci_stop(struct usb_hcd *hcd)
  183. {
  184. struct xhci_hcd *xhci = hcd_to_xhci(hcd);
  185. xhci_stop(hcd);
  186. if (usb_hcd_is_primary_hcd(hcd))
  187. xhci_cleanup_msix(xhci);
  188. }
  189. /* called after powerup, by probe or system-pm "wakeup" */
  190. static int xhci_pci_reinit(struct xhci_hcd *xhci, struct pci_dev *pdev)
  191. {
  192. /*
  193. * TODO: Implement finding debug ports later.
  194. * TODO: see if there are any quirks that need to be added to handle
  195. * new extended capabilities.
  196. */
  197. /* PCI Memory-Write-Invalidate cycle support is optional (uncommon) */
  198. if (!pci_set_mwi(pdev))
  199. xhci_dbg(xhci, "MWI active\n");
  200. xhci_dbg(xhci, "Finished xhci_pci_reinit\n");
  201. return 0;
  202. }
  203. static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
  204. {
  205. struct pci_dev *pdev = to_pci_dev(dev);
  206. /* Look for vendor-specific quirks */
  207. if (pdev->vendor == PCI_VENDOR_ID_FRESCO_LOGIC &&
  208. (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK ||
  209. pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1400)) {
  210. if (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK &&
  211. pdev->revision == 0x0) {
  212. xhci->quirks |= XHCI_RESET_EP_QUIRK;
  213. xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
  214. "XHCI_RESET_EP_QUIRK for this evaluation HW is deprecated");
  215. }
  216. if (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK &&
  217. pdev->revision == 0x4) {
  218. xhci->quirks |= XHCI_SLOW_SUSPEND;
  219. xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
  220. "QUIRK: Fresco Logic xHC revision %u"
  221. "must be suspended extra slowly",
  222. pdev->revision);
  223. }
  224. if (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK)
  225. xhci->quirks |= XHCI_BROKEN_STREAMS;
  226. /* Fresco Logic confirms: all revisions of this chip do not
  227. * support MSI, even though some of them claim to in their PCI
  228. * capabilities.
  229. */
  230. xhci->quirks |= XHCI_BROKEN_MSI;
  231. xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
  232. "QUIRK: Fresco Logic revision %u "
  233. "has broken MSI implementation",
  234. pdev->revision);
  235. }
  236. if (pdev->vendor == PCI_VENDOR_ID_FRESCO_LOGIC &&
  237. pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1009)
  238. xhci->quirks |= XHCI_BROKEN_STREAMS;
  239. if (pdev->vendor == PCI_VENDOR_ID_NEC)
  240. xhci->quirks |= XHCI_NEC_HOST;
  241. if (pdev->vendor == PCI_VENDOR_ID_AMD && xhci->hci_version == 0x96)
  242. xhci->quirks |= XHCI_AMD_0x96_HOST;
  243. /* AMD PLL quirk */
  244. if (pdev->vendor == PCI_VENDOR_ID_AMD && usb_amd_quirk_pll_check())
  245. xhci->quirks |= XHCI_AMD_PLL_FIX;
  246. if (pdev->vendor == PCI_VENDOR_ID_AMD &&
  247. (pdev->device == 0x145c ||
  248. pdev->device == 0x15e0 ||
  249. pdev->device == 0x15e1 ||
  250. pdev->device == 0x43bb))
  251. xhci->quirks |= XHCI_SUSPEND_DELAY;
  252. if (pdev->vendor == PCI_VENDOR_ID_AMD &&
  253. (pdev->device == 0x15e0 || pdev->device == 0x15e1))
  254. xhci->quirks |= XHCI_SNPS_BROKEN_SUSPEND;
  255. if (pdev->vendor == PCI_VENDOR_ID_AMD && pdev->device == 0x15e5) {
  256. xhci->quirks |= XHCI_DISABLE_SPARSE;
  257. xhci->quirks |= XHCI_RESET_ON_RESUME;
  258. }
  259. if (pdev->vendor == PCI_VENDOR_ID_AMD && pdev->device == 0x43f7)
  260. xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
  261. if ((pdev->vendor == PCI_VENDOR_ID_AMD) &&
  262. ((pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4) ||
  263. (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_3) ||
  264. (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_2) ||
  265. (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_1)))
  266. xhci->quirks |= XHCI_U2_DISABLE_WAKE;
  267. if (pdev->vendor == PCI_VENDOR_ID_AMD &&
  268. pdev->device == PCI_DEVICE_ID_AMD_RENOIR_XHCI)
  269. xhci->quirks |= XHCI_BROKEN_D3COLD_S2I;
  270. if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
  271. xhci->quirks |= XHCI_LPM_SUPPORT;
  272. xhci->quirks |= XHCI_INTEL_HOST;
  273. xhci->quirks |= XHCI_AVOID_BEI;
  274. }
  275. if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
  276. pdev->device == PCI_DEVICE_ID_INTEL_PANTHERPOINT_XHCI) {
  277. xhci->quirks |= XHCI_EP_LIMIT_QUIRK;
  278. xhci->limit_active_eps = 64;
  279. xhci->quirks |= XHCI_SW_BW_CHECKING;
  280. /*
  281. * PPT desktop boards DH77EB and DH77DF will power back on after
  282. * a few seconds of being shutdown. The fix for this is to
  283. * switch the ports from xHCI to EHCI on shutdown. We can't use
  284. * DMI information to find those particular boards (since each
  285. * vendor will change the board name), so we have to key off all
  286. * PPT chipsets.
  287. */
  288. xhci->quirks |= XHCI_SPURIOUS_REBOOT;
  289. }
  290. if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
  291. (pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI ||
  292. pdev->device == PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_XHCI)) {
  293. xhci->quirks |= XHCI_SPURIOUS_REBOOT;
  294. xhci->quirks |= XHCI_SPURIOUS_WAKEUP;
  295. }
  296. if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
  297. (pdev->device == PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_XHCI ||
  298. pdev->device == PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_XHCI ||
  299. pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI ||
  300. pdev->device == PCI_DEVICE_ID_INTEL_BROXTON_M_XHCI ||
  301. pdev->device == PCI_DEVICE_ID_INTEL_BROXTON_B_XHCI ||
  302. pdev->device == PCI_DEVICE_ID_INTEL_APOLLO_LAKE_XHCI ||
  303. pdev->device == PCI_DEVICE_ID_INTEL_DENVERTON_XHCI ||
  304. pdev->device == PCI_DEVICE_ID_INTEL_COMET_LAKE_XHCI)) {
  305. xhci->quirks |= XHCI_PME_STUCK_QUIRK;
  306. }
  307. if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
  308. pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI)
  309. xhci->quirks |= XHCI_SSIC_PORT_UNUSED;
  310. if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
  311. (pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI ||
  312. pdev->device == PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_XHCI ||
  313. pdev->device == PCI_DEVICE_ID_INTEL_APOLLO_LAKE_XHCI))
  314. xhci->quirks |= XHCI_INTEL_USB_ROLE_SW;
  315. if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
  316. (pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI ||
  317. pdev->device == PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_XHCI ||
  318. pdev->device == PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_XHCI ||
  319. pdev->device == PCI_DEVICE_ID_INTEL_APOLLO_LAKE_XHCI ||
  320. pdev->device == PCI_DEVICE_ID_INTEL_DENVERTON_XHCI))
  321. xhci->quirks |= XHCI_MISSING_CAS;
  322. if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
  323. (pdev->device == PCI_DEVICE_ID_INTEL_TIGER_LAKE_PCH_XHCI ||
  324. pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI ||
  325. pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_PCH_XHCI))
  326. xhci->quirks |= XHCI_RESET_TO_DEFAULT;
  327. if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
  328. (pdev->device == PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_2C_XHCI ||
  329. pdev->device == PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_4C_XHCI ||
  330. pdev->device == PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_LP_XHCI ||
  331. pdev->device == PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_C_2C_XHCI ||
  332. pdev->device == PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_C_4C_XHCI ||
  333. pdev->device == PCI_DEVICE_ID_INTEL_TITAN_RIDGE_2C_XHCI ||
  334. pdev->device == PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_XHCI ||
  335. pdev->device == PCI_DEVICE_ID_INTEL_TITAN_RIDGE_DD_XHCI ||
  336. pdev->device == PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI ||
  337. pdev->device == PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI ||
  338. pdev->device == PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI))
  339. xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
  340. if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
  341. (pdev->device == PCI_DEVICE_ID_EJ168 ||
  342. pdev->device == PCI_DEVICE_ID_EJ188)) {
  343. xhci->quirks |= XHCI_ETRON_HOST;
  344. xhci->quirks |= XHCI_RESET_ON_RESUME;
  345. xhci->quirks |= XHCI_BROKEN_STREAMS;
  346. xhci->quirks |= XHCI_NO_SOFT_RETRY;
  347. }
  348. if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
  349. pdev->device == 0x0014) {
  350. xhci->quirks |= XHCI_ZERO_64B_REGS;
  351. }
  352. if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
  353. pdev->device == 0x0015) {
  354. xhci->quirks |= XHCI_RESET_ON_RESUME;
  355. xhci->quirks |= XHCI_ZERO_64B_REGS;
  356. }
  357. if (pdev->vendor == PCI_VENDOR_ID_VIA)
  358. xhci->quirks |= XHCI_RESET_ON_RESUME;
  359. if (pdev->vendor == PCI_VENDOR_ID_PHYTIUM &&
  360. pdev->device == PCI_DEVICE_ID_PHYTIUM_XHCI)
  361. xhci->quirks |= XHCI_RESET_ON_RESUME;
  362. /* See https://bugzilla.kernel.org/show_bug.cgi?id=79511 */
  363. if (pdev->vendor == PCI_VENDOR_ID_VIA &&
  364. pdev->device == 0x3432)
  365. xhci->quirks |= XHCI_BROKEN_STREAMS;
  366. if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483)
  367. xhci->quirks |= XHCI_LPM_SUPPORT;
  368. if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
  369. pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI) {
  370. /*
  371. * try to tame the ASMedia 1042 controller which reports 0.96
  372. * but appears to behave more like 1.0
  373. */
  374. xhci->quirks |= XHCI_SPURIOUS_SUCCESS;
  375. xhci->quirks |= XHCI_BROKEN_STREAMS;
  376. }
  377. if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
  378. pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI) {
  379. xhci->quirks |= XHCI_NO_64BIT_SUPPORT;
  380. }
  381. if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
  382. (pdev->device == PCI_DEVICE_ID_ASMEDIA_1142_XHCI ||
  383. pdev->device == PCI_DEVICE_ID_ASMEDIA_2142_XHCI ||
  384. pdev->device == PCI_DEVICE_ID_ASMEDIA_3242_XHCI))
  385. xhci->quirks |= XHCI_NO_64BIT_SUPPORT;
  386. if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
  387. pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI)
  388. xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL;
  389. if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
  390. pdev->device == PCI_DEVICE_ID_ASMEDIA_3042_XHCI)
  391. xhci->quirks |= XHCI_RESET_ON_RESUME;
  392. if (pdev->vendor == PCI_VENDOR_ID_TI && pdev->device == 0x8241)
  393. xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_7;
  394. if ((pdev->vendor == PCI_VENDOR_ID_BROADCOM ||
  395. pdev->vendor == PCI_VENDOR_ID_CAVIUM) &&
  396. pdev->device == 0x9026)
  397. xhci->quirks |= XHCI_RESET_PLL_ON_DISCONNECT;
  398. if (pdev->vendor == PCI_VENDOR_ID_AMD &&
  399. (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_2 ||
  400. pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4))
  401. xhci->quirks |= XHCI_NO_SOFT_RETRY;
  402. if (pdev->vendor == PCI_VENDOR_ID_ZHAOXIN) {
  403. xhci->quirks |= XHCI_ZHAOXIN_HOST;
  404. xhci->quirks |= XHCI_LPM_SUPPORT;
  405. if (pdev->device == 0x9202) {
  406. xhci->quirks |= XHCI_RESET_ON_RESUME;
  407. xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH;
  408. }
  409. if (pdev->device == 0x9203)
  410. xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH;
  411. }
  412. if (pdev->vendor == PCI_DEVICE_ID_CADENCE &&
  413. pdev->device == PCI_DEVICE_ID_CADENCE_SSP)
  414. xhci->quirks |= XHCI_CDNS_SCTX_QUIRK;
  415. /* xHC spec requires PCI devices to support D3hot and D3cold */
  416. if (xhci->hci_version >= 0x120)
  417. xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
  418. if (xhci->quirks & XHCI_RESET_ON_RESUME)
  419. xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
  420. "QUIRK: Resetting on resume");
  421. }
  422. #ifdef CONFIG_ACPI
  423. static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev)
  424. {
  425. static const guid_t intel_dsm_guid =
  426. GUID_INIT(0xac340cb7, 0xe901, 0x45bf,
  427. 0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23);
  428. union acpi_object *obj;
  429. obj = acpi_evaluate_dsm(ACPI_HANDLE(&dev->dev), &intel_dsm_guid, 3, 1,
  430. NULL);
  431. ACPI_FREE(obj);
  432. }
  433. static void xhci_find_lpm_incapable_ports(struct usb_hcd *hcd, struct usb_device *hdev)
  434. {
  435. struct xhci_hcd *xhci = hcd_to_xhci(hcd);
  436. struct xhci_hub *rhub = &xhci->usb3_rhub;
  437. int ret;
  438. int i;
  439. /* This is not the usb3 roothub we are looking for */
  440. if (hcd != rhub->hcd)
  441. return;
  442. if (hdev->maxchild > rhub->num_ports) {
  443. dev_err(&hdev->dev, "USB3 roothub port number mismatch\n");
  444. return;
  445. }
  446. for (i = 0; i < hdev->maxchild; i++) {
  447. ret = usb_acpi_port_lpm_incapable(hdev, i);
  448. dev_dbg(&hdev->dev, "port-%d disable U1/U2 _DSM: %d\n", i + 1, ret);
  449. if (ret >= 0) {
  450. rhub->ports[i]->lpm_incapable = ret;
  451. continue;
  452. }
  453. }
  454. }
  455. #else
  456. static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { }
  457. static void xhci_find_lpm_incapable_ports(struct usb_hcd *hcd, struct usb_device *hdev) { }
  458. #endif /* CONFIG_ACPI */
  459. /* called during probe() after chip reset completes */
  460. static int xhci_pci_setup(struct usb_hcd *hcd)
  461. {
  462. struct xhci_hcd *xhci;
  463. struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
  464. int retval;
  465. u8 sbrn;
  466. xhci = hcd_to_xhci(hcd);
  467. /* imod_interval is the interrupt moderation value in nanoseconds. */
  468. xhci->imod_interval = 40000;
  469. retval = xhci_gen_setup(hcd, xhci_pci_quirks);
  470. if (retval)
  471. return retval;
  472. if (!usb_hcd_is_primary_hcd(hcd))
  473. return 0;
  474. if (xhci->quirks & XHCI_PME_STUCK_QUIRK)
  475. xhci_pme_acpi_rtd3_enable(pdev);
  476. pci_read_config_byte(pdev, XHCI_SBRN_OFFSET, &sbrn);
  477. xhci_dbg(xhci, "Got SBRN %u\n", (unsigned int)sbrn);
  478. /* Find any debug ports */
  479. return xhci_pci_reinit(xhci, pdev);
  480. }
  481. static int xhci_pci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev,
  482. struct usb_tt *tt, gfp_t mem_flags)
  483. {
  484. /* Check if acpi claims some USB3 roothub ports are lpm incapable */
  485. if (!hdev->parent)
  486. xhci_find_lpm_incapable_ports(hcd, hdev);
  487. return xhci_update_hub_device(hcd, hdev, tt, mem_flags);
  488. }
  489. /*
  490. * We need to register our own PCI probe function (instead of the USB core's
  491. * function) in order to create a second roothub under xHCI.
  492. */
  493. int xhci_pci_common_probe(struct pci_dev *dev, const struct pci_device_id *id)
  494. {
  495. int retval;
  496. struct xhci_hcd *xhci;
  497. struct usb_hcd *hcd;
  498. struct reset_control *reset;
  499. reset = devm_reset_control_get_optional_exclusive(&dev->dev, NULL);
  500. if (IS_ERR(reset))
  501. return PTR_ERR(reset);
  502. reset_control_reset(reset);
  503. /* Prevent runtime suspending between USB-2 and USB-3 initialization */
  504. pm_runtime_get_noresume(&dev->dev);
  505. /* Register the USB 2.0 roothub.
  506. * FIXME: USB core must know to register the USB 2.0 roothub first.
  507. * This is sort of silly, because we could just set the HCD driver flags
  508. * to say USB 2.0, but I'm not sure what the implications would be in
  509. * the other parts of the HCD code.
  510. */
  511. retval = usb_hcd_pci_probe(dev, &xhci_pci_hc_driver);
  512. if (retval)
  513. goto put_runtime_pm;
  514. /* USB 2.0 roothub is stored in the PCI device now. */
  515. hcd = dev_get_drvdata(&dev->dev);
  516. xhci = hcd_to_xhci(hcd);
  517. xhci->reset = reset;
  518. xhci->shared_hcd = usb_create_shared_hcd(&xhci_pci_hc_driver, &dev->dev,
  519. pci_name(dev), hcd);
  520. if (!xhci->shared_hcd) {
  521. retval = -ENOMEM;
  522. goto dealloc_usb2_hcd;
  523. }
  524. retval = xhci_ext_cap_init(xhci);
  525. if (retval)
  526. goto put_usb3_hcd;
  527. retval = usb_add_hcd(xhci->shared_hcd, dev->irq,
  528. IRQF_SHARED);
  529. if (retval)
  530. goto put_usb3_hcd;
  531. /* Roothub already marked as USB 3.0 speed */
  532. if (!(xhci->quirks & XHCI_BROKEN_STREAMS) &&
  533. HCC_MAX_PSA(xhci->hcc_params) >= 4)
  534. xhci->shared_hcd->can_do_streams = 1;
  535. /* USB-2 and USB-3 roothubs initialized, allow runtime pm suspend */
  536. pm_runtime_put_noidle(&dev->dev);
  537. if (pci_choose_state(dev, PMSG_SUSPEND) == PCI_D0)
  538. pm_runtime_get(&dev->dev);
  539. else if (xhci->quirks & XHCI_DEFAULT_PM_RUNTIME_ALLOW)
  540. pm_runtime_allow(&dev->dev);
  541. dma_set_max_seg_size(&dev->dev, UINT_MAX);
  542. return 0;
  543. put_usb3_hcd:
  544. usb_put_hcd(xhci->shared_hcd);
  545. dealloc_usb2_hcd:
  546. usb_hcd_pci_remove(dev);
  547. put_runtime_pm:
  548. pm_runtime_put_noidle(&dev->dev);
  549. return retval;
  550. }
  551. EXPORT_SYMBOL_NS_GPL(xhci_pci_common_probe, xhci);
  552. /* handled by xhci-pci-renesas if enabled */
  553. static const struct pci_device_id pci_ids_renesas[] = {
  554. { PCI_DEVICE(PCI_VENDOR_ID_RENESAS, 0x0014) },
  555. { PCI_DEVICE(PCI_VENDOR_ID_RENESAS, 0x0015) },
  556. { /* end: all zeroes */ }
  557. };
  558. static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
  559. {
  560. if (IS_ENABLED(CONFIG_USB_XHCI_PCI_RENESAS) &&
  561. pci_match_id(pci_ids_renesas, dev))
  562. return -ENODEV;
  563. return xhci_pci_common_probe(dev, id);
  564. }
  565. void xhci_pci_remove(struct pci_dev *dev)
  566. {
  567. struct xhci_hcd *xhci;
  568. bool set_power_d3;
  569. xhci = hcd_to_xhci(pci_get_drvdata(dev));
  570. set_power_d3 = xhci->quirks & XHCI_SPURIOUS_WAKEUP;
  571. xhci->xhc_state |= XHCI_STATE_REMOVING;
  572. if (pci_choose_state(dev, PMSG_SUSPEND) == PCI_D0)
  573. pm_runtime_put(&dev->dev);
  574. else if (xhci->quirks & XHCI_DEFAULT_PM_RUNTIME_ALLOW)
  575. pm_runtime_forbid(&dev->dev);
  576. if (xhci->shared_hcd) {
  577. usb_remove_hcd(xhci->shared_hcd);
  578. usb_put_hcd(xhci->shared_hcd);
  579. xhci->shared_hcd = NULL;
  580. }
  581. usb_hcd_pci_remove(dev);
  582. /* Workaround for spurious wakeups at shutdown with HSW */
  583. if (set_power_d3)
  584. pci_set_power_state(dev, PCI_D3hot);
  585. }
  586. EXPORT_SYMBOL_NS_GPL(xhci_pci_remove, xhci);
  587. /*
  588. * In some Intel xHCI controllers, in order to get D3 working,
  589. * through a vendor specific SSIC CONFIG register at offset 0x883c,
  590. * SSIC PORT need to be marked as "unused" before putting xHCI
  591. * into D3. After D3 exit, the SSIC port need to be marked as "used".
  592. * Without this change, xHCI might not enter D3 state.
  593. */
  594. static void xhci_ssic_port_unused_quirk(struct usb_hcd *hcd, bool suspend)
  595. {
  596. struct xhci_hcd *xhci = hcd_to_xhci(hcd);
  597. u32 val;
  598. void __iomem *reg;
  599. int i;
  600. for (i = 0; i < SSIC_PORT_NUM; i++) {
  601. reg = (void __iomem *) xhci->cap_regs +
  602. SSIC_PORT_CFG2 +
  603. i * SSIC_PORT_CFG2_OFFSET;
  604. /* Notify SSIC that SSIC profile programming is not done. */
  605. val = readl(reg) & ~PROG_DONE;
  606. writel(val, reg);
  607. /* Mark SSIC port as unused(suspend) or used(resume) */
  608. val = readl(reg);
  609. if (suspend)
  610. val |= SSIC_PORT_UNUSED;
  611. else
  612. val &= ~SSIC_PORT_UNUSED;
  613. writel(val, reg);
  614. /* Notify SSIC that SSIC profile programming is done */
  615. val = readl(reg) | PROG_DONE;
  616. writel(val, reg);
  617. readl(reg);
  618. }
  619. }
  620. /*
  621. * Make sure PME works on some Intel xHCI controllers by writing 1 to clear
  622. * the Internal PME flag bit in vendor specific PMCTRL register at offset 0x80a4
  623. */
  624. static void xhci_pme_quirk(struct usb_hcd *hcd)
  625. {
  626. struct xhci_hcd *xhci = hcd_to_xhci(hcd);
  627. void __iomem *reg;
  628. u32 val;
  629. reg = (void __iomem *) xhci->cap_regs + 0x80a4;
  630. val = readl(reg);
  631. writel(val | BIT(28), reg);
  632. readl(reg);
  633. }
  634. static void xhci_sparse_control_quirk(struct usb_hcd *hcd)
  635. {
  636. u32 reg;
  637. reg = readl(hcd->regs + SPARSE_CNTL_ENABLE);
  638. reg &= ~BIT(SPARSE_DISABLE_BIT);
  639. writel(reg, hcd->regs + SPARSE_CNTL_ENABLE);
  640. }
  641. static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
  642. {
  643. struct xhci_hcd *xhci = hcd_to_xhci(hcd);
  644. struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
  645. int ret;
  646. /*
  647. * Systems with the TI redriver that loses port status change events
  648. * need to have the registers polled during D3, so avoid D3cold.
  649. */
  650. if (xhci->quirks & XHCI_COMP_MODE_QUIRK)
  651. pci_d3cold_disable(pdev);
  652. #ifdef CONFIG_SUSPEND
  653. /* d3cold is broken, but only when s2idle is used */
  654. if (pm_suspend_target_state == PM_SUSPEND_TO_IDLE &&
  655. xhci->quirks & (XHCI_BROKEN_D3COLD_S2I))
  656. pci_d3cold_disable(pdev);
  657. #endif
  658. if (xhci->quirks & XHCI_PME_STUCK_QUIRK)
  659. xhci_pme_quirk(hcd);
  660. if (xhci->quirks & XHCI_SSIC_PORT_UNUSED)
  661. xhci_ssic_port_unused_quirk(hcd, true);
  662. if (xhci->quirks & XHCI_DISABLE_SPARSE)
  663. xhci_sparse_control_quirk(hcd);
  664. ret = xhci_suspend(xhci, do_wakeup);
  665. /* synchronize irq when using MSI-X */
  666. xhci_msix_sync_irqs(xhci);
  667. if (ret && (xhci->quirks & XHCI_SSIC_PORT_UNUSED))
  668. xhci_ssic_port_unused_quirk(hcd, false);
  669. return ret;
  670. }
  671. static int xhci_pci_resume(struct usb_hcd *hcd, pm_message_t msg)
  672. {
  673. struct xhci_hcd *xhci = hcd_to_xhci(hcd);
  674. struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
  675. reset_control_reset(xhci->reset);
  676. /* The BIOS on systems with the Intel Panther Point chipset may or may
  677. * not support xHCI natively. That means that during system resume, it
  678. * may switch the ports back to EHCI so that users can use their
  679. * keyboard to select a kernel from GRUB after resume from hibernate.
  680. *
  681. * The BIOS is supposed to remember whether the OS had xHCI ports
  682. * enabled before resume, and switch the ports back to xHCI when the
  683. * BIOS/OS semaphore is written, but we all know we can't trust BIOS
  684. * writers.
  685. *
  686. * Unconditionally switch the ports back to xHCI after a system resume.
  687. * It should not matter whether the EHCI or xHCI controller is
  688. * resumed first. It's enough to do the switchover in xHCI because
  689. * USB core won't notice anything as the hub driver doesn't start
  690. * running again until after all the devices (including both EHCI and
  691. * xHCI host controllers) have been resumed.
  692. */
  693. if (pdev->vendor == PCI_VENDOR_ID_INTEL)
  694. usb_enable_intel_xhci_ports(pdev);
  695. if (xhci->quirks & XHCI_SSIC_PORT_UNUSED)
  696. xhci_ssic_port_unused_quirk(hcd, false);
  697. if (xhci->quirks & XHCI_PME_STUCK_QUIRK)
  698. xhci_pme_quirk(hcd);
  699. return xhci_resume(xhci, msg);
  700. }
  701. static int xhci_pci_poweroff_late(struct usb_hcd *hcd, bool do_wakeup)
  702. {
  703. struct xhci_hcd *xhci = hcd_to_xhci(hcd);
  704. struct xhci_port *port;
  705. struct usb_device *udev;
  706. u32 portsc;
  707. int i;
  708. /*
  709. * Systems with XHCI_RESET_TO_DEFAULT quirk have boot firmware that
  710. * cause significant boot delay if usb ports are in suspended U3 state
  711. * during boot. Some USB devices survive in U3 state over S4 hibernate
  712. *
  713. * Disable ports that are in U3 if remote wake is not enabled for either
  714. * host controller or connected device
  715. */
  716. if (!(xhci->quirks & XHCI_RESET_TO_DEFAULT))
  717. return 0;
  718. for (i = 0; i < HCS_MAX_PORTS(xhci->hcs_params1); i++) {
  719. port = &xhci->hw_ports[i];
  720. portsc = readl(port->addr);
  721. if ((portsc & PORT_PLS_MASK) != XDEV_U3)
  722. continue;
  723. if (!port->slot_id || !xhci->devs[port->slot_id]) {
  724. xhci_err(xhci, "No dev for slot_id %d for port %d-%d in U3\n",
  725. port->slot_id, port->rhub->hcd->self.busnum,
  726. port->hcd_portnum + 1);
  727. continue;
  728. }
  729. udev = xhci->devs[port->slot_id]->udev;
  730. /* if wakeup is enabled then don't disable the port */
  731. if (udev->do_remote_wakeup && do_wakeup)
  732. continue;
  733. xhci_dbg(xhci, "port %d-%d in U3 without wakeup, disable it\n",
  734. port->rhub->hcd->self.busnum, port->hcd_portnum + 1);
  735. portsc = xhci_port_state_to_neutral(portsc);
  736. writel(portsc | PORT_PE, port->addr);
  737. }
  738. return 0;
  739. }
  740. static void xhci_pci_shutdown(struct usb_hcd *hcd)
  741. {
  742. struct xhci_hcd *xhci = hcd_to_xhci(hcd);
  743. struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
  744. xhci_shutdown(hcd);
  745. xhci_cleanup_msix(xhci);
  746. /* Yet another workaround for spurious wakeups at shutdown with HSW */
  747. if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
  748. pci_set_power_state(pdev, PCI_D3hot);
  749. }
  750. /*-------------------------------------------------------------------------*/
  751. /* PCI driver selection metadata; PCI hotplugging uses this */
  752. static const struct pci_device_id pci_ids[] = {
  753. /* handle any USB 3.0 xHCI controller */
  754. { PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_XHCI, ~0),
  755. },
  756. { /* end: all zeroes */ }
  757. };
  758. MODULE_DEVICE_TABLE(pci, pci_ids);
  759. /* pci driver glue; this is a "new style" PCI driver module */
  760. static struct pci_driver xhci_pci_driver = {
  761. .name = hcd_name,
  762. .id_table = pci_ids,
  763. .probe = xhci_pci_probe,
  764. .remove = xhci_pci_remove,
  765. /* suspend and resume implemented later */
  766. .shutdown = usb_hcd_pci_shutdown,
  767. .driver = {
  768. .pm = pm_ptr(&usb_hcd_pci_pm_ops),
  769. },
  770. };
  771. static int __init xhci_pci_init(void)
  772. {
  773. xhci_init_driver(&xhci_pci_hc_driver, &xhci_pci_overrides);
  774. xhci_pci_hc_driver.pci_suspend = pm_ptr(xhci_pci_suspend);
  775. xhci_pci_hc_driver.pci_resume = pm_ptr(xhci_pci_resume);
  776. xhci_pci_hc_driver.pci_poweroff_late = pm_ptr(xhci_pci_poweroff_late);
  777. xhci_pci_hc_driver.shutdown = pm_ptr(xhci_pci_shutdown);
  778. xhci_pci_hc_driver.stop = xhci_pci_stop;
  779. return pci_register_driver(&xhci_pci_driver);
  780. }
  781. module_init(xhci_pci_init);
  782. static void __exit xhci_pci_exit(void)
  783. {
  784. pci_unregister_driver(&xhci_pci_driver);
  785. }
  786. module_exit(xhci_pci_exit);
  787. MODULE_DESCRIPTION("xHCI PCI Host Controller Driver");
  788. MODULE_LICENSE("GPL");