[OpenWrt-Devel] Regression in interface names & /etc/config/network (ethX order)

Rafał Miłecki zajec5 at gmail.com
Sat Jun 16 16:18:05 EDT 2018


I noticed a regression in openwrt-18.06 and master branches after
switching from kernel 4.9 to 4.14.

I have Tenda AC9 device which has two Ethernet interfaces connected to
the same switch. Only the first interface provides MDIO bus with PHY
access to the switch. That is used by b53 switch driver.

With 4.9 kernel bgmac gets probed twice. The first probe (for the
first Ethernet code) calls mdiobus_register() and it succeeds. That
results in eth0 being created. Then second bgmac happens and eth1 is

With 4.14 kernel bgmac probe for the first Ethernet code fails on the
first try. mdiobus_register returns EPROBE_DEFER. Then second Ethernet
code is being problem and it succeeds getting eth0 interface. Then the
first interface gets probed *again* and is gets eth1.

Long story short: with 4.14 eth0 and eth1 are reversed due to the
EPROBE_DEFER for the first Ethernet interface.

Unfortunately target/linux/bcm53xx/base-files/etc/board.d/02_network
depends on eth0 and eth1 order. Having it different breaks network

Do you have any suggestion on the fix? Should we debug why
EPROBE_DEFER happens? Or should we rather make 02_network more generic
and somehow:
1) Wait for all interfaces to be ready
2) Find interface name by Ethernet code number

Please note that above solution, as it sounds nice, will still break
for sysupgrade.

Any comments, ideas?


openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list