All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] net: pse-pd: core fixes ahead of the controller notifier
@ 2026-10-18  8:18 Carlo Szelinsky
  2026-10-18  8:18 ` [PATCH net-next 1/4] net: pse-pd: unlink the controller before freeing its PI data Carlo Szelinsky
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Carlo Szelinsky @ 2026-10-18  8:18 UTC (permalink / raw)
  To: Oleksij Rempel, Kory Maincent, Andrew Lunn, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Mark Brown, Liam Girdwood, Corey Leavitt, Kyle Swenson,
	Simon Horman, netdev-bot+sashiko, netdev, linux-kernel,
	Carlo Szelinsky

These four PSE core fixes were part of the "decouple controller lookup
from MDIO probe" series [1]; Oleksij asked to split them out. They do
not need phylib, and each one fixes a problem on its own:

 1. Unregister frees the PI data while the controller can still be
    found. Take it off the list and stop the IRQ and the worker first.
 2. A failed registration leaks memory, and can leave freed power
    domains in the global map. Clean up on the error paths.
 3. si3474: use dev_err_probe(), so the deferral from 4 is not logged
    as an error.
 4. Defer the PSE driver's probe until every PI's vpwr supply is there.

Patch 1 conflicts with the pending net series [2]; keep the order from
patch 1. Patch 2 conflicts with two of the net fixes posted alongside
[3]; the note below its --- explains how to merge them.

Tested in QEMU on arm64 with KASAN, lockdep and kmemleak: controllers
whose supply never appears defer, and an injected pse_register_pw_ds()
failure is cleaned up and retried. The only KASAN reports are the known
stale-handle bug at MDIO bus unbind, the same without this series; the
decouple series fixes it. This series, the decouple series and the net
fixes together also run on a Hasivo S600WP (hs104), with 200 controller
unbind/bind cycles and no warnings or leaks. Every patch builds with
W=1, and PHYLIB=m, PHYLIB=n and PSE_CONTROLLER=n link.

[1] https://lore.kernel.org/netdev/20261004164219.1161294-1-github@szelinsky.de/
[2] https://lore.kernel.org/netdev/20260813200653.980170-1-github@szelinsky.de/
[3] "net: pse-pd: assorted lifetime and error-path fixes", for net

Carlo Szelinsky (4):
  net: pse-pd: unlink the controller before freeing its PI data
  net: pse-pd: unwind allocations when controller registration fails
  net: pse-pd: si3474: use dev_err_probe() for controller registration
  net: pse-pd: check the PI vpwr supply before registering the
    controller

 drivers/net/pse-pd/pse_core.c | 175 ++++++++++++++++++++++++++++++----
 drivers/net/pse-pd/si3474.c   |   7 +-
 2 files changed, 158 insertions(+), 24 deletions(-)


base-commit: 98c2ad4f5d805dbc1ea436a334ee59311806a48c
-- 
2.43.0


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

end of thread, other threads:[~2026-10-18  8:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-18  8:18 [PATCH net-next 0/4] net: pse-pd: core fixes ahead of the controller notifier Carlo Szelinsky
2026-10-18  8:18 ` [PATCH net-next 1/4] net: pse-pd: unlink the controller before freeing its PI data Carlo Szelinsky
2026-10-18  8:18 ` [PATCH net-next 2/4] net: pse-pd: unwind allocations when controller registration fails Carlo Szelinsky
2026-10-18  8:18 ` [PATCH net-next 3/4] net: pse-pd: si3474: use dev_err_probe() for controller registration Carlo Szelinsky
2026-10-18  8:18 ` [PATCH net-next 4/4] net: pse-pd: check the PI vpwr supply before registering the controller Carlo Szelinsky
2026-10-18  8:23 ` [PATCH net-next 0/4] net: pse-pd: core fixes ahead of the controller notifier netdev-bot+sinfo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.