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: <uc3stkm4yyaudv7x3gaarx2xipxglrrnwo4ixht35gkaq2bec2@zpg6roiq5pnu>
Date: Fri, 3 May 2024 21:28:46 +0300
From: Serge Semin <fancer.lancer@...il.com>
To: Yanteng Si <siyanteng@...ngson.cn>
Cc: andrew@...n.ch, hkallweit1@...il.com, peppe.cavallaro@...com, 
	alexandre.torgue@...s.st.com, joabreu@...opsys.com, Jose.Abreu@...opsys.com, 
	chenhuacai@...nel.org, linux@...linux.org.uk, guyinggang@...ngson.cn, 
	netdev@...r.kernel.org, chris.chenfeiyang@...il.com, siyanteng01@...il.com
Subject: Re: [PATCH net-next v12 08/15] net: stmmac: dwmac-loongson: Add phy
 mask for Loongson GMAC

On Thu, Apr 25, 2024 at 09:06:11PM +0800, Yanteng Si wrote:
> The phy mask of gmac(and gnet) is 0.

First of all the GNET PHY mask won't be zero as you setting it up to
~BIT(2) in the patch 13 yourself. Secondly the stmmac_mdio_bus_data
structure instance is Z-malloced, thus it will be zeroed anyway. So
the only reason why the explicit stmmac_mdio_bus_data::phy_mask
zeroing would be useful is to signify the difference between the GMAC
and GNET devices. But that difference could be relatively easy
inferred from the code. So to speak IMO the patch has a little value.
I would drop it.

-Serge(y)

> 
> Signed-off-by: Feiyang Chen <chenfeiyang@...ngson.cn>
> Signed-off-by: Yinggang Gu <guyinggang@...ngson.cn>
> Signed-off-by: Yanteng Si <siyanteng@...ngson.cn>
> ---
>  drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
> index 9f208f84c1e7..f7618edf4a3a 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
> @@ -48,6 +48,8 @@ static int loongson_gmac_data(struct plat_stmmacenet_data *plat)
>  {
>  	loongson_default_data(plat);
>  
> +	plat->mdio_bus_data->phy_mask = 0;
> +
>  	return 0;
>  }
>  
> -- 
> 2.31.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ