Skip to contentSkip to conversation

net: stmmac: fix EEE supportable interfaces

PATCH Applied Russell King (Oracle) 2 participants 2 messages Feb 23 – Feb 26

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

PATCH 1/1 net: stmmac: fix EEE supportable interfaces

According to the dwmac v3.74a databook, only MII, GMII and RGMII dwmac interface modes are supported for EEE. Restrict EEE to these modes, or the modules supported by a PCS other than the GMAC's integrated PCS.

---
 .../net/ethernet/stmicro/stmmac/stmmac_main.c  | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +15 -3
index 82375d34ad57..89ded359a9fe 100644
@@ -1374,9 +1374,21 @@ static int stmmac_phylink_setup(struct stmmac_priv *priv)
 				 pcs->supported_interfaces);
 
 	if (priv->dma_cap.eee) {
-		/* Assume all supported interfaces also support LPI */
-		memcpy(config->lpi_interfaces, config->supported_interfaces,
-		       sizeof(config->lpi_interfaces));
+		/* The GMAC 3.74a databook states that EEE is only supported
+		 * in MII, GMII, and RGMII interfaces.
+		 */
+		__set_bit(PHY_INTERFACE_MODE_MII, config->lpi_interfaces);
+		__set_bit(PHY_INTERFACE_MODE_GMII, config->lpi_interfaces);
+		phy_interface_set_rgmii(config->lpi_interfaces);
+
+		/* If we have a non-integrated PCS, assume that it is connected
+		 * to the GMAC using GMII or another EEE compatible interface,
+		 * and thus all PCS-supported interfaces support LPI.
+		 */
+		if (pcs)
+			phy_interface_or(config->lpi_interfaces,
+					 config->lpi_interfaces,
+					 pcs->supported_interfaces);
 
 		/* All full duplex speeds above 100Mbps are supported */
 		config->lpi_capabilities = ~(MAC_1000FD - 1) | MAC_100FD;
Signature · 1 line
2.47.3
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Mon, 23 Feb 2026 12:17:13 +0000 you wrote:

According to the dwmac v3.74a databook, only MII, GMII and RGMII dwmac interface modes are supported for EEE. Restrict EEE to these modes, or the modules supported by a PCS other than the GMAC's integrated PCS.

---
 .../net/ethernet/stmicro/stmmac/stmmac_main.c  | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

Here is the summary with links:
- [net-next] net: stmmac: fix EEE supportable interfaces

    https://git.kernel.org/netdev/net-next/c/8215d7cbfbcf

You are awesome, thank you!

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