summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Pham <jackp@codeaurora.org>2013-11-15 22:53:14 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-06 19:22:15 (GMT)
commit494a99a553c3362e18fc9d0687dbd495f7942f83 (patch)
tree6d094d2cd3b8c9040e55a148f989d8fdfec6b12a
parentb9746f01fc21e4dee9f39bb3d1cde46ecf6c995e (diff)
downloadlinux-fsl-qoriq-494a99a553c3362e18fc9d0687dbd495f7942f83.tar.xz
usb: xhci: Check for XHCI_PLAT in xhci_cleanup_msix()
commit 9005355af23856c55a5538c9024355785424821b upstream. If CONFIG_PCI is enabled, make sure xhci_cleanup_msix() doesn't try to free a bogus PCI IRQ or dereference an invalid pci_dev when the xHCI device is actually a platform_device. This patch should be backported to kernels as old as 3.9, that contain the commit 52fb61250a7a132b0cfb9f4a1060a1f3c49e5a25 "xhci-plat: Don't enable legacy PCI interrupts." Signed-off-by: Jack Pham <jackp@codeaurora.org> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/host/xhci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index ed6c186..f178f76 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -321,6 +321,9 @@ static void xhci_cleanup_msix(struct xhci_hcd *xhci)
struct usb_hcd *hcd = xhci_to_hcd(xhci);
struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
+ if (xhci->quirks & XHCI_PLAT)
+ return;
+
xhci_free_irq(xhci);
if (xhci->msix_entries) {