All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: John Madieu <john.madieu.xa@bp.renesas.com>
Cc: prabhakar.mahadev-lad.rj@bp.renesas.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, geert+renesas@glider.be,
	biju.das.jz@bp.renesas.com, claudiu.beznea@tuxon.dev,
	magnus.damm@gmail.com, mcoquelin.stm32@gmail.com,
	alexandre.torgue@foss.st.com, netdev@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH net-next 3/3] net: stmmac: dwmac-renesas-gbeth: add physical port identification
Date: Thu, 4 Dec 2025 17:04:57 +0000	[thread overview]
Message-ID: <aTG_OVLXfvFXzs3i@shell.armlinux.org.uk> (raw)
In-Reply-To: <20251204163122.3032995-4-john.madieu.xa@bp.renesas.com>

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!

  reply	other threads:[~2025-12-04 17:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-04 16:31 [PATCH net-next 0/3] net: stmmac: add physical port identification support John Madieu
2025-12-04 16:31 ` [PATCH net-next 1/3] " John Madieu
2025-12-04 16:54   ` Russell King (Oracle)
2025-12-04 16:31 ` [PATCH net-next 2/3] dt-bindings: net: renesas-gbeth: Add port-id property John Madieu
2025-12-04 16:31 ` [PATCH net-next 3/3] net: stmmac: dwmac-renesas-gbeth: add physical port identification John Madieu
2025-12-04 17:04   ` Russell King (Oracle) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-12-04 16:37 [PATCH net-next 0/3] net: stmmac: add physical port identification support John Madieu
2025-12-04 16:37 ` [PATCH net-next 3/3] net: stmmac: dwmac-renesas-gbeth: add physical port identification John Madieu
2025-12-04 16:40 [PATCH net-next 0/3] net: stmmac: add physical port identification support John Madieu
2025-12-04 16:40 ` [PATCH net-next 3/3] net: stmmac: dwmac-renesas-gbeth: add physical port identification John Madieu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aTG_OVLXfvFXzs3i@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=geert+renesas@glider.be \
    --cc=john.madieu.xa@bp.renesas.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.