On Thu, Dec 04, 2025 at 04:31:20PM +0000, John Madieu wrote:
+static int stmmac_get_phys_port_name(struct net_device *dev,
+ char *name, size_t len)
+{
+ struct stmmac_priv *priv = netdev_priv(dev);
+
+ /* Allow glue driver to override */
+ if (priv->plat->get_phys_port_name)
+ return priv->plat->get_phys_port_name(dev, name, len);
+
+ /* Default: use bus_id as port identifier */
+ return snprintf(name, len, "p%d", priv->plat->bus_id) >= len ? -EINVAL : 0;
priv->plat->bus_id may not be stable - for example, if a SoC describes
two stmmac ethernet, but omits the ethernet aliases, then plat->bus_id
is assigned in order that stmmac_probe_config_dt() is called for each
device.
How important is it that the phys_port_name is stable across boots?
If it should be stable, then I think we should not report it if we end
up falling back to the "assign in order of stmmac_probe_config_dt()".
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!