Patchwork [1/1] PCI: Allow pcie_aspm=force to work even when FADT indicates it is unsupported

login
register
mail settings
Submitter Colin King
Date March 30, 2012, 10:13 a.m.
Message ID <1333102434-4361-2-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/149600/
State New
Headers show

Comments

Colin King - March 30, 2012, 10:13 a.m.
From: Colin Ian King <colin.king@canonical.com>

BugLink: https://bugs.launchpad.net/ubuntu/+bug/962038

Right now using pcie_aspm=force will not enable ASPM if the FADT indicates
ASPM is unsupported.  However, the semantics of force should probably allow
for this, especially as they did before the ASPM disable rework with commit
3c076351c4027a56d5005a39a0b518a4ba393ce2

This patch just skips the clearing of any ASPM setup that the firmware has
carried out on this bus if pcie_aspm=force is being used.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/pci/pcie/aspm.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Stefan Bader - March 30, 2012, 10:34 a.m.
On 30.03.2012 12:13, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> BugLink: https://bugs.launchpad.net/ubuntu/+bug/962038
> 
> Right now using pcie_aspm=force will not enable ASPM if the FADT indicates
> ASPM is unsupported.  However, the semantics of force should probably allow
> for this, especially as they did before the ASPM disable rework with commit
> 3c076351c4027a56d5005a39a0b518a4ba393ce2
> 
> This patch just skips the clearing of any ASPM setup that the firmware has
> carried out on this bus if pcie_aspm=force is being used.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/pci/pcie/aspm.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
> index 2275162..c73ed00 100644
> --- a/drivers/pci/pcie/aspm.c
> +++ b/drivers/pci/pcie/aspm.c
> @@ -790,6 +790,9 @@ void pcie_clear_aspm(struct pci_bus *bus)
>  {
>  	struct pci_dev *child;
>  
> +	if (aspm_force)
> +		return;
> +
>  	/*
>  	 * Clear any ASPM setup that the firmware has carried out on this bus
>  	 */

It sounds like it will then do more like one does expect from a force semantics.

Patch

diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 2275162..c73ed00 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -790,6 +790,9 @@  void pcie_clear_aspm(struct pci_bus *bus)
 {
 	struct pci_dev *child;
 
+	if (aspm_force)
+		return;
+
 	/*
 	 * Clear any ASPM setup that the firmware has carried out on this bus
 	 */