mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-13 00:17:02 +04:00
Both drivers implement the phylink tx_lpi methods but never fill phylink_config.lpi_interfaces, so phylink decides at creation time that the MAC does not support EEE and locks userspace out of enabling it. On mt753x that has been the state since the conversion to phylink managed EEE; on mtk_eth_soc since EEE was added there, which was already in managed form. Both fixes are in net: https://git.kernel.org/netdev/net/c/3c18e3c9a54e https://git.kernel.org/netdev/net/c/d876c9cb2d16 The mtk_eth_soc fix is taken as upstream applied it. The mt7530 one is adapted: upstream guards the block with an extra priv->id != ID_EN7528 arm, and that symbol only exists once econet's local EN7528 patch adds it, so the generic backport drops the arm and the patch header records that. The mtk_eth_soc fix lands ahead of three patches that touch the same part of mtk_add_mac and the same capability enum, so 737-10, 795-05 and the mt7987 platform patch are refreshed for it; 795-05 also loses a declaration hunk that this fix makes redundant. Seven more mtk_eth_soc patches (702, hack 730, 732-00, 732-03, 737-09, 738-01 and 795-04) are refreshed for hunk offsets only. The mtk_eth_soc fix fills lpi_interfaces only on SoCs carrying a new MTK_GMAC_EEE capability, and only MT7981 sets it: the LPI wake-up times the driver programs are borrowed from MT7531 and have been measured on MT7981 alone, so the other SoCs keep EEE unreachable until someone confirms them. The econet EN7528 patch is rebased on top of the mt7530 fix: both rewrite the same block in mt753x_phylink_get_caps(), and generic applies first, so the EN7528 guard now sits on the reworked condition. The behavior for EN7528 is unchanged: its LPI capabilities stay empty and phylink keeps EEE disabled there. Tested on an MT7981B board with an MT7531 switch: ethtool sees EEE on every port where it saw nothing before, enabling it negotiates EEE against a partner that advertises it, and a port whose partner does not advertise settles at "enabled - inactive". Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> Link: https://github.com/openwrt/openwrt/pull/24863 Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>