Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 56d9bf66 authored by Sarah Sharp's avatar Sarah Sharp Committed by Jack Pham
Browse files

xhci-plat: Don't enable legacy PCI interrupts.



The xHCI platform driver calls into usb_add_hcd to register the irq for
its platform device.  It does not want the xHCI generic driver to
register an interrupt for it at all.  The original code did that by
setting the XHCI_BROKEN_MSI quirk, which tells the xHCI driver to not
enable MSI or MSI-X for a PCI host.

Unfortunately, if CONFIG_PCI is enabled, and CONFIG_USB_DW3 is enabled,
the xHCI generic driver will attempt to register a legacy PCI interrupt
for the xHCI platform device in xhci_try_enable_msi().  This will result
in a bogus irq being registered, since the underlying device is a
platform_device, not a pci_device, and thus the pci_device->irq pointer
will be bogus.

Add a new quirk, XHCI_PLAT, so that the xHCI generic driver can
distinguish between a PCI device that can't handle MSI or MSI-X, and a
platform device that should not have its interrupts touched at all.
This quirk may be useful in the future, in case other corner cases like
this arise.

This patch should be backported to kernels as old as 3.9, that
contain the commit 00eed9c8 "USB: xhci:
correctly enable interrupts".

Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
Reported-by: default avatarYu Y Wang <yu.y.wang@intel.com>
Tested-by: default avatarYu Y Wang <yu.y.wang@intel.com>
Reviewed-by: default avatarFelipe Balbi <balbi@ti.com>
Cc: stable@vger.kernel.org
Change-Id: I7e57f2d737f651b6a5f7a616eef591520b2f783b
Git-commit: 52fb61250a7a132b0cfb9f4a1060a1f3c49e5a25
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


[jackp@codeaurora.org: resolved merge conflicts; renumbered other XHCI
 quirk bit flags]
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 0cabfa0f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment