summaryrefslogtreecommitdiffstats
path: root/drivers/pci/msi.c
diff options
context:
space:
mode:
authorTaku Izumi <izumi.taku@jp.fujitsu.com>2008-10-17 13:52:51 +0900
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-10-22 16:42:35 -0700
commitd389fec6a2aec1ea7d47833f36a0413a619c8c12 (patch)
treef2cb010b0ea9a995cf19bc7c43e59ad47fffe5e2 /drivers/pci/msi.c
parentab20440c376ff0454cb93904a888212d874fbb6b (diff)
downloadlinux-stable-d389fec6a2aec1ea7d47833f36a0413a619c8c12.tar.gz
linux-stable-d389fec6a2aec1ea7d47833f36a0413a619c8c12.tar.bz2
linux-stable-d389fec6a2aec1ea7d47833f36a0413a619c8c12.zip
ACPI/PCI: Set support bit for MSI in support field of _OSC
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>
Diffstat (limited to 'drivers/pci/msi.c')
-rw-r--r--drivers/pci/msi.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index d2812013fd22..74801f7df9c9 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -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();
+}