Re: [PATCH 03/17] net: phy: Attach generic PHY drivers through the driver core
From: Andrew Lunn
Date: Thu Nov 05 2026 - 09:54:32 EST
On Thu, Nov 05, 2026 at 01:42:16PM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@xxxxxxxxxx>
>
> The generic PHY fallback probes directly before publishing its binding,
> bypassing driver-core admission and supplier checks.
>
> Attach through the driver core so admission precedes functional setup.
> Callers hold RTNL, which a concurrent bind of a specific driver may wait
> for with the device lock held, so for this flow let's add
> device_driver_try_attach() so the attachment never waits for that lock.
FYI: This code is fragile, and causes issues. I will need to stare
long and hard at it before accepting it. So i'm unlikely to do that
until the basic idea is accepted.
I also wounder how a PHY is a threat. What is your threat model for an
Ethernet PHY?
Andrew