diff options
| author | Michał Kępień | 2026-06-12 07:28:03 +0000 |
|---|---|---|
| committer | Hauke Mehrtens | 2026-06-18 21:25:09 +0000 |
| commit | a8aef63898ad2bbb4a27b6abb31c9b6185ed3817 (patch) | |
| tree | eec8b6a0631fe1d4a64da30ce6bd0ebe2e587e58 | |
| parent | c957f2732edaec7a51db66d0c1619f2e58873f17 (diff) | |
| download | openwrt-a8aef63898ad2bbb4a27b6abb31c9b6185ed3817.tar.gz | |
ath79: mikrotik: also compile AG71XX_LEGACY as a module
Commit 9091c9f8cbd9 ("ath79: mikrotik: compile SWCONFIG and AR8216_PHY
as modules") caused the hybrid PHY/MDIO ar8xxx driver to be built as a
module instead of built-in. On at least MikroTik RouterBOARD 951G-2HnD,
this prevents the kernel from binding the correct PHY driver at boot
because the ar8xxx driver is not yet available when the MDIO bus is
probed:
- before:
ag71xx-legacy 19000000.eth: invalid MAC address, using random address
switch0: Atheros AR8327 rev. 4 switch registered on mdio.0
ag71xx-legacy 19000000.eth: connected to PHY at mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii
- after:
ag71xx-legacy 19000000.eth: invalid MAC address, using random address
ag71xx-legacy 19000000.eth: connected to PHY at mdio.0:00 [uid=004dd034, driver=Generic PHY]
eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii
As the PHY is already bound to the fallback "Generic PHY" driver when
the ar8xxx module is loaded, the switch remains non-functional and the
router has no network connectivity.
Fix by also compiling the MAC driver (ag71xx-legacy) as a module,
deferring switch initialization until control is transferred to
userspace during boot. The configured module autoload priorities
(ar8xxx: 43, ag71xx-legacy: 50) ensure that the ar8xxx driver is loaded
before ag71xx-legacy.
Fixes: https://github.com/openwrt/openwrt/issues/23739
Fixes: 9091c9f8cbd9 ("ath79: mikrotik: compile SWCONFIG and AR8216_PHY as modules")
Suggested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
Link: https://github.com/openwrt/openwrt/pull/23748
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 12abb2413a5f314dbf8dc9f5769bc58378c8c940)
Link: https://github.com/openwrt/openwrt/pull/23833
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
| -rw-r--r-- | target/linux/ath79/mikrotik/config-default | 1 | ||||
| -rw-r--r-- | target/linux/ath79/mikrotik/target.mk | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/target/linux/ath79/mikrotik/config-default b/target/linux/ath79/mikrotik/config-default index d975536bbf..2c56b721a6 100644 --- a/target/linux/ath79/mikrotik/config-default +++ b/target/linux/ath79/mikrotik/config-default @@ -1,3 +1,4 @@ +# CONFIG_AG71XX_LEGACY is not set # CONFIG_AR8216_PHY is not set CONFIG_CRC16=y CONFIG_CRYPTO_DEFLATE=y diff --git a/target/linux/ath79/mikrotik/target.mk b/target/linux/ath79/mikrotik/target.mk index ddc375976c..0d314e8ab7 100644 --- a/target/linux/ath79/mikrotik/target.mk +++ b/target/linux/ath79/mikrotik/target.mk @@ -3,7 +3,7 @@ FEATURES += minor nand KERNELNAME := vmlinux vmlinuz IMAGES_DIR := ../../.. -DEFAULT_PACKAGES += wpad-basic-mbedtls yafut kmod-switch-ar8xxx +DEFAULT_PACKAGES += kmod-ag71xx-legacy kmod-switch-ar8xxx wpad-basic-mbedtls yafut define Target/Description Build firmware images for MikroTik devices based on Qualcomm Atheros |