The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / board / freescale / p2020ds / linux-fix-c6187597-breakage.patch
1 From: Nikita Yushchenko <nyushchenko@dev.rtsoft.ru>
2 Subject: [PATCH] usb: pci-quirks: do not access OHCI_FMINTERVAL register on ULI hw
3
4 This access causes hang on Freescale P2020DS board (that has OHCI
5 provided by ULI 1533 chip).
6
7 Since preserving OHCI_FMINTERVAL was originally done only for NVIDIA
8 hardware and only later (in c6187597) was turned unconditional, and
9 c6187597 commit message again mentions only NVIDIA, I think it should be
10 safe to disable preserving OHCI_FMINTERVAL if device vendor is ULI.
11
12 Signed-off-by: Nikita Yushchenko <nyushchenko@dev.rtsoft.ru>
13 ---
14  drivers/usb/host/pci-quirks.c |    8 +++++---
15  1 file changed, 5 insertions(+), 3 deletions(-)
16
17 diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
18 index 00661d3..5acbd5b 100644
19 --- a/drivers/usb/host/pci-quirks.c
20 +++ b/drivers/usb/host/pci-quirks.c
21 @@ -571,7 +571,7 @@ static void quirk_usb_handoff_ohci(struct pci_dev *pdev)
22  {
23         void __iomem *base;
24         u32 control;
25 -       u32 fminterval;
26 +       u32 uninitialized_var(fminterval);
27         int cnt;
28  
29         if (!mmio_resource_enabled(pdev, 0))
30 @@ -619,7 +619,8 @@ static void quirk_usb_handoff_ohci(struct pci_dev *pdev)
31         }
32  
33         /* software reset of the controller, preserving HcFmInterval */
34 -       fminterval = readl(base + OHCI_FMINTERVAL);
35 +       if (pdev->vendor != PCI_VENDOR_ID_AL)
36 +               fminterval = readl(base + OHCI_FMINTERVAL);
37         writel(OHCI_HCR, base + OHCI_CMDSTATUS);
38  
39         /* reset requires max 10 us delay */
40 @@ -628,7 +629,8 @@ static void quirk_usb_handoff_ohci(struct pci_dev *pdev)
41                         break;
42                 udelay(1);
43         }
44 -       writel(fminterval, base + OHCI_FMINTERVAL);
45 +       if (pdev->vendor != PCI_VENDOR_ID_AL)
46 +               writel(fminterval, base + OHCI_FMINTERVAL);
47  
48         /* Now the controller is safely in SUSPEND and nothing can wake it up */
49         iounmap(base);
50 -- 
51 1.7.10.4