Re: [PATCH net-next v2 8/8] net: phy: add X-Powers AC200/AC300 EPHY driver
From: James Hilliard
Date: Wed Aug 05 2026 - 21:32:02 EST
On Wed, Aug 5, 2026 at 6:38 AM Andrew Lunn <andrew@xxxxxxx> wrote:
>
> > +static int acx00_ephy_disable_eee(struct phy_device *phydev)
> > +{
> > + int ret;
> > +
> > + ret = phy_modify_paged(phydev, ACX00_PAGE_1,
> > + ACX00_PAGE1_INTELLIGENT_EEE_CONTROL_REG,
> > + ACX00_PAGE1_INTELLIGENT_EEE_ENABLE, 0);
> > + if (ret)
> > + return ret;
> > +
> > + return phy_clear_bits_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV,
> > + MDIO_EEE_100TX);
> > +}
>
>
> > +
> > + /* Set the hardware default before phylib reads its EEE advertisement. */
> > + ret = acx00_ephy_disable_eee(phydev);
> > + if (ret)
> > + return dev_err_probe(dev, ret,
> > + "failed to disable EEE\n");
>
> If the PHY is capable of doing MAC based EEE, that should be the
> default.
AFAIU it's only capable of PHY based EEE
> Why clear MDIO_AN_EEE_ADV? This does not stop the user from
> re-enabling EEE for this link mode. phy_disable_eee_mode().
I think I was doing this since I was trying to align the driver defaults
with the vendor driver defaults which disable EEE entirely.
>
> Andrew