Skip to content

kernel: disable broken EEE on the MT7530 PHY - #25058

Open
work423 wants to merge 1 commit into
openwrt:mainfrom
work423:eee-mt7530-pending
Open

work423 wants to merge 1 commit into
openwrt:mainfrom
work423:eee-mt7530-pending

Conversation

@work423

@work423 work423 commented Sep 6, 2026

Copy link
Copy Markdown

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.

Pending-6.18 patch, code identical to the netdev submission (Reviewed-by: Andrew Lunn, ETHERNET PHY LIBRARY maintainer):
https://lore.kernel.org/netdev/[email protected]/

Supersedes #22647 (per netdev review, the fix belongs in the PHY driver, not DSA). Ref: #24752.

Tested on ASUS RT-AX53U (MT7621): clean 100 Mbps WAN link + DHCP over a 2-pair cable; unpatched loops.

@openwrt openwrt Bot added kernel pull request/issue with Linux kernel related changes not following guidelines Pull request does not follow formatting guidelines labels Sep 6, 2026
@openwrt

openwrt Bot commented Sep 6, 2026

Copy link
Copy Markdown

Formality Check: Suggestions Available

We checked this pull request against the contribution guidelines. Here is what needs your attention:

⚠️ STYLISTIC WARNINGS & SUGGESTIONS

Commit c2ec0b9:

  • ⚠️ Commit author email '[email protected]' is not linked to any registered GitHub account. Please add and verify this email in your GitHub profile settings.

Something broken? Consider reporting an issue.
Running version 059e3de deployed on 2026-09-09 11:53:18 CEST

@work423
work423 force-pushed the eee-mt7530-pending branch 2 times, most recently from 43e13db to d5043f6 Compare September 6, 2026 19:15
@openwrt openwrt Bot removed the not following guidelines Pull request does not follow formatting guidelines label Sep 6, 2026
@raenye

raenye commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Why in target/linux/generic/pending-6.18? IMHO this patch should be in target/linux/ramips/patches-6.18.

@work423

work423 commented Sep 6, 2026

Copy link
Copy Markdown
Author

Why in target/linux/generic/pending-6.18? IMHO this patch should be in target/linux/ramips/patches-6.18.

I put it in generic because the upstream fix is not ramips specific. It patches drivers/net/phy/mediatek/mtk-ge.c, the driver for the MT7530 internal GE PHY which is used both by the MT7621 integrated switch and by boards with the dedicated MT7530 IC ( Banana Pi R2 on the mediatek target) same silicon same defect. The netdev review moved the fix from the DSA side to the PHY driver precisely so it covers every user of this PHY.

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit.


Generated by Claude Code

Comment on lines +45 to +46
diff --git a/drivers/net/phy/mediatek/mtk-ge.c b/drivers/net/phy/mediatek/mtk-ge.c
index 73d9b72..35600c7 100644

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is raw git format-patch output, not a quilt-refreshed patch: none of the 1050 patches under target/linux/generic/ carry a diff --git header, an index line, or the trailing --/2.43.0 git footer (lines 85-86 here). Run make target/linux/refresh (with a MT7530-using target selected) and commit the result — that also regenerates hack-6.18/766-net-phy-mediatek-ge-add-LED-configuration-interface.patch,`` which patches the same file and, after this one, applies with offset 21.


Generated by Claude Code

@Djfe

Djfe commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Could this commit be reverted then and it would still be fixed for affected devices?
b7fa9d9

@work423

work423 commented Sep 7, 2026

Copy link
Copy Markdown
Author

Could this commit be reverted then and it would still be fixed for affected devices? b7fa9d9

Functionally yes on main/6.18 with this patch the EEE advertisement of the MT7530 PHY is cleared in probe() and EEE is locked off in the driver, which is earlier and stronger than the eee-broken-100tx/1000t device tree markers from b7fa9d9, so the symptoms that commit addressed are gone either way.
I'd still not revert it now the DT markers are the only protection on the release branches whose kernels do not have the driver fix (24.10, 25.12) they cost nothing and document the broken silicon.

Once the upstream fix has landed and the OpenWrt kernel bumps inherit it, the markers and this pending patch can be dropped together that looks like a cleanup for later rather than something to fold into this PR.
https://lore.kernel.org/netdev/[email protected]/

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit checks

  • b2a8f2f "kernel: backport MT7530 broken-EEE fix from upstream" — "bound for v7.0" doesn't hold for a commit dated 8 Sep 2026; v7.0-tagged backports in this tree are January 2026 material. Name the release it actually lands in.

Generated by Claude Code

Comment on lines +51 to +52
diff --git a/drivers/net/phy/mediatek/mtk-ge.c b/drivers/net/phy/mediatek/mtk-ge.c
index 73d9b72f9d9e2..96d8ac5154e5e 100644

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Raw git format-patch output: none of the 165 patches in target/linux/generic/backport-6.18/ carry a diff --git or index line, quilt-refreshed patches go straight from the diffstat to --- a/.... Run make target/linux/refresh with an MT7530 target selected and commit the result; that also refreshes hack-6.18/766-net-phy-mediatek-ge-add-LED-configuration-interface.patch,`` which patches the same file and, with this patch applied first, lands its hunks 2 and 3 at offset 28.


Generated by Claude Code

@@ -0,0 +1,101 @@
From ccbe7540e4aad0d1c3acc249697350b93ccb8025 Mon Sep 17 00:00:00 2001
From: Vladislav Karmanov <[email protected]>
Date: Tue, 8 Sep 2026 17:52:13 +0300

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The v7.0- prefix in the filename doesn't fit this date: the v7.0- backports in this directory are January 2026 material, and the newest prefix in tree is v7.4 on 786-01-v7.4-net-phy-add-phy_detach_internal-helper.patch`` dated 31 Aug 2026. Rename the file to the release this commit actually lands in.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, thanks


Generated by Claude Code

@work423

work423 commented Sep 11, 2026

Copy link
Copy Markdown
Author

Update: the fix is in Linus's tree. It was applied to netdev/net.git as ccbe7540e4aa ("net: phy: mediatek-ge: disable EEE on the MT7530 PHY") and has since been pulled into mainline - it will be part of v7.3:

https://git.kernel.org/torvalds/linux/c/ccbe7540e4aa
netdev thread: https://lore.kernel.org/netdev/[email protected]/

This PR now carries that upstream commit verbatim, refiled from pending-6.18 to backport-6.18 as @raenye suggested.

@raenye: I kept it under generic rather than ramips/patches-6.18 because the upstream commit covers every user of this PHY driver, not just ramips/mt7621 - the MT7530 internal GE PHY is also used by boards with the standalone MT7530 IC on the mediatek target (Banana Pi R2), and the netdev review moved the fix to the PHY driver precisely to cover those too.

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit.


Generated by Claude Code

@@ -0,0 +1,101 @@
From ccbe7540e4aad0d1c3acc249697350b93ccb8025 Mon Sep 17 00:00:00 2001

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 800- number puts this in the "Other drivers" range, but PATCHES.md assigns 7xx to Network / PHY and 8xx to other drivers — this patches drivers/net/phy/mediatek/mtk-ge.c. Renumber into the free 7xx slots next to the other PHY backports (781-783, 786-787 are unused in this directory).


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, thanks


Generated by Claude Code

@AuthorReflex

Copy link
Copy Markdown
Contributor

Could this commit be reverted then and it would still be fixed for affected devices? b7fa9d9

Yes
Tested on Wifire s1500 with two-pair cable and 100 mbit linked device

The upstream fix disabling broken EEE on the MT7530 internal GE PHY
was applied to netdev/net.git (ccbe7540e4aa) and is bound for v7.3.
Carry the upstream commit verbatim as a backport patch.

Signed-off-by: Vladislav Karmanov <[email protected]>
@Bruno-HiFi

Copy link
Copy Markdown

Hi,
what about a backport for Linux 6.12.103?

The problem was originally observed on this kernel, and it still affects OpenWrt 25.12 on MT7621/MT7530 devices.

@work423

work423 commented Sep 12, 2026

Copy link
Copy Markdown
Author

Hi, what about a backport for Linux 6.12.103?

The problem was originally observed on this kernel, and it still affects OpenWrt 25.12 on MT7621/MT7530 devices.

Right - 25.12 (kernel 6.12) is affected too. Since the upstream commit (ccbe7540e4aa) carries a Fixes: tag for af3b4b0e59de, which is in 6.12.y, the stable process will backport it into 6.12.x once v7.3 is released, and the 25.12 branch then inherits it with the next kernel bump no extra patch needed, but that chain takes a while.

So users don't have to wait, I can also open a PR against the openwrt-25.12 branch carrying the fix adapted for 6.12 (6.12 predates phy_disable_eee(), so the port clears MDIO_AN_EEE_ADV in probe()/config_init() and sets the equivalent eee_cfg/eee_broken_modes state by hand).

@raenye @dangowrt: would you prefer that as a separate PR now, or the usual route - this one merged first, then a backport PR to the release branch?

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit; no new issues found.


Generated by Claude Code

@raenye

raenye commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Usually I'd say first merge snapshot, then stable, but if the fix is different enough (i.e., more than just refreshing a patch) perhaps it's better to prepare the other PR beforehand.

@Bartel-C8

Copy link
Copy Markdown

@work423 I am interested in the backport PR to test out locally!

@work423

work423 commented Sep 15, 2026

Copy link
Copy Markdown
Author

@work423 I am interested in the backport PR to test out locally!

Here it is: #25206

Reports on other MT7621 or MT7530 boards are very welcome - they help the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel pull request/issue with Linux kernel related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants