[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250424130222.3959457-3-o.rempel@pengutronix.de>
Date: Thu, 24 Apr 2025 15:02:20 +0200
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Woojung Huh <woojung.huh@...rochip.com>,
Andrew Lunn <andrew@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>
Cc: Oleksij Rempel <o.rempel@...gutronix.de>,
kernel@...gutronix.de,
linux-kernel@...r.kernel.org,
netdev@...r.kernel.org,
UNGLinuxDriver@...rochip.com,
Simon Horman <horms@...nel.org>,
Maxime Chevallier <maxime.chevallier@...tlin.com>
Subject: [PATCH net-next v1 2/4] net: dsa: microchip: Remove set_mac_eee() callback from KSZ driver
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 functions
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 <o.rempel@...gutronix.de>
---
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/microchip/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, int port)
return false;
}
-static int ksz_set_mac_eee(struct dsa_switch *ds, int port,
- struct ethtool_keee *e)
-{
- struct ksz_device *dev = 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 = {
.cls_flower_del = ksz_cls_flower_del,
.port_setup_tc = ksz_setup_tc,
.support_eee = ksz_support_eee,
- .set_mac_eee = ksz_set_mac_eee,
.port_get_default_prio = ksz_port_get_default_prio,
.port_set_default_prio = ksz_port_set_default_prio,
.port_get_dscp_prio = ksz_port_get_dscp_prio,
--
2.39.5
Powered by blists - more mailing lists