netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC net-next 00/22] net: stmmac/xpcs: further EEE work
@ 2025-01-28 15:46 Russell King (Oracle)
  2025-01-28 15:46 ` [PATCH RFC net-next 01/22] net: stmmac: delete software timer before disabling LPI Russell King (Oracle)
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: Russell King (Oracle) @ 2025-01-28 15:46 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: Alexandre Torgue, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Jiawen Wu, linux-arm-kernel, linux-stm32,
	Maxime Coquelin, netdev, Paolo Abeni, Vladimir Oltean

Hi,

This series is a preview of the further work I wish to merge during
the next cycle for EEE in stmmac and XPCS drivers.

The first 14 patches target stmmac's EEE implementation, which I believe
to be buggy such that it does not disable LPI signalling immediately
when ethtool settings change, but instead in effect waits until the
next packet is sent. This is a relatively minor bug, so isn't high
priority.

However, what the first set of patches are doing is continuing the
cleanup of the stmmac implementation and making things consistent and
readable.

The following patches are aimed at eliminating the xpcs_config_eee()
direct call between stmmac's EEE code and XPCS, and present a way to
do this. Sadly, it doesn't reduce the number of direct calls between
these two drivers as we need to implement a new call to configure the
"mult_fract" parameter in the XPCS EEE control registers, which is
supposed to be derived from the speed of an EEE-specific clock.

However, I remain unconvinced whether it is necessary to enable and
disable the EEE controls at the XPCS with LPI being enabled/disabled
at the MAC. Could many or all of these settings be configured as part
of the creation of the driver instance instead?

Without knowing that, the only real way to clean this up is the one
I've taken - which is the principle of preserving the existing
behaviour.

Sadly, the entire series doesn't lead to a great reduction in LOC,
however, the initial 14 stmmac patches leads to a reduction of 71
LOC.

My plan is to send the first 14 patches shortly after net-next opens.

 drivers/net/ethernet/stmicro/stmmac/common.h       |  14 +++
 drivers/net/ethernet/stmicro/stmmac/dwmac1000.h    |  13 +--
 .../net/ethernet/stmicro/stmmac/dwmac1000_core.c   |  30 ++---
 drivers/net/ethernet/stmicro/stmmac/dwmac4.h       |  12 +-
 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c  |  96 +++++++---------
 drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h     |   9 +-
 .../net/ethernet/stmicro/stmmac/dwxgmac2_core.c    |  49 ++++----
 drivers/net/ethernet/stmicro/stmmac/hwif.h         |  21 ++--
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  | 126 +++++++--------------
 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c  |   2 +
 drivers/net/pcs/pcs-xpcs.c                         |  89 ++++++++++-----
 drivers/net/pcs/pcs-xpcs.h                         |   1 +
 drivers/net/phy/phylink.c                          |  25 +++-
 include/linux/pcs/pcs-xpcs.h                       |   3 +-
 include/linux/phylink.h                            |  22 ++++
 15 files changed, 253 insertions(+), 259 deletions(-)

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

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

end of thread, other threads:[~2025-01-28 15:49 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-28 15:46 [PATCH RFC net-next 00/22] net: stmmac/xpcs: further EEE work Russell King (Oracle)
2025-01-28 15:46 ` [PATCH RFC net-next 01/22] net: stmmac: delete software timer before disabling LPI Russell King (Oracle)
2025-01-28 15:46 ` [PATCH RFC net-next 02/22] net: stmmac: ensure LPI is disabled when disabling EEE Russell King (Oracle)
2025-01-28 15:47 ` [PATCH RFC net-next 03/22] net: stmmac: dwmac4: ensure LPIATE is cleared Russell King (Oracle)
2025-01-28 15:47 ` [PATCH RFC net-next 04/22] net: stmmac: split stmmac_init_eee() and move to phylink methods Russell King (Oracle)
2025-01-28 15:47 ` [PATCH RFC net-next 05/22] net: stmmac: remove priv->dma_cap.eee test in tx_lpi methods Russell King (Oracle)
2025-01-28 15:47 ` [PATCH RFC net-next 06/22] net: stmmac: remove unnecessary priv->eee_active tests Russell King (Oracle)
2025-01-28 15:47 ` [PATCH RFC net-next 07/22] net: stmmac: remove unnecessary priv->eee_enabled tests Russell King (Oracle)
2025-01-28 15:47 ` [PATCH RFC net-next 08/22] net: stmmac: clear priv->tx_path_in_lpi_mode when disabling LPI Russell King (Oracle)
2025-01-28 15:47 ` [PATCH RFC net-next 09/22] net: stmmac: remove unnecessary LPI disable when enabling LPI Russell King (Oracle)
2025-01-28 15:47 ` [PATCH RFC net-next 10/22] net: stmmac: use common LPI_CTRL_STATUS bit definitions Russell King (Oracle)
2025-01-28 15:47 ` [PATCH RFC net-next 11/22] net: stmmac: add new MAC method set_lpi_mode() Russell King (Oracle)
2025-01-28 15:47 ` [PATCH RFC net-next 12/22] net: stmmac: dwmac4: clear LPI_CTRL_STATUS_LPITCSE too Russell King (Oracle)
2025-01-28 15:47 ` [PATCH RFC net-next 13/22] net: stmmac: use stmmac_set_lpi_mode() Russell King (Oracle)
2025-01-28 15:47 ` [PATCH RFC net-next 14/22] net: stmmac: remove old EEE methods Russell King (Oracle)
2025-01-28 15:48 ` [PATCH RFC net-next 15/22] net: phylink: add support for notifying PCS about EEE Russell King (Oracle)
2025-01-28 15:48 ` [PATCH RFC net-next 16/22] net: xpcs: add function to configure EEE clock multiplying factor Russell King (Oracle)
2025-01-28 15:48 ` [PATCH RFC net-next 17/22] net: stmmac: call xpcs_config_eee_mult_fact() Russell King (Oracle)
2025-01-28 15:48 ` [PATCH RFC net-next 18/22] net: xpcs: convert to phylink managed EEE Russell King (Oracle)
2025-01-28 15:48 ` [PATCH RFC net-next 19/22] net: stmmac: remove calls to xpcs_config_eee() Russell King (Oracle)
2025-01-28 15:48 ` [PATCH RFC net-next 20/22] net: xpcs: remove xpcs_config_eee() from global scope Russell King (Oracle)
2025-01-28 15:48 ` [PATCH RFC net-next 21/22] net: xpcs: clean up xpcs_config_eee() Russell King (Oracle)
2025-01-28 15:48 ` [PATCH RFC net-next 22/22] net: xpcs: group EEE code together Russell King (Oracle)

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