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] [day] [month] [year] [list]
Message-ID: <DB7PR04MB4618045D0E1135A514329AFFE65B0@DB7PR04MB4618.eurprd04.prod.outlook.com>
Date:   Tue, 10 Dec 2019 08:41:29 +0000
From:   Joakim Zhang <qiangqing.zhang@....com>
To:     Marc Kleine-Budde <mkl@...gutronix.de>,
        "sean@...nix.com" <sean@...nix.com>,
        "linux-can@...r.kernel.org" <linux-can@...r.kernel.org>
CC:     dl-linux-imx <linux-imx@....com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH 2/2] can: flexcan: disable clocks during stop mode


> -----Original Message-----
> From: Marc Kleine-Budde <mkl@...gutronix.de>
> Sent: 2019年12月10日 16:32
> To: Joakim Zhang <qiangqing.zhang@....com>; sean@...nix.com;
> linux-can@...r.kernel.org
> Cc: dl-linux-imx <linux-imx@....com>; netdev@...r.kernel.org
> Subject: Re: [PATCH 2/2] can: flexcan: disable clocks during stop mode
> 
> On 12/10/19 8:16 AM, Joakim Zhang wrote:
> > Disable clocks during CAN in stop mode.
> >
> > Signed-off-by: Joakim Zhang <qiangqing.zhang@....com>
> > ---
> >  drivers/net/can/flexcan.c | 13 ++++++++++++-
> >  1 file changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
> > index 6c1ccf9f6c08..d767f85c80d3 100644
> > --- a/drivers/net/can/flexcan.c
> > +++ b/drivers/net/can/flexcan.c
> > @@ -1786,10 +1786,16 @@ static int __maybe_unused
> > flexcan_noirq_suspend(struct device *device)  {
> >  	struct net_device *dev = dev_get_drvdata(device);
> >  	struct flexcan_priv *priv = netdev_priv(dev);
> > +	int err;
> >
> > -	if (netif_running(dev) && device_may_wakeup(device))
> > +	if (netif_running(dev) && device_may_wakeup(device)) {
> >  		flexcan_enable_wakeup_irq(priv, true);
> >
> > +		err = pm_runtime_force_suspend(device);
> > +		if (err)
> > +			return err;
> > +	}
> 
> What about moving the pm_runtime_force_suspend() call for both cases
> "device_may_wakeup()" and "!device_may_wakeup()" into the
> flexcan_noirq_suspend() handler?

Sounds great! I will do it in V2.

Best Regards,
Joakim Zhang
> Marc
> 
> --
> Pengutronix e.K.                 | Marc Kleine-Budde           |
> Embedded Linux                   | https://www.pengutronix.de  |
> Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
> Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ