2017-02-10 16:44:43 +00:00
|
|
|
From a0dc613140bab907a3d5787a7ae7b0638bf674d0 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Christian Lamparter <chunkeey@gmail.com>
|
|
|
|
Date: Thu, 23 Jun 2016 20:28:20 +0200
|
|
|
|
Subject: [PATCH] usb: xhci: force MSI for uPD720201 and
|
|
|
|
uPD720202
|
|
|
|
|
|
|
|
The APM82181 does not support MSI-X. When probed, it will
|
|
|
|
produce a noisy warning.
|
|
|
|
|
|
|
|
---
|
|
|
|
drivers/usb/host/pci-quirks.c | 362 ++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
1 file changed, 362 insertions(+)
|
|
|
|
|
|
|
|
--- a/drivers/usb/host/xhci-pci.c
|
|
|
|
+++ b/drivers/usb/host/xhci-pci.c
|
2017-10-18 12:19:10 +00:00
|
|
|
@@ -193,7 +193,7 @@ static void xhci_pci_quirks(struct devic
|
2017-02-10 16:44:43 +00:00
|
|
|
}
|
|
|
|
if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
|
|
|
|
pdev->device == 0x0015)
|
|
|
|
- xhci->quirks |= XHCI_RESET_ON_RESUME;
|
|
|
|
+ xhci->quirks |= XHCI_RESET_ON_RESUME | XHCI_FORCE_MSI;
|
|
|
|
if (pdev->vendor == PCI_VENDOR_ID_VIA)
|
|
|
|
xhci->quirks |= XHCI_RESET_ON_RESUME;
|
|
|
|
|
|
|
|
--- a/drivers/usb/host/xhci.c
|
|
|
|
+++ b/drivers/usb/host/xhci.c
|
2017-07-23 11:40:40 +00:00
|
|
|
@@ -390,10 +390,14 @@ static int xhci_try_enable_msi(struct us
|
2017-02-10 16:44:43 +00:00
|
|
|
free_irq(hcd->irq, hcd);
|
|
|
|
hcd->irq = 0;
|
|
|
|
|
|
|
|
- ret = xhci_setup_msix(xhci);
|
|
|
|
- if (ret)
|
|
|
|
- /* fall back to msi*/
|
|
|
|
+ if (xhci->quirks & XHCI_FORCE_MSI) {
|
|
|
|
ret = xhci_setup_msi(xhci);
|
|
|
|
+ } else {
|
|
|
|
+ ret = xhci_setup_msix(xhci);
|
|
|
|
+ if (ret)
|
|
|
|
+ /* fall back to msi*/
|
|
|
|
+ ret = xhci_setup_msi(xhci);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if (!ret)
|
|
|
|
/* hcd->irq is 0, we have MSI */
|
|
|
|
--- a/drivers/usb/host/xhci.h
|
|
|
|
+++ b/drivers/usb/host/xhci.h
|
2017-07-23 11:40:40 +00:00
|
|
|
@@ -1680,6 +1680,7 @@ struct xhci_hcd {
|
2017-02-10 16:44:43 +00:00
|
|
|
/* support xHCI 0.96 spec USB2 software LPM */
|
|
|
|
unsigned sw_lpm_support:1;
|
|
|
|
/* support xHCI 1.0 spec USB2 hardware LPM */
|
|
|
|
+#define XHCI_FORCE_MSI (1 << 24)
|
|
|
|
unsigned hw_lpm_support:1;
|
|
|
|
/* cached usb2 extened protocol capabilites */
|
|
|
|
u32 *ext_caps;
|