[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0a4f320-6218-2631-a5a0-26cfa9a25ee1@omp.ru>
Date: Wed, 24 Jan 2024 23:18:31 +0300
From: Sergey Shtylyov <s.shtylyov@....ru>
To: Claudiu <claudiu.beznea@...on.dev>, <davem@...emloft.net>,
<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
<richardcochran@...il.com>, <p.zabel@...gutronix.de>,
<geert+renesas@...der.be>
CC: <netdev@...r.kernel.org>, <linux-renesas-soc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, Claudiu Beznea
<claudiu.beznea.uj@...renesas.com>
Subject: Re: [PATCH net-next v4 10/15] net: ravb: Move delay mode set in the
driver's ndo_open API
On 1/23/24 3:58 PM, Claudiu wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
>
> Delay parsing and setting were done in the driver's probe API. As some IP
> variants switch to reset mode (and thus registers content is lost) when
s/registers content/the register contents/, perhaps?
> setting clocks (due to module standby functionality) to be able to
> implement runtime PM keep the delay parsing in the driver's probe function
> and move the delay applying function to the driver's ndo_open API.
>
> Along with it, both delay specific functions were kept together.
>
> Reviewed-by: Sergey Shtylyov <s.shtylyov@....ru>
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
[...]
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index 8956c33c60e2..69d4854d6738 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -1800,6 +1800,59 @@ static int ravb_compute_gti(struct net_device *ndev)
> return 0;
> }
>
> +/* Set tx and rx clock internal delay modes */
> +static void ravb_parse_delay_mode(struct device_node *np, struct net_device *ndev)
Wait, why are you moving this? Its call site didn't move -- it's still
down in the probe() method...
[...]
> @@ -2785,10 +2793,7 @@ static int ravb_probe(struct platform_device *pdev)
> if (error)
> goto out_rpm_put;
>
> - if (info->internal_delay) {
> - ravb_parse_delay_mode(np, ndev);
> - ravb_set_delay_mode(ndev);
> - }
> + ravb_parse_delay_mode(np, ndev);
>
> /* Allocate descriptor base address table */
> priv->desc_bat_size = sizeof(struct ravb_desc) * DBAT_ENTRY_NUM;
>
MBR, Sergey
Powered by blists - more mailing lists