aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/Kconfig4
-rw-r--r--drivers/pci/msi.c10
-rw-r--r--drivers/pci/pci.c8
-rw-r--r--drivers/pci/pci.h2
4 files changed, 22 insertions, 2 deletions
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index d3dcce815d15..4d762fc4878c 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -11,6 +11,10 @@ config PCI_MSI
11 generate an interrupt using an inbound Memory Write on its 11 generate an interrupt using an inbound Memory Write on its
12 PCI bus instead of asserting a device IRQ pin. 12 PCI bus instead of asserting a device IRQ pin.
13 13
14 Use of PCI MSI interrupts can be disabled at kernel boot time
15 by using the 'pci=nomsi' option. This disables MSI for the
16 entire system.
17
14 If you don't know what to do here, say N. 18 If you don't know what to do here, say N.
15 19
16config PCI_DEBUG 20config PCI_DEBUG
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index aea8b258b9b8..a77e79c8c82e 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -765,8 +765,11 @@ void pci_disable_msi(struct pci_dev* dev)
765 u16 control; 765 u16 control;
766 unsigned long flags; 766 unsigned long flags;
767 767
768 if (!pci_msi_enable)
769 return;
768 if (!dev) 770 if (!dev)
769 return; 771 return;
772
770 pos = pci_find_capability(dev, PCI_CAP_ID_MSI); 773 pos = pci_find_capability(dev, PCI_CAP_ID_MSI);
771 if (!pos) 774 if (!pos)
772 return; 775 return;
@@ -1026,6 +1029,8 @@ void pci_disable_msix(struct pci_dev* dev)
1026 int pos, temp; 1029 int pos, temp;
1027 u16 control; 1030 u16 control;
1028 1031
1032 if (!pci_msi_enable)
1033 return;
1029 if (!dev) 1034 if (!dev)
1030 return; 1035 return;
1031 1036
@@ -1152,6 +1157,11 @@ void msi_remove_pci_irq_vectors(struct pci_dev* dev)
1152 } 1157 }
1153} 1158}
1154 1159
1160void pci_no_msi(void)
1161{
1162 pci_msi_enable = 0;
1163}
1164
1155EXPORT_SYMBOL(pci_enable_msi); 1165EXPORT_SYMBOL(pci_enable_msi);
1156EXPORT_SYMBOL(pci_disable_msi); 1166EXPORT_SYMBOL(pci_disable_msi);
1157EXPORT_SYMBOL(pci_enable_msix); 1167EXPORT_SYMBOL(pci_enable_msix);
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 0bf6d254426b..03af23238939 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -900,8 +900,12 @@ static int __devinit pci_setup(char *str)
900 if (k) 900 if (k)
901 *k++ = 0; 901 *k++ = 0;
902 if (*str && (str = pcibios_setup(str)) && *str) { 902 if (*str && (str = pcibios_setup(str)) && *str) {
903 /* PCI layer options should be handled here */ 903 if (!strcmp(str, "nomsi")) {
904 printk(KERN_ERR "PCI: Unknown option `%s'\n", str); 904 pci_no_msi();
905 } else {
906 printk(KERN_ERR "PCI: Unknown option `%s'\n",
907 str);
908 }
905 } 909 }
906 str = k; 910 str = k;
907 } 911 }
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index a6dfee2f6d2b..8f3fb47ea671 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -50,8 +50,10 @@ extern int pci_msi_quirk;
50 50
51#ifdef CONFIG_PCI_MSI 51#ifdef CONFIG_PCI_MSI
52void disable_msi_mode(struct pci_dev *dev, int pos, int type); 52void disable_msi_mode(struct pci_dev *dev, int pos, int type);
53void pci_no_msi(void);
53#else 54#else
54static inline void disable_msi_mode(struct pci_dev *dev, int pos, int type) { } 55static inline void disable_msi_mode(struct pci_dev *dev, int pos, int type) { }
56static inline void pci_no_msi(void) { }
55#endif 57#endif
56 58
57extern int pcie_mch_quirk; 59extern int pcie_mch_quirk;