Subject: Re: [PATCH net-next v2 3/3] net: mdio: treat PSE EPROBE_DEFER as non-fatal during PHY registration

From: Carlo Szelinsky <[email-masked]>
Date: Wed, 8 Apr 2026 23:07:11 +0200

So I went ahead and tested the phy_probe() approach on my setup (RTL930x
DSA switch with an I2C Hasivo HS104 PSE controller as module).

PoE itself works fine, but phydev->psec never gets set - ethtool just
says "No PSE is attached" on all ports.

Took me a while to figure out what's going on. The problem is how DSA
handles PHYs: when phy_probe() returns -EPROBE_DEFER because the PSE
controller hasn't probed yet, the PHY device is registered but sits
there unprobed. Then the DSA switch comes along, sets up its ports, and
phy_attach_direct() force-binds the generic PHY driver with
device_bind_driver(). Now the device already has a driver, so when the
deferred probe retry kicks in it just skips it. phy_probe() never runs
again and psec stays NULL.

What I'm seeing timing-wise:
  - MDIO scan registers PHYs, phy_probe() defers (no PSE yet)
  - DSA probes, phy_attach_direct() binds genphy
  - t=17s: HS104 finally probes
  - deferred retry: nope, driver already bound
  - t=35s: regulator_late_cleanup (caught by admin_state_synced)

Not sure what the best path forward is here. Should we look at fixing
phy_attach_direct() to handle this case, or go back to the non-fatal
EPROBE_DEFER approach from v2 for now?

Cheers,
Carlo