linux-fix-c6187597-breakage.patch 1.7 KB

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