@@ -1524,6 +1524,12 @@ static int ksz9477_get_features(struct phy_device *phydev)
if (ret)
return ret;
+ /* See KSZ9477 Errata DS80000754C Module 4 */
+ if (phydev->phy_id == PHY_ID_KSZ9477) {
+ phy_disable_eee(phydev);
+ return 0;
+ }
+
/* The "EEE control and capability 1" (Register 3.20) seems to be
* influenced by the "EEE advertisement 1" (Register 7.60). Changes
* on the 7.60 will affect 3.20. So, we need to construct our own list
@@ -2002,12 +2008,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)
- linkmode_fill(phydev->eee_broken_modes);
-
return kszphy_config_init(phydev);
}
On several supported switches the integrated PHY's have buggy EEE. On the GBit-capable ones it's always the same type of PHY with PHY ID 0x00221631. So we can simplify erratum handling by calling phy_disable_eee() for this PHY type. Note: The KSZ9477 PHY driver also covers e.g. the internal PHY of KSZ9563 (ID: 0x00221637), which is unaffected by the EEE issue. Therefore check for the exact PHY ID. Reported-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> --- v2: - call phy_disable_eee() instead of clearing supported_eee --- drivers/net/phy/micrel.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)