Lines Matching defs:xhci
17 #include "xhci.h"
18 #include "xhci-trace.h"
19 #include "xhci-pci.h"
89 static int xhci_pci_reinit(struct xhci_hcd *xhci, struct pci_dev *pdev)
99 xhci_dbg(xhci, "MWI active\n");
101 xhci_dbg(xhci, "Finished xhci_pci_reinit\n");
105 static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
115 xhci->quirks |= driver_data->quirks;
124 xhci->quirks |= XHCI_RESET_EP_QUIRK;
125 xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
131 xhci->quirks |= XHCI_SLOW_SUSPEND;
132 xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
138 xhci->quirks |= XHCI_BROKEN_STREAMS;
143 xhci->quirks |= XHCI_BROKEN_MSI;
144 xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
148 xhci->quirks |= XHCI_TRUST_TX_LENGTH;
153 xhci->quirks |= XHCI_BROKEN_STREAMS;
157 xhci->quirks |= XHCI_TRUST_TX_LENGTH;
160 xhci->quirks |= XHCI_NEC_HOST;
162 if (pdev->vendor == PCI_VENDOR_ID_AMD && xhci->hci_version == 0x96)
163 xhci->quirks |= XHCI_AMD_0x96_HOST;
167 xhci->quirks |= XHCI_AMD_PLL_FIX;
174 xhci->quirks |= XHCI_SUSPEND_DELAY;
178 xhci->quirks |= XHCI_SNPS_BROKEN_SUSPEND;
181 xhci->quirks |= XHCI_DISABLE_SPARSE;
182 xhci->quirks |= XHCI_RESET_ON_RESUME;
186 xhci->quirks |= XHCI_TRUST_TX_LENGTH;
193 xhci->quirks |= XHCI_U2_DISABLE_WAKE;
196 xhci->quirks |= XHCI_LPM_SUPPORT;
197 xhci->quirks |= XHCI_INTEL_HOST;
198 xhci->quirks |= XHCI_AVOID_BEI;
202 xhci->quirks |= XHCI_EP_LIMIT_QUIRK;
203 xhci->limit_active_eps = 64;
204 xhci->quirks |= XHCI_SW_BW_CHECKING;
213 xhci->quirks |= XHCI_SPURIOUS_REBOOT;
218 xhci->quirks |= XHCI_SPURIOUS_REBOOT;
219 xhci->quirks |= XHCI_SPURIOUS_WAKEUP;
230 xhci->quirks |= XHCI_PME_STUCK_QUIRK;
234 xhci->quirks |= XHCI_SSIC_PORT_UNUSED;
239 xhci->quirks |= XHCI_INTEL_USB_ROLE_SW;
246 xhci->quirks |= XHCI_MISSING_CAS;
251 xhci->quirks |= XHCI_RESET_TO_DEFAULT;
265 xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
269 xhci->quirks |= XHCI_RESET_ON_RESUME;
270 xhci->quirks |= XHCI_TRUST_TX_LENGTH;
271 xhci->quirks |= XHCI_BROKEN_STREAMS;
275 xhci->quirks |= XHCI_TRUST_TX_LENGTH;
276 xhci->quirks |= XHCI_ZERO_64B_REGS;
277 xhci->quirks |= XHCI_LWP_QUIRK;
281 xhci->quirks |= XHCI_RESET_ON_RESUME;
282 xhci->quirks |= XHCI_ZERO_64B_REGS;
283 xhci->quirks |= XHCI_LWP_QUIRK;
286 xhci->quirks |= XHCI_RESET_ON_RESUME;
291 xhci->quirks |= XHCI_BROKEN_STREAMS;
294 xhci->quirks |= XHCI_LPM_SUPPORT;
295 xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS;
304 xhci->quirks |= XHCI_SPURIOUS_SUCCESS;
305 xhci->quirks |= XHCI_BROKEN_STREAMS;
309 xhci->quirks |= XHCI_TRUST_TX_LENGTH;
310 xhci->quirks |= XHCI_NO_64BIT_SUPPORT;
316 xhci->quirks |= XHCI_NO_64BIT_SUPPORT;
320 xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL;
323 xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_7;
328 xhci->quirks |= XHCI_RESET_PLL_ON_DISCONNECT;
333 xhci->quirks |= XHCI_NO_SOFT_RETRY;
336 xhci->quirks |= XHCI_ZHAOXIN_HOST;
339 xhci->quirks |= XHCI_RESET_ON_RESUME;
340 xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH;
344 xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH;
348 if (xhci->hci_version >= 0x120)
349 xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
351 if (xhci->quirks & XHCI_RESET_ON_RESUME)
352 xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
371 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
372 struct xhci_hub *rhub = &xhci->usb3_rhub;
405 struct xhci_hcd *xhci;
409 xhci = hcd_to_xhci(hcd);
410 if (!xhci->sbrn)
411 pci_read_config_byte(pdev, XHCI_SBRN_OFFSET, &xhci->sbrn);
414 xhci->imod_interval = 40000;
423 if (xhci->quirks & XHCI_PME_STUCK_QUIRK)
426 xhci_dbg(xhci, "Got SBRN %u\n", (unsigned int) xhci->sbrn);
429 return xhci_pci_reinit(xhci, pdev);
449 struct xhci_hcd *xhci;
482 xhci = hcd_to_xhci(hcd);
483 xhci->reset = reset;
484 xhci->shared_hcd = usb_create_shared_hcd(&xhci_pci_hc_driver, &dev->dev,
486 if (!xhci->shared_hcd) {
491 retval = xhci_ext_cap_init(xhci);
495 retval = usb_add_hcd(xhci->shared_hcd, dev->irq,
501 if (!(xhci->quirks & XHCI_BROKEN_STREAMS) &&
502 HCC_MAX_PSA(xhci->hcc_params) >= 4)
503 xhci->shared_hcd->can_do_streams = 1;
510 else if (xhci->quirks & XHCI_DEFAULT_PM_RUNTIME_ALLOW)
518 usb_put_hcd(xhci->shared_hcd);
528 struct xhci_hcd *xhci;
530 xhci = hcd_to_xhci(pci_get_drvdata(dev));
531 if (xhci->quirks & XHCI_RENESAS_FW_QUIRK)
534 xhci->xhc_state |= XHCI_STATE_REMOVING;
536 if (xhci->quirks & XHCI_DEFAULT_PM_RUNTIME_ALLOW)
539 if (xhci->shared_hcd) {
540 usb_remove_hcd(xhci->shared_hcd);
541 usb_put_hcd(xhci->shared_hcd);
542 xhci->shared_hcd = NULL;
546 if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
550 if (xhci->quirks & XHCI_LWP_QUIRK)
566 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
572 reg = (void __iomem *) xhci->cap_regs +
601 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
605 reg = (void __iomem *) xhci->cap_regs + 0x80a4;
622 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
630 if (xhci->quirks & XHCI_COMP_MODE_QUIRK)
633 if (xhci->quirks & XHCI_PME_STUCK_QUIRK)
636 if (xhci->quirks & XHCI_SSIC_PORT_UNUSED)
639 if (xhci->quirks & XHCI_DISABLE_SPARSE)
642 ret = xhci_suspend(xhci, do_wakeup);
643 if (ret && (xhci->quirks & XHCI_SSIC_PORT_UNUSED))
651 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
655 reset_control_reset(xhci->reset);
678 if (xhci->quirks & XHCI_SSIC_PORT_UNUSED)
681 if (xhci->quirks & XHCI_PME_STUCK_QUIRK)
684 retval = xhci_resume(xhci, hibernated);
690 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
696 if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
700 if (xhci->quirks & XHCI_LWP_QUIRK)
729 * load firmware, so don't encumber the xhci-pci driver with it.