1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-18 13:29:16 +02:00
openwrt/target
Nikolay Martynov 4705398bbf ramips: rename interfaces for tplink er605v2
Currently eth1 (which is the first "lan" interface) doesn't work on this device.
During boot the following can be seen in logs:

```
[    2.252804] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    2.266060] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 19
[    2.277889] mtk_soc_eth 1e100000.ethernet eth1: mediatek frame engine at 0xbe100000, irq 19
...
[    2.355157] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    2.390312] mt7530-mdio mdio-bus:1f: configuring for fixed/rgmii link mode
[    2.398597] mt7530-mdio mdio-bus:1f: Link is Up - 1Gbps/Full - flow control rx/tx
[    2.403872] mt7530-mdio mdio-bus:1f eth1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=21)
[    2.416988] mtk_soc_eth 1e100000.ethernet eth0: error -17 registering interface eth1
[    2.426973] mt7530-mdio mdio-bus:1f eth2 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7530 PHY] (irq=22)
[    2.440996] mt7530-mdio mdio-bus:1f eth3 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7530 PHY] (irq=23)
[    2.454405] mt7530-mdio mdio-bus:1f eth4 (uninitialized): PHY [mt7530-0:04] driver [MediaTek MT7530 PHY] (irq=24)
[    2.467198] mtk_soc_eth 1e100000.ethernet eth0: entered promiscuous mode
[    2.474117] DSA: tree 0 setup
...
[    6.820998] mtk_soc_eth 1e100000.ethernet dsa: renamed from eth0
[    6.919904] mtk_soc_eth 1e100000.ethernet wan: renamed from eth1
```

So the problem seems to be the fact that built-in gmacs get default
names (eth0/eth1) and are renamed after switch ports are initialized. This means
that when switch port with name `eth1` is brought up this name is still used by
gmac1 causing switch port's init to fail.

This patch just renames the ports to avoid name collision.
Note: this will break existing configs for this device because it renames all
the ports. This should not be major problem because this device doesn't have a
proper OEM image and is only flashable with serial access, meaning there should
not be many users.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15865
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-03 16:36:05 +02:00
..
imagebuilder
linux ramips: rename interfaces for tplink er605v2 2024-10-03 16:36:05 +02:00
llvm-bpf
sdk
toolchain
Config.in
Makefile