]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/x86/pci/common.c
Merge branch 'pci/host-layerscape' into next
[karo-tx-linux.git] / arch / x86 / pci / common.c
index 09d3afc0a181c1ac44ca654f9fde35796dbe3843..b106c67f88c516eedc06217c6d69141a37ca6af7 100644 (file)
@@ -674,6 +674,14 @@ int pcibios_add_device(struct pci_dev *dev)
 
 int pcibios_alloc_irq(struct pci_dev *dev)
 {
+       /*
+        * If the PCI device was already claimed by core code and has
+        * MSI enabled, probing of the pcibios IRQ will overwrite
+        * dev->irq.  So bail out if MSI is already enabled.
+        */
+       if (pci_dev_msi_enabled(dev))
+               return -EBUSY;
+
        return pcibios_enable_irq(dev);
 }