[PATCH net-next v2 1/1] net: dsa: microchip: Remove ineffective checks from ksz_set_mac_eee()

Oleksij Rempel
2025-04-25T11:08:57Z

KSZ switches handle EEE internally via PHY advertisement and do not
support MAC-level configuration. The ksz_set_mac_eee() handler previously
rejected Tx LPI disable and timer changes, but provided no real control.

These checks now interfere with userspace attempts to disable EEE and no
longer reflect the actual hardware behavior. Replace the logic with a
no-op.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
drivers/net/dsa/microchip/ksz_common.c | 12 ------------
1 file changed, 12 deletions(-)

diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index b45052497f8a..b4a8f2c6346f 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -3492,18 +3492,6 @@ static bool ksz_support_eee(struct dsa_switch *ds, int port)
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;
}

--
2.39.5