]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
qualcommax: build the Aquantia PHY driver into the kernel
authorJulius Bairaktaris <julius@bairaktaris.de>
Sat, 25 Jul 2026 17:14:16 +0000 (19:14 +0200)
committerRobert Marko <robimarko@gmail.com>
Thu, 6 Aug 2026 10:45:26 +0000 (12:45 +0200)
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 <xlighting2017@users.noreply.github.com>
Tested-by: Rye Sears <xlighting2017@users.noreply.github.com>
Assisted-by: Claude:claude-opus-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/24420
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/qualcommax/image/ipq60xx.mk
target/linux/qualcommax/ipq60xx/config-default
target/linux/qualcommax/ipq807x/config-default
target/linux/qualcommax/ipq807x/target.mk

index dc4ca1871e40bf7a33cfc7e1fbdd37bad80ceca0..a55cce95b66c9182cbe92ae166ac3ee3f86f01de 100644 (file)
@@ -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
 
index 0b3a10efe0c27f46c13e27feaca865b7689a9215..36a3e5d94ba5bf99e309b38d01a619b7dcf9bca7 100644 (file)
@@ -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
index 9837d8744a95748974c6d5a52ccf30f267913d29..000a39a520f640d9494436be2d93370b300f24e7 100644 (file)
@@ -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
index 22a9b78d592df4e189771765ffe8a8805a747e3c..d5aff23ef7f73820e7a07b32987631051055a8c9 100644 (file)
@@ -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.