From: Ahmed Naseef <naseefkm@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Ahmed Naseef" <naseefkm@gmail.com>,
netdev@vger.kernel.org, "Arınç ÜNAL" <arinc.unal@arinc9.com>,
"Chester A. Unal" <chester.a.unal@arinc9.com>,
"David S. Miller" <davem@davemloft.net>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Conor Dooley" <conor+dt@kernel.org>,
"DENG Qingfang" <dqfext@gmail.com>,
"Daniel Golle" <daniel@makrotopia.org>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Landen Chao" <Landen.Chao@mediatek.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Paolo Abeni" <pabeni@redhat.com>,
"Rob Herring" <robh@kernel.org>,
"Russell King" <linux@armlinux.org.uk>,
"Sean Wang" <sean.wang@mediatek.com>,
"Vladimir Oltean" <olteanv@gmail.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org
Subject: Re: [PATCH net-next 2/2] net: dsa: mt7530: add EN7528 support
Date: Fri, 10 Jul 2026 20:58:28 +0400 [thread overview]
Message-ID: <alEktKWsrriHdR40@DESKTOP-TIT0J8O.localdomain> (raw)
In-Reply-To: <f968d3fe-83dc-4b82-972b-0d4d477a1a52@lunn.ch>
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
next prev parent reply other threads:[~2026-07-10 16:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 10:54 [PATCH net-next 0/2] net: dsa: mt7530: add EcoNet EN7528 built-in switch support Ahmed Naseef
2026-07-10 10:54 ` [PATCH net-next 1/2] dt-bindings: net: dsa: mediatek,mt7530: add econet,en7528-switch Ahmed Naseef
2026-07-10 16:18 ` Conor Dooley
2026-07-10 10:54 ` [PATCH net-next 2/2] net: dsa: mt7530: add EN7528 support Ahmed Naseef
2026-07-10 13:32 ` Andrew Lunn
2026-07-10 16:58 ` Ahmed Naseef [this message]
2026-07-10 17:04 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alEktKWsrriHdR40@DESKTOP-TIT0J8O.localdomain \
--to=naseefkm@gmail.com \
--cc=Landen.Chao@mediatek.com \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=arinc.unal@arinc9.com \
--cc=chester.a.unal@arinc9.com \
--cc=conor+dt@kernel.org \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dqfext@gmail.com \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=sean.wang@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox