From: Heiner Kallweit <hkallweit1@gmail.com>
To: Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
David Miller <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Simon Horman <horms@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH net-next v2 09/10] net: phy: c45: use cached EEE advertisement in genphy_c45_ethtool_get_eee
Date: Sat, 11 Jan 2025 21:32:16 +0100 [thread overview]
Message-ID: <5aadb2cb-3328-4126-89c5-eabd78181f30@gmail.com> (raw)
In-Reply-To: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com>
Now that disabled EEE modes are considered when populating
advertising_eee, we can use this bitmap here instead of reading
the PHY register.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
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 8cb420c04..2558b535a 100644
--- a/drivers/net/phy/phy-c45.c
+++ b/drivers/net/phy/phy-c45.c
@@ -1516,14 +1516,14 @@ int genphy_c45_ethtool_get_eee(struct phy_device *phydev,
{
int ret;
- ret = genphy_c45_eee_is_active(phydev, data->advertised,
- data->lp_advertised);
+ ret = genphy_c45_eee_is_active(phydev, NULL, data->lp_advertised);
if (ret < 0)
return ret;
data->eee_active = phydev->eee_active;
linkmode_andnot(data->supported, phydev->supported_eee,
phydev->eee_disabled_modes);
+ linkmode_copy(data->advertised, phydev->advertising_eee);
return 0;
}
EXPORT_SYMBOL(genphy_c45_ethtool_get_eee);
--
2.47.1
next prev parent reply other threads:[~2025-01-11 20:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-11 20:24 [PATCH net-next v2 00/10] net: phy: improve phylib EEE handling Heiner Kallweit
2025-01-11 20:25 ` [PATCH net-next v2 01/10] net: phy: rename eee_broken_modes to eee_disabled_modes Heiner Kallweit
2025-01-11 20:26 ` [PATCH net-next v2 02/10] net: phy: rename phy_set_eee_broken to phy_disable_eee_mode Heiner Kallweit
2025-01-11 20:27 ` [PATCH net-next v2 03/10] ethtool: allow ethtool op set_eee to set an NL extack message Heiner Kallweit
2025-01-11 20:28 ` [PATCH net-next v2 04/10] net: phy: c45: improve handling of disabled EEE modes in ethtool functions Heiner Kallweit
2025-01-12 1:37 ` Jakub Kicinski
2025-01-11 20:29 ` [PATCH net-next v2 05/10] net: phy: move definition of phy_is_started before phy_disable_eee_mode Heiner Kallweit
2025-01-11 20:30 ` [PATCH net-next v2 06/10] net: phy: improve phy_disable_eee_mode Heiner Kallweit
2025-01-11 20:30 ` [PATCH net-next v2 07/10] net: phy: remove disabled EEE modes from advertising in phy_probe Heiner Kallweit
2025-01-11 20:31 ` [PATCH net-next v2 08/10] net: phy: c45: Don't silently remove disabled EEE modes any longer when writing advertisement register Heiner Kallweit
2025-01-11 20:32 ` Heiner Kallweit [this message]
2025-01-11 20:33 ` [PATCH net-next v2 10/10] net: phy: c45: remove local advertisement parameter from genphy_c45_eee_is_active Heiner Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5aadb2cb-3328-4126-89c5-eabd78181f30@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).