[PATCH net v3 2/2] net: ethernet: mtk_eth_soc: populate lpi_interfaces to fix EEE support
Paolo Abeni
pabeni at redhat.com
Tue Sep 1 01:32:45 PDT 2026
On 8/27/26 11:16 PM, Aleksei Sviridkin wrote:
> phylink_create() decides once and for all that a MAC supports managed
> EEE, and it requires the tx_lpi ops plus non-empty lpi_capabilities and
> lpi_interfaces. mtk_add_mac() leaves lpi_interfaces empty.
>
> So ever since EEE support was added, ethtool has answered "Not
> supported" on every MAC that uses mtk_phylink_ops, and
> phy_disable_eee() has locked userspace out of turning EEE on. MT7628
> is unaffected, as rt5350_phylink_ops has no tx_lpi methods.
>
> Leave 2.5 Gbps out of both bitmaps. MAC_MCR folds SPEED_2500 onto
> MAC_MCR_SPEED_1000, so MAC_MCR_EEE1G would govern LPI on such a link,
> and that is unvalidated rather than known unsupported: MediaTek's SDK
> driver sets the EEE force bits for 100 Mbps and 1 Gbps only, and the
> unit of the wakeup timers is undocumented with the port clock at
> 2.5 times the rate.
>
> LPI stays off until userspace enables it, but the EEE advertisement of
> a PHY that advertises it out of reset comes back, since phylink stops
> force-clearing it.
>
> Fixes: 952d7325362f ("net: ethernet: mediatek: add EEE support")
> Signed-off-by: Aleksei Sviridkin <f at lex.la>
> ---
>
> On the netsys v3 switch MAC the xGMII filter empties lpi_interfaces
> outright, as PHY_INTERFACE_MODE_INTERNAL is the only interface it
> supports. It is a fixed link port with no PHY, so phylink had no EEE to
> manage there before this patch either.
>
> Pre-existing and not addressed here: mtk_mac_enable_tx_lpi() programs
> MT7531's reset wakeup times (17 for 1 Gbps, 36 for 100 Mbps) whenever
> it runs, as its own comment says, so they now apply to every SoC driven
> by mtk_phylink_ops once a user enables EEE on an eligible interface.
> Those values do not appear to have been confirmed for MT7981, MT7986 or
> MT7988.
For a 'net' patch, I think it makes more sense to restrict the lpi
interface to the chip revisions with support confirmed.
/P
More information about the linux-arm-kernel
mailing list