mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 01:59:02 +00:00
58 lines
1.8 KiB
Diff
58 lines
1.8 KiB
Diff
|
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(+)
|
||
|
|
||
|
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
|
||
|
index 1c4d89e..555bd3f 100644
|
||
|
--- a/drivers/usb/host/xhci-pci.c
|
||
|
+++ b/drivers/usb/host/xhci-pci.c
|
||
|
@@ -172,7 +172,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||
|
}
|
||
|
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;
|
||
|
|
||
|
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
|
||
|
index 9e71c96..27cfcb9 100644
|
||
|
--- a/drivers/usb/host/xhci.c
|
||
|
+++ b/drivers/usb/host/xhci.c
|
||
|
@@ -389,10 +389,14 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd)
|
||
|
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 */
|
||
|
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
|
||
|
index 6b085aa..514dc3f 100644
|
||
|
--- a/drivers/usb/host/xhci.h
|
||
|
+++ b/drivers/usb/host/xhci.h
|
||
|
@@ -1649,3 +1649,4 @@ struct xhci_hcd {
|
||
|
#define XHCI_BROKEN_STREAMS (1 << 19)
|
||
|
#define XHCI_PME_STUCK_QUIRK (1 << 20)
|
||
|
+#define XHCI_FORCE_MSI (1 << 24)
|
||
|
unsigned int num_active_eps;
|