netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v1 0/2] Fix 'ethtool --show-eee' during initial stage
@ 2024-11-14  8:16 Choong Yong Liang
  2024-11-14  8:16 ` [PATCH net v1 1/2] net: phy: set eee_cfg based on PHY configuration Choong Yong Liang
  2024-11-14  8:16 ` [PATCH net v1 2/2] net: stmmac: set initial EEE policy configuration Choong Yong Liang
  0 siblings, 2 replies; 9+ messages in thread
From: Choong Yong Liang @ 2024-11-14  8:16 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Alexandre Torgue,
	Jose Abreu, Maxime Coquelin, Oleksij Rempel
  Cc: netdev, linux-kernel, linux-stm32, linux-arm-kernel

The commit 49168d1980e2 
("net: phy: Add phy_support_eee() indicating MAC support EEE") introduced
phy_support_eee() to set eee_cfg.tx_lpi_enabled and eee_cfg.eee_enabled to
true as the default value. However, not all PHYs have EEE enabled by default.
For example, Marvell PHYs are designed to have EEE hardware disabled during
the initial state, and it needs to be configured to turn it on again.

When the MAC boots up with a Marvell PHY and phy_support_eee() is implemented,
the 'ethtool --show-eee' command shows that EEE is enabled, but in actuality,
the driver side is disabled. If we try to enable EEE through
'ethtool --set-eee' for a Marvell PHY, nothing happens because the eee_cfg
matches the setting required to enable EEE in ethnl_set_eee().

This patch series will read the PHY configuration and set it as the initial
value for eee_cfg.tx_lpi_enabled and eee_cfg.eee_enabled, allowing
'ethtool --show-eee' to display the correct value during the initial stage.

Choong Yong Liang (2):
  net: phy: set eee_cfg based on PHY configuration
  net: stmmac: set initial EEE policy configuration

 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
 drivers/net/phy/phy_device.c                      | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-11-15  1:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-14  8:16 [PATCH net v1 0/2] Fix 'ethtool --show-eee' during initial stage Choong Yong Liang
2024-11-14  8:16 ` [PATCH net v1 1/2] net: phy: set eee_cfg based on PHY configuration Choong Yong Liang
2024-11-14  9:23   ` Russell King (Oracle)
2024-11-14 10:05     ` Russell King (Oracle)
2024-11-14 10:16       ` Russell King (Oracle)
2024-11-15  1:46         ` Choong Yong Liang
2024-11-14  8:16 ` [PATCH net v1 2/2] net: stmmac: set initial EEE policy configuration Choong Yong Liang
2024-11-14 14:19   ` Andrew Lunn
2024-11-15  1:45     ` Choong Yong Liang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).