netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v6 0/8] net: ethernet: Rework EEE
@ 2024-02-23  9:44 Oleksij Rempel
  2024-02-23  9:44 ` [PATCH net-next v6 1/8] net: add helpers for EEE configuration Oleksij Rempel
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Oleksij Rempel @ 2024-02-23  9:44 UTC (permalink / raw)
  To: Wei Fang, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Andrew Lunn, Heiner Kallweit, Russell King
  Cc: Oleksij Rempel, kernel, linux-kernel, netdev, Shenwei Wang,
	Clark Wang, NXP Linux Team

Hello all,

with Andrew's permission I'll continue mainlining this patches:

==============================================================

Most MAC drivers get EEE wrong. The API to the PHY is not very
obvious, which is probably why. Rework the API, pushing most of the
EEE handling into phylib core, leaving the MAC drivers to just
enable/disable support for EEE in there change_link call back.

MAC drivers are now expect to indicate to phylib if they support
EEE. This will allow future patches to configure the PHY to advertise
no EEE link modes when EEE is not supported. The information could
also be used to enable SmartEEE if the PHY supports it.

With these changes, the uAPI configuration eee_enable becomes a global
on/off. tx-lpi must also be enabled before EEE is enabled. This fits
the discussion here:

https://lore.kernel.org/netdev/af880ce8-a7b8-138e-1ab9-8c89e662eecf@gmail.com/T/

This patchset puts in place all the infrastructure, and converts one
MAC driver to the new API. Following patchsets will convert other MAC
drivers, extend support into phylink, and when all MAC drivers are
converted to the new scheme, clean up some unneeded code.

v6:
--
Reword different comments. See per patch change comments.

v5:
--
Rebase against latest netdev-next
Use keee instead of eee struct

v4
--
Only convert one MAC driver
Drop all phylink code
Conform to the uAPI discision.

v3
--
Rework phylink code to add a new callback.
Rework function to indicate clock should be stopped during LPI

Andrew Lunn (7):
  net: phy: Add phydev->enable_tx_lpi to simplify adjust link callbacks
  net: phy: Add helper to set EEE Clock stop enable bit
  net: phy: Keep track of EEE configuration
  net: phy: Immediately call adjust_link if only tx_lpi_enabled changes
  net: phy: Add phy_support_eee() indicating MAC support EEE
  net: fec: Move fec_enet_eee_mode_set() and helper earlier
  net: fec: Fixup EEE

Russell King (1):
  net: add helpers for EEE configuration

 drivers/net/ethernet/freescale/fec_main.c | 84 ++++++++++-------------
 drivers/net/phy/phy-c45.c                 | 11 ++-
 drivers/net/phy/phy.c                     | 55 ++++++++++++++-
 drivers/net/phy/phy_device.c              | 28 ++++++++
 include/linux/phy.h                       |  9 ++-
 include/net/eee.h                         | 38 ++++++++++
 6 files changed, 170 insertions(+), 55 deletions(-)
 create mode 100644 include/net/eee.h

-- 
2.39.2


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

end of thread, other threads:[~2024-02-27 16:12 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-23  9:44 [PATCH net-next v6 0/8] net: ethernet: Rework EEE Oleksij Rempel
2024-02-23  9:44 ` [PATCH net-next v6 1/8] net: add helpers for EEE configuration Oleksij Rempel
2024-02-23  9:44 ` [PATCH net-next v6 2/8] net: phy: Add phydev->enable_tx_lpi to simplify adjust link callbacks Oleksij Rempel
2024-02-23  9:44 ` [PATCH net-next v6 3/8] net: phy: Add helper to set EEE Clock stop enable bit Oleksij Rempel
2024-02-23  9:44 ` [PATCH net-next v6 4/8] net: phy: Keep track of EEE configuration Oleksij Rempel
2024-02-23  9:44 ` [PATCH net-next v6 5/8] net: phy: Immediately call adjust_link if only tx_lpi_enabled changes Oleksij Rempel
2024-02-23 10:38   ` Russell King (Oracle)
2024-02-23 12:49     ` Oleksij Rempel
2024-02-23 13:17     ` Andrew Lunn
2024-02-23 13:26       ` Russell King (Oracle)
2024-02-23 17:53         ` Florian Fainelli
2024-02-24 17:57           ` Oleksij Rempel
2024-02-26 16:44             ` Andrew Lunn
2024-02-26 17:50               ` Florian Fainelli
2024-02-26 17:53                 ` Russell King (Oracle)
2024-02-26 18:59                   ` Andrew Lunn
2024-02-27  5:35                     ` Oleksij Rempel
2024-02-27 16:12                       ` Andrew Lunn
2024-02-23  9:44 ` [PATCH net-next v6 6/8] net: phy: Add phy_support_eee() indicating MAC support EEE Oleksij Rempel
2024-02-23  9:44 ` [PATCH net-next v6 7/8] net: fec: Move fec_enet_eee_mode_set() and helper earlier Oleksij Rempel
2024-02-23  9:44 ` [PATCH net-next v6 8/8] net: fec: Fixup EEE Oleksij Rempel

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).