Patchwork pcie: added explanations to aspm messages.

login
register
mail settings
Submitter Alex Hung
Date April 2, 2012, 3:35 p.m.
Message ID <1333380944-10302-1-git-send-email-alex.hung@canonical.com>
Download mbox | patch
Permalink /patch/150179/
State Accepted
Headers show

Comments

Alex Hung - April 2, 2012, 3:35 p.m.
Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 src/pci/aspm/aspm.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
Colin King - April 2, 2012, 3:59 p.m.
On 02/04/12 16:35, Alex Hung wrote:
> Signed-off-by: Alex Hung<alex.hung@canonical.com>
> ---
>   src/pci/aspm/aspm.c |   11 +++++++++++
>   1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/src/pci/aspm/aspm.c b/src/pci/aspm/aspm.c
> index c4da009..b5e85b3 100644
> --- a/src/pci/aspm/aspm.c
> +++ b/src/pci/aspm/aspm.c
> @@ -104,6 +104,11 @@ static int facp_get_aspm_control(fwts_framework *fw, int *aspm)
>   	} else {
>   		*aspm = 0;
>   		fwts_log_info(fw, "PCIE ASPM is not controlled by Linux kernel.");
> +		fwts_advice(fw,
> +			"BIOS reports that Linux kernel should not modify ASPM "
> +			"settings that BIOS configured. It can be intentional "
> +			"because hardware vendors identified some capability "
> +			"bugs between the motherboard and the add-on cards.");
>   	}
>
>   	return FWTS_OK;
> @@ -170,6 +175,12 @@ int pcie_compare_rp_dev_aspm_registers(fwts_framework *fw,
>   			, rp->bus, rp->dev, rp->func, rp_aspm_cntrl);
>   		fwts_log_error(fw, "Device %02Xh:%02Xh.%02Xh has aspm = %02Xh.",
>   			dev->bus, dev->dev, dev->func, device_aspm_cntrl);
> +		fwts_advice(fw,
> +			"ASPM control registers between root port and device "
> +			"must match in order for ASPM to be active. Unmatched "
> +			"configuration indicates software did not configure "
> +			"ASPM correctly and the system is not saving power "
> +			"at its full potential.");
>   	} else {
>   		fwts_passed(fw, "PCIE aspm setting matched was matched.");
>   	}
Thanks Alex.

Acked-by: Colin Ian King <colin.king@canonical.com>
Keng-Yu Lin - April 3, 2012, 2:48 a.m.
On Mon, Apr 2, 2012 at 11:35 PM, Alex Hung <alex.hung@canonical.com> wrote:
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/pci/aspm/aspm.c |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/src/pci/aspm/aspm.c b/src/pci/aspm/aspm.c
> index c4da009..b5e85b3 100644
> --- a/src/pci/aspm/aspm.c
> +++ b/src/pci/aspm/aspm.c
> @@ -104,6 +104,11 @@ static int facp_get_aspm_control(fwts_framework *fw, int *aspm)
>        } else {
>                *aspm = 0;
>                fwts_log_info(fw, "PCIE ASPM is not controlled by Linux kernel.");
> +               fwts_advice(fw,
> +                       "BIOS reports that Linux kernel should not modify ASPM "
> +                       "settings that BIOS configured. It can be intentional "
> +                       "because hardware vendors identified some capability "
> +                       "bugs between the motherboard and the add-on cards.");
>        }
>
>        return FWTS_OK;
> @@ -170,6 +175,12 @@ int pcie_compare_rp_dev_aspm_registers(fwts_framework *fw,
>                        , rp->bus, rp->dev, rp->func, rp_aspm_cntrl);
>                fwts_log_error(fw, "Device %02Xh:%02Xh.%02Xh has aspm = %02Xh.",
>                        dev->bus, dev->dev, dev->func, device_aspm_cntrl);
> +               fwts_advice(fw,
> +                       "ASPM control registers between root port and device "
> +                       "must match in order for ASPM to be active. Unmatched "
> +                       "configuration indicates software did not configure "
> +                       "ASPM correctly and the system is not saving power "
> +                       "at its full potential.");
>        } else {
>                fwts_passed(fw, "PCIE aspm setting matched was matched.");
>        }
> --
> 1.7.5.4
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>

Patch

diff --git a/src/pci/aspm/aspm.c b/src/pci/aspm/aspm.c
index c4da009..b5e85b3 100644
--- a/src/pci/aspm/aspm.c
+++ b/src/pci/aspm/aspm.c
@@ -104,6 +104,11 @@  static int facp_get_aspm_control(fwts_framework *fw, int *aspm)
 	} else {
 		*aspm = 0;
 		fwts_log_info(fw, "PCIE ASPM is not controlled by Linux kernel.");
+		fwts_advice(fw,
+			"BIOS reports that Linux kernel should not modify ASPM "
+			"settings that BIOS configured. It can be intentional "
+			"because hardware vendors identified some capability "
+			"bugs between the motherboard and the add-on cards.");
 	}
 
 	return FWTS_OK;
@@ -170,6 +175,12 @@  int pcie_compare_rp_dev_aspm_registers(fwts_framework *fw,
 			, rp->bus, rp->dev, rp->func, rp_aspm_cntrl);
 		fwts_log_error(fw, "Device %02Xh:%02Xh.%02Xh has aspm = %02Xh.",
 			dev->bus, dev->dev, dev->func, device_aspm_cntrl);
+		fwts_advice(fw, 
+			"ASPM control registers between root port and device "
+			"must match in order for ASPM to be active. Unmatched "
+			"configuration indicates software did not configure "
+			"ASPM correctly and the system is not saving power "
+			"at its full potential.");
 	} else {
 		fwts_passed(fw, "PCIE aspm setting matched was matched.");
 	}