Thread (9 messages) 9 messages, 4 authors, 2025-12-05

RE: [PATCH net-next 0/3] net: stmmac: add physical port identification support

From: John Madieu <john.madieu.xa@bp.renesas.com>
Date: 2025-12-04 17:09:48
Also in: linux-devicetree, linux-renesas-soc

Hi Russell,
-----Original Message-----
From: Russell King <linux@armlinux.org.uk>
Sent: Thursday, December 4, 2025 6:07 PM
To: John Madieu <john.madieu.xa@bp.renesas.com>
Cc: Prabhakar Mahadev Lad <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
[off-list ref]; Claudiu.Beznea [off-list ref];
magnus.damm [off-list ref]; 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 0/3] net: stmmac: add physical port
identification support

See comments on the previous posting of this patch series (why it was
reposted in as little as six minutes apart...)

netdev has a rule: allow 24 hours between re-posts.

netdev has another rule: don't post new material, except for bug fixes for
the net tree, while netdev is closed (in other words, while the merge
window is open.) If you wish to post new material, mark it RFC.

Thanks.
Sorry for duplicated series. Something went wrong while sending out the series.
This won't happen next time.

Regards,
John
On Thu, Dec 04, 2025 at 04:37:26PM +0000, John Madieu wrote:
quoted
This series adds physical port identification support to the stmmac
driver, enabling userspace to query hardware-stable identifiers for
network interfaces via ndo_get_phys_port_id() and
ndo_get_phys_port_name().
quoted
On systems with multiple ethernet controllers sharing the same driver,
physical port identification provides stable identifiers that persist
across reboots and are independent of interface enumeration order.
This is particularly useful for predictable network interface naming
and for correlating interfaces with physical connectors.

The implementation follows a two-tier approach:

1. Generic stmmac support: Default implementations use the permanent MAC
   address as port ID and bus_id for port naming. This provides
immediate
quoted
   benefit for all stmmac-based platforms.

2. Glue driver override: Platform drivers can provide custom callbacks
   for hardware-specific identification schemes. The Renesas GBETH
driver
quoted
   implements this to support device tree-based port identification,
   addressing cases where hardware lacks unique identification
registers.
quoted
The Renesas implementation constructs an 8-byte port identifier from:
- Permanent MAC address (if available) or Renesas OUI (74:90:50) as
fallback
- Port index from device tree property or ethernet alias


John Madieu (3):
  net: stmmac: add physical port identification support
  dt-bindings: net: renesas-gbeth: Add port-id property
  net: stmmac: dwmac-renesas-gbeth: add physical port identification

 .../bindings/net/renesas,rzv2h-gbeth.yaml     | 19 +++++++
 .../stmicro/stmmac/dwmac-renesas-gbeth.c      | 56 +++++++++++++++++++
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 54 ++++++++++++++++++
 include/linux/stmmac.h                        |  5 ++
 4 files changed, 134 insertions(+)

--
2.25.1
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help