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]
Message-ID: <59ba595a-ab79-cc5d-feff-dad60e80c44f@omp.ru>
Date: Tue, 19 Dec 2023 21:54:49 +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 11/21] net: ravb: Move DBAT configuration to
 the driver's ndo_open API

On 12/17/23 3:54 PM, claudiu beznea wrote:

[...]

>>>> From: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
>>>>
>>>> DBAT setup was done in the driver's probe API. As some IP variants switch
>>>> to reset mode (and thus registers' content is lost) when setting clocks
>>>> (due to module standby functionality) to be able to implement runtime PM
>>>> move the DBAT configuration in the driver's ndo_open API.
>>>>
>>>> This commit prepares the code for the addition of runtime PM.
>>>>
>>>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
>>>
>>> Reviewed-by: Sergey Shtylyov <s.shtylyov@....ru>
>>>
>>> [...]
>>>> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
>>>> index 04eaa1967651..6b8ca08be35e 100644
>>>> --- a/drivers/net/ethernet/renesas/ravb_main.c
>>>> +++ b/drivers/net/ethernet/renesas/ravb_main.c
>>>> @@ -1822,6 +1822,7 @@ static int ravb_open(struct net_device *ndev)
>>>>  		napi_enable(&priv->napi[RAVB_NC]);
>>>>  
>>>>  	ravb_set_delay_mode(ndev);
>>>> +	ravb_write(ndev, priv->desc_bat_dma, DBAT);
>>
>>    Looking at it again, I suspect this belong in ravb_dmac_init()...
> 
> ravb_dmac_init() is called from multiple places in this driver, e.g.,

   It's purpose is to configure AVB-DMAC and DBAT is the AVB-DMAC register,
right?

> ravb_set_ringparam(), ravb_tx_timeout_work().

   I know. Its value is only calculated once, in ravb_probe(), right?

> I'm afraid we may broke the behavior of these if DBAT setup is moved

   Do not be afraid! :-)

> in ravb_dmac_init(). This is also
> valid for setting delay (see patch 10/12).

   I don't think there will be a problem either... but maybe we
should call it in ravb_emac_init() indeed.

[...]

MBR, Sergey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ