OpenWrt – Blame information for rev 1
?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 |
||
16 | @@ -214,6 +214,7 @@ static void xhci_pci_quirks(struct devic |
||
17 | pdev->device == 0x0015) { |
||
18 | xhci->quirks |= XHCI_RESET_ON_RESUME; |
||
19 | xhci->quirks |= XHCI_ZERO_64B_REGS; |
||
20 | + xhci->quirks |= XHCI_FORCE_MSI; |
||
21 | } |
||
22 | if (pdev->vendor == PCI_VENDOR_ID_VIA) |
||
23 | xhci->quirks |= XHCI_RESET_ON_RESUME; |
||
24 | --- a/drivers/usb/host/xhci.c |
||
25 | +++ b/drivers/usb/host/xhci.c |
||
26 | @@ -424,10 +424,14 @@ static int xhci_try_enable_msi(struct us |
||
27 | free_irq(hcd->irq, hcd); |
||
28 | hcd->irq = 0; |
||
29 | |||
30 | - ret = xhci_setup_msix(xhci); |
||
31 | - if (ret) |
||
32 | - /* fall back to msi*/ |
||
33 | + if (xhci->quirks & XHCI_FORCE_MSI) { |
||
34 | ret = xhci_setup_msi(xhci); |
||
35 | + } else { |
||
36 | + ret = xhci_setup_msix(xhci); |
||
37 | + if (ret) |
||
38 | + /* fall back to msi*/ |
||
39 | + ret = xhci_setup_msi(xhci); |
||
40 | + } |
||
41 | |||
42 | if (!ret) { |
||
43 | hcd->msi_enabled = 1; |
||
44 | --- a/drivers/usb/host/xhci.h |
||
45 | +++ b/drivers/usb/host/xhci.h |
||
46 | @@ -1859,6 +1859,7 @@ struct xhci_hcd { |
||
47 | /* support xHCI 0.96 spec USB2 software LPM */ |
||
48 | unsigned sw_lpm_support:1; |
||
49 | /* support xHCI 1.0 spec USB2 hardware LPM */ |
||
50 | +#define XHCI_FORCE_MSI (1 << 24) |
||
51 | unsigned hw_lpm_support:1; |
||
52 | /* Broken Suspend flag for SNPS Suspend resume issue */ |
||
53 | unsigned broken_suspend:1; |