]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ACPI/PCI: Set support bit for MSI in support field of _OSC
authorTaku Izumi <izumi.taku@jp.fujitsu.com>
Fri, 17 Oct 2008 04:52:51 +0000 (13:52 +0900)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 22 Oct 2008 23:42:35 +0000 (16:42 -0700)
Currently linux doesn't have any code to set the "MSI supported" bit in
Support Fireld of _OSC. This patch adds the code for that.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/msi.c
drivers/pci/pci.c
drivers/pci/pci.h

index d2812013fd2293e0f5520aaf4e1cd649b715f535..74801f7df9c901ad21017ce2a831e0cd61c8af1c 100644 (file)
@@ -759,3 +759,24 @@ void pci_msi_init_pci_dev(struct pci_dev *dev)
 {
        INIT_LIST_HEAD(&dev->msi_list);
 }
+
+#ifdef CONFIG_ACPI
+#include <linux/acpi.h>
+#include <linux/pci-acpi.h>
+static void __devinit msi_acpi_init(void)
+{
+       if (acpi_pci_disabled)
+               return;
+       pci_osc_support_set(OSC_MSI_SUPPORT);
+       pcie_osc_support_set(OSC_MSI_SUPPORT);
+}
+#else
+static inline void msi_acpi_init(void) { }
+#endif /* CONFIG_ACPI */
+
+void __devinit msi_init(void)
+{
+       if (!pci_msi_enable)
+               return;
+       msi_acpi_init();
+}
index 4db261e13e69eb397ffce8dc3eeb95e9509cbf00..aee73cf251b6bb7c90a83038f97d5ba3dad216bf 100644 (file)
@@ -1933,6 +1933,9 @@ static int __devinit pci_init(void)
        while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
                pci_fixup_device(pci_fixup_final, dev);
        }
+
+       msi_init();
+
        return 0;
 }
 
index b205ab866a1df72c4c659052fe2742a43d99124e..9de87e9f98f5ad5d7327a000474eef6b54da689d 100644 (file)
@@ -98,9 +98,11 @@ extern unsigned int pci_pm_d3_delay;
 #ifdef CONFIG_PCI_MSI
 void pci_no_msi(void);
 extern void pci_msi_init_pci_dev(struct pci_dev *dev);
+extern void __devinit msi_init(void);
 #else
 static inline void pci_no_msi(void) { }
 static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { }
+static inline void msi_init(void) { }
 #endif
 
 #ifdef CONFIG_PCIEAER