Conversation
Formality Check: Suggestions AvailableWe checked this pull request against the contribution guidelines. Here is what needs your attention:
|
1163a2c to
84dcbb4
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Commit checks
- 84dcbb4 "kernel: backport MT7530 broken-EEE fix from upstream (6.12-adapted)" — the entire message body is indented two spaces, including
Signed-off-by:and the cherry-pick trailer, so git does not parse them as trailers and the commit has no recognised SoB. Unindent the body to column 0. - 84dcbb4 —
(cherry picked from commit ccbe7540e4aad0d1c3acc249697350b93ccb8025)names a Linux commit, not an OpenWrt one, and the main-branch counterpart (#25058) is still open, so nothing was cherry-picked here. Drop the trailer; the upstream reference belongs in the patch header/backport note only.
Generated by Claude Code
| @@ -0,0 +1,116 @@ | |||
| From 687c573f0e000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | |||
There was a problem hiding this comment.
This is not a commit hash — it is the post-image blob hash from the index 97d845c..687c573 line below, zero-padded to 40 chars (the pre-image 97d845c does check out against the OpenWrt-patched 6.12 tree). Use the upstream commit named in the backport note so the patch stays traceable and can be dropped at the kernel bump.
| From 687c573f0e000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | |
| From ccbe7540e4aad0d1c3acc249697350b93ccb8025 Mon Sep 17 00:00:00 2001 |
Generated by Claude Code
| + linkmode_zero(phydev->advertising_eee); | ||
| + phydev->eee_cfg.eee_enabled = false; | ||
| + phydev->eee_cfg.tx_lpi_enabled = false; | ||
| + phydev->eee_broken_modes = ~0U; |
There was a problem hiding this comment.
On 6.12 the flag phylib actually tests on the advertisement path is the standalone phydev->eee_enabled, not eee_cfg.eee_enabled — see genphy_c45_an_config_eee_aneg() at phy-c45.c:945, while eee_cfg only feeds ethtool reporting and enable_tx_lpi. Adding phydev->eee_enabled = false; here would make the hand-rolled state match what phy_disable_eee() sets upstream; as written only eee_broken_modes is load-bearing, so the "neither phylib nor ethtool can re-advertise EEE" claim rests on that single line. (Adding a line means the hunk header and diffstat need refreshing — make target/linux/refresh.)
Generated by Claude Code
Upstream commit ccbe7540e4aa (bound for v7.3) disables broken EEE on the MT7530 internal GE PHY. Adapted for 6.12, which has no phy_disable_eee(): the durable disable sets the equivalent state by hand (clears advertising_eee, phydev->eee_enabled and the eee_cfg flags, and fills eee_broken_modes). Fixes the WAN gigabit-fallback loop on MT7621 boards with 2-pair cables (openwrt#24752). Signed-off-by: Vladislav Karmanov <[email protected]> (cherry picked from commit ccbe7540e4aad0d1c3acc249697350b93ccb8025)
84dcbb4 to
39f307d
Compare
Backport of the upstream MT7530 broken-EEE fix to the 25.12 branch (kernel 6.12), requested in #25058.
The MT7530 internal GE PHY has broken EEE: on a 2-pair cable where both ends advertise gigabit, the port loops instead of falling back to 100 Mbps, so no link and no DHCP. This is the regression behind #24752 and #15348 - users of official 25.12.x on MT7621/MT7530 hit it on every boot.
Upstream commit ccbe7540e4aa ("net: phy: mediatek-ge: disable EEE on the MT7530 PHY", in netdev/net.git, bound for v7.3) fixes it in the PHY driver; the -stable process is already distributing it (queued for 7.2-stable as 4fe7399eb52b, 6.12.x expected to follow), but the kernel bump plus a 25.12 point release still takes a while. This PR brings the fix to 25.12 users now.
Adaptation for 6.12 (more than a patch refresh, hence a separate PR rather than the usual backport-after-main): 6.12 has neither phy_disable_eee() nor the current EEE advertisement model, so the durable disable sets the equivalent state by hand - clears advertising_eee and eee_cfg.eee_enabled / tx_lpi_enabled and fills eee_broken_modes with all raw MDIO_AN_EEE_ADV bits, so neither phylib nor ethtool can re-advertise EEE. The probe()/config_init() placement is unchanged: probe() kills the advertisement before anything negotiates, config_init() is what phy_init_hw() replays after resets and runs after of_set_phy_eee_broken(), so the state survives. Once 6.12.x carries the upstream backport, this patch can be dropped at the next kernel bump.
Tested on ASUS RT-AX53U (MT7621, same PHY) on the equivalent main/6.18 backport (#25058): single clean 100 Mbps WAN link + DHCP lease over a 2-pair cable, where unpatched kernels loop.