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: <aTG_OVLXfvFXzs3i@shell.armlinux.org.uk>
Date: Thu, 4 Dec 2025 17:04:57 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: John Madieu <john.madieu.xa@...renesas.com>
Cc: prabhakar.mahadev-lad.rj@...renesas.com, andrew+netdev@...n.ch,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, robh@...nel.org, krzk+dt@...nel.org,
	conor+dt@...nel.org, geert+renesas@...der.be,
	biju.das.jz@...renesas.com, claudiu.beznea@...on.dev,
	magnus.damm@...il.com, mcoquelin.stm32@...il.com,
	alexandre.torgue@...s.st.com, netdev@...r.kernel.org,
	linux-renesas-soc@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH net-next 3/3] net: stmmac: dwmac-renesas-gbeth: add
 physical port identification

On Thu, Dec 04, 2025 at 04:31:22PM +0000, John Madieu wrote:
> +static int renesas_gbeth_get_port_id(struct device *dev)
> +{
> +	int port_id;
> +
> +	if (!device_property_read_u32(dev, "renesas,port-id", &port_id))
> +		return port_id;
> +
> +	port_id = of_alias_get_id(dev_of_node(dev), "ethernet");
> +
> +	return port_id < 0 ? 0 : port_id;
> +}

You fall back to the ethernet alias, which is essentially what
devm_stmmac_probe_config_dt() will assign to plat->bus_id. So, is
there any reason we can't just use plat->bus_id ? Why do we need a
special property?

I really don't like the idea that, with the proposal here, we'll
likely see the stmmac platform glue spawn more platform specific
code. This doesn't scale.

So, the next question: should there be a standard way to describe
these attributes, rather than having lots of vendor specific
properties describing the same information? Should this be part
of the generic binding, iow
Documentation/devicetree/bindings/net/ethernet-controller.yaml ?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ