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: <DB7PR04MB46184177F22A1D958FA2B2FDE65D0@DB7PR04MB4618.eurprd04.prod.outlook.com>
Date:   Wed, 4 Dec 2019 09:59:51 +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 V2 4/4] can: flexcan: add LPSR mode support


> -----Original Message-----
> From: Marc Kleine-Budde <mkl@...gutronix.de>
> Sent: 2019年12月4日 17:21
> 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 V2 4/4] can: flexcan: add LPSR mode support
> 
> On 11/27/19 6:56 AM, Joakim Zhang wrote:
> > For i.MX7D LPSR mode, the controller will lost power and got the
> > configuration state lost after system resume back. (coming i.MX8QM/QXP
> > will also completely power off the domain, the controller state will
> > be lost and needs restore).
> > So we need to set pinctrl state again and re-start chip to do
> > re-configuration after resume.
> >
> > For wakeup case, it should not set pinctrl to sleep state by
> > pinctrl_pm_select_sleep_state.
> > For interface is not up before suspend case, we don't need
> > re-configure as it will be configured by user later by interface up.
> >
> > Signed-off-by: Joakim Zhang <qiangqing.zhang@....com>
> > ------
> > ChangeLog:
> > 	V1->V2: no change.
> > ---
> >  drivers/net/can/flexcan.c | 21 ++++++++++++++-------
> >  1 file changed, 14 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
> > index d178146b3da5..d1509cffdd24 100644
> > --- a/drivers/net/can/flexcan.c
> > +++ b/drivers/net/can/flexcan.c
> > @@ -26,6 +26,7 @@
> >  #include <linux/platform_device.h>
> >  #include <linux/pm_runtime.h>
> >  #include <linux/regulator/consumer.h>
> > +#include <linux/pinctrl/consumer.h>
> >  #include <linux/regmap.h>
> >
> >  #define DRV_NAME			"flexcan"
> > @@ -1707,7 +1708,7 @@ static int __maybe_unused
> flexcan_suspend(struct
> > device *device)  {
> >  	struct net_device *dev = dev_get_drvdata(device);
> >  	struct flexcan_priv *priv = netdev_priv(dev);
> > -	int err = 0;
> > +	int err;
> >
> >  	if (netif_running(dev)) {
> >  		/* if wakeup is enabled, enter stop mode @@ -1719,25 +1720,27
> @@
> > static int __maybe_unused flexcan_suspend(struct device *device)
> >  			if (err)
> >  				return err;
> >  		} else {
> > -			err = flexcan_chip_disable(priv);
> > +			flexcan_chip_stop(dev);
> 
> chip_stop calls chip_disable, but doesn't propagate the error value.
> Please create a seperate patch to propagate the error value of chip_stop().

Okay, I will do it.

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