OpenWrt – Blame information for rev 3
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | From a0dc613140bab907a3d5787a7ae7b0638bf674d0 Mon Sep 17 00:00:00 2001 |
2 | From: Christian Lamparter <chunkeey@gmail.com> |
||
3 | Date: Thu, 23 Jun 2016 20:28:20 +0200 |
||
4 | Subject: [PATCH] usb: xhci: force MSI for uPD720201 and |
||
5 | uPD720202 |
||
6 | |||
7 | The APM82181 does not support MSI-X. When probed, it will |
||
8 | produce a noisy warning. |
||
9 | |||
10 | --- |
||
11 | drivers/usb/host/pci-quirks.c | 362 ++++++++++++++++++++++++++++++++++++++++++ |
||
12 | 1 file changed, 362 insertions(+) |
||
13 | |||
14 | --- a/drivers/usb/host/xhci-pci.c |
||
15 | +++ b/drivers/usb/host/xhci-pci.c |
||
3 | office | 16 | @@ -213,7 +213,7 @@ static void xhci_pci_quirks(struct devic |
1 | office | 17 | xhci->quirks |= XHCI_TRUST_TX_LENGTH; |
18 | if (pdev->vendor == PCI_VENDOR_ID_RENESAS && |
||
19 | pdev->device == 0x0015) |
||
20 | - xhci->quirks |= XHCI_RESET_ON_RESUME; |
||
21 | + xhci->quirks |= XHCI_RESET_ON_RESUME | XHCI_FORCE_MSI; |
||
22 | if (pdev->vendor == PCI_VENDOR_ID_VIA) |
||
23 | xhci->quirks |= XHCI_RESET_ON_RESUME; |
||
24 | |||
25 | --- a/drivers/usb/host/xhci.c |
||
26 | +++ b/drivers/usb/host/xhci.c |
||
3 | office | 27 | @@ -357,10 +357,14 @@ static int xhci_try_enable_msi(struct us |
1 | office | 28 | free_irq(hcd->irq, hcd); |
29 | hcd->irq = 0; |
||
30 | |||
31 | - ret = xhci_setup_msix(xhci); |
||
32 | - if (ret) |
||
33 | - /* fall back to msi*/ |
||
34 | + if (xhci->quirks & XHCI_FORCE_MSI) { |
||
35 | ret = xhci_setup_msi(xhci); |
||
36 | + } else { |
||
37 | + ret = xhci_setup_msix(xhci); |
||
38 | + if (ret) |
||
39 | + /* fall back to msi*/ |
||
40 | + ret = xhci_setup_msi(xhci); |
||
41 | + } |
||
42 | |||
43 | if (!ret) { |
||
44 | hcd->msi_enabled = 1; |
||
45 | --- a/drivers/usb/host/xhci.h |
||
46 | +++ b/drivers/usb/host/xhci.h |
||
3 | office | 47 | @@ -1854,6 +1854,7 @@ struct xhci_hcd { |
1 | office | 48 | /* support xHCI 0.96 spec USB2 software LPM */ |
49 | unsigned sw_lpm_support:1; |
||
50 | /* support xHCI 1.0 spec USB2 hardware LPM */ |
||
51 | +#define XHCI_FORCE_MSI (1 << 24) |
||
52 | unsigned hw_lpm_support:1; |
||
3 | office | 53 | /* cached usb2 extened protocol capabilites */ |
54 | u32 *ext_caps; |