802-usb-xhci-force-msi-renesas-xhci.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From a0dc613140bab907a3d5787a7ae7b0638bf674d0 Mon Sep 17 00:00:00 2001
  2. From: Christian Lamparter <[email protected]>
  3. Date: Thu, 23 Jun 2016 20:28:20 +0200
  4. Subject: [PATCH] usb: xhci: force MSI for uPD720201 and
  5. uPD720202
  6. The APM82181 does not support MSI-X. When probed, it will
  7. produce a noisy warning.
  8. ---
  9. drivers/usb/host/pci-quirks.c | 362 ++++++++++++++++++++++++++++++++++++++++++
  10. 1 file changed, 362 insertions(+)
  11. --- a/drivers/usb/host/xhci-pci.c
  12. +++ b/drivers/usb/host/xhci-pci.c
  13. @@ -215,6 +215,7 @@ static void xhci_pci_quirks(struct devic
  14. pdev->device == 0x0015) {
  15. xhci->quirks |= XHCI_RESET_ON_RESUME;
  16. xhci->quirks |= XHCI_ZERO_64B_REGS;
  17. + xhci->quirks |= XHCI_FORCE_MSI;
  18. }
  19. if (pdev->vendor == PCI_VENDOR_ID_VIA)
  20. xhci->quirks |= XHCI_RESET_ON_RESUME;
  21. --- a/drivers/usb/host/xhci.c
  22. +++ b/drivers/usb/host/xhci.c
  23. @@ -424,10 +424,14 @@ static int xhci_try_enable_msi(struct us
  24. free_irq(hcd->irq, hcd);
  25. hcd->irq = 0;
  26. - ret = xhci_setup_msix(xhci);
  27. - if (ret)
  28. - /* fall back to msi*/
  29. + if (xhci->quirks & XHCI_FORCE_MSI) {
  30. ret = xhci_setup_msi(xhci);
  31. + } else {
  32. + ret = xhci_setup_msix(xhci);
  33. + if (ret)
  34. + /* fall back to msi*/
  35. + ret = xhci_setup_msi(xhci);
  36. + }
  37. if (!ret) {
  38. hcd->msi_enabled = 1;
  39. --- a/drivers/usb/host/xhci.h
  40. +++ b/drivers/usb/host/xhci.h
  41. @@ -1867,6 +1867,7 @@ struct xhci_hcd {
  42. /* support xHCI 0.96 spec USB2 software LPM */
  43. unsigned sw_lpm_support:1;
  44. /* support xHCI 1.0 spec USB2 hardware LPM */
  45. +#define XHCI_FORCE_MSI (1 << 24)
  46. unsigned hw_lpm_support:1;
  47. /* Broken Suspend flag for SNPS Suspend resume issue */
  48. unsigned broken_suspend:1;