lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 23 Jan 2017 11:56:10 +0000
From:   Lee Jones <lee.jones@...aro.org>
To:     Thierry Escande <thierry.escande@...labora.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mfd: cros_ec: Send correct suspend/resume event to EC

On Fri, 13 Jan 2017, Thierry Escande wrote:

> From: Shawn Nematbakhsh <shawnn@...omium.org>
> 
> pm_suspend_via_firmware() will return false for platforms with ACPI
> disabled and ACPI is a prerequisite for S0ix support.
> 
> With this patch, sleep state event sent to EC is forced to S3 if ACPI is
> disabled.
> 
> Signed-off-by: Shawn Nematbakhsh <shawnn@...omium.org>
> Signed-off-by: Thierry Escande <thierry.escande@...labora.com>
> ---
>  drivers/mfd/cros_ec.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c
> index b8a5080..9b66a98 100644
> --- a/drivers/mfd/cros_ec.c
> +++ b/drivers/mfd/cros_ec.c
> @@ -190,8 +190,9 @@ int cros_ec_suspend(struct cros_ec_device *ec_dev)
>  	int ret;
>  	u8 sleep_event;
>  
> -	sleep_event = pm_suspend_via_firmware() ? HOST_SLEEP_EVENT_S3_RESUME :
> -						  HOST_SLEEP_EVENT_S0IX_RESUME;
> +	sleep_event = (!IS_ENABLED(CONFIG_ACPI) || pm_suspend_via_firmware()) ?
> +		      HOST_SLEEP_EVENT_S3_RESUME :
> +		      HOST_SLEEP_EVENT_S0IX_RESUME;
>  
>  	ret = cros_ec_sleep_event(ec_dev, sleep_event);
>  	if (ret < 0)
> @@ -224,8 +225,9 @@ int cros_ec_resume(struct cros_ec_device *ec_dev)
>  	ec_dev->suspended = false;
>  	enable_irq(ec_dev->irq);
>  
> -	sleep_event = pm_suspend_via_firmware() ? HOST_SLEEP_EVENT_S3_RESUME :
> -						  HOST_SLEEP_EVENT_S0IX_RESUME;
> +	sleep_event = (!IS_ENABLED(CONFIG_ACPI) || pm_suspend_via_firmware()) ?
> +		      HOST_SLEEP_EVENT_S3_RESUME :
> +		      HOST_SLEEP_EVENT_S0IX_RESUME;
>  
>  	ret = cros_ec_sleep_event(ec_dev, sleep_event);
>  	if (ret < 0)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists