]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: phy: micrel: remove KSZ9477 EEE quirks now handled by phylink
authorOleksij Rempel <o.rempel@pengutronix.de>
Sun, 4 May 2025 08:14:34 +0000 (10:14 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 13 May 2025 08:23:24 +0000 (10:23 +0200)
The KSZ9477 PHY driver contained workarounds for broken EEE capability
advertisements by manually masking supported EEE modes and forcibly
disabling EEE if MICREL_NO_EEE was set.

With proper MAC-side EEE handling implemented via phylink, these quirks
are no longer necessary. Remove MICREL_NO_EEE handling and the use of
ksz9477_get_features().

This simplifies the PHY driver and avoids duplicated EEE management logic.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: stable@vger.kernel.org # v6.14+
Link: https://patch.msgid.link/20250504081434.424489-3-o.rempel@pengutronix.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/phy/micrel.c
include/linux/micrel_phy.h

index 24882d30f68589b2b821d13decdb9f858cdaa609..e2c6569d8c45caceaa7b3e1d8fb880f533f8b15e 100644 (file)
@@ -2027,12 +2027,6 @@ static int ksz9477_config_init(struct phy_device *phydev)
                        return err;
        }
 
-       /* According to KSZ9477 Errata DS80000754C (Module 4) all EEE modes
-        * in this switch shall be regarded as broken.
-        */
-       if (phydev->dev_flags & MICREL_NO_EEE)
-               phy_disable_eee(phydev);
-
        return kszphy_config_init(phydev);
 }
 
@@ -5705,7 +5699,6 @@ static struct phy_driver ksphy_driver[] = {
        .handle_interrupt = kszphy_handle_interrupt,
        .suspend        = genphy_suspend,
        .resume         = ksz9477_resume,
-       .get_features   = ksz9477_get_features,
 } };
 
 module_phy_driver(ksphy_driver);
index 591bf5b5e8dc228816d8ba5d737846a3c25a0aab..9af01bdd86d26d7009af1a805a9c99c0acc303f0 100644 (file)
@@ -44,7 +44,6 @@
 #define MICREL_PHY_50MHZ_CLK   BIT(0)
 #define MICREL_PHY_FXEN                BIT(1)
 #define MICREL_KSZ8_P1_ERRATA  BIT(2)
-#define MICREL_NO_EEE          BIT(3)
 
 #define MICREL_KSZ9021_EXTREG_CTRL     0xB
 #define MICREL_KSZ9021_EXTREG_DATA_WRITE       0xC