From nobody Mon Feb 9 03:31:25 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 878BD1CFBC for ; Thu, 24 Apr 2025 13:02:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745499762; cv=none; b=rCwEe6SE58cNtrylCtlj+ZsftZXToVR3b2qmwB1QS/SimlFdN9yI5AGriG66kFV9d50v7APF0rsKHVgc2q28pJw7bWqfUei0/RUmhauusCzSp6NmpKrutkJwthkyXfpJRgckdV015tQIyyvApA9xt/Xh49aMk0dbwbQaGNWb+bc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745499762; c=relaxed/simple; bh=7R7KVsX3qk+rurBDVziqshzEIUxrEy3FSUgnQ+DvgWM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Soa/ZuU0oW/JrVJqPm2/JxiOP/KKoV/bOZ/9YmZDt3HWxaiIHzm4wmJn+Ld7nkA0mXTAG6FZaPIsfH3CU1EKvvIGDFrEJ1vJ6vEtqfXhQ07xVJB1Rn3qVy5IOjX6RMBfdkTelHT1BlEsG6723stq9/AwBM0zt+JtT4jYpgSTjbg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1u7wDh-0002ZW-3v; Thu, 24 Apr 2025 15:02:25 +0200 Received: from dude04.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::ac]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u7wDf-001swG-22; Thu, 24 Apr 2025 15:02:23 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1u7wDf-00Gc4i-1c; Thu, 24 Apr 2025 15:02:23 +0200 From: Oleksij Rempel To: Woojung Huh , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Heiner Kallweit , Russell King Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, Simon Horman , Maxime Chevallier Subject: [PATCH net-next v1 1/4] net: dsa: user: Skip set_mac_eee() if support_eee() is implemented Date: Thu, 24 Apr 2025 15:02:19 +0200 Message-Id: <20250424130222.3959457-2-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250424130222.3959457-1-o.rempel@pengutronix.de> References: <20250424130222.3959457-1-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Some switches with integrated PHYs, like Microchip KSZ, manage EEE internally based on PHY advertisement and link resolution. If ds->ops->support_eee() is implemented, assume EEE is supported and skip requiring set_mac_eee(). Signed-off-by: Oleksij Rempel --- net/dsa/user.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/dsa/user.c b/net/dsa/user.c index 804dc7dac4f2..87b78a4c1d6c 100644 --- a/net/dsa/user.c +++ b/net/dsa/user.c @@ -1246,14 +1246,12 @@ static int dsa_user_set_eee(struct net_device *dev,= struct ethtool_keee *e) /* If the port is using phylink managed EEE, then an unimplemented * set_mac_eee() is permissible. */ - if (!phylink_mac_implements_lpi(ds->phylink_mac_ops)) { + if (ds->ops->set_mac_eee && + !phylink_mac_implements_lpi(ds->phylink_mac_ops)) { /* Port's PHY and MAC both need to be EEE capable */ if (!dev->phydev) return -ENODEV; =20 - if (!ds->ops->set_mac_eee) - return -EOPNOTSUPP; - ret =3D ds->ops->set_mac_eee(ds, dp->index, e); if (ret) return ret; --=20 2.39.5 From nobody Mon Feb 9 03:31:25 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 878901BC3C for ; Thu, 24 Apr 2025 13:02:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745499763; cv=none; b=C3KYFLA5xjswRwRBB3FvDSb9uS7OgBZ1D7NBoRYRcfhrakmhCtFnCeK3YIWq9Sy9lID/YAiOIy4G/2COQp+AR/+I6UYifl2wAtQN2fP3KKD79SeEdfBGrn+rbax7bej+105MfED9yEhOIaok4lN3sPwdTcQpBYyB4OvrqcLASAM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745499763; c=relaxed/simple; bh=Jn3Ztb7pyp9z98OVAPvWb6Sa7v7xVBuTtm9M+cuLT5Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BW7bGRpQX6VNBD9Btlyoi6r7v4+Vjr9nSUqbkLun/rt+LizT5uWFo+OqaGRJ9gsIfnfymjliviLzAQukqBzRwlZGI8ClfhBwlbBYLtGTXJLEpKVWhQOkV+faQ3cvHnT5KJU8HiOIf+xl0CO33F1VOvA7MpmAmnZ58y9J9U0AvLw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1u7wDh-0002ZX-3v; Thu, 24 Apr 2025 15:02:25 +0200 Received: from dude04.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::ac]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u7wDf-001swH-23; Thu, 24 Apr 2025 15:02:23 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1u7wDf-00Gc4u-1f; Thu, 24 Apr 2025 15:02:23 +0200 From: Oleksij Rempel To: Woojung Huh , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Heiner Kallweit , Russell King Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, Simon Horman , Maxime Chevallier Subject: [PATCH net-next v1 2/4] net: dsa: microchip: Remove set_mac_eee() callback from KSZ driver Date: Thu, 24 Apr 2025 15:02:20 +0200 Message-Id: <20250424130222.3959457-3-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250424130222.3959457-1-o.rempel@pengutronix.de> References: <20250424130222.3959457-1-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" KSZ switches manage EEE internally without any documented MAC-specific configuration. The existing set_mac_eee() handler only rejected attempts to disable LPI while keeping EEE on, or to change the Tx LPI timer, offering no real control. This now prevents users from disabling EEE when desired. Even if it worked in the initial implementation, it has since bitrotted and no longer functio= ns as expected. Since support_eee() is implemented and EEE is handled via PHY negotiation, drop the set_mac_eee() callback entirely. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/microchip/ksz_common.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/micro= chip/ksz_common.c index b45052497f8a..e5924ad65658 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -3489,24 +3489,6 @@ static bool ksz_support_eee(struct dsa_switch *ds, i= nt port) return false; } =20 -static int ksz_set_mac_eee(struct dsa_switch *ds, int port, - struct ethtool_keee *e) -{ - struct ksz_device *dev =3D ds->priv; - - if (!e->tx_lpi_enabled) { - dev_err(dev->dev, "Disabling EEE Tx LPI is not supported\n"); - return -EINVAL; - } - - if (e->tx_lpi_timer) { - dev_err(dev->dev, "Setting EEE Tx LPI timer is not supported\n"); - return -EINVAL; - } - - return 0; -} - static void ksz_set_xmii(struct ksz_device *dev, int port, phy_interface_t interface) { @@ -4749,7 +4731,6 @@ static const struct dsa_switch_ops ksz_switch_ops =3D= { .cls_flower_del =3D ksz_cls_flower_del, .port_setup_tc =3D ksz_setup_tc, .support_eee =3D ksz_support_eee, - .set_mac_eee =3D ksz_set_mac_eee, .port_get_default_prio =3D ksz_port_get_default_prio, .port_set_default_prio =3D ksz_port_set_default_prio, .port_get_dscp_prio =3D ksz_port_get_dscp_prio, --=20 2.39.5 From nobody Mon Feb 9 03:31:25 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 8786218AE2 for ; Thu, 24 Apr 2025 13:02:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745499762; cv=none; b=opY4LLJWK2s9A1cP0qa1u6PFUxrZXXMi7vZVLqSqWWOyHSO3g5tPtzbRVDYrhMdMUiT0u8MO8syTm6/xZLPYyiOdfvENnoyrtmDiFf+VjbrVba8RkrgDGQWFBkidx4ufQ096drpRw80qkANPktHPlEE4wfqIeQuix7OUpoXGRD4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745499762; c=relaxed/simple; bh=X0xbmq6mopiAXygxzFtiRf/NAA9I6JQft0huv5sX+5M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=k5o+gxmQX0dseE51xBsB3Lytcz4Zn6r1BQuAju/+QoXfINYsITRYsp/1AsZ3taU5knKi0WWjHMHEXUm4Sq5o2a2ljdjHeW7Ahl6hJWdWV4rKjiS7JfnJR61o5HKIg0c+OGII5ED0WMvBXJ4EMfSz09HzH23ZEyNPdwRDZPSriKk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1u7wDh-0002ZV-3v; Thu, 24 Apr 2025 15:02:25 +0200 Received: from dude04.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::ac]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u7wDf-001swI-24; Thu, 24 Apr 2025 15:02:23 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1u7wDf-00Gc55-1i; Thu, 24 Apr 2025 15:02:23 +0200 From: Oleksij Rempel To: Woojung Huh , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Heiner Kallweit , Russell King Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, Simon Horman , Maxime Chevallier Subject: [PATCH net-next v1 3/4] net: phy: Don't report advertised EEE modes if EEE is disabled Date: Thu, 24 Apr 2025 15:02:21 +0200 Message-Id: <20250424130222.3959457-4-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250424130222.3959457-1-o.rempel@pengutronix.de> References: <20250424130222.3959457-1-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Currently, `ethtool --show-eee` reports "Advertised EEE link modes" even wh= en EEE is disabled, which can be misleading. For example: EEE settings for lan1: EEE status: disabled Tx LPI: disabled Supported EEE link modes: 100baseT/Full 1000baseT/Full Advertised EEE link modes: 100baseT/Full 1000baseT/Full Link partner advertised EEE link modes: Not reported This may lead to confusion for users who aren't familiar with kernel intern= als but understand that EEE functionality depends on proper advertisement during link negotiation. Seeing advertised EEE modes in this case might incorrectly suggest that EEE is still being advertised. After this change, if EEE is disabled, the output becomes: EEE settings for lan1: EEE status: disabled Tx LPI: disabled Supported EEE link modes: 100baseT/Full 1000baseT/Full Advertised EEE link modes: Not reported Link partner advertised EEE link modes: Not reported This better reflects the actual EEE configuration. The fix ensures advertised EEE modes are only reported when eee_cfg.eee_enabled is true. Signed-off-by: Oleksij Rempel --- drivers/net/phy/phy-c45.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index bdd70d424491..8eb12433387d 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -1517,7 +1517,8 @@ int genphy_c45_ethtool_get_eee(struct phy_device *phy= dev, data->eee_active =3D phydev->eee_active; linkmode_andnot(data->supported, phydev->supported_eee, phydev->eee_disabled_modes); - linkmode_copy(data->advertised, phydev->advertising_eee); + if (phydev->eee_cfg.eee_enabled) + linkmode_copy(data->advertised, phydev->advertising_eee); return 0; } EXPORT_SYMBOL(genphy_c45_ethtool_get_eee); --=20 2.39.5 From nobody Mon Feb 9 03:31:25 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 877F4E545 for ; Thu, 24 Apr 2025 13:02:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745499762; cv=none; b=BpabN2IErsuQItXWae+foaI0QV9Bes3stXdn1WqdWGQO/HK1LfH0vsydxIumvDaOxYq94RAD5dYHHqlOnzsgfzatkOa/El3KsH7hzj/kXR4rk8/UcYldOiT5cM9WdGLjCvvcbmpzUn61ZvxW0bMxPTw3K3G+f8uroZJWvcA3H34= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745499762; c=relaxed/simple; bh=eQzx+fu6PtOfEIyP+38fseRdXivb/g+e7FRifGzNnGI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CBCD9gLp6bwR+CggMMMB2OOiy5zrjhe5jXGMA00Ak9vOmV4HrmtC/DKOBZ8IkV//fbKhdLqXfV9yfmpekV6Vsn4LaCgLOy77gxIz/1UaIw0G2L0c6uR+HPgBwc67NGVLTiWl9CL9kJFi0zbAFOAyh5z31NtlBgReyoHEZBXq0E8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1u7wDh-0002ZY-3v; Thu, 24 Apr 2025 15:02:25 +0200 Received: from dude04.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::ac]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u7wDf-001swJ-24; Thu, 24 Apr 2025 15:02:23 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1u7wDf-00Gc5G-1m; Thu, 24 Apr 2025 15:02:23 +0200 From: Oleksij Rempel To: Woojung Huh , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Heiner Kallweit , Russell King Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, Simon Horman , Maxime Chevallier Subject: [PATCH net-next v1 4/4] net: phy: Always read EEE LPA in genphy_c45_ethtool_get_eee() Date: Thu, 24 Apr 2025 15:02:22 +0200 Message-Id: <20250424130222.3959457-5-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250424130222.3959457-1-o.rempel@pengutronix.de> References: <20250424130222.3959457-1-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Previously, genphy_c45_ethtool_get_eee() used genphy_c45_eee_is_active(), which skips reading the EEE LPA register if local EEE is disabled. This prevents ethtool from reporting the link partner's EEE capabilities in that case. Replace it with genphy_c45_read_eee_lpa(), which always reads the LPA register regardless of local EEE state. This allows users to see the link partner's EEE advertisement even when EEE is disabled locally. Example before the patch: EEE settings for lan1: EEE status: disabled Tx LPI: disabled Supported EEE link modes: 100baseT/Full 1000baseT/Full Advertised EEE link modes: Not reported Link partner advertised EEE link modes: Not reported After the patch: EEE settings for lan1: EEE status: disabled Tx LPI: disabled Supported EEE link modes: 100baseT/Full 1000baseT/Full Advertised EEE link modes: Not reported Link partner advertised EEE link modes: 100baseT/Full 1000baseT/Full Signed-off-by: Oleksij Rempel --- drivers/net/phy/phy-c45.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index 8eb12433387d..9c582abc023a 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -1510,8 +1510,8 @@ int genphy_c45_ethtool_get_eee(struct phy_device *phy= dev, { int ret; =20 - ret =3D genphy_c45_eee_is_active(phydev, data->lp_advertised); - if (ret < 0) + ret =3D genphy_c45_read_eee_lpa(phydev, data->lp_advertised); + if (ret) return ret; =20 data->eee_active =3D phydev->eee_active; --=20 2.39.5