linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/9] net: stmmac: further EEE cleanups (and one fix!)
@ 2025-01-13 11:45 Russell King (Oracle)
  2025-01-13 11:45 ` [PATCH net-next 1/9] net: stmmac: rename stmmac_disable_sw_eee_mode() Russell King (Oracle)
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Russell King (Oracle) @ 2025-01-13 11:45 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: lexandre Torgue, Andrew Lunn, David S. Miller, Eric Dumazet,
	Eric Woudstra, Jakub Kicinski, linux-arm-kernel, linux-stm32,
	Maxime Coquelin, netdev, Paolo Abeni

Hi,

This series continues the EEE cleanup of the stmmac driver, and
includes one fix.

As mentioned in the previous series, I wasn't entirely happy with the
"stmmac_disable_sw_eee_mode" name, so the first patch renames this to
"stmmac_stop_sw_lpi" instead, which I think better describes what this
function is doing - stopping the transmit of the LPI state because we
have a packet ot send.

Patch 2 corrects the priv->eee_sw_timer_en flag when EEE has been
disabled. Currently upon disable, priv->eee_enabled is set false,
but through the weird logic that was present prior to the previous
series, priv->eee_sw_timer_en was set true. This behaviour was kept
as the previous series was cleanup, not fixes. This patch fixes this.

Having fixed priv->eee_sw_timer_en to actually indicate whether
software timed EEE mode is being used, it becomes no longer necessary
to test priv->eee_enabled in addition. Patch 3 removes the redundant
test. Patch 4 also uses priv->eee_sw_timer_en before manipulating the
software EEE state in the suspend method rather than using
priv->eee_enabled, which brings consistency.

Patch 5 provides stmmac_try_to_start_sw_lpi() which complements
stmmac_stop_sw_lpi(), and allows us to move duplicated code into one
location.

Patch 6 splits stmmac_enable_eee_mode() - one part of this function
tests whether there are any queues that have unfinished work (in
other words are busy). Separate out this code into a separate function.

Patch 7 also splits out the mod_timer() for the software EEE timer
intoi a seperate function (the reason will be in patch 9.)

Patch 8 merges the remains of stmmac_enable_eee_mode() into
stmmac_try_to_start_sw_lpi().

Patch 9 fixes the delay between transmit and entering LPI. Currently,
when cleaning the transmit queues, if we discover that we have finished
cleaning up all queues, we immediately instruct the hardware to enter
LPI mode without waiting for the LPI timer. However, we should wait for
the LPI timer to expire. Therefore, the transmit cleanup path needs
to call stmmac_restart_sw_lpi_timer() instead of
stmmac_try_to_start_sw_lpi().

 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 58 +++++++++++++----------
 1 file changed, 33 insertions(+), 25 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] 11+ messages in thread

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

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-13 11:45 [PATCH net-next 0/9] net: stmmac: further EEE cleanups (and one fix!) Russell King (Oracle)
2025-01-13 11:45 ` [PATCH net-next 1/9] net: stmmac: rename stmmac_disable_sw_eee_mode() Russell King (Oracle)
2025-01-13 11:45 ` [PATCH net-next 2/9] net: stmmac: correct priv->eee_sw_timer_en setting Russell King (Oracle)
2025-01-13 11:45 ` [PATCH net-next 3/9] net: stmmac: simplify TX cleanup decision for ending sw LPI mode Russell King (Oracle)
2025-01-13 11:45 ` [PATCH net-next 4/9] net: stmmac: check priv->eee_sw_timer_en in suspend path Russell King (Oracle)
2025-01-13 11:46 ` [PATCH net-next 5/9] net: stmmac: add stmmac_try_to_start_sw_lpi() Russell King (Oracle)
2025-01-13 11:46 ` [PATCH net-next 6/9] net: stmmac: provide stmmac_eee_tx_busy() Russell King (Oracle)
2025-01-13 11:46 ` [PATCH net-next 7/9] net: stmmac: provide function for restarting sw LPI timer Russell King (Oracle)
2025-01-13 11:46 ` [PATCH net-next 8/9] net: stmmac: combine stmmac_enable_eee_mode() Russell King (Oracle)
2025-01-13 11:46 ` [PATCH net-next 9/9] net: stmmac: restart LPI timer after cleaning transmit descriptors Russell King (Oracle)
2025-01-15  2:50 ` [PATCH net-next 0/9] net: stmmac: further EEE cleanups (and one fix!) patchwork-bot+netdevbpf

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