Mediatek: EEE problems with the MT7530 PHYs on OpenWRT 24.10

Andrew Lunn andrew at lunn.ch
Wed Apr 23 12:27:55 PDT 2025


> 3. In Linux 6.6, the PHY driver tries to disable EEE in
>    mtk_gephy_config_init() in drivers/net/phy/mediatek-ge.c:
> 
>         /* Disable EEE */
>         phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, 0);
> 
>    but this is later overridden by a subsequent execution of the
>    genphy_c45_write_eee_adv() function, which enables every EEE mode
>    supported.

Arınç ÜNAL <arinc.unal at arinc9.com> noticed the same:

commit af3b4b0e59decfc4db2eafbb4e0d0658529019f6
Author: Arınç ÜNAL <arinc.unal at arinc9.com>
Date:   Sun Apr 14 00:08:13 2024 +0300

    net: phy: mediatek-ge: do not disable EEE advertisement
    
    The mediatek-ge PHY driver already disables EEE advertisement on the switch
    PHYs but my testing [1] shows that it is somehow enabled afterwards.
    Disabling EEE advertisement before the PHY driver initialises keeps it off.
    Therefore, remove disabling EEE advertisement here as it's useless.
    
    Link: https://lore.kernel.org/netdev/d286ea27-e911-4dcb-9037-b75f22b437b8@arinc9.com/ [1]
    Signed-off-by: Arınç ÜNAL <arinc.unal at arinc9.com>
    Signed-off-by: David S. Miller <davem at davemloft.net>

diff --git a/drivers/net/phy/mediatek-ge.c b/drivers/net/phy/mediatek-ge.c
index a493ae01b267..54ea64a37ab3 100644
--- a/drivers/net/phy/mediatek-ge.c
+++ b/drivers/net/phy/mediatek-ge.c
@@ -23,9 +23,6 @@ static int mtk_gephy_write_page(struct phy_device *phydev, int page)
 
 static void mtk_gephy_config_init(struct phy_device *phydev)
 {
-       /* Disable EEE */
-       phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, 0);
-
        /* Enable HW auto downshift */
        phy_modify_paged(phydev, MTK_PHY_PAGE_EXTENDED, 0x14, 0, BIT(4));


> 
> In 2021, Landen Chao wrote [2]:
> 
> > EEE of the 10-year-old MT7530 internal gephy has many IOT problems, so
> > it is recommended to disable its EEE.
> 
> I'd like to ask Mediatek to clarify whether it is possible to fine-tune
> the EEE of this PHY in some way, or rather that it should be hard-disabled
> by setting:
> 
>     phydev->eee_broken_modes = -1;

You are looking at old code, at least for mainline:

        /* 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);

Andrew



More information about the openwrt-devel mailing list