[PATCH net-next 2/2] net: dsa: mt7530: add EN7528 support
Ahmed Naseef
naseefkm at gmail.com
Fri Jul 10 09:58:28 PDT 2026
On Fri, Jul 10, 2026 at 03:32:32PM +0200, Andrew Lunn wrote:
> > + /* The EN7528 LAN GPHYs advertise EEE by default, but negotiating EEE
> > + * with common link partners (e.g. Realtek GbE NICs) results in an
> > + * unstable link with dropped frames. Disable EEE advertisement on
> > + * them.
> > + */
> > + if (priv->id == ID_EN7528)
> > + for (i = EN7528_GPHY_BASE;
> > + i < EN7528_GPHY_BASE + EN7528_NUM_GPHYS; i++)
> > + mt7531_ind_c45_phy_write(priv, i, MDIO_MMD_AN,
> > + MDIO_AN_EEE_ADV, 0);
> > +
>
> The problem with this is, you can still use ethtool to enable EEE.
>
> Please look at phylink_bringup_phy(), where it calls
> phy_disable_eee().
Thanks, you are right , the register write is the wrong approach.
While looking at phylink_bringup_phy(), I noticed that the mt7530
driver sets config->lpi_capabilities but never config->lpi_interfaces.
Since
mac_supports_eee = mac_supports_eee_ops && lpi_capabilities &&
!phy_interface_empty(lpi_interfaces);
that leaves mac_supports_eee false on all mt753x ports, so phylink
already takes the phy_disable_eee() path for every port and
phylink_ethtool_set_eee() returns -EOPNOTSUPP. On the EN7528 I
confirmed "ethtool --set-eee lan1 eee on" reports "Not supported", so
EEE cannot currently be enabled from userspace on this driver at all.
That looks like it unintentionally undid the "EEE can now be enabled
using ethtool" behaviour from commit 06dfcd4098cf ("net: dsa: mt7530:
fix enabling EEE on MT7531 switch on all boards"), starting with commit
9cf21773f535 ("net: dsa: mt7530: convert to phylink managed EEE"). That
is pre-existing and outside the scope of this series, just flagging it.
For the EN7528 the GPHYs report EEE capability, but the link stops
passing traffic once LPI is entered, so EEE must stay off regardless.
The register loop cannot express that to phylib, as you noted.
My plan for v2 is to not advertise lpi_capabilities for the EN7528, so
mac_supports_eee stays false by design and phylink disables EEE on
these PHYs via phy_disable_eee() and refuses to enable it from
userspace. Does that sound like the right approach to you, or would
you prefer it handled differently?
Thanks,
Ahmed
>
> Andrew
>
> ---
> pw-bot: cr
More information about the Linux-mediatek
mailing list