RE: [PATCH net-next 13/13] ravb: Add reset support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
> [...]
> > 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@xxxxxx>
> 
> MBR, Sergey




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux