aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pcie
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-03-05 07:21:51 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2011-03-21 12:38:02 -0400
commit8b8bae901ce23addbdcdb54fa1696fb2d049feb5 (patch)
tree4b95885dc5ba5b6105231289501e83ef429987c2 /drivers/pci/pcie
parenta44f99c7efdb88fa41128065c9a9445c19894e34 (diff)
PCI/ACPI: Report ASPM support to BIOS if not disabled from command line
We need to distinguish the situation in which ASPM support is disabled from the command line or through .config from the situation in which it is disabled, because the hardware or BIOS can't handle it. In the former case we should not report ASPM support to the BIOS through ACPI _OSC, but in the latter case we should do that. Introduce pcie_aspm_support_enabled() that can be used by acpi_pci_root_add() to determine whether or not it should report ASPM support to the BIOS through _OSC. Cc: stable@kernel.org References: https://bugzilla.kernel.org/show_bug.cgi?id=29722 References: https://bugzilla.kernel.org/show_bug.cgi?id=20232 Reported-and-tested-by: Ortwin Glück <odi@odi.ch> Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Tested-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r--drivers/pci/pcie/aspm.c7
1 files changed, 7 insertions, 0 deletions
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
71static int aspm_disabled, aspm_force, aspm_clear_state; 71static int aspm_disabled, aspm_force, aspm_clear_state;
72static bool aspm_support_enabled = true;
72static DEFINE_MUTEX(aspm_lock); 73static DEFINE_MUTEX(aspm_lock);
73static LIST_HEAD(link_list); 74static 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}
931EXPORT_SYMBOL(pcie_aspm_enabled); 933EXPORT_SYMBOL(pcie_aspm_enabled);
932 934
935bool pcie_aspm_support_enabled(void)
936{
937 return aspm_support_enabled;
938}
939EXPORT_SYMBOL(pcie_aspm_support_enabled);