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:   Tue, 1 Nov 2016 18:19:42 +0100
From:   Joachim Eastwood <manabian@...il.com>
To:     "David S. Miller" <davem@...emloft.net>
Cc:     Joachim Eastwood <manabian@...il.com>,
        "peppe.cavallaro" <peppe.cavallaro@...com>,
        alexandre.torgue@...com, netdev <netdev@...r.kernel.org>
Subject: Re: [net-next PATCH 3/7] stmmac: dwmac-sti: add PM ops and resume function

On 30 October 2016 at 21:05, Joachim Eastwood <manabian@...il.com> wrote:
> Implement PM callbacks and driver remove in the driver instead
> of relying on the init/exit hooks in stmmac_platform. This gives
> the driver more flexibility in how the code is organized.
>
> Eventually the init/exit callbacks will be deprecated in favor
> of the standard PM callbacks and driver remove function.
>
> Signed-off-by: Joachim Eastwood <manabian@...il.com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 46 +++++++++++++++++++------
>  1 file changed, 36 insertions(+), 10 deletions(-)
> +#ifdef CONFIG_PM_SLEEP
> +static int sti_dwmac_suspend(struct device *dev)
> +{
> +       struct sti_dwmac *dwmac = get_stmmac_bsp_priv(dev);
> +       int ret = stmmac_suspend(dev);
> +
> +       clk_disable_unprepare(dwmac->clk);
> +
> +       return ret;
> +}
> +
> +static int sti_dwmac_resume(struct device *dev)
> +{
> +       struct sti_dwmac *dwmac = get_stmmac_bsp_priv(dev);
> +       struct platform_device *pdev = to_platform_device(dev);
> +
> +       sti_dwmac_init(pdev, dwmac);
> +
> +       return stmmac_resume(dev);
> +}
> +#endif /* CONFIG_PM_SLEEP */
> +
> +SIMPLE_DEV_PM_OPS(sti_dwmac_pm_ops, sti_dwmac_suspend, sti_dwmac_resume);

Just noticed that I am missing a 'static' here.

As this not critical for testing I'll resend the patch set after I
(hopefully) get some response from someone with the hw that can do a
test.


regards,
Joachim Eastwood

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ