Thread (12 messages) flat view 12 messages, 3 authors, 12h ago

Re: [PATCH net v3 0/5] net: phy: fix cleanup after probe failure

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-08-19 13:33:45
Also in: lkml

On Wed, Aug 19, 2026 at 02:02:31PM +0800, Xuanqiang Luo wrote:
From: Xuanqiang Luo <redacted>

phy_probe() initializes the PHY driver, ports, SFP upstream, and LEDs in
stages. Its error paths do not always release only the resources acquired
at each stage. It can also mark the PHY ready before all setup succeeds.

Port setup also leaves SFP cleanup split between phy_sfp_probe(),
phy_setup_ports(), and phy_probe(), and default port setup ignores errors
from attaching the port to the PHY driver.

This series makes each initialization layer own its cleanup and propagates
setup failures to the caller.

Patch 1 splits the phy_probe() cleanup by initialization stage.

Patch 2 makes SFP and port setup unwind their resources in the required
order.

Patch 3 sets PHY_READY only after LED setup succeeds.

Patch 4 calls the PHY driver remove callback after later probe failures.

Patch 5 propagates errors from default port setup.
The scope of these patches has increased quite a bit. It is now more
like ongoing development work than a actual fix. Does this bother
anybody?

Please submit for net-next, once it reopens.

       Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help