openwrt/target/linux/ramips
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
..
base-files/etc ramips: remove model name from LED labels 2020-10-02 14:51:57 +02:00
dts ramips: rename interfaces for tplink er605v2 2024-10-03 16:36:05 +02:00
files/drivers ramips: mtk_eth_soc: don't allocate 4 queues 2024-09-29 07:46:33 +08:00
image ramips: rename interfaces for tplink er605v2 2024-10-03 16:36:05 +02:00
mt76x8 ramips: mt76x8: add support for Yuncore CPE200 2024-09-02 13:27:47 +02:00
mt7620 ramips: add support for Wavlink WL-WN531G3-A2 2024-07-21 18:47:37 +02:00
mt7621 ramips: rename interfaces for tplink er605v2 2024-10-03 16:36:05 +02:00
patches-6.6 ramips: add back the missing periph clock for Ralink RT3883 2024-09-22 19:12:16 +02:00
rt288x ramips: gpio: convert to the generic GPIO driver 2024-07-04 22:20:47 +02:00
rt305x ramips: gpio: convert to the generic GPIO driver 2024-07-04 22:20:47 +02:00
rt3883 ramips: gpio: convert to the generic GPIO driver 2024-07-04 22:20:47 +02:00
Makefile ramips: switch to Linux 6.6 2024-05-03 21:36:42 +01:00
modules.mk ramips: modules: add Mediatek MMC driver package 2024-07-11 18:57:41 +02:00