Skip to content

net: pse-pd: support module-based PSE controller drivers

Carlo Szelinsky lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 24 repliesIn review
  2. v13 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Reordered patches: moved the EPROBE_DEFER patch last since it changes probe behavior and depends on the other two patches for correct lazy resolution (Kory Maincent)
- Added net-next to subject prefix (Kory Maincent)
- Collected Acked-by tags

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net: pse-pd: prevent regulator cleanup from disabling unclaimed PSE PIsdrivers/net/pse-pd/pse_core.c include/linux/pse-pd/pse.h+14 -02 replies
2/3net: pse-pd: add lazy PSE control resolution for modular driversdrivers/net/pse-pd/pse_core.c include/linux/pse-pd/pse.h net/ethtool/pse-pd.c+45 -00 replies
3/3net: mdio: treat PSE EPROBE_DEFER as non-fatal during PHY registrationdrivers/net/mdio/fwnode_mdio.c+6 -222 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchKory Maincent
1/3A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net-next v2 0/3] net: pse-pd: support module-based PSE controller drivers

When a PSE controller driver is built as a module, it may not be probed yet when PHYs are registered on the MDIO bus. This causes of_pse_control_get() to return -EPROBE_DEFER, destroying the PHY device. Later, regulator_late_cleanup disables the unclaimed PSE regulators, permanently killing PoE.

This series fixes the issue in three steps:

1. Add an admin_state_synced flag to pse_pi so that pse_pi_is_enabled() reports unclaimed PIs as disabled, preventing regulator_late_cleanup from shutting them down. The existing dual-path behavior (software- tracked vs. hardware-queried state) is preserved for claimed PIs.

2. Add pse_control_try_resolve() for lazy PSE control resolution on first ethtool access, serialized by RTNL.

3. Treat -EPROBE_DEFER as non-fatal during PHY registration, allowing the PHY to register with psec=NULL. This is ordered last because it changes probe behavior and relies on patches 1 and 2 for correct lazy resolution.

Thanks to Kory Maincent for the review and feedback on v1.

Changes in v2:
- Reordered patches: moved the EPROBE_DEFER patch last since it changes probe behavior and depends on the other two patches for correct lazy resolution (Kory Maincent)
- Added net-next to subject prefix (Kory Maincent)
- Collected Acked-by tags

Carlo Szelinsky (3):
net: pse-pd: prevent regulator cleanup from disabling unclaimed PSE
PIs
net: pse-pd: add lazy PSE control resolution for modular drivers
net: mdio: treat PSE EPROBE_DEFER as non-fatal during PHY registration

 drivers/net/mdio/fwnode_mdio.c |  8 ++++--
 drivers/net/pse-pd/pse_core.c  | 49 ++++++++++++++++++++++++++++++++++
 include/linux/pse-pd/pse.h     |  6 +++++
 net/ethtool/pse-pd.c           |  4 +++
 4 files changed, 65 insertions(+), 2 deletions(-)

base-commit: cf0d9080c6f795bc6be08babbffa29b62c06e9b0 --
2.43.0