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]
Date: Thu, 21 Dec 2023 22:40:39 +0300
From: Sergey Shtylyov <s.shtylyov@....ru>
To: claudiu beznea <claudiu.beznea@...on.dev>, <davem@...emloft.net>,
	<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
	<richardcochran@...il.com>, <p.zabel@...gutronix.de>,
	<yoshihiro.shimoda.uh@...esas.com>, <wsa+renesas@...g-engineering.com>,
	<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 v2 13/21] net: ravb: Set config mode in ndo_open
 and reset mode in ndo_close

On 12/17/23 4:15 PM, claudiu beznea wrote:

[...]

>>> From: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
>>>
>>> As some IP variants switch to reset mode (and thus registers' content is
>>
>>    Register.
>>
>>> lost) when setting clocks (due to module standby functionality) to be able
>>> to implement runtime PM and save more power, set the IP's operation mode to
>>
>>    Operating.
>>
>>> reset at the end of the probe. Along with it, in the ndo_open API the IP
>>> will be switched to configuration, then operational mode. In the ndo_close
>>> API, the IP will be switched back to reset mode. This allows implementing
>>> runtime PM and, along with it, save more power when the IP is not used.
>>>
>>> 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 db9222fc57c2..31a1f8a83652 100644
>>> --- a/drivers/net/ethernet/renesas/ravb_main.c
>>> +++ b/drivers/net/ethernet/renesas/ravb_main.c
>> [...]
>>> @@ -1821,13 +1845,19 @@ static int ravb_open(struct net_device *ndev)
>>>  	if (info->nc_queues)
>>>  		napi_enable(&priv->napi[RAVB_NC]);
>>>  
>>> +	/* Set AVB config mode */
>>> +	error = ravb_set_config_mode(ndev);
>>> +	if (error)
>>> +		goto out_napi_off;
>>> +
>>
>>    I suspect this too belongs in ravb_dmac_init() now...
> 
> What I can do here is to keep PTP/GAC specific settings from
> ravb_set_config_mode() in a separate function close to PTP setup and remove
> ravb_set_config_mode() at all as ravb_dmac_init() switches anyway the IP to
> config mode. But with this I don't know how the PTP/GAC will be influenced

   My manuals say there are certain limitations (currently reflected in
ravb_set_config_mode()) WRT setting CCC.CSEL and CCC.GAC bits.

> as I don't have a setup to check it. From my memories, the commit that
> introduces the setup of PTP when switching to config mode did this by
> intention, so I'm not sure weather playing around with this is the way to
> go forward. Do you remember something specific about this?

   I haven't ever tested PTP, IIRC...

[...]

MBR, Sergey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ