Re: [PATCH RFC net-next 4/4] net: phy: own phydev->psec via PSE notifier and remove fwnode_mdio hook

From: Jonas Jelonek

Date: Thu May 28 2026 - 15:16:08 EST


Hi,

this patch seems to cause a deadlock with PHYs which provide SFP 
ports. Noticed this downstream in OpenWrt with Realtek RTL8214FC
using an extension to the upstream driver [1].

I suspect the deadlock happens because phy_device_register takes
rtnl_lock with this patch. But further down in the call chain,
phy_sfp_probe is called, calling sfp_bus_add_upstream which in turn
tries to take rtnl_lock again.

While the downstream driver part still calls phy_sfp_probe itself,
backporting the phy_port changes to 6.18 and adjusting the driver
doesn't help. If I got it correctly, the phy_sfp_probe just moves
into phylib core but still causes the deadlock.

Kind regards,
Jonas Jelonek

[1] https://git.openwrt.org/openwrt/openwrt/tree/target/linux/realtek/files-6.18/drivers/net/phy/realtek/realtek_multiport.c