of: net: Add helper function of_get_ethdev_label()
Subsystems (28)
PATCH 1/2 of: net: Add helper function of_get_ethdev_label()
Adds a new helper function of_get_ethdev_label() which sets initial name of specified netdev interface based on DT "label" property. It is same what is doing DSA function dsa_port_parse_of() for DSA ports.
This helper function can be useful for drivers to make consistency between DSA and netdev interface names.
--- include/linux/of_net.h | 6 ++++++ net/core/of_net.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+)
include/linux/of_net.h +6 -0
@@ -15,6 +15,7 @@ struct net_device;extern int of_get_phy_mode (struct device_node *np,phy_interface_t *interface);extern int of_get_mac_address (struct device_node *np,u8 *mac);int of_get_ethdev_address (struct device_node *np,struct net_device *dev); +int of_get_ethdev_label (struct device_node *np,struct net_device *dev);extern struct net_device *of_find_net_device_by_node (struct device_node *np);#else static inline int of_get_phy_mode(struct device_node *np,
@@ -33,6 +34,11 @@ static inline int of_get_ethdev_address(struct device_node *np, struct net_devicreturn -ENODEV ; } +static inline int of_get_ethdev_label (struct device_node *np,struct net_device *dev) +{ +return -ENODEV ; +} +static inline struct net_device *of_find_net_device_by_node (struct device_node *np) {return NULL ;
net/core/of_net.c +15 -0
@@ -168,3 +168,18 @@ int of_get_ethdev_address(struct device_node *np, struct net_device *dev)return ret; }EXPORT_SYMBOL (of_get_ethdev_address); + +int of_get_ethdev_label (struct device_node *np,struct net_device *dev) +{ +const char *name =of_get_property (np,"label" ,NULL ); + +if (!name) +return -ENOENT ; + +if (strlen (name) >=sizeof (dev->name)) +return -ENAMETOOLONG ; + +strcpy (dev->name, name); +return 0 ; +} +EXPORT_SYMBOL (of_get_ethdev_label);
Signature · 1 line
2.20.1
PATCH 2/2 of: net: Call of_get_ethdev_label() in all DT based net drivers
Make consistency between DT based netdev and DSA interfaces in eth net drivers by setting initial netdev name based on DT label. Exactly same behavior is already implemented and used in DSA drivers.
This change just makes initial consistency between netdev eth devices and DSA devices.
--- drivers/net/ethernet/allwinner/sun4i-emac.c | 2 ++ drivers/net/ethernet/altera/altera_tse_main.c | 2 ++ drivers/net/ethernet/arc/emac_main.c | 2 ++ drivers/net/ethernet/atheros/ag71xx.c | 2 ++ drivers/net/ethernet/broadcom/bcm4908_enet.c | 1 + drivers/net/ethernet/broadcom/bcmsysport.c | 3 +++ drivers/net/ethernet/broadcom/bgmac-bcma.c | 2 ++ drivers/net/ethernet/broadcom/bgmac-platform.c | 2 ++ drivers/net/ethernet/cadence/macb_main.c | 2 ++ drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 2 ++ drivers/net/ethernet/ethoc.c | 1 + drivers/net/ethernet/ezchip/nps_enet.c | 2 ++ drivers/net/ethernet/freescale/fec_mpc52xx.c | 2 ++ drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 2 ++ drivers/net/ethernet/freescale/gianfar.c | 2 ++ drivers/net/ethernet/freescale/ucc_geth.c | 1 + drivers/net/ethernet/hisilicon/hisi_femac.c | 2 ++ drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 2 ++ drivers/net/ethernet/ibm/emac/core.c | 2 ++ drivers/net/ethernet/korina.c | 2 ++ drivers/net/ethernet/lantiq_xrx200.c | 2 ++ drivers/net/ethernet/litex/litex_liteeth.c | 2 ++ drivers/net/ethernet/marvell/mvneta.c | 2 ++ drivers/net/ethernet/marvell/pxa168_eth.c | 2 ++ drivers/net/ethernet/marvell/sky2.c | 2 ++ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++ drivers/net/ethernet/micrel/ks8851_common.c | 2 ++ drivers/net/ethernet/nxp/lpc_eth.c | 2 ++ drivers/net/ethernet/qualcomm/qca_spi.c | 2 ++ drivers/net/ethernet/qualcomm/qca_uart.c | 1 + drivers/net/ethernet/renesas/ravb_main.c | 2 ++ drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c | 2 ++ drivers/net/ethernet/socionext/sni_ave.c | 2 ++ drivers/net/ethernet/ti/netcp_core.c | 2 ++ drivers/net/ethernet/xilinx/xilinx_emaclite.c | 2 ++ drivers/staging/octeon/ethernet.c | 2 ++ 36 files changed, 69 insertions(+)
drivers/net/ethernet/allwinner/sun4i-emac.c +2 -0
@@ -851,6 +851,8 @@ static int emac_probe(struct platform_device *pdev) goto out_release_sram; } +of_get_ethdev_label (np, ndev); +/* Read MAC-address from DT */ ret =of_get_ethdev_address (np, ndev);if (ret) {
drivers/net/ethernet/altera/altera_tse_main.c +2 -0
@@ -1523,6 +1523,8 @@ static int altera_tse_probe(struct platform_device *pdev)*/ priv->rx_dma_buf_sz =ALTERA_RXDMABUFFER_SIZE ; +of_get_ethdev_label (pdev->dev.of_node, ndev); +/* get default MAC address from device tree */ ret =of_get_ethdev_address (pdev->dev.of_node, ndev);if (ret)
drivers/net/ethernet/arc/emac_main.c +2 -0
@@ -940,6 +940,8 @@ int arc_emac_probe(struct net_device *ndev, int interface) goto out_clken; } +of_get_ethdev_label (dev->of_node, ndev); +/* Get MAC address from device tree */ err =of_get_ethdev_address (dev->of_node, ndev);if (err)
drivers/net/ethernet/atheros/ag71xx.c +2 -0
@@ -1966,6 +1966,8 @@ static int ag71xx_probe(struct platform_device *pdev) ag->stop_desc->ctrl =0 ; ag->stop_desc->next = (u32 )ag->stop_desc_dma; +of_get_ethdev_label (np, ndev); + err =of_get_ethdev_address (np, ndev);if (err) {netif_err (ag, probe, ndev,"invalid MAC address, using random address\n" );
drivers/net/ethernet/broadcom/bcm4908_enet.c +1 -0
@@ -715,6 +715,7 @@ static int bcm4908_enet_probe(struct platform_device *pdev)return err;SET_NETDEV_DEV (netdev, &pdev->dev); +of_get_ethdev_label (dev->of_node, netdev); err =of_get_ethdev_address (dev->of_node, netdev);if (err)eth_hw_addr_random (netdev);
drivers/net/ethernet/broadcom/bcmsysport.c +3 -0
@@ -2555,6 +2555,9 @@ static int bcm_sysport_probe(struct platform_device *pdev) }/* Initialize netdevice members */ + +of_get_ethdev_label (dn, dev); + ret =of_get_ethdev_address (dn, dev);if (ret) {dev_warn (&pdev->dev,"using random Ethernet MAC\n" );
drivers/net/ethernet/broadcom/bgmac-bcma.c +2 -0
@@ -140,6 +140,8 @@ static int bgmac_probe(struct bcma_device *core)bcma_set_drvdata (core, bgmac); +of_get_ethdev_label (bgmac->dev->of_node, bgmac->net_dev); + err =of_get_ethdev_address (bgmac->dev->of_node, bgmac->net_dev);if (err == -EPROBE_DEFER )return err;
drivers/net/ethernet/broadcom/bgmac-platform.c +2 -0
@@ -191,6 +191,8 @@ static int bgmac_probe(struct platform_device *pdev) bgmac->dev = &pdev->dev; bgmac->dma_dev = &pdev->dev; +of_get_ethdev_label (np, bgmac->net_dev); + ret =of_get_ethdev_address (np, bgmac->net_dev);if (ret == -EPROBE_DEFER )return ret;
drivers/net/ethernet/cadence/macb_main.c +2 -0
@@ -4784,6 +4784,8 @@ static int macb_probe(struct platform_device *pdev)if (bp->caps &MACB_CAPS_NEEDS_RSTONUBR ) bp->rx_intr_mask |=MACB_BIT (RXUBR ); +of_get_ethdev_label (np, bp->dev); + err =of_get_ethdev_address (np, bp->dev);if (err == -EPROBE_DEFER ) goto err_out_free_netdev;
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c +2 -0
@@ -1501,6 +1501,8 @@ static int octeon_mgmt_probe(struct platform_device *pdev) netdev->min_mtu =64 -OCTEON_MGMT_RX_HEADROOM ; netdev->max_mtu =16383 -OCTEON_MGMT_RX_HEADROOM -VLAN_HLEN ; +of_get_ethdev_label (pdev->dev.of_node, netdev); + result =of_get_ethdev_address (pdev->dev.of_node, netdev);if (result)eth_hw_addr_random (netdev);
drivers/net/ethernet/ethoc.c +1 -0
@@ -1147,6 +1147,7 @@ static int ethoc_probe(struct platform_device *pdev)eth_hw_addr_set (netdev, pdata->hwaddr); priv->phy_id = pdata->phy_id; }else { +of_get_ethdev_label (pdev->dev.of_node, netdev);of_get_ethdev_address (pdev->dev.of_node, netdev); priv->phy_id =-1 ; }
drivers/net/ethernet/ezchip/nps_enet.c +2 -0
@@ -600,6 +600,8 @@ static s32 nps_enet_probe(struct platform_device *pdev) }dev_dbg (dev,"Registers base address is 0x%p\n" , priv->regs_base); +of_get_ethdev_label (dev->of_node, ndev); +/* set kernel MAC address to dev */ err =of_get_ethdev_address (dev->of_node, ndev);if (err)
drivers/net/ethernet/freescale/fec_mpc52xx.c +2 -0
@@ -885,6 +885,8 @@ static int mpc52xx_fec_probe(struct platform_device *op)/* TX */ priv->t_irq =bcom_get_task_irq (priv->tx_dmatsk); +of_get_ethdev_label (np, ndev); +/* * MAC address init: *
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +2 -0
@@ -1005,6 +1005,8 @@ static int fs_enet_probe(struct platform_device *ofdev)spin_lock_init (&fep->lock);spin_lock_init (&fep->tx_lock); +of_get_ethdev_label (ofdev->dev.of_node, ndev); +of_get_ethdev_address (ofdev->dev.of_node, ndev); ret = fep->ops->allocate_bd (ndev);
drivers/net/ethernet/freescale/gianfar.c +2 -0
@@ -753,6 +753,8 @@ static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev)if (stash_len || stash_idx) priv->device_flags |=FSL_GIANFAR_DEV_HAS_BUF_STASHING ; +of_get_ethdev_label (np, dev); + err =of_get_ethdev_address (np, dev);if (err) {eth_hw_addr_random (dev);
drivers/net/ethernet/freescale/ucc_geth.c +1 -0
@@ -3731,6 +3731,7 @@ static int ucc_geth_probe(struct platform_device* ofdev) goto err_free_netdev; } +of_get_ethdev_label (np, dev);of_get_ethdev_address (np, dev); ugeth->ug_info = ug_info;
drivers/net/ethernet/hisilicon/hisi_femac.c +2 -0
@@ -841,6 +841,8 @@ static int hisi_femac_drv_probe(struct platform_device *pdev) (unsigned long )phy->phy_id, phy_modes(phy->interface)); +of_get_ethdev_label (node, ndev); + ret =of_get_ethdev_address (node, ndev);if (ret) {eth_hw_addr_random (ndev);
drivers/net/ethernet/hisilicon/hix5hd2_gmac.c +2 -0
@@ -1219,6 +1219,8 @@ static int hix5hd2_dev_probe(struct platform_device *pdev) goto out_phy_node; } +of_get_ethdev_label (node, ndev); + ret =of_get_ethdev_address (node, ndev);if (ret) {eth_hw_addr_random (ndev);
drivers/net/ethernet/ibm/emac/core.c +2 -0
@@ -2974,6 +2974,8 @@ static int emac_init_config(struct emac_instance *dev)#endif } +of_get_ethdev_label (np, dev->ndev); +/* Read MAC-address */ err =of_get_ethdev_address (np, dev->ndev);if (err) {
drivers/net/ethernet/korina.c +2 -0
@@ -1296,6 +1296,8 @@ static int korina_probe(struct platform_device *pdev)SET_NETDEV_DEV (dev, &pdev->dev); lp =netdev_priv (dev); +of_get_ethdev_label (pdev->dev.of_node, dev); +if (mac_addr)eth_hw_addr_set (dev, mac_addr);else if (of_get_ethdev_address (pdev->dev.of_node, dev) <0 )
drivers/net/ethernet/lantiq_xrx200.c +2 -0
@@ -526,6 +526,8 @@ static int xrx200_probe(struct platform_device *pdev)return PTR_ERR (priv->clk); } +of_get_ethdev_label (np, net_dev); + err =of_get_ethdev_address (np, net_dev);if (err)eth_hw_addr_random (net_dev);
drivers/net/ethernet/litex/litex_liteeth.c +2 -0
@@ -264,6 +264,8 @@ static int liteeth_probe(struct platform_device *pdev) priv->tx_base = buf_base + priv->num_rx_slots * priv->slot_size; priv->tx_slot =0 ; +of_get_ethdev_label (pdev->dev.of_node, netdev); + err =of_get_ethdev_address (pdev->dev.of_node, netdev);if (err)eth_hw_addr_random (netdev);
drivers/net/ethernet/marvell/mvneta.c +2 -0
@@ -5251,6 +5251,8 @@ static int mvneta_probe(struct platform_device *pdev) goto err_free_ports; } +of_get_ethdev_label (dn, dev); + err =of_get_ethdev_address (dn, dev);if (!err) { mac_from ="device tree" ;
drivers/net/ethernet/marvell/pxa168_eth.c +2 -0
@@ -1433,6 +1433,8 @@ static int pxa168_eth_probe(struct platform_device *pdev)INIT_WORK (&pep->tx_timeout_task, pxa168_eth_tx_timeout_task); +of_get_ethdev_label (pdev->dev.of_node, dev); + err =of_get_ethdev_address (pdev->dev.of_node, dev);if (err) {u8 addr[ETH_ALEN ];
drivers/net/ethernet/marvell/sky2.c +2 -0
@@ -4716,6 +4716,8 @@ static struct net_device *sky2_init_netdev(struct sky2_hw *hw, unsigned port,else dev->max_mtu =ETH_JUMBO_MTU ; +of_get_ethdev_label (hw->pdev->dev.of_node, dev); +/* try to get mac address in the following order: * 1) from device tree data * 2) from internal registers set by bootloader
drivers/net/ethernet/mediatek/mtk_eth_soc.c +2 -0
@@ -2588,6 +2588,8 @@ static int __init mtk_init(struct net_device *dev)struct mtk_eth *eth = mac->hw;int ret; +of_get_ethdev_label (mac->of_node, dev); + ret =of_get_ethdev_address (mac->of_node, dev);if (ret) {/* If the mac address is invalid, use random mac address */
drivers/net/ethernet/micrel/ks8851_common.c +2 -0
@@ -197,6 +197,8 @@ static void ks8851_init_mac(struct ks8851_net *ks, struct device_node *np)struct net_device *dev = ks->netdev;int ret; +of_get_ethdev_label (np, dev); + ret =of_get_ethdev_address (np, dev);if (!ret) {ks8851_write_mac_addr (dev);
drivers/net/ethernet/nxp/lpc_eth.c +2 -0
@@ -1346,6 +1346,8 @@ static int lpc_eth_drv_probe(struct platform_device *pdev) pldat->phy_node =of_parse_phandle (np,"phy-handle" ,0 ); +of_get_ethdev_label (np, ndev); +/* Get MAC address from current HW setting (POR state is all zeros) */ __lpc_get_mac (pldat, addr);eth_hw_addr_set (ndev, addr);
drivers/net/ethernet/qualcomm/qca_spi.c +2 -0
@@ -968,6 +968,8 @@ qca_spi_probe(struct spi_device *spi)spi_set_drvdata (spi, qcaspi_devs); +of_get_ethdev_label (spi->dev.of_node, qca->net_dev); + ret =of_get_ethdev_address (spi->dev.of_node, qca->net_dev);if (ret) {eth_hw_addr_random (qca->net_dev);
drivers/net/ethernet/qualcomm/qca_uart.c +1 -0
@@ -346,6 +346,7 @@ static int qca_uart_probe(struct serdev_device *serdev)INIT_WORK (&qca->tx_work, qcauart_transmit);of_property_read_u32 (serdev->dev.of_node,"current-speed" , &speed); +of_get_ethdev_label (serdev->dev.of_node, qca->net_dev); ret =of_get_ethdev_address (serdev->dev.of_node, qca->net_dev);if (ret) {
drivers/net/ethernet/renesas/ravb_main.c +2 -0
@@ -2741,6 +2741,8 @@ static int ravb_probe(struct platform_device *pdev)/* Debug message level */ priv->msg_enable =RAVB_DEF_MSG_ENABLE ; +of_get_ethdev_label (np, ndev); +/* Read and set MAC address */ ravb_read_mac_address (np, ndev);if (!is_valid_ether_addr (ndev->dev_addr)) {
drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c +2 -0
@@ -117,6 +117,8 @@ static int sxgbe_platform_probe(struct platform_device *pdev) goto err_drv_remove; } +of_get_ethdev_label (node, priv->dev); +/* Get MAC address if available (DT) */ of_get_ethdev_address (node, priv->dev);
drivers/net/ethernet/socionext/sni_ave.c +2 -0
@@ -1599,6 +1599,8 @@ static int ave_probe(struct platform_device *pdev) ndev->max_mtu =AVE_MAX_ETHFRAME - (ETH_HLEN +ETH_FCS_LEN ); +of_get_ethdev_label (np, ndev); + ret =of_get_ethdev_address (np, ndev);if (ret) {/* if the mac address is invalid, use random mac address */
drivers/net/ethernet/ti/netcp_core.c +2 -0
@@ -2002,6 +2002,8 @@ static int netcp_create_interface(struct netcp_device *netcp_device, netcp->tx_resume_threshold = netcp->tx_pause_threshold; netcp->node_interface = node_interface; +of_get_ethdev_label (node_interface, ndev); + ret =of_property_read_u32 (node_interface,"efuse-mac" , &efuse_mac);if (efuse_mac) {if (of_address_to_resource (node,NETCP_EFUSE_REG_INDEX , &res)) {
drivers/net/ethernet/xilinx/xilinx_emaclite.c +2 -0
@@ -1158,6 +1158,8 @@ static int xemaclite_of_probe(struct platform_device *ofdev) lp->tx_ping_pong =get_bool (ofdev,"xlnx,tx-ping-pong" ); lp->rx_ping_pong =get_bool (ofdev,"xlnx,rx-ping-pong" ); +of_get_ethdev_label (ofdev->dev.of_node, ndev); + rc =of_get_ethdev_address (ofdev->dev.of_node, ndev);if (rc) {dev_warn (dev,"No MAC address found, using random\n" );
drivers/staging/octeon/ethernet.c +2 -0
@@ -409,6 +409,8 @@ int cvm_oct_common_init(struct net_device *dev)struct octeon_ethernet *priv =netdev_priv (dev);int ret; +of_get_ethdev_label (priv->of_node, dev); + ret =of_get_ethdev_address (priv->of_node, dev);if (ret)eth_hw_addr_random (dev);
Signature · 1 line
2.20.1
Russell King (Oracle)
reviewerQuoted 8 lines · Pali Rohár
Adds a new helper function
of_get_ethdev_label()which sets initial name of specified netdev interface based on DT "label" property. It is same what is doing DSA functiondsa_port_parse_of()for DSA ports.This helper function can be useful for drivers to make consistency between DSA and netdev interface names.
Signed-off-by Pali Rohár <[email protected]>
Doesn't this also need a patch to update the DT binding document Documentation/devicetree/bindings/net/ethernet-controller.yaml ?
Also it needs a covering message for the series, and a well thought out argument why this is required. Consistency with DSA probably isn't a good enough reason.
From what I remember, there have been a number of network interface naming proposals over the years, and as you can see, none of them have been successful... but who knows what will happen this time.
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Andrew Lunn
maintainerQuoted 13 lines · Russell King (Oracle)
Quoted 8 lines · Pali Rohár
Adds a new helper function
of_get_ethdev_label()which sets initial name of specified netdev interface based on DT "label" property. It is same what is doing DSA functiondsa_port_parse_of()for DSA ports.This helper function can be useful for drivers to make consistency between DSA and netdev interface names.
Signed-off-by Pali Rohár <[email protected]>Doesn't this also need a patch to update the DT binding document
Documentation/devicetree/bindings/net/ethernet-controller.yaml?
Quoted 7 lines
Also it needs a covering message for the series, and a well thought out argument why this is required. Consistency with DSA probably isn't a good enough reason.
Quoted 1 line
From what I remember, there have been a number of network interface
naming proposals over the years, and as you can see, none of them have been successful... but who knows what will happen this time.
I agree with Russell here. I doubt this is going to be accepted.
DSA is special because DSA is very old, much older than DT, and maybe older than udev. The old DSA platform drivers had a mechanism to supply the interface name to the DSA core. When we added a DT binding to DSA we kept that mechanism, since that mechanism had been used for a long time.
Even if you could show there was a generic old mechanism, from before the days of DT, that allowed interface names to be set from platform drivers, i doubt it would be accepted because there is no continuity, which DSA has.
Andrew
Quoted 30 lines · On Friday 07 January 2022 17:55:25 Andrew Lunn wrote:
Quoted 13 lines · Russell King (Oracle)
Quoted 8 lines · Pali Rohár
Adds a new helper function
of_get_ethdev_label()which sets initial name of specified netdev interface based on DT "label" property. It is same what is doing DSA functiondsa_port_parse_of()for DSA ports.This helper function can be useful for drivers to make consistency between DSA and netdev interface names.
Signed-off-by Pali Rohár <[email protected]>Doesn't this also need a patch to update the DT binding document
Documentation/devicetree/bindings/net/ethernet-controller.yaml?Quoted 7 lines
Also it needs a covering message for the series, and a well thought out argument why this is required. Consistency with DSA probably isn't a good enough reason.
Quoted 1 line
From what I remember, there have been a number of network interface
naming proposals over the years, and as you can see, none of them have been successful... but who knows what will happen this time.
I agree with Russell here. I doubt this is going to be accepted.
DSA is special because DSA is very old, much older than DT, and maybe older than udev. The old DSA platform drivers had a mechanism to supply the interface name to the DSA core. When we added a DT binding to DSA we kept that mechanism, since that mechanism had been used for a long time.
Quoted 4 lines
Even if you could show there was a generic old mechanism, from before the days of DT, that allowed interface names to be set from platform drivers, i doubt it would be accepted because there is no continuity, which DSA has.
Well, DT should universally describe HW board wiring. From HW point of view, it is really does not matter if RJ45 port is connected to embedded PHY on SoC itself or to the external PHY chip, or to the switch chip with embedded PHY. And if board has mix of these options, also labels (as printed on product box) should be in DTS described in the same way, independently of which software solution / driver is used for particular chip. It really should not matter for DTS if kernel is using for particular HW part DSA driver or ethernet driver.
So there really should be some common way. And if the one which DSA is using is the old mechanism, what is the new mechanism then?
Quoted 45 lines · On Thursday 13 January 2022 19:27:19 Pali Rohár wrote:
Quoted 30 lines · On Friday 07 January 2022 17:55:25 Andrew Lunn wrote:
Quoted 13 lines · Russell King (Oracle)
Quoted 8 lines · Pali Rohár
Adds a new helper function
of_get_ethdev_label()which sets initial name of specified netdev interface based on DT "label" property. It is same what is doing DSA functiondsa_port_parse_of()for DSA ports.This helper function can be useful for drivers to make consistency between DSA and netdev interface names.
Signed-off-by Pali Rohár <[email protected]>Doesn't this also need a patch to update the DT binding document
Documentation/devicetree/bindings/net/ethernet-controller.yaml?Quoted 7 lines
Also it needs a covering message for the series, and a well thought out argument why this is required. Consistency with DSA probably isn't a good enough reason.
Quoted 1 line
From what I remember, there have been a number of network interface
naming proposals over the years, and as you can see, none of them have been successful... but who knows what will happen this time.
I agree with Russell here. I doubt this is going to be accepted.
DSA is special because DSA is very old, much older than DT, and maybe older than udev. The old DSA platform drivers had a mechanism to supply the interface name to the DSA core. When we added a DT binding to DSA we kept that mechanism, since that mechanism had been used for a long time.
Quoted 4 lines
Even if you could show there was a generic old mechanism, from before the days of DT, that allowed interface names to be set from platform drivers, i doubt it would be accepted because there is no continuity, which DSA has.
Well, DT should universally describe HW board wiring. From HW point of view, it is really does not matter if RJ45 port is connected to embedded PHY on SoC itself or to the external PHY chip, or to the switch chip with embedded PHY. And if board has mix of these options, also labels (as printed on product box) should be in DTS described in the same way, independently of which software solution / driver is used for particular chip. It really should not matter for DTS if kernel is using for particular HW part DSA driver or ethernet driver.
Quoted 2 lines
So there really should be some common way. And if the one which DSA is using is the old mechanism, what is the new mechanism then?
Hello! Any comments on this?