From nobody Mon May 25 07:30:21 2026 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 74FF03DCD98 for ; Sat, 16 May 2026 15:03:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778943795; cv=none; b=OpMwc1NP6Yc1CEhsynTRYK4rRAqst7G5NndkHN86/6mlO8MLS2F8rNgEHDL31kWMNvtnIkCqfBttqps82TarCys6mBJN1ttxtOy6V5DrC4D53nmNce6OZ+TOQXHYRh6U609g+zkVZzGhfIYmFTbl5en9g39oHOBwwOKFtsMc03Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778943795; c=relaxed/simple; bh=QmkJpHUldte/egmuA7DGybI2tVG7cghkcZq8VmZIces=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=pK9Zs/3D9qIu93xkgq/ehQoWEfgPc6vVlRlWaJ8oDRuvLSIP4QvQ8qUGq/tmOoS2XnAOw8B+1prMnzCcyc9d1q4cL0pMGSx1xv2q0v4P0czgXI1lUY46jKVbgMUQYZ9ph8zwdJO5xEzLgs7sB39Cc0ee0ZGZdiJ9tLjJd2i9HYQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bOITm0rn; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bOITm0rn" Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-bb91b426e40so189971566b.0 for ; Sat, 16 May 2026 08:03:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778943791; x=1779548591; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=zxxDjL5gnnI2uwzrc+KACxtlyJsnDYW3Yb57xozjSks=; b=bOITm0rn8gqxIeMDd3KMioNG9rgbxyqM9xpgEJDiJ1GF594FuruJ08UKdFtbYnZaZ2 KLeUP3ZhQD9+UdsepnT9gM4GJWSo/IEdWbiS5T2xJnqKce1rJHSCLHovwaa24xkFHwM5 fUil7fCpNBVavaU8CiTWKpnJKsl8rmcegsAs6KqF1UAm0who8+41zdwvx03JMFEIsLKF 2fUw378H+couxZhoFxMJTBVx2+Vo3HVmdAT6eTHcObjX+Gqs3qSrrQ6RuifepZY6Yayn nvTiryJfsJ8Utvbx7K9Orw76xSEC3VR0sAVjhf9o463eH6Hy8eF0wvtCSRzeRYv93sDI CA9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778943791; x=1779548591; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zxxDjL5gnnI2uwzrc+KACxtlyJsnDYW3Yb57xozjSks=; b=ojXYUvZJcjt+If/E1vmvAF6JkJrmFwOUheQ/w7Vs5g/Ri7uiO82gblNIOF861Q2DIg +lr7NP16L++pdRPxjSO+3KhIHGyM0X3LPUC7w/fT5zccjmM10JlscPLzZEKqMuapycLM +OXiybaIROP3Y2e1ByQgev8DDPMkBEseZccvx5xyyGZJTzWN6EZZB+qnRXaDV6fAicE4 o3lTBvuguBWsNkjCzqxizCHR/KZve4Uo4VQGtajDThQzbyxUJo83XVzjrJtuLF3FgCRf 0/5SKdNwobYrFg89LSvgI4NL7jphfhedBFPqeJmRX1Wm78visimmxit/0yL+xg1HqCST NRRA== X-Forwarded-Encrypted: i=1; AFNElJ/U3pE0vxiQ9AUfVtNo3mi+Xriej9Gk4L7Y9LPZc6+gTOWqzzl19LGcxnQ2m8Cc1ibtaYz6qeW0M0dZEiM=@vger.kernel.org X-Gm-Message-State: AOJu0YzHi4TUbqnL2taPx6sa7U13LUHTc4HO+P4RHd8weur9By3BWLpe yuaoN1ycAeFskW1z61Z/+VSWNHXfkJp6zihDREfWepfGg583XP507aE= X-Gm-Gg: Acq92OE3cLRggdkTY7PpIjhHW3UUupiusuiKHSGbsjaVf5bNwf0oxIDG3660Wek9+7A Hf/S8jGUZAELvVx8uA3WxB4kAJgkWNjD1mITc8h77Dk8xSd+WzEjSwQfyib0WxUy5S+W4BxZ/kP VEssD7FFX15c25qCHf5xq8WFbjQs28c3+fSeLxs/MJ944H5hJDCvuwEzN9nnAIRxKDj6VtDv3Q2 dc2jlPCtnB1jvwfC3hswdSDRzTInrL89Lfk3vhwR//P/i6K774VFW1UmPySqIP2ZMcwCPW2CbR1 6D+AbjAEkGcPtXQNIEqJLoYZX1l5c5+qkCVlfu3d5MOuukgI7AxRD4I7BjUXzei2VJ7Czz4gG+4 Eib4oPIXV+GZdArfVCRY5yhOni1RK58+QlJEoWAc9DB3vmuAegRsRIOHpHxpiRFAmYqO4k1FVbf mamxyjYAIcH563QB0z7AoZqnOqsjUUvBvPKhveP+bNl+0HDN560419nBKJnFupfz7hqByZCms/0 kyuZXGEf2I/9i9hF1gnSYR2MPGY43sSE+bfSfawxfE= X-Received: by 2002:a17:906:f59a:b0:bd4:6c96:f87b with SMTP id a640c23a62f3a-bd5178f913bmr453717966b.28.1778943790650; Sat, 16 May 2026 08:03:10 -0700 (PDT) Received: from nn ([2001:1ab8:1003:0:5454:f357:ba89:4e22]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-68310b3e8fbsm3313946a12.2.2026.05.16.08.03.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 May 2026 08:03:09 -0700 (PDT) Sender: N B From: =?UTF-8?q?Nerijus=20Bend=C5=BEi=C5=ABnas?= To: Andrew Lunn , Heiner Kallweit Cc: Russell King , "Russell King (Oracle)" , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, regressions@lists.linux.dev, stable@vger.kernel.org Subject: [PATCH net v2] net: phy: skip EEE advertisement write when autoneg is disabled Date: Sat, 16 May 2026 18:02:51 +0300 Message-ID: <20260516150251.879680-1-nerijus.bendziunas@gmail.com> X-Mailer: git-send-email 2.54.0 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 genphy_c45_an_config_eee_aneg() writes the EEE advertisement to the auto-negotiation device's MMD register space (MDIO_MMD_AN, register MDIO_AN_EEE_ADV). These registers are read by the link partner only during auto-negotiation, so writing them while autoneg is disabled cannot influence the link. On some PHYs (e.g. Broadcom BCM54213PE) the write nevertheless reaches the chip and disturbs the receive datapath. Concretely, running ethtool -s eth0 speed 100 duplex full autoneg off ethtool --set-eee eth0 eee off leaves eth0 with TX working and RX completely silent on a Raspberry Pi 4 / CM4 board (bcmgenet + BCM54213PE in rgmii-rxid). Switching back to autoneg recovers the link. Prior to commit f26a29a038ee ("net: phy: ensure that genphy_c45_an_config_e= ee_aneg() sees new value of phydev->eee_cfg.eee_enabled"), the disable path was effectively a no-op because the helper read the stale eee_cfg.eee_enabled, so the underlying PHY behavior never surfaced. Bisected on rpi-6.12.y between commits 83943264 (good) and effcbc88 (bad) to f26a29a038ee. Fixes: f26a29a038ee ("net: phy: ensure that genphy_c45_an_config_eee_aneg()= sees new value of phydev->eee_cfg.eee_enabled") Cc: stable@vger.kernel.org Signed-off-by: Nerijus Bend=C5=BEi=C5=ABnas Reviewed-by: Nicolai Buchwitz Tested-by: Nicolai Buchwitz --- Changes since v1: - Reworded the inline comment and commit message: the MMD AN write is read by the chip with side-effects, not silently ignored. Suggested by Andrew Lunn. - Tightened the reproducer paragraph (was repeating paragraph 1). v1: https://lore.kernel.org/netdev/20260516114334.812828-1-nerijus.bendziun= as@gmail.com/ drivers/net/phy/phy-c45.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index d48aa7231b37..126951741428 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -940,6 +940,14 @@ EXPORT_SYMBOL_GPL(genphy_c45_read_eee_abilities); */ int genphy_c45_an_config_eee_aneg(struct phy_device *phydev) { + /* Writing MMD AN advertisements while autoneg is disabled has no + * effect on link-partner negotiation, but on some PHYs (e.g. the + * Broadcom BCM54213PE) the write itself disturbs the receive + * datapath. Skip it. + */ + if (phydev->autoneg =3D=3D AUTONEG_DISABLE) + return 0; + if (!phydev->eee_cfg.eee_enabled) { __ETHTOOL_DECLARE_LINK_MODE_MASK(adv) =3D {}; =20 --=20 2.54.0