linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] net: stmmac: socfpga: fix init ordering and cleanups
@ 2025-04-15 16:29 Russell King (Oracle)
  2025-04-15 16:29 ` [PATCH net-next 1/5] net: stmmac: socfpga: init dwmac->stmmac_rst before registration Russell King (Oracle)
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Russell King (Oracle) @ 2025-04-15 16:29 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: Alexandre Torgue, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, linux-arm-kernel, linux-stm32, Maxime Coquelin,
	netdev, Paolo Abeni

Hi,

This series fixes the init ordering of the socfpga probe function.
The standard rule is to do all setup before publishing any device,
and socfpga violates that. I can see no reason for this, but these
patches have not been tested on hardware.

Address this by moving the initialisation of dwmac->stmmac_rst
along with all the other dwmac initialisers - there's no reason
for this to be late as plat_dat->stmmac_rst has already been
populated.

Next, replace the call to ops->set_phy_mode() with an init function
socfpga_dwmac_init() which will then be linked in to plat_dat->init.

Then, add this to plat_dat->init, and switch to stmmac_pltfr_pm_ops
from the private ops. The runtime suspend/resume socfpga implementations
are identical to the platform ones, but misses the noirq versions
which this will add.

Next, swap the order of socfpga_dwmac_init() and stmmac_dvr_probe().

Finally, convert to devm_stmmac_pltfr_probe() by moving the call
to ops->set_phy_mode() into an init function appropriately populating
plat_dat->init.

 .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c    | 79 +++++-----------------
 1 file changed, 16 insertions(+), 63 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] 9+ messages in thread

end of thread, other threads:[~2025-04-16 10:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-15 16:29 [PATCH net-next 0/5] net: stmmac: socfpga: fix init ordering and cleanups Russell King (Oracle)
2025-04-15 16:29 ` [PATCH net-next 1/5] net: stmmac: socfpga: init dwmac->stmmac_rst before registration Russell King (Oracle)
2025-04-15 16:29 ` [PATCH net-next 2/5] net: stmmac: socfpga: provide init function Russell King (Oracle)
2025-04-15 16:29 ` [PATCH net-next 3/5] net: stmmac: socfpga: convert to stmmac_pltfr_pm_ops Russell King (Oracle)
2025-04-15 16:29 ` [PATCH net-next 4/5] net: stmmac: socfpga: call set_phy_mode() before registration Russell King (Oracle)
2025-04-15 16:29 ` [PATCH net-next 5/5] net: stmmac: socfpga: convert to devm_stmmac_pltfr_probe() Russell King (Oracle)
2025-04-16  7:53 ` [PATCH net-next 0/5] net: stmmac: socfpga: fix init ordering and cleanups Maxime Chevallier
2025-04-16  8:20   ` Russell King (Oracle)
2025-04-16  8:32     ` Maxime Chevallier

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