netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: claudiu beznea <claudiu.beznea@tuxon.dev>
To: Sergey Shtylyov <s.shtylyov@omp.ru>,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, richardcochran@gmail.com,
	p.zabel@pengutronix.de, geert+renesas@glider.be
Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH net-next v4 10/15] net: ravb: Move delay mode set in the driver's ndo_open API
Date: Mon, 29 Jan 2024 15:55:54 +0200	[thread overview]
Message-ID: <1c680be4-67b7-435b-9609-b5f7a45ca675@tuxon.dev> (raw)
In-Reply-To: <b0a4f320-6218-2631-a5a0-26cfa9a25ee1@omp.ru>



On 24.01.2024 22:18, Sergey Shtylyov wrote:
> On 1/23/24 3:58 PM, Claudiu wrote:
> 
>> From: Claudiu Beznea <claudiu.beznea.uj@bp.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@omp.ru>
>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.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...

As explained in the patch description ("Along with it, both delay specific
functions were kept together.") functions were moved closed to each other
to have the code dealing with delay in the same place.

> 
> [...]
>> @@ -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

  reply	other threads:[~2024-01-29 13:55 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 12:58 [PATCH net-next v4 00/15] net: ravb: Prepare for suspend to RAM and runtime PM support (part 1) Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 01/15] net: ravb: Let IP-specific receive function to interrogate descriptors Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 02/15] net: ravb: Rely on PM domain to enable gptp_clk Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 03/15] net: ravb: Make reset controller support mandatory Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 04/15] net: ravb: Switch to SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() and pm_ptr() Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 05/15] net: ravb: Use tabs instead of spaces Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 06/15] net: ravb: Assert/de-assert reset on suspend/resume Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 07/15] net: ravb: Move reference clock enable/disable on runtime PM APIs Claudiu
2024-01-23 20:43   ` Sergey Shtylyov
2024-01-29 13:53     ` claudiu beznea
2024-01-30 18:22       ` Sergey Shtylyov
2024-01-23 12:58 ` [PATCH net-next v4 08/15] net: ravb: Move the IRQs get and request in the probe function Claudiu
2024-01-28 18:01   ` Sergey Shtylyov
2024-01-28 18:03     ` Sergey Shtylyov
2024-01-28 18:22       ` Sergey Shtylyov
2024-01-28 18:23       ` Sergey Shtylyov
2024-01-28 18:23       ` Sergey Shtylyov
2024-01-23 12:58 ` [PATCH net-next v4 09/15] net: ravb: Split GTI computation and set operations Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 10/15] net: ravb: Move delay mode set in the driver's ndo_open API Claudiu
2024-01-24 20:18   ` Sergey Shtylyov
2024-01-29 13:55     ` claudiu beznea [this message]
2024-01-29 13:57       ` claudiu beznea
2024-01-23 12:58 ` [PATCH net-next v4 11/15] net: ravb: Move DBAT configuration to " Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 12/15] net: ravb: Move PTP initialization in the driver's ndo_open API for ccc_gac platorms Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 13/15] net: ravb: Set config mode in ndo_open and reset mode in ndo_close Claudiu
2024-01-28 20:12   ` Sergey Shtylyov
2024-01-23 12:58 ` [PATCH net-next v4 14/15] net: ravb: Simplify ravb_suspend() Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 15/15] net: ravb: Simplify ravb_resume() Claudiu

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=1c680be4-67b7-435b-9609-b5f7a45ca675@tuxon.dev \
    --to=claudiu.beznea@tuxon.dev \
    --cc=claudiu.beznea.uj@bp.renesas.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=geert+renesas@glider.be \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=s.shtylyov@omp.ru \
    /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).