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: <OS0PR01MB59220E9CE8125FE4D9D75F2986C99@OS0PR01MB5922.jpnprd01.prod.outlook.com>
Date:   Sat, 28 Aug 2021 09:41:27 +0000
From:   Biju Das <biju.das.jz@...renesas.com>
To:     Sergey Shtylyov <s.shtylyov@....ru>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
CC:     Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>,
        Andrew Lunn <andrew@...n.ch>,
        Sergei Shtylyov <sergei.shtylyov@...il.com>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Adam Ford <aford173@...il.com>,
        Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-renesas-soc@...r.kernel.org" 
        <linux-renesas-soc@...r.kernel.org>,
        Chris Paterson <Chris.Paterson2@...esas.com>,
        Biju Das <biju.das@...renesas.com>
Subject: RE: [PATCH net-next 13/13] ravb: Add reset support

Hi Sergei,

Thanks for the feedback.

> Subject: Re: [PATCH net-next 13/13] ravb: Add reset support
> 
> On 8/25/21 10:01 AM, Biju Das wrote:
> 
> > Reset support is present on R-Car. Let's support it, if it is
> > available.
> >
> > Signed-off-by: Biju Das <biju.das.jz@...renesas.com>
> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> [...]
> > diff --git a/drivers/net/ethernet/renesas/ravb_main.c
> > b/drivers/net/ethernet/renesas/ravb_main.c
> > index 7a144b45e41d..0f85f2d97b18 100644
> > --- a/drivers/net/ethernet/renesas/ravb_main.c
> > +++ b/drivers/net/ethernet/renesas/ravb_main.c
> [...]
> 
> > @@ -2349,6 +2358,7 @@ static int ravb_probe(struct platform_device
> > *pdev)
> >
> >  	pm_runtime_put(&pdev->dev);
> >  	pm_runtime_disable(&pdev->dev);
> > +	reset_control_assert(rstc);
> >  	return error;
> >  }
> >
> > @@ -2374,6 +2384,7 @@ static int ravb_remove(struct platform_device
> *pdev)
> >  	netif_napi_del(&priv->napi[RAVB_BE]);
> >  	ravb_mdio_release(priv);
> >  	pm_runtime_disable(&pdev->dev);
> > +	reset_control_assert(priv->rstc);
> >  	free_netdev(ndev);
> >  	platform_set_drvdata(pdev, NULL);
> >
> 
>    Is it possible to get into/out of reset in open()/close() methods?

No, Reason, Normally reset will be called

	ravb_mdio_release(priv);
	pm_runtime_disable(&pdev->dev);
	reset_control_assert(priv->rstc);

After reset assert, We should not access any RAVB registers, otherwise system will hang.
There is a high chance that other users(for eg:- mdio) may access ravb registers and system hangs.

Regards,
Biju


>    Otherwise, looks good (I'm not much into reset h/w)
> 
> Reviewed-by: Sergey Shtylyov <s.shtylyov@....ru>
> 
> MBR, Sergey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ