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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 10 Aug 2016 13:40:51 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Niklas Söderlund 
	<niklas.soderlund+renesas@...natech.se>, netdev@...r.kernel.org,
	linux-renesas-soc@...r.kernel.org
Cc:	davem@...emloft.net, wsa@...-dreams.de
Subject: Re: [PATCH 2/2] ravb: add sleep PM suspend/resume support

Hello.

On 8/3/2016 4:56 PM, Niklas Söderlund wrote:

> The interface would not function after the system had been woken up
> after have been suspended (echo mem > /sys/power/state) cycle. The
> reason for this is that all device registers have been reset to its
> default values. This patch adds sleep suspend and resume functions that
> detached the interface at suspend and restore the registers and reattach
> the interface at resume.
>
> Only the registers that are only configured at probe time needs to be
> explicitly restored by the resume handler. All other registers are
> reconfigured by either reopening the device in the resume handler (if
> the device was running when the system was suspended) or when the
> interface is opened by a user at a later time.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@...natech.se>
> ---
>  drivers/net/ethernet/renesas/ravb_main.c | 72 ++++++++++++++++++++++++++++----
>  1 file changed, 64 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index da8da86..1de55c9 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
[...]
> @@ -2111,6 +2166,7 @@ static int ravb_runtime_nop(struct device *dev)
>  }
>
>  static const struct dev_pm_ops ravb_dev_pm_ops = {
> +	SET_SYSTEM_SLEEP_PM_OPS(ravb_runtime_suspend, ravb_runtime_resume)

    Why in the world you used runtime_ in the usual suspend/resume method 
names?! Since DaveM have already taken the patch, please send a follow-up 
patch to remove that infix.

>  	SET_RUNTIME_PM_OPS(ravb_runtime_nop, ravb_runtime_nop, NULL)
>  };
>

MBR, Sergei

Powered by blists - more mailing lists