ACK: [PATCH] pci: aspm: test should skip if it can't read FACP or PCIe config (LP: #1201909)

IvanHu ivan.hu at canonical.com
Tue Jul 16 23:20:07 UTC 2013


On 07/17/2013 01:57 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> If we can't test ASPM then we should log the test as skipped.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/pci/aspm/aspm.c | 14 +++++++++-----
>   1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/src/pci/aspm/aspm.c b/src/pci/aspm/aspm.c
> index 035d1b0..be8ee5b 100644
> --- a/src/pci/aspm/aspm.c
> +++ b/src/pci/aspm/aspm.c
> @@ -331,17 +331,21 @@ static int aspm_check_configuration(fwts_framework *fw)
>   	int aspm_facp;
>
>   	ret = facp_get_aspm_control(fw, &aspm_facp);
> -	if (ret == FWTS_ERROR) {
> -		fwts_log_info(fw, "No valid FACP information present: cannot test ASPM.");
> -		return FWTS_ERROR;
> -	}
> +	if (ret == FWTS_ERROR)
> +		fwts_skipped(fw, "No valid FACP information present: cannot test ASPM.");
>
>   	return ret;
>   }
>
>   static int aspm_pcie_register_configuration(fwts_framework *fw)
>   {
> -	return pcie_check_aspm_registers(fw);
> +	int ret;
> +
> +	ret = pcie_check_aspm_registers(fw);
> +	if (ret == FWTS_ERROR)
> +		fwts_skipped(fw, "Cannot sanity check PCIe register configuration.");
> +
> +	return ret;
>   }
>
>   static fwts_framework_minor_test aspm_tests[] = {
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list