All of lore.kernel.org
 help / color / mirror / Atom feed
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 7/9] net: phy: c45: Don't silently remove disabled EEE modes any longer when writing advertisement register
Date: Sat, 11 Jan 2025 10:09:51 +0100	[thread overview]
Message-ID: <88ddca91-5318-4916-a87f-e8cf8c15eaca@gmail.com> (raw)
In-Reply-To: <a002914f-8dc7-4284-bc37-724909af9160@gmail.com>

advertising_eee is adjusted now whenever an EEE mode gets disabled.
Therefore we can remove the silent removal of disabled EEE modes here.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/phy/phy-c45.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c
index b566faba9..ef58d3b23 100644
--- a/drivers/net/phy/phy-c45.c
+++ b/drivers/net/phy/phy-c45.c
@@ -683,13 +683,10 @@ EXPORT_SYMBOL_GPL(genphy_c45_read_mdix);
 static int genphy_c45_write_eee_adv(struct phy_device *phydev,
 				    unsigned long *adv)
 {
-	__ETHTOOL_DECLARE_LINK_MODE_MASK(tmp);
 	int val, changed = 0;
 
-	linkmode_andnot(tmp, adv, phydev->eee_disabled_modes);
-
 	if (linkmode_intersects(phydev->supported_eee, PHY_EEE_CAP1_FEATURES)) {
-		val = linkmode_to_mii_eee_cap1_t(tmp);
+		val = linkmode_to_mii_eee_cap1_t(adv);
 
 		/* IEEE 802.3-2018 45.2.7.13 EEE advertisement 1
 		 * (Register 7.60)
@@ -707,7 +704,7 @@ static int genphy_c45_write_eee_adv(struct phy_device *phydev,
 	}
 
 	if (linkmode_intersects(phydev->supported_eee, PHY_EEE_CAP2_FEATURES)) {
-		val = linkmode_to_mii_eee_cap2_t(tmp);
+		val = linkmode_to_mii_eee_cap2_t(adv);
 
 		/* IEEE 802.3-2022 45.2.7.16 EEE advertisement 2
 		 * (Register 7.62)
-- 
2.47.1



  parent reply	other threads:[~2025-01-11  9:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-11  9:01 [PATCH net-next 0/9] net: phy: improve phylib EEE handling Heiner Kallweit
2025-01-11  9:02 ` [PATCH net-next 1/9] net: phy: rename eee_broken_modes to eee_disabled_modes Heiner Kallweit
2025-01-11  9:04 ` [PATCH net-next 2/9] net: phy: rename phy_set_eee_broken to phy_disable_eee_mode Heiner Kallweit
2025-01-11  9:06 ` [PATCH net-next 3/9] net: phy: c45: don't accept disabled EEE modes in genphy_c45_ethtool_set_eee Heiner Kallweit
2025-01-11  9:21   ` Russell King (Oracle)
2025-01-11  9:44     ` Heiner Kallweit
2025-01-11 10:01       ` Russell King (Oracle)
2025-01-11 13:19         ` Heiner Kallweit
2025-01-11 15:13           ` Russell King (Oracle)
2025-01-11 15:33             ` Heiner Kallweit
2025-01-11 17:31               ` Andrew Lunn
2025-01-11 17:52                 ` Heiner Kallweit
2025-01-11  9:06 ` [PATCH net-next 4/9] net: phy: move definition of phy_is_started before phy_disable_eee_mode Heiner Kallweit
2025-01-11  9:07 ` [PATCH net-next 5/9] net: phy: improve phy_disable_eee_mode Heiner Kallweit
2025-01-11 17:38   ` Andrew Lunn
2025-01-11 17:45     ` Russell King (Oracle)
2025-01-11  9:08 ` [PATCH net-next 6/9] net: phy: remove disabled EEE modes from advertising in phy_probe Heiner Kallweit
2025-01-11  9:09 ` Heiner Kallweit [this message]
2025-01-11  9:10 ` [PATCH net-next 8/9] net: phy: c45: use cached EEE advertisement in genphy_c45_ethtool_get_eee Heiner Kallweit
2025-01-11  9:12 ` [PATCH net-next 9/9] 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=88ddca91-5318-4916-a87f-e8cf8c15eaca@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.