diff options
author | Shaohua Li <shaohua.li@intel.com> | 2008-07-22 22:32:42 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-07-28 17:57:30 -0400 |
commit | d6d385743463f38a0da899cd4607e526ad9a049f (patch) | |
tree | 3d5de148d1cf56e58c6321511adaf8078d9046c0 /drivers/pci/pcie | |
parent | 149e16372a2066c5474d8a8db9b252afd57eb427 (diff) |
PCI: add an option to allow ASPM enabled forcibly
A new option, pcie_aspm=force, will force ASPM to be enabled, even on system
with PCIe 1.0 devices.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r-- | drivers/pci/pcie/aspm.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 704605298c5..9a7c9e1408a 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c | |||
@@ -55,7 +55,7 @@ struct pcie_link_state { | |||
55 | struct endpoint_state endpoints[8]; | 55 | struct endpoint_state endpoints[8]; |
56 | }; | 56 | }; |
57 | 57 | ||
58 | static int aspm_disabled; | 58 | static int aspm_disabled, aspm_force; |
59 | static DEFINE_MUTEX(aspm_lock); | 59 | static DEFINE_MUTEX(aspm_lock); |
60 | static LIST_HEAD(link_list); | 60 | static LIST_HEAD(link_list); |
61 | 61 | ||
@@ -527,9 +527,10 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev) | |||
527 | */ | 527 | */ |
528 | pci_read_config_dword(child_dev, child_pos + PCI_EXP_DEVCAP, | 528 | pci_read_config_dword(child_dev, child_pos + PCI_EXP_DEVCAP, |
529 | ®32); | 529 | ®32); |
530 | if (!(reg32 & PCI_EXP_DEVCAP_RBER)) { | 530 | if (!(reg32 & PCI_EXP_DEVCAP_RBER && !aspm_force)) { |
531 | printk("Pre-1.1 PCIe device detected, " | 531 | printk("Pre-1.1 PCIe device detected, " |
532 | "disable ASPM for %s\n", pci_name(pdev)); | 532 | "disable ASPM for %s. It can be enabled forcedly" |
533 | " with 'pcie_aspm=force'\n", pci_name(pdev)); | ||
533 | return -EINVAL; | 534 | return -EINVAL; |
534 | } | 535 | } |
535 | } | 536 | } |
@@ -815,15 +816,22 @@ void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev) | |||
815 | 816 | ||
816 | static int __init pcie_aspm_disable(char *str) | 817 | static int __init pcie_aspm_disable(char *str) |
817 | { | 818 | { |
818 | aspm_disabled = 1; | 819 | if (!strcmp(str, "off")) { |
820 | aspm_disabled = 1; | ||
821 | printk(KERN_INFO "PCIe ASPM is disabled\n"); | ||
822 | } else if (!strcmp(str, "force")) { | ||
823 | aspm_force = 1; | ||
824 | printk(KERN_INFO "PCIe ASPM is forcedly enabled\n"); | ||
825 | } | ||
819 | return 1; | 826 | return 1; |
820 | } | 827 | } |
821 | 828 | ||
822 | __setup("pcie_noaspm", pcie_aspm_disable); | 829 | __setup("pcie_aspm=", pcie_aspm_disable); |
823 | 830 | ||
824 | void pcie_no_aspm(void) | 831 | void pcie_no_aspm(void) |
825 | { | 832 | { |
826 | aspm_disabled = 1; | 833 | if (!aspm_force) |
834 | aspm_disabled = 1; | ||
827 | } | 835 | } |
828 | 836 | ||
829 | #ifdef CONFIG_ACPI | 837 | #ifdef CONFIG_ACPI |