Currently linux doesn't have any code to set "MSI supported" bit in Support Fireld of _OSC. This patch adds the code for that. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@xxxxxxxxxxxxxx> Signed-off-by: Taku Izumi <izumi.taku@xxxxxxxxxxxxxx> drivers/pci/msi.c | 21 +++++++++++++++++++++ drivers/pci/pci.c | 3 +++ drivers/pci/pci.h | 2 ++ 3 files changed, 26 insertions(+) Index: linux-next.osc/drivers/pci/msi.c =================================================================== --- linux-next.osc.orig/drivers/pci/msi.c +++ linux-next.osc/drivers/pci/msi.c @@ -759,3 +759,24 @@ void pci_msi_init_pci_dev(struct pci_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: linux-next.osc/drivers/pci/pci.c =================================================================== --- linux-next.osc.orig/drivers/pci/pci.c +++ linux-next.osc/drivers/pci/pci.c @@ -1899,6 +1899,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: linux-next.osc/drivers/pci/pci.h =================================================================== --- linux-next.osc.orig/drivers/pci/pci.h +++ linux-next.osc/drivers/pci/pci.h @@ -86,9 +86,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 -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html