diff options
| -rw-r--r-- | drivers/acpi/pci_root.c | 2 | ||||
| -rw-r--r-- | drivers/pci/pcie/aspm.c | 7 | ||||
| -rw-r--r-- | include/linux/pci.h | 7 |
3 files changed, 11 insertions, 5 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 85249395623b..c7358dd68b31 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
| @@ -564,7 +564,7 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device) | |||
| 564 | /* Indicate support for various _OSC capabilities. */ | 564 | /* Indicate support for various _OSC capabilities. */ |
| 565 | if (pci_ext_cfg_avail(root->bus->self)) | 565 | if (pci_ext_cfg_avail(root->bus->self)) |
| 566 | flags |= OSC_EXT_PCI_CONFIG_SUPPORT; | 566 | flags |= OSC_EXT_PCI_CONFIG_SUPPORT; |
| 567 | if (pcie_aspm_enabled()) | 567 | if (pcie_aspm_support_enabled()) |
| 568 | flags |= OSC_ACTIVE_STATE_PWR_SUPPORT | | 568 | flags |= OSC_ACTIVE_STATE_PWR_SUPPORT | |
| 569 | OSC_CLOCK_PWR_CAPABILITY_SUPPORT; | 569 | OSC_CLOCK_PWR_CAPABILITY_SUPPORT; |
| 570 | if (pci_msi_enabled()) | 570 | if (pci_msi_enabled()) |
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 3188cd96b338..bbdb4fd85b9c 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c | |||
| @@ -69,6 +69,7 @@ struct pcie_link_state { | |||
| 69 | }; | 69 | }; |
| 70 | 70 | ||
| 71 | static int aspm_disabled, aspm_force, aspm_clear_state; | 71 | static int aspm_disabled, aspm_force, aspm_clear_state; |
| 72 | static bool aspm_support_enabled = true; | ||
| 72 | static DEFINE_MUTEX(aspm_lock); | 73 | static DEFINE_MUTEX(aspm_lock); |
| 73 | static LIST_HEAD(link_list); | 74 | static LIST_HEAD(link_list); |
| 74 | 75 | ||
| @@ -896,6 +897,7 @@ static int __init pcie_aspm_disable(char *str) | |||
| 896 | { | 897 | { |
| 897 | if (!strcmp(str, "off")) { | 898 | if (!strcmp(str, "off")) { |
| 898 | aspm_disabled = 1; | 899 | aspm_disabled = 1; |
| 900 | aspm_support_enabled = false; | ||
| 899 | printk(KERN_INFO "PCIe ASPM is disabled\n"); | 901 | printk(KERN_INFO "PCIe ASPM is disabled\n"); |
| 900 | } else if (!strcmp(str, "force")) { | 902 | } else if (!strcmp(str, "force")) { |
| 901 | aspm_force = 1; | 903 | aspm_force = 1; |
| @@ -930,3 +932,8 @@ int pcie_aspm_enabled(void) | |||
| 930 | } | 932 | } |
| 931 | EXPORT_SYMBOL(pcie_aspm_enabled); | 933 | EXPORT_SYMBOL(pcie_aspm_enabled); |
| 932 | 934 | ||
| 935 | bool pcie_aspm_support_enabled(void) | ||
| 936 | { | ||
| 937 | return aspm_support_enabled; | ||
| 938 | } | ||
| 939 | EXPORT_SYMBOL(pcie_aspm_support_enabled); | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 16c9f2e61977..96f70d7e058d 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -1002,12 +1002,11 @@ extern bool pcie_ports_auto; | |||
| 1002 | #endif | 1002 | #endif |
| 1003 | 1003 | ||
| 1004 | #ifndef CONFIG_PCIEASPM | 1004 | #ifndef CONFIG_PCIEASPM |
| 1005 | static inline int pcie_aspm_enabled(void) | 1005 | static inline int pcie_aspm_enabled(void) { return 0; } |
| 1006 | { | 1006 | static inline bool pcie_aspm_support_enabled(void) { return false; } |
| 1007 | return 0; | ||
| 1008 | } | ||
| 1009 | #else | 1007 | #else |
| 1010 | extern int pcie_aspm_enabled(void); | 1008 | extern int pcie_aspm_enabled(void); |
| 1009 | extern bool pcie_aspm_support_enabled(void); | ||
| 1011 | #endif | 1010 | #endif |
| 1012 | 1011 | ||
| 1013 | #ifdef CONFIG_PCIEAER | 1012 | #ifdef CONFIG_PCIEAER |
