From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B5E98365A10 for ; Mon, 23 Feb 2026 12:17:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771849041; cv=none; b=qoArpyqaGDPYbI5qP2z9dKpsERfD9CyII6hSb3ALP4fp/4UyeRmo5TgyQo2yK50Vn78ADcv2PwERsG80hGXujtE4i0PLijZd2QX56Odi3BrKMDnC+pz+7RCOsvicL660z2miNpCWtUTVfOiXjFEXqD43K2h8YWyc3K8/mzAGdLA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771849041; c=relaxed/simple; bh=ErtAMzne6vE+BQpgEy/OrbeqgfnSI4kMRA8dFkQrLCk=; h=From:To:Cc:Subject:MIME-Version:Content-Disposition:Content-Type: Message-Id:Date; b=OHUU8GoCukb7Fli1H70zDEGt/iMrPmXdX8nx3pYibtbrTyWTobE9Zkhq5wrQIPFKEI6OAlWzUS038nWCYdkrFwe/AE5M874SqGytpLHuwqHPpDuhD3gszyJK1A+pUDUUIg6xKhTjeGj8mVJWhvN4+dKur8VVilGBw03hUjIzwqU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=PS2f02Iz; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="PS2f02Iz" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:Reply-To:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MSVGaTn7XmA6GkXd/fmaGcbAWdaT3/cac6c7RkoSv1I=; b=PS2f02IzwG5dDzXEj90R/sRgwZ JligdCvKe18fAPWGEwMAVCVlYYqNrMR7OKqNT/CsyLDqD4n868fofXSMgvLaneVl8JE/Tt3lTnwIm YABgQmK6SgXbcU/u3tFOGiKjoloi2qsQE8rQ52kNjtz63rP9+HUd5OTQCwalDiVjoE4oVqakgz5Qp iRaxoMUm1vkEcKMxm9w+HkQ/hKh82G9DMbfePDGK5Ipfxu5n06kTuB8mmUBNT+wjbqZF7ix8wuitr dJpkt7FQ8QLDobjgNNd2RWuMAWGQF9hDu04LCTDJQ3pURXZLP2lfLzQ208csrRSxIoGdc+MhlcV49 UUAW/4pw==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:40614 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vuUsD-0000000042a-3Uz5; Mon, 23 Feb 2026 12:17:13 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1vuUsD-0000000Afci-0XxO; Mon, 23 Feb 2026 12:17:13 +0000 From: "Russell King (Oracle)" To: Andrew Lunn Cc: Alexandre Torgue , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org, Paolo Abeni Subject: [PATCH net-next] net: stmmac: fix EEE supportable interfaces Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Sender: Russell King Date: Mon, 23 Feb 2026 12:17:13 +0000 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. Signed-off-by: Russell King (Oracle) --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 82375d34ad57..89ded359a9fe 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -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; -- 2.47.3