Skip to contentSkip to conversation

net: restore EEE on MediaTek switches and SoC MACs

PATCH Applied Aleksei Sviridkin 3 participants 6 messages Sep 3 – Sep 10

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

v5 cover net: restore EEE on MediaTek switches and SoC MACs

Both drivers fill in phylink_config.lpi_capabilities and lpi_timer_default but never lpi_interfaces. phylink treats a MAC as supporting managed EEE only when the tx_lpi methods are implemented and BOTH bitmaps are non-empty, which phylink_create() decides once and for all, so EEE has been off on every mt753x port and on every mtk_eth_soc MAC that uses mtk_phylink_ops since the two commits named in the
Fixes: tags. Because the tx_lpi methods ARE implemented, phylink takes the other branch and calls phy_disable_eee(), which fills eee_disabled_modes - so userspace cannot enable EEE either.

On an MT7981B board with an MT7531 switch, before these patches:

== lan1
Cannot get EEE settings: Not supported
== lan2
Cannot get EEE settings: Not supported
== lan3
Cannot get EEE settings: Not supported
== lan4
Cannot get EEE settings: Not supported
== wan
Cannot get EEE settings: Not supported

lan1-3 are the MT7531 internal PHYs, lan4 is an EN8811H on switch port 5 whose MAC side runs 2500BASE-X rate matched to a 1 Gbps media link, and wan is the mtk_eth_soc MAC with its directly attached 1 Gbps PHY - so both drivers are covered.

Each patch fills lpi_interfaces from supported_interfaces and leaves 2.5 Gbps out of both bitmaps for now. LPI above 1 Gbps is unvalidated rather than unsupported: both MACs fold 2.5 Gbps onto their 1 Gbps speed encoding, so the 1 Gbps EEE force bit is what would govern it. MediaTek's SDK driver sets the force bits for 100 Mbps and 1 Gbps only, EEE signalling on 2500BASE-X is outside 802.3, and the 1 us unit of the wakeup timers is undocumented at 2.5 times the port clock.

The SoC MAC patch fills lpi_interfaces only on SoCs carrying a new MTK_GMAC_EEE capability. mtk_mac_enable_tx_lpi() programs wake-up times taken from MT7531's reset values, and the capability marks the SoCs where those have been measured to work: MT7981 for now. The others keep today's behaviour, EEE unreachable from userspace, until someone with the hardware confirms them.

Neither driver sets eee_enabled_default, so LPI stays off until userspace asks for it with ethtool --set-eee. The EEE advertisement is a different matter: phylink stops force-clearing it, so a PHY that advertises EEE out of reset advertises it again and the link may negotiate EEE, without this MAC asserting LPI. MT7531's internal PHYs and EN7528 are the exceptions, for the reasons in patch 1. Devicetree eee-broken-* marks act at the PHY level and keep working, so a board that already distrusts its PHYs stays protected: OpenWrt marks all modes broken on MT7621's internal PHYs.

The two patches are independent and touch different subsystems; they are sent together because they are the same bug.

Targeted at net as a regression fix with an active userspace lockout; can be retargeted at net-next if maintainers prefer.

Based on net-next at 91ec20351349. All three files touched are byte identical in net/main and the series applies there unchanged.

After the series, all five ports report:

EEE status: disabled
Tx LPI: disabled
Supported EEE link modes: 100baseT/Full

                             1000baseT/Full

Advertised EEE link modes: Not reported

No 2.5G mode is offered, which is the narrowed lpi_capabilities, and nothing is advertised until userspace asks. On this board no PHY came out of reset advertising EEE, so the case where the advertisement returns once phylink stops clearing it is not exercised here.

Enabling it on lan1, whose partner advertises EEE at both speeds:

  # ethtool --set-eee lan1 eee on
  EEE status: enabled - active
  Advertised EEE link modes:  100baseT/Full 1000baseT/Full
  Link partner advertised EEE link modes:  100baseT/Full 1000baseT/Full
  # ethtool --set-eee lan1 eee on tx-lpi on
  EEE status: enabled - active
  Tx LPI: 30 (us)

With LPI armed, 30 parallel ICMPv6 streams of 1400-byte payload, 300 packets each one second apart - so every gap crosses the LPI threshold and the link enters and leaves LPI thousands of times over 300 s - lost
nothing: 300/300 on every stream, tx and rx error counters unchanged, carrier_changes unchanged, and no mac_enable_tx_lpi errors in dmesg.

On wan, cabled for this round to a partner that advertises EEE (a BCM5720), the MT7981 GMAC's own LPI was exercised. With tx-lpi armed the wan PHY's MMD 3.1 reads 0x0f44, Tx LPI indication set, so the MAC is asserting LPI; it drops to 0x0044 with tx-lpi off and comes back with it on. The same 30-stream test at 1 Gbps lost nothing over 9000 packets with the link cycling through LPI at every 1 s gap. At 100 Mbps the only losses were the first packet or two of some streams, and those reproduce with EEE disabled on both ends:
neighbour discovery for 30 streams starting at once. The 17 and 36 that mtk_mac_enable_tx_lpi() programs therefore hold on MT7981 against this partner at both speeds. Its Tx LPI reads 1000 (us) against lan1's 30; see the note below the scissors of patch 1.

lan4 keeps EEE disabled and never arms LPI, which is what dropping 2500BASE-X from lpi_interfaces is for. Forwarding through it was lossless with no carrier change.

---
v5: in-code comments cut to one line each; the reasoning stays in
the commit messages (Maxime Chevallier). No code change.
https://lore.kernel.org/netdev/[email protected]/
v4: patch 2: populate lpi_interfaces only on SoCs carrying a new
MTK_GMAC_EEE capability, set for MT7981 after measuring its LPI exits; the other SoCs keep the current behaviour (Paolo Abeni). patch 1: lpi_capabilities is derived from mac_capabilities instead of asserting both speeds. Cover: the MT7981 GMAC LPI measurement.
https://lore.kernel.org/netdev/[email protected]/
v3: both commit messages cut down to the Why, with the mechanism left
to the diff and the detail below the scissors (Andrew Lunn); no code changes.
https://lore.kernel.org/netdev/[email protected]/
v2: commit messages rewritten to carry the Why only, mechanism notes
moved below the scissors (Andrew Lunn); comments and commit messages reworded so the 2.5 Gbps exclusion reads as unvalidated rather than impossible (Daniel Golle); no functional changes.
https://lore.kernel.org/netdev/[email protected]/

Aleksei Sviridkin (2):
net: dsa: mt7530: populate lpi_interfaces to fix EEE support
net: ethernet: mtk_eth_soc: populate lpi_interfaces to fix EEE support

 drivers/net/dsa/mt7530.c                    | 16 ++++++++++++----
 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 18 +++++++++++++++---
 drivers/net/ethernet/mediatek/mtk_eth_soc.h |  4 +++-
 3 files changed, 30 insertions(+), 8 deletions(-)
Signature · 1 line
2.53.0
#1 lore raw

PATCH v5 1/2 net: dsa: mt7530: populate lpi_interfaces to fix EEE support

phylink_create() decides once and for all that a MAC supports managed EEE, and it requires the tx_lpi ops plus non-empty lpi_capabilities and lpi_interfaces. mt753x_phylink_get_caps() leaves lpi_interfaces empty.

So ever since the conversion to phylink managed EEE, ethtool has answered "Not supported" on every mt753x port, and phy_disable_eee() has locked userspace out of turning EEE on. That undoes what commit 06dfcd4098cf ("net: dsa: mt7530: fix enabling EEE on MT7531 switch on all boards") arranged: EEE off by default, but reachable with ethtool.

Leave the speeds above 1 Gbps out of both bitmaps. PMCR folds SPEED_2500 and SPEED_10000 onto PMCR_FORCE_SPEED_1000, so PMCR_FORCE_EEE1G would govern LPI on such a link, and that is unvalidated rather than known unsupported: MediaTek's SDK driver sets the EEE force bits for 100 Mbps and 1 Gbps only, and the unit of the wakeup timers is undocumented with the port clock at 2.5 times the rate.

LPI stays off until userspace enables it, but the EEE advertisement of a PHY that advertises it out of reset comes back, since phylink stops force-clearing it.

Fixes 9cf21773f535 ("net: dsa: mt7530: convert to phylink managed EEE")

---
Ports that support neither 100 Mbps nor 1 Gbps are skipped because on MT7988, EN7581 and AN7583 port 6 is 10 Gbps only and shares PHY_INTERFACE_MODE_INTERNAL with the user ports, so the interface mask alone cannot tell them apart. MT7531's internal PHYs keep the advertisement mt7531_setup() zeroed and EN7528 keeps both bitmaps empty, so EEE stays fully off there.

Two pre-existing things this patch makes live, neither addressed here:

- The unit of LPI_THRESH is still unspecified, as the comment above lpi_timer_default says. Before the phylink conversion mt753x_set_mac_eee() wrote tx_lpi_timer into the field directly, so the raw unit has always been what ethtool showed on these ports.

- mt753x_phylink_mac_enable_tx_lpi() sets the PMCR force-EEE bits without checking the resolved speed or interface, relying entirely on phylink never calling it above 1 Gbps. A check there would make the driver robust independently of lpi_interfaces being right.

v2, with the full argument for leaving the higher speeds out:
https://lore.kernel.org/netdev/[email protected]/

v4: lpi_capabilities is mac_capabilities masked to the two speeds instead of both asserted. Every port that reaches the guard today has both speeds, so nothing changes; it only stops the bitmap from claiming a speed a port cannot link at.

v5: comments cut to one line (Maxime Chevallier); no code change.

 drivers/net/dsa/mt7530.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
drivers/net/dsa/mt7530.c +12 -4
index 2b7be091c056..3e61eb3c2b1e 100644
@@ -3172,23 +3172,31 @@ static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
 
 	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE;
 
+	priv->info->mac_port_get_caps(ds, port, config);
+
 	/* The EN7528 GPHYs report EEE capability, but negotiating EEE with
 	 * common link partners (e.g. Realtek GbE NICs) results in an unstable
 	 * link with dropped frames. Leave the LPI capabilities empty so that
 	 * phylink disables EEE on these PHYs and refuses to enable it from
 	 * userspace.
 	 */
-	if (priv->id != ID_EN7528) {
+	if (priv->id != ID_EN7528 &&
+	    config->mac_capabilities & (MAC_100FD | MAC_1000FD)) {
 		u32 eeecr = mt7530_read(priv, MT753X_PMEEECR_P(port));
 
-		config->lpi_capabilities = MAC_100FD | MAC_1000FD | MAC_2500FD;
+		/* LPI above 1 Gbps is not supported */
+		config->lpi_capabilities = config->mac_capabilities &
+					   (MAC_100FD | MAC_1000FD);
+		phy_interface_copy(config->lpi_interfaces,
+				   config->supported_interfaces);
+		__clear_bit(PHY_INTERFACE_MODE_2500BASEX,
+			    config->lpi_interfaces);
+
 		/* tx_lpi_timer should be in microseconds. The time units for
 		 * LPI threshold are unspecified.
 		 */
 		config->lpi_timer_default = FIELD_GET(LPI_THRESH_MASK, eeecr);
 	}
-
-	priv->info->mac_port_get_caps(ds, port, config);
 }
 
 static int mt753x_pcs_validate(struct phylink_pcs *pcs,
Signature · 1 line
2.53.0
#2 lore raw

Re: [PATCH net v5 1/2] net: dsa: mt7530: populate lpi_interfaces to fix EEE support

Hi Aleksei,
I'm a little confused by this patch. At the same time, there are patches floating around mailing list to disable EEE on the MT7530 PHY[1]. Does the EEE work, or is it broken?

1. https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/

Best regards,
Aleksander

Quoted 98 lines · Aleksei Sviridkin

phylink_create() decides once and for all that a MAC supports managed EEE, and it requires the tx_lpi ops plus non-empty lpi_capabilities and lpi_interfaces. mt753x_phylink_get_caps() leaves lpi_interfaces empty.

So ever since the conversion to phylink managed EEE, ethtool has answered "Not supported" on every mt753x port, and phy_disable_eee() has locked userspace out of turning EEE on. That undoes what commit 06dfcd4098cf ("net: dsa: mt7530: fix enabling EEE on MT7531 switch on all boards") arranged: EEE off by default, but reachable with ethtool.

Leave the speeds above 1 Gbps out of both bitmaps. PMCR folds SPEED_2500 and SPEED_10000 onto PMCR_FORCE_SPEED_1000, so PMCR_FORCE_EEE1G would govern LPI on such a link, and that is unvalidated rather than known unsupported: MediaTek's SDK driver sets the EEE force bits for 100 Mbps and 1 Gbps only, and the unit of the wakeup timers is undocumented with the port clock at 2.5 times the rate.

LPI stays off until userspace enables it, but the EEE advertisement of a PHY that advertises it out of reset comes back, since phylink stops force-clearing it.

Fixes 9cf21773f535 ("net: dsa: mt7530: convert to phylink managed EEE")

---
Ports that support neither 100 Mbps nor 1 Gbps are skipped because on MT7988, EN7581 and AN7583 port 6 is 10 Gbps only and shares PHY_INTERFACE_MODE_INTERNAL with the user ports, so the interface mask alone cannot tell them apart. MT7531's internal PHYs keep the advertisement mt7531_setup() zeroed and EN7528 keeps both bitmaps empty, so EEE stays fully off there.

Two pre-existing things this patch makes live, neither addressed here:

- The unit of LPI_THRESH is still unspecified, as the comment above lpi_timer_default says. Before the phylink conversion mt753x_set_mac_eee() wrote tx_lpi_timer into the field directly, so the raw unit has always been what ethtool showed on these ports.

- mt753x_phylink_mac_enable_tx_lpi() sets the PMCR force-EEE bits without checking the resolved speed or interface, relying entirely on phylink never calling it above 1 Gbps. A check there would make the driver robust independently of lpi_interfaces being right.

v2, with the full argument for leaving the higher speeds out:
https://lore.kernel.org/netdev/[email protected]/

v4: lpi_capabilities is mac_capabilities masked to the two speeds instead of both asserted. Every port that reaches the guard today has both speeds, so nothing changes; it only stops the bitmap from claiming a speed a port cannot link at.

v5: comments cut to one line (Maxime Chevallier); no code change.

  drivers/net/dsa/mt7530.c | 16 ++++++++++++----
  1 file changed, 12 insertions(+), 4 deletions(-)
drivers/net/dsa/mt7530.c +12 -4
index 2b7be091c056..3e61eb3c2b1e 100644
@@ -3172,23 +3172,31 @@ static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
 
  	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE;
 
+	priv->info->mac_port_get_caps(ds, port, config);
+
  	/* The EN7528 GPHYs report EEE capability, but negotiating EEE with
  	 * common link partners (e.g. Realtek GbE NICs) results in an unstable
  	 * link with dropped frames. Leave the LPI capabilities empty so that
  	 * phylink disables EEE on these PHYs and refuses to enable it from
  	 * userspace.
  	 */
-	if (priv->id != ID_EN7528) {
+	if (priv->id != ID_EN7528 &&
+	    config->mac_capabilities & (MAC_100FD | MAC_1000FD)) {
  		u32 eeecr = mt7530_read(priv, MT753X_PMEEECR_P(port));
 
-		config->lpi_capabilities = MAC_100FD | MAC_1000FD | MAC_2500FD;
+		/* LPI above 1 Gbps is not supported */
+		config->lpi_capabilities = config->mac_capabilities &
+					   (MAC_100FD | MAC_1000FD);
+		phy_interface_copy(config->lpi_interfaces,
+				   config->supported_interfaces);
+		__clear_bit(PHY_INTERFACE_MODE_2500BASEX,
+			    config->lpi_interfaces);
+
  		/* tx_lpi_timer should be in microseconds. The time units for
  		 * LPI threshold are unspecified.
  		 */
  		config->lpi_timer_default = FIELD_GET(LPI_THRESH_MASK, eeecr);
  	}
-
-	priv->info->mac_port_get_caps(ds, port, config);
  }
 
  static int mt753x_pcs_validate(struct phylink_pcs *pcs,
#3 lore raw

Re: [PATCH net v5 1/2] net: dsa: mt7530: populate lpi_interfaces to fix EEE support

Quoted 3 lines · Aleksander Jan Bajkowski

I'm a little confused by this patch. At the same time, there are patches floating around mailing list to disable EEE on the MT7530 PHY[1]. Does the EEE work, or is it broken?

Both, at different layers, and the two patches don't collide.

The MT7530 internal GE PHY really does have broken EEE, and Vladislav's patch fixes that in the PHY driver where it belongs. Mine is on the MAC
side: since the phylink managed EEE conversion, lpi_interfaces was left empty for every mt753x port, so phylink never saw the MAC as EEE capable and ethtool answered "Not supported" everywhere, including on boards whose PHY is fine.

They compose, and the PHY wins. phy_disable_eee() clears eee_cfg.tx_lpi_enabled and fills eee_disabled_modes, phy.c:1027 builds phydev->enable_tx_lpi from that flag, phylink copies it into pl->phy_enable_tx_lpi at phylink.c:1997, and phylink_activate_lpi() is gated on (pl->mac_supports_eee && pl->phy_enable_tx_lpi) at phylink.c:1583. A PHY that disabled EEE keeps LPI off no matter what the MAC declares.

So with both applied, boards with the broken MT7530 PHY stay EEE off through the PHY driver, and boards with a working PHY get back the ability to turn it on. Mine doesn't enable anything by itself, LPI stays off until userspace asks.

#4 lore raw

PATCH v5 2/2 net: ethernet: mtk_eth_soc: populate lpi_interfaces to fix EEE support

In reply to Aleksei Sviridkin

phylink_create() decides once and for all that a MAC supports managed EEE, and it requires the tx_lpi ops plus non-empty lpi_capabilities and lpi_interfaces. mtk_add_mac() leaves lpi_interfaces empty.

So ever since EEE support was added, ethtool has answered "Not supported" on every MAC that uses mtk_phylink_ops, and phy_disable_eee() has locked userspace out of turning EEE on. MT7628 is unaffected, as rt5350_phylink_ops has no tx_lpi methods.

Leave 2.5 Gbps out of both bitmaps, and the xGMII modes that mtk_mac_enable_tx_lpi() already refuses. MAC_MCR folds SPEED_2500 onto MAC_MCR_SPEED_1000, so MAC_MCR_EEE1G would govern LPI on such a link, and that is unvalidated rather than known unsupported: MediaTek's SDK driver sets the EEE force bits for 100 Mbps and 1 Gbps only, and the unit of the wakeup timers is undocumented with the port clock at 2.5 times the rate.

mtk_mac_enable_tx_lpi() programs wake-up times taken from MT7531's reset values, and the SoC's own field has no reset value to fall back on. Only MT7981 has been seen to exit LPI cleanly with them, so the LPI interfaces sit behind a new MTK_GMAC_EEE capability that only MT7981 sets; every other SoC keeps the current behaviour until it has been confirmed.

LPI stays off until userspace enables it, but the EEE advertisement of a PHY that advertises it out of reset comes back, since phylink stops force-clearing it.

Fixes 952d7325362f ("net: ethernet: mediatek: add EEE support")

---
On the netsys v3 switch MAC the xGMII filter would empty lpi_interfaces outright, as PHY_INTERFACE_MODE_INTERNAL is the only interface it supports. MT7988 does not carry MTK_GMAC_EEE, so this is moot for now.

mtk_mac_enable_tx_lpi() programs MT7531's reset wakeup times (17 for 1 Gbps, 36 for 100 Mbps) whenever it runs, as its own comment says. The capability gate exists because of that: MT7981 has been measured with them (see the cover), the other SoCs have not, so they keep EEE unreachable from userspace as before.

v2, with the full argument for leaving 2.5 Gbps out:
https://lore.kernel.org/netdev/[email protected]/

v4: the MTK_GMAC_EEE gate (Paolo Abeni).

v5: comments cut to one line (Maxime Chevallier); no code change.

 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 18 +++++++++++++++---
 drivers/net/ethernet/mediatek/mtk_eth_soc.h |  4 +++-
 2 files changed, 18 insertions(+), 4 deletions(-)
drivers/net/ethernet/mediatek/mtk_eth_soc.c +15 -3
index be3bd025c41a..fd7a49ae88d0 100644
@@ -4828,7 +4828,7 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
 	phy_interface_t phy_mode;
 	struct phylink *phylink;
 	struct mtk_mac *mac;
-	int id, err;
+	int id, err, i;
 	int txqs = 1;
 	u32 val;
 
@@ -4907,8 +4907,8 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
 	mac->phylink_config.type = PHYLINK_NETDEV;
 	mac->phylink_config.mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
 		MAC_10 | MAC_100 | MAC_1000 | MAC_2500FD;
-	mac->phylink_config.lpi_capabilities = MAC_100FD | MAC_1000FD |
-		MAC_2500FD;
+	/* LPI above 1 Gbps is not supported */
+	mac->phylink_config.lpi_capabilities = MAC_100FD | MAC_1000FD;
 	mac->phylink_config.lpi_timer_default = 1000;
 
 	/* MT7623 gmac0 is now missing its speed-specific PLL configuration
@@ -4966,6 +4966,18 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
 		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
 			  mac->phylink_config.supported_interfaces);
 
+	/* LPI wake-up timing is only verified on MTK_GMAC_EEE SoCs */
+	if (MTK_HAS_CAPS(eth->soc->caps, MTK_GMAC_EEE)) {
+		phy_interface_copy(mac->phylink_config.lpi_interfaces,
+				   mac->phylink_config.supported_interfaces);
+		__clear_bit(PHY_INTERFACE_MODE_2500BASEX,
+			    mac->phylink_config.lpi_interfaces);
+		for (i = 0; i < PHY_INTERFACE_MODE_MAX; i++)
+			if (mtk_interface_mode_is_xgmii(eth, i))
+				__clear_bit(i,
+					    mac->phylink_config.lpi_interfaces);
+	}
+
 	phylink = phylink_create(&mac->phylink_config,
 				 of_fwnode_handle(mac->of_node),
 				 phy_mode, mac_ops);
drivers/net/ethernet/mediatek/mtk_eth_soc.h +3 -1
index 0168e2fbc619..88a9b3b23bea 100644
@@ -994,6 +994,7 @@ enum mkt_eth_capabilities {
 	MTK_U3_COPHY_V2_BIT,
 	MTK_SRAM_BIT,
 	MTK_36BIT_DMA_BIT,
+	MTK_GMAC_EEE_BIT,
 
 	/* MUX BITS*/
 	MTK_ETH_MUX_GDM1_TO_GMAC1_ESW_BIT,
@@ -1034,6 +1035,7 @@ enum mkt_eth_capabilities {
 #define MTK_U3_COPHY_V2		BIT_ULL(MTK_U3_COPHY_V2_BIT)
 #define MTK_SRAM		BIT_ULL(MTK_SRAM_BIT)
 #define MTK_36BIT_DMA	BIT_ULL(MTK_36BIT_DMA_BIT)
+#define MTK_GMAC_EEE		BIT_ULL(MTK_GMAC_EEE_BIT)
 
 #define MTK_ETH_MUX_GDM1_TO_GMAC1_ESW		\
 	BIT_ULL(MTK_ETH_MUX_GDM1_TO_GMAC1_ESW_BIT)
@@ -1117,7 +1119,7 @@ enum mkt_eth_capabilities {
 #define MT7981_CAPS  (MTK_GMAC1_SGMII | MTK_GMAC2_SGMII | MTK_GMAC2_GEPHY | \
 		      MTK_MUX_GMAC12_TO_GEPHY_SGMII | MTK_QDMA | \
 		      MTK_MUX_U3_GMAC2_TO_QPHY | MTK_U3_COPHY_V2 | \
-		      MTK_RSTCTRL_PPE1 | MTK_SRAM)
+		      MTK_RSTCTRL_PPE1 | MTK_SRAM | MTK_GMAC_EEE)
 
 #define MT7986_CAPS  (MTK_GMAC1_SGMII | MTK_GMAC2_SGMII | \
 		      MTK_MUX_GMAC12_TO_GEPHY_SGMII | MTK_QDMA | \
Signature · 1 line
2.53.0
#5 lore raw
In reply to Aleksei Sviridkin
This series was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:

Hello:

This series was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:

Quoted 11 lines · On Thu, 3 Sep 2026 12:36:42 +0000 you wrote:

Both drivers fill in phylink_config.lpi_capabilities and lpi_timer_default but never lpi_interfaces. phylink treats a MAC as supporting managed EEE only when the tx_lpi methods are implemented and BOTH bitmaps are non-empty, which phylink_create() decides once and for all, so EEE has been off on every mt753x port and on every mtk_eth_soc MAC that uses mtk_phylink_ops since the two commits named in the
Fixes: tags. Because the tx_lpi methods ARE implemented, phylink takes the other branch and calls phy_disable_eee(), which fills eee_disabled_modes - so userspace cannot enable EEE either.

[...]

Here is the summary with links:
- [net,v5,1/2] net: dsa: mt7530: populate lpi_interfaces to fix EEE support

    https://git.kernel.org/netdev/net/c/3c18e3c9a54e
  - [net,v5,2/2] net: ethernet: mtk_eth_soc: populate lpi_interfaces to fix EEE support
    https://git.kernel.org/netdev/net/c/d876c9cb2d16

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html