]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.4.24/xhci-extend-fresco-logic-msi-quirk.patch
Fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 3.4.24 / xhci-extend-fresco-logic-msi-quirk.patch
1 From bba18e33f25072ebf70fd8f7f0cdbf8cdb59a746 Mon Sep 17 00:00:00 2001
2 From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
3 Date: Wed, 17 Oct 2012 13:44:06 -0700
4 Subject: xhci: Extend Fresco Logic MSI quirk.
5
6 From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
7
8 commit bba18e33f25072ebf70fd8f7f0cdbf8cdb59a746 upstream.
9
10 Ali reports that plugging a device into the Fresco Logic xHCI host with
11 PCI device ID 1400 produces an IRQ error:
12
13 do_IRQ: 3.176 No irq handler for vector (irq -1)
14
15 Other early Fresco Logic host revisions don't support MSI, even though
16 their PCI config space claims they do. Extend the quirk to disabling
17 MSI to this chipset revision. Also enable the short transfer quirk,
18 since it's likely this revision also has that quirk, and it should be
19 harmless to enable.
20
21 04:00.0 0c03: 1b73:1400 (rev 01) (prog-if 30 [XHCI])
22 Subsystem: 1d5c:1000
23 Physical Slot: 3
24 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
25 Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
26 Latency: 0, Cache Line Size: 64 bytes
27 Interrupt: pin A routed to IRQ 51
28 Region 0: Memory at d4600000 (32-bit, non-prefetchable) [size=64K]
29 Capabilities: [50] Power Management version 3
30 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-)
31 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
32 Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
33 Address: 00000000feeff00c Data: 41b1
34 Capabilities: [80] Express (v1) Endpoint, MSI 00
35 DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <2us, L1 <32us
36 ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
37 DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
38 RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
39 MaxPayload 128 bytes, MaxReadReq 512 bytes
40 DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
41 LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 unlimited, L1 unlimited
42 ClockPM- Surprise- LLActRep- BwNot-
43 LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
44 ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
45 LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
46 Kernel driver in use: xhci_hcd
47
48 This patch should be backported to stable kernels as old as 2.6.36, that
49 contain the commit f5182b4155b9d686c5540a6822486400e34ddd98 "xhci:
50 Disable MSI for some Fresco Logic hosts."
51
52 Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
53 Reported-by: A Sh <smr.ash1991@gmail.com>
54 Tested-by: A Sh <smr.ash1991@gmail.com>
55 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
56
57 ---
58 drivers/usb/host/xhci-pci.c | 7 +++++--
59 1 file changed, 5 insertions(+), 2 deletions(-)
60
61 --- a/drivers/usb/host/xhci-pci.c
62 +++ b/drivers/usb/host/xhci-pci.c
63 @@ -29,6 +29,7 @@
64 /* Device for a quirk */
65 #define PCI_VENDOR_ID_FRESCO_LOGIC 0x1b73
66 #define PCI_DEVICE_ID_FRESCO_LOGIC_PDK 0x1000
67 +#define PCI_DEVICE_ID_FRESCO_LOGIC_FL1400 0x1400
68
69 #define PCI_VENDOR_ID_ETRON 0x1b6f
70 #define PCI_DEVICE_ID_ASROCK_P67 0x7023
71 @@ -58,8 +59,10 @@ static void xhci_pci_quirks(struct devic
72
73 /* Look for vendor-specific quirks */
74 if (pdev->vendor == PCI_VENDOR_ID_FRESCO_LOGIC &&
75 - pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK) {
76 - if (pdev->revision == 0x0) {
77 + (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK ||
78 + pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1400)) {
79 + if (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK &&
80 + pdev->revision == 0x0) {
81 xhci->quirks |= XHCI_RESET_EP_QUIRK;
82 xhci_dbg(xhci, "QUIRK: Fresco Logic xHC needs configure"
83 " endpoint cmd after reset endpoint\n");