[openwrt/openwrt] ramips: use openwrt,netdev-name to fix port name conflict on TP-Link Deco M4R v4

LEDE Commits lede-commits at lists.infradead.org
Sun Mar 16 14:27:22 PDT 2025


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4fed462454469e9af89bc92cd12d30c47d43efe4

commit 4fed462454469e9af89bc92cd12d30c47d43efe4
Author: J. S. Seldenthuis <jseldenthuis at lely.com>
AuthorDate: Sun Feb 23 13:54:58 2025 +0100

    ramips: use openwrt,netdev-name to fix port name conflict on TP-Link Deco M4R v4
    
    Since 24.10.0, eth0, used for the WAN interface, does not work. From dmesg:
    
    ...
    [    1.831126] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
    [    1.846204] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 19
    ...
    [    1.933969] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
    [    1.967668] mt7530-mdio mdio-bus:1f: configuring for fixed/rgmii link mode
    [    1.975999] mt7530-mdio mdio-bus:1f eth0 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7530 PHY] (irq=21)
    [    1.986907] mt7530-mdio mdio-bus:1f: Link is Up - 1Gbps/Full - flow control rx/tx
    [    1.987149] mtk_soc_eth 1e100000.ethernet eth0: error -17 registering interface eth0
    [    2.004157] mt7530-mdio mdio-bus:1f eth1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=22)
    [    2.017698] mtk_soc_eth 1e100000.ethernet eth0: entered promiscuous mode
    [    2.024849] DSA: tree 0 setup
    ...
    [    4.249680] mtk_soc_eth 1e100000.ethernet dsa: renamed from eth0
    ...
    
    Like #15865, it seems that gmac0 does not rename eth0 to dsa until after the
    switch ports are initialized, leading to a name collision (error -17 = EEXIST).
    
    This patch follows #17062 by using openwrt,netdev-name to fix the collision.
    
    Signed-off-by: J. S. Seldenthuis <jseldenthuis at lely.com>
    Link: https://github.com/openwrt/openwrt/pull/18082
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts b/target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts
index 6274f98599..b9e359d2f1 100644
--- a/target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts
@@ -181,19 +181,19 @@
 &gmac0 {
 	nvmem-cells = <&macaddr_config_8>;
 	nvmem-cell-names = "mac-address";
-	label = "dsa";
+	openwrt,netdev-name = "dsa";
 };
 
 &switch0 {
 	ports {
 		port at 0 {
 			status = "okay";
-			label = "eth0";
+			openwrt,netdev-name = "eth0";
 		};
 
 		port at 1 {
 			status = "okay";
-			label = "eth1";
+			openwrt,netdev-name = "eth1";
 		};
 	};
 };




More information about the lede-commits mailing list