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: <7d3b2991-f755-42e5-87ca-727fd8fb9164@roeck-us.net>
Date:   Mon, 8 May 2023 06:29:09 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Wim Van Sebroeck <wim@...ux-watchdog.org>
Cc:     Fabrizio Castro <fabrizio.castro.jz@...esas.com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Magnus Damm <magnus.damm@...il.com>,
        Biju Das <biju.das.jz@...renesas.com>,
        "linux-renesas-soc@...r.kernel.org" 
        <linux-renesas-soc@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-watchdog@...r.kernel.org" <linux-watchdog@...r.kernel.org>,
        Chris Paterson <Chris.Paterson2@...esas.com>,
        Biju Das <biju.das@...renesas.com>,
        Fabrizio Castro <fabrizio.castro@...renesas.com>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Jacopo Mondi <jacopo@...ndi.org>
Subject: Re: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M

On Sun, May 07, 2023 at 05:36:25PM +0200, Wim Van Sebroeck wrote:
> Hi Fabrizio,
> 
> Based on below e-mail I excluded this patch from the merge window.
> I saw that Guenter still has it in his branch.

Thanks for the note. I'll drop it.

Guenter

> So can we have an update on this please?
> 
> Thanks in advance,
> Wim.
> 
> > Hi Geert and Guenter,
> > 
> > Thank you for your reviews!
> > 
> > As it turns out, the rzg2l_wdt driver has some reset related issues
> > (currently not addressed by the driver) for the RZ/V2M and RZ/Five
> > SoCs. More specifically to this patch, there is a better way to fix
> > the restart callback by addressing the way the reset is handled
> > for the watchdog IP.
> > 
> > I am dropping this patch, and I'll send out a series to address
> > the above concerns (which will tackle the issues with the restart
> > callback in a better way).
> > 
> > 
> > Thanks,
> > Fab
> > 
> > 
> > > From: Guenter Roeck <groeck7@...il.com> On Behalf Of Guenter Roeck
> > > Sent: 15 November 2022 13:28
> > > Subject: Re: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M
> > > 
> > > On Thu, Nov 03, 2022 at 10:39:54PM +0000, Fabrizio Castro wrote:
> > > > The setting for the RZ/V2M watchdog cannot be changed once
> > > > the watchdog has been enabled, unless the IP gets reset.
> > > > The current implementation of the restart callback assumes
> > > > that the watchdog is not enabled, but that's not always the
> > > > case, and it leads to longer than necessary reboot times if
> > > > the watchdog is already running.
> > > >
> > > > Always reset the RZ/V2M watchdog first, so that we can always
> > > > restart quickly.
> > > >
> > > > Fixes: ec122fd94eeb ("watchdog: rzg2l_wdt: Add rzv2m support")
> > > > Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@...esas.com>
> > > 
> > > Reviewed-by: Guenter Roeck <linux@...ck-us.net>
> > > 
> > > > ---
> > > >  drivers/watchdog/rzg2l_wdt.c | 11 ++++++++---
> > > >  1 file changed, 8 insertions(+), 3 deletions(-)
> > > >
> > > > diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c
> > > > index 974a4194a8fd..00438ceed17a 100644
> > > > --- a/drivers/watchdog/rzg2l_wdt.c
> > > > +++ b/drivers/watchdog/rzg2l_wdt.c
> > > > @@ -145,10 +145,10 @@ static int rzg2l_wdt_restart(struct
> > > watchdog_device *wdev,
> > > >  {
> > > >  	struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev);
> > > >
> > > > -	clk_prepare_enable(priv->pclk);
> > > > -	clk_prepare_enable(priv->osc_clk);
> > > > -
> > > >  	if (priv->devtype == WDT_RZG2L) {
> > > > +		clk_prepare_enable(priv->pclk);
> > > > +		clk_prepare_enable(priv->osc_clk);
> > > > +
> > > >  		/* Generate Reset (WDTRSTB) Signal on parity error */
> > > >  		rzg2l_wdt_write(priv, 0, PECR);
> > > >
> > > > @@ -157,6 +157,11 @@ static int rzg2l_wdt_restart(struct watchdog_device
> > > *wdev,
> > > >  	} else {
> > > >  		/* RZ/V2M doesn't have parity error registers */
> > > >
> > > > +		reset_control_reset(priv->rstc);
> > > > +
> > > > +		clk_prepare_enable(priv->pclk);
> > > > +		clk_prepare_enable(priv->osc_clk);
> > > > +
> > > >  		wdev->timeout = 0;
> > > >
> > > >  		/* Initialize time out */
> > > > --
> > > > 2.34.1
> > > >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ