Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106954
b: refs/heads/master
c: d6d3857
h: refs/heads/master
v: v3
  • Loading branch information
Shaohua Li authored and Jesse Barnes committed Jul 28, 2008
1 parent 81a7f7a commit 7239fd3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 149e16372a2066c5474d8a8db9b252afd57eb427
refs/heads/master: d6d385743463f38a0da899cd4607e526ad9a049f
20 changes: 14 additions & 6 deletions trunk/drivers/pci/pcie/aspm.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct pcie_link_state {
struct endpoint_state endpoints[8];
};

static int aspm_disabled;
static int aspm_disabled, aspm_force;
static DEFINE_MUTEX(aspm_lock);
static LIST_HEAD(link_list);

Expand Down Expand Up @@ -527,9 +527,10 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
*/
pci_read_config_dword(child_dev, child_pos + PCI_EXP_DEVCAP,
&reg32);
if (!(reg32 & PCI_EXP_DEVCAP_RBER)) {
if (!(reg32 & PCI_EXP_DEVCAP_RBER && !aspm_force)) {
printk("Pre-1.1 PCIe device detected, "
"disable ASPM for %s\n", pci_name(pdev));
"disable ASPM for %s. It can be enabled forcedly"
" with 'pcie_aspm=force'\n", pci_name(pdev));
return -EINVAL;
}
}
Expand Down Expand Up @@ -815,15 +816,22 @@ void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev)

static int __init pcie_aspm_disable(char *str)
{
aspm_disabled = 1;
if (!strcmp(str, "off")) {
aspm_disabled = 1;
printk(KERN_INFO "PCIe ASPM is disabled\n");
} else if (!strcmp(str, "force")) {
aspm_force = 1;
printk(KERN_INFO "PCIe ASPM is forcedly enabled\n");
}
return 1;
}

__setup("pcie_noaspm", pcie_aspm_disable);
__setup("pcie_aspm=", pcie_aspm_disable);

void pcie_no_aspm(void)
{
aspm_disabled = 1;
if (!aspm_force)
aspm_disabled = 1;
}

#ifdef CONFIG_ACPI
Expand Down

0 comments on commit 7239fd3

Please sign in to comment.