From: Biju Das <biju.das.jz@bp.renesas.com>
To: Sergey Shtylyov <s.shtylyov@omp.ru>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
Andrew Lunn <andrew@lunn.ch>,
Sergei Shtylyov <sergei.shtylyov@gmail.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Adam Ford <aford173@gmail.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
Chris Paterson <Chris.Paterson2@renesas.com>,
Biju Das <biju.das@bp.renesas.com>
Subject: RE: [PATCH net-next 13/13] ravb: Add reset support
Date: Sat, 28 Aug 2021 09:41:27 +0000 [thread overview]
Message-ID: <OS0PR01MB59220E9CE8125FE4D9D75F2986C99@OS0PR01MB5922.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <3114f468-f454-4289-bc1f-befdadac9994@omp.ru>
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@bp.renesas.com>
> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.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@omp.ru>
>
> MBR, Sergey
next prev parent reply other threads:[~2021-08-28 9:41 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-25 7:01 [PATCH net-next 00/13] Add Factorisation code to support Gigabit Ethernet driver Biju Das
2021-08-25 7:01 ` [PATCH net-next 01/13] ravb: Remove the macros NUM_TX_DESC_GEN[23] Biju Das
2021-08-25 14:30 ` Sergey Shtylyov
2021-08-25 7:01 ` [PATCH net-next 02/13] ravb: Add multi_irq to struct ravb_hw_info Biju Das
2021-08-25 18:49 ` Sergey Shtylyov
2021-08-25 19:10 ` Sergey Shtylyov
2021-08-25 7:01 ` [PATCH net-next 03/13] ravb: Add no_ptp_cfg_active " Biju Das
2021-08-25 20:17 ` Sergey Shtylyov
2021-08-25 7:01 ` [PATCH net-next 04/13] ravb: Add ptp_cfg_active " Biju Das
2021-08-25 20:38 ` Sergey Shtylyov
2021-08-26 6:20 ` Biju Das
2021-08-26 10:29 ` Sergey Shtylyov
2021-08-26 10:34 ` Biju Das
2021-08-26 10:42 ` Sergey Shtylyov
2021-08-26 10:52 ` Biju Das
2021-08-26 18:06 ` Sergei Shtylyov
2021-08-26 18:57 ` Andrew Lunn
2021-08-26 19:02 ` Sergey Shtylyov
2021-08-26 19:09 ` Andrew Lunn
2021-08-26 19:37 ` Biju Das
2021-08-26 20:03 ` Sergey Shtylyov
2021-08-27 6:36 ` Biju Das
2021-08-27 15:48 ` Sergey Shtylyov
2021-08-27 15:55 ` Biju Das
2021-08-25 7:01 ` [PATCH net-next 05/13] ravb: Factorise ravb_ring_free function Biju Das
2021-08-25 20:53 ` Sergey Shtylyov
2021-08-25 7:01 ` [PATCH net-next 06/13] ravb: Factorise ravb_ring_format function Biju Das
2021-08-26 18:54 ` Sergey Shtylyov
2021-08-26 19:34 ` Biju Das
2021-08-25 7:01 ` [PATCH net-next 07/13] ravb: Factorise ravb_ring_init function Biju Das
2021-08-26 20:27 ` Sergey Shtylyov
2021-08-25 7:01 ` [PATCH net-next 08/13] ravb: Factorise ravb_rx function Biju Das
2021-08-26 20:41 ` Sergey Shtylyov
2021-08-27 6:28 ` Biju Das
2021-08-25 7:01 ` [PATCH net-next 09/13] ravb: Factorise ravb_adjust_link function Biju Das
2021-08-25 7:01 ` [PATCH net-next 10/13] ravb: Factorise ravb_set_features Biju Das
2021-08-27 19:16 ` Sergey Shtylyov
2021-08-28 9:20 ` Biju Das
2021-08-28 11:35 ` Sergey Shtylyov
2021-08-28 12:45 ` Biju Das
2021-08-25 7:01 ` [PATCH net-next 11/13] ravb: Factorise ravb_dmac_init function Biju Das
2021-08-27 19:36 ` Sergey Shtylyov
2021-08-28 9:28 ` Biju Das
2021-08-25 7:01 ` [PATCH net-next 12/13] ravb: Factorise ravb_emac_init function Biju Das
2021-08-27 19:52 ` Sergey Shtylyov
2021-08-28 9:34 ` Biju Das
2021-08-25 7:01 ` [PATCH net-next 13/13] ravb: Add reset support Biju Das
2021-08-27 20:17 ` Sergey Shtylyov
2021-08-28 9:41 ` Biju Das [this message]
2021-08-25 10:30 ` [PATCH net-next 00/13] Add Factorisation code to support Gigabit Ethernet driver patchwork-bot+netdevbpf
2021-08-25 10:57 ` Sergey Shtylyov
2021-08-25 13:46 ` Andrew Lunn
2021-08-25 14:06 ` Sergey Shtylyov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OS0PR01MB59220E9CE8125FE4D9D75F2986C99@OS0PR01MB5922.jpnprd01.prod.outlook.com \
--to=biju.das.jz@bp.renesas.com \
--cc=Chris.Paterson2@renesas.com \
--cc=aford173@gmail.com \
--cc=andrew@lunn.ch \
--cc=biju.das@bp.renesas.com \
--cc=davem@davemloft.net \
--cc=geert+renesas@glider.be \
--cc=kuba@kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=s.shtylyov@omp.ru \
--cc=sergei.shtylyov@gmail.com \
--cc=yoshihiro.shimoda.uh@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).