Re: [PATCH net-next v5 4/4] net: phy: make an unbind wait for the attached consumer to detach

From: Aleksei Sviridkin

Date: Sat Oct 10 2026 - 15:50:34 EST


Russell,

Sashiko's review of this patch showed that waiting in phy_remove() for
the consumer to detach can hang: on the unbinding thread itself through
device links, and with the device lock held across reboot and suspend.

For v6 I would rather not wait. phy_remove() would call back into the
consumer under rtnl, and phylink would answer with
phylink_disconnect_phy(), the path it already takes when an SFP module
with a PHY goes away. Consumers without the callback keep today's
behaviour.

Is a callback from phylib into phylink like this acceptable to you, or
would you rather see it shaped differently?

Aleksei

pw-bot: cr