From nobody Mon May 25 05:55:43 2026 Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246]) (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 9DBE03E2768; Mon, 18 May 2026 08:23:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.13.80.246 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779092608; cv=none; b=PlHMgtCFg7zxTVVCW8uUXbTzZwLeq3Z3iTLR80Q/Z2xwOVHeCMnSNBt/qhi8jU8fLTBLKc6g/gw9yo1aFrR/G0PpGQV6FbyAQwA0LPcsotFrxpdqt+ood9FP2pqv1kvPrmx7JBFAnw9/uHVhABcoI7hD2NcEZ15hfQ+a57T/wmo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779092608; c=relaxed/simple; bh=AsqFlT2AxPBAm+rv40Da/5KbtsG8QzIHSFexj3+Zkd0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BbMFeAzKC6IBYX2d2wekOEsd5sV8u+nHrP7o6qYJ0Qu3paT5OPdzngXHc6kHtAqXBnQEOfmG8CojecX6CoCL+uHEEbacv7vzeZbI3SCzB2LEunjcLa2LIJ6iUu0q9WdPZpDTheEPbhty0mjR1Erk1rg5Qg8ckDHvF3Xwn1X2NL4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.b=FNmez8+J; arc=none smtp.client-ip=194.13.80.246 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.b="FNmez8+J" Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 630D8A4F8A; Mon, 18 May 2026 10:23:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1779092596; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=b+0Fj2XVBlztwa4aMETMdgSMnSo9rICEod6EcX1HPFw=; b=FNmez8+JkzoiPWxmaRTL3PFjvKLPFt44zPOlMd9bXQ6VmrB9fBr9sP27SWRUNSDj8s/gmR xTCET9R1nQ3fpyU2h3PZ+JFfkvTSeDKX9l1HRwsFTegIRRgsrEkVA5aKx4vZKQuFmkn42x UHASLzgghRYLRLFfUAwvNSiS2QnS7kBbCx6xkP0b2xsDciWPfq1p3WuIWNCjDvl2jBjbmy kftnR72Zl2QbUkE8fPEHNrKwDvgy30oJb4KBzon37/tppzdGFBbH9hNxAvUS6L5sYkuztJ Ynk3UOapa6WHYrNraqSapzXoLypIfFwpW42tNgm0e3Gl2zJ00BFd/+zrhAGqlg== From: Nicolai Buchwitz Date: Mon, 18 May 2026 10:23:09 +0200 Subject: [PATCH net v2 1/2] net: phy: honor eee_disabled_modes in phy_support_eee() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260518-devel-phy-support-eee-fix-v2-1-05b52626fa68@tipi-net.de> References: <20260518-devel-phy-support-eee-fix-v2-0-05b52626fa68@tipi-net.de> In-Reply-To: <20260518-devel-phy-support-eee-fix-v2-0-05b52626fa68@tipi-net.de> To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Oleksij Rempel Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Nicolai Buchwitz X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 phy_support_eee() copies supported_eee into advertising_eee unconditionally, overwriting any filtering applied during phy_probe() based on DT eee-broken-* properties or driver-populated eee_disabled_modes. MAC drivers that call phy_support_eee() after probe (e.g. bcmgenet, fec, lan743x, lan78xx, r8169) then cause the PHY to advertise EEE for modes the user marked as broken. The symptom is that ethtool --show-eee on the local interface reports "not supported" (supported & ~eee_disabled_modes is empty) while the link partner sees EEE negotiated and active. phy_probe() already filters advertising_eee via eee_disabled_modes after calling of_set_phy_eee_broken(). Apply the same mask in phy_support_eee() so the filtering survives the copy. Fixes: 49168d1980e2 ("net: phy: Add phy_support_eee() indicating MAC suppor= t EEE") Signed-off-by: Nicolai Buchwitz Reviewed-by: Andrew Lunn --- drivers/net/phy/phy_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index c2cdf1ae354249c033445f2d942e07220205b41c..83b074bc4a8f716b3e10c8ff57a= ff7c7abba0236 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -2903,7 +2903,8 @@ EXPORT_SYMBOL_GPL(phy_advertise_eee_all); */ void phy_support_eee(struct phy_device *phydev) { - linkmode_copy(phydev->advertising_eee, phydev->supported_eee); + linkmode_andnot(phydev->advertising_eee, phydev->supported_eee, + phydev->eee_disabled_modes); phydev->eee_cfg.tx_lpi_enabled =3D true; phydev->eee_cfg.eee_enabled =3D true; =20 --=20 2.51.0 From nobody Mon May 25 05:55:43 2026 Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246]) (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 9DB393E1701; Mon, 18 May 2026 08:23:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.13.80.246 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779092608; cv=none; b=Bi8XAVX9breh9Fj8O72xNTnQ11dBngNmsA+PfAcKpXnuhD/1BChmjneP9lhx8/LIqHxXnbW6bQxdhXlsCk/v+EPatznUa9Y0+r/Bf8hYNFUPw31S3373+4twb39vPhe/xR9DV6i0WEOxwzSXAffkxYVCD2BPSaibcuHD3sXfVc8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779092608; c=relaxed/simple; bh=+I23rzg1W1BdTOa/9Lsj69CcgtRcJ5g9YpKlSMdX6A0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WO3Qif66uvrqf+kBdBFm32C8tL0Ntv+66HgmIrV4+dF0z2qJHfw7YSAXKu5loEIT6s328ey3VZ5vJK6/rYUtsL7FoIJsrJR9AtK8QYl16AMiBksybRVOPc8ip6eqyRFedLT8D0WpDwlbIZE5hLLgeMzTd2AmrkE+vkTjzxS4FEk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.b=VD2FMngE; arc=none smtp.client-ip=194.13.80.246 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.b="VD2FMngE" Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id D8A7EA4FBD; Mon, 18 May 2026 10:23:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1779092597; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=YP6KhuJNLz/Nd1TE8cEZQYfvR5G/npigCeJLKAe+Aus=; b=VD2FMngEy2ngsv3+p+D3ZGXPH3hnZwgGOGVi4m1/cScOfJQTEYN6ReHMzBi0Mq4vF1+rEB oU+MsZzJqqKz9Touxme7p5N9Yl+hg2qRIC4MYyflKoiD91i1nzHLs5eEFPJmaRx/dvZwMW 4u/6SYhy7s1F6K+gko2IwtdH/KjGqfTNP1lOqup644v8z4i+q3mDfh0TYmrv9biGrwh0m6 3ceizbvquM7sg5qeO7IqxccWvFMOQd96xqaTpX2AbvECTkLvRHXzajG1NYdUsgJVAfIxnA lUSccBd/d4Jn/I8FyGFpME59+ngwIZ0KDTgF0ZaOJhM9gLBsw5PN9AaQMLNLLA== From: Nicolai Buchwitz Date: Mon, 18 May 2026 10:23:10 +0200 Subject: [PATCH net v2 2/2] net: phy: honor eee_disabled_modes in phy_advertise_eee_all() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260518-devel-phy-support-eee-fix-v2-2-05b52626fa68@tipi-net.de> References: <20260518-devel-phy-support-eee-fix-v2-0-05b52626fa68@tipi-net.de> In-Reply-To: <20260518-devel-phy-support-eee-fix-v2-0-05b52626fa68@tipi-net.de> To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Oleksij Rempel Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Nicolai Buchwitz X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 phy_advertise_eee_all() copies supported_eee into advertising_eee unconditionally, overwriting any filtering applied during phy_probe() based on DT eee-broken-* properties or driver-populated eee_disabled_modes. genphy_c45_ethtool_set_eee() calls this helper when user space passes an empty advertisement, undoing the filtering. Apply the same eee_disabled_modes mask in phy_advertise_eee_all() so the filtering survives the copy, matching the pattern in phy_probe() and phy_support_eee(). Fixes: b64691274f5d ("net: phy: add helper phy_advertise_eee_all") Signed-off-by: Nicolai Buchwitz Reviewed-by: Andrew Lunn --- drivers/net/phy/phy_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 83b074bc4a8f716b3e10c8ff57aff7c7abba0236..3370eb822017b264cfc26881b0e= ade8a49e1530f 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -2877,7 +2877,8 @@ EXPORT_SYMBOL(phy_advertise_supported); */ void phy_advertise_eee_all(struct phy_device *phydev) { - linkmode_copy(phydev->advertising_eee, phydev->supported_eee); + linkmode_andnot(phydev->advertising_eee, phydev->supported_eee, + phydev->eee_disabled_modes); } EXPORT_SYMBOL_GPL(phy_advertise_eee_all); =20 --=20 2.51.0