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: <3e8f65e3-3aab-ddf4-2b05-16b275af6021@omp.ru>
Date: Sat, 16 Dec 2023 19:38:12 +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>,
	<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 09/21] net: ravb: Split GTI computation and
 set operations

On 12/14/23 2:45 PM, Claudiu wrote:

> From: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
> 
> ravb_set_gti() was computing the value of GTI based on the reference clock
> rate and then applied it to register. This was done on the driver's probe
> function. In order to implement runtime PM for all IP variants (as some IP
> variants switches to reset operation mode (and thus the register's content

   Again, operating mode...

> is lost) when module standby is configured through clock APIs) the GTI was

   The GTI what? Setup?

> split in 2 parts: one computing the value of the GTI register (done in the
> driver's probe function) and one applying the computed value to register
> (done in the driver's ndo_open API).
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
[...]

> diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h
> index e0f8276cffed..76202395b68d 100644
> --- a/drivers/net/ethernet/renesas/ravb.h
> +++ b/drivers/net/ethernet/renesas/ravb.h
> @@ -1106,6 +1106,8 @@ struct ravb_private {
>  
>  	const struct ravb_hw_info *info;
>  	struct reset_control *rstc;
> +
> +	uint64_t gti_tiv;

   Please use the kernel type, u64; uint64_t is for userland, IIRC.

[...]
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index d7f6e8ea8e79..5e01e03e1b43 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -1750,6 +1750,51 @@ static int ravb_set_reset_mode(struct net_device *ndev)
>  	return error;
>  }
>  
> +static int ravb_set_gti(struct net_device *ndev)
> +{
[...]
> +	/* Request GTI loading */
> +	ravb_modify(ndev, GCCR, GCCR_LTI, GCCR_LTI);
> +
> +	/* Check completion status. */
> +	return ravb_wait(ndev, GCCR, GCCR_LTI, 0);

   Is this really necessary?

[...]
> @@ -1767,6 +1812,10 @@ static int ravb_open(struct net_device *ndev)
>  		goto out_napi_off;
>  	ravb_emac_init(ndev);
>  
> +	error = ravb_set_gti(ndev);
> +	if (error)
> +		goto out_dma_stop;
> +

   Hm... belongs in ravb_dmac_init() now, as it seems... 

[...]

MBR, Sergey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ