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]
Message-ID: <yw1xshdh109j.fsf@mansr.com>
Date:   Tue, 14 Nov 2017 13:02:32 +0000
From:   Måns Rullgård <mans@...sr.com>
To:     Marc Gonzalez <marc_gonzalez@...madesigns.com>
Cc:     David Miller <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Florian Fainelli <f.fainelli@...il.com>,
        Thibaud Cornic <thibaud_cornic@...madesigns.com>,
        Mason <slash.tmp@...e.fr>
Subject: Re: [PATCH v3 4/4] net: nb8800: Add support for suspend/resume

Marc Gonzalez <marc_gonzalez@...madesigns.com> writes:

> Signed-off-by: Marc Gonzalez <marc_gonzalez@...madesigns.com>

Missing patch description.  Don't bother though.  I won't approve of
this implementation.

Suspend support has to depend on the chip since the EMAC core doesn't
have anything of the kind.

> ---
>  drivers/net/ethernet/aurora/nb8800.c | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>
> diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c
> index b71d8fb80610..9af2423aed03 100644
> --- a/drivers/net/ethernet/aurora/nb8800.c
> +++ b/drivers/net/ethernet/aurora/nb8800.c
> @@ -1437,6 +1437,26 @@ static int nb8800_remove(struct platform_device *pdev)
>  	return 0;
>  }
>
> +static int nb8800_suspend(struct platform_device *pdev, pm_message_t state)
> +{
> +	struct net_device *dev = platform_get_drvdata(pdev);
> +
> +	if (netif_running(dev))
> +		return nb8800_stop(dev);
> +
> +	return 0;
> +}
> +
> +static int nb8800_resume(struct platform_device *pdev)
> +{
> +	struct net_device *dev = platform_get_drvdata(pdev);
> +
> +	if (netif_running(dev))
> +		return nb8800_open(dev);
> +
> +	return 0;
> +}
> +
>  static struct platform_driver nb8800_driver = {
>  	.driver = {
>  		.name		= "nb8800",
> @@ -1444,6 +1464,8 @@ static struct platform_driver nb8800_driver = {
>  	},
>  	.probe	= nb8800_probe,
>  	.remove	= nb8800_remove,
> +	.suspend = nb8800_suspend,
> +	.resume = nb8800_resume,
>  };
>
>  module_platform_driver(nb8800_driver);
> -- 
> 2.15.0
>

-- 
Måns Rullgård

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ