From: Julius Bairaktaris Date: Sat, 25 Jul 2026 17:14:16 +0000 (+0200) Subject: qualcommax: build the Aquantia PHY driver into the kernel X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b1e5a1a804559646e34776ccf9a40bddf29836d;p=thirdparty%2Fopenwrt.git qualcommax: build the Aquantia PHY driver into the kernel The PPE driver registers its DSA switch, and with it attaches every user port's PHY, before the root filesystem is mounted. A PHY driver that is only available as a module therefore always loses the race: phy_attach_direct() finds no matching driver, falls back to genphy_c45 and binds it with device_bind_driver(), and nothing rebinds the PHY when the real driver shows up later. On the boards with an Aquantia 10G PHY that leaves the AQR running under the generic Clause 45 driver. It never loads its firmware, from the nvmem cell or otherwise, and its system interface is never configured, so the 10G port does not pass traffic. Boards that provision the firmware from flash have therefore never had that path execute at all. The driver was built in until commit 8c3bcc198936 ("ipq807x: move AQR driver from built-in to kmod"), which made it a module so that IS_REACHABLE(CONFIG_HWMON) would evaluate true and the temperature sensors in the AQR would be usable as thermal zones. That was correct at the time: the ethernet driver then attached PHYs from userspace, so a module was in place early enough, and hwmon was not built in. Neither still holds. HWMON is compiled in on this target, so building the PHY driver in keeps its hwmon support, and the PPE driver attaches PHYs from its own probe. Build it in, as is already done for the AT803X and QCA807X PHYs here. CRC_ITU_T, which the driver selects for the firmware image checksum, follows it from module to built-in. Both symbols go in the ipq807x and ipq60xx config-default rather than the target's per-kernel config. Every board with an AQR is on one of those two subtargets and ipq50xx has none, and a subtarget's config-default is merged for whichever kernel version the target builds, so the 6.18 kernel picks them up as well. kmod-phy-aquantia goes with it. The package builds empty once the symbol is built in, because KernelPackage/install skips a module listed in modules.builtin, but ModuleAutoLoad still runs and would ship /etc/modules.d/18-phy-aquantia naming a module that no longer exists. Drop it from the subtarget defaults and from the one ipq60xx device that listed it, matching AT803X_PHY and QCA807X_PHY which carry no kmod on this target. Reported-by: Rye Sears Tested-by: Rye Sears Assisted-by: Claude:claude-opus-5 Signed-off-by: Julius Bairaktaris Link: https://github.com/openwrt/openwrt/pull/24420 Signed-off-by: Robert Marko --- diff --git a/target/linux/qualcommax/image/ipq60xx.mk b/target/linux/qualcommax/image/ipq60xx.mk index dc4ca1871e4..a55cce95b66 100644 --- a/target/linux/qualcommax/image/ipq60xx.mk +++ b/target/linux/qualcommax/image/ipq60xx.mk @@ -172,7 +172,7 @@ define Device/linksys_mr7500 IMAGE_SIZE := 147456k DEVICE_PACKAGES += ipq-wifi-linksys_mr7500 \ ath11k-firmware-qcn9074 kmod-ath11k-pci \ - kmod-leds-pwm kmod-phy-aquantia + kmod-leds-pwm endef TARGET_DEVICES += linksys_mr7500 diff --git a/target/linux/qualcommax/ipq60xx/config-default b/target/linux/qualcommax/ipq60xx/config-default index 0b3a10efe0c..36a3e5d94ba 100644 --- a/target/linux/qualcommax/ipq60xx/config-default +++ b/target/linux/qualcommax/ipq60xx/config-default @@ -1,3 +1,5 @@ +CONFIG_AQUANTIA_PHY=y +CONFIG_CRC_ITU_T=y CONFIG_IPQ_CMN_PLL=y CONFIG_IPQ_GCC_6018=y CONFIG_MTD_SPLIT_FIT_FW=y diff --git a/target/linux/qualcommax/ipq807x/config-default b/target/linux/qualcommax/ipq807x/config-default index 9837d8744a9..000a39a520f 100644 --- a/target/linux/qualcommax/ipq807x/config-default +++ b/target/linux/qualcommax/ipq807x/config-default @@ -1,4 +1,6 @@ +CONFIG_AQUANTIA_PHY=y CONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y +CONFIG_CRC_ITU_T=y CONFIG_DT_IDLE_GENPD=y CONFIG_IPQ_CMN_PLL=y CONFIG_IPQ_GCC_8074=y diff --git a/target/linux/qualcommax/ipq807x/target.mk b/target/linux/qualcommax/ipq807x/target.mk index 22a9b78d592..d5aff23ef7f 100644 --- a/target/linux/qualcommax/ipq807x/target.mk +++ b/target/linux/qualcommax/ipq807x/target.mk @@ -1,6 +1,6 @@ SUBTARGET:=ipq807x BOARDNAME:=Qualcomm Atheros IPQ807x -DEFAULT_PACKAGES += kmod-phy-aquantia ath11k-firmware-ipq8074 +DEFAULT_PACKAGES += ath11k-firmware-ipq8074 define Target/Description Build firmware images for Qualcomm Atheros IPQ807x based boards.