Re: [PATCH v3 18/31] net: phy: Use the compatibility driver attachment API

From: Andrew Lunn

Date: Wed Nov 18 2026 - 15:22:57 EST


> @@ -3813,6 +3809,8 @@ static int phy_probe(struct device *dev)
> int err = 0;
>
> phydev->drv = phydrv;
> + phydev->is_genphy_driven = phydrv == &genphy_driver ||
> + phydrv == &genphy_c45_driver;
>

Why do this here?

It also makes the code asymmetric. If you set it in phy_probe, you
should unset it in phy_remove. At the moment, it is symmetric,
phy_attach_direct sets it, phy_detach clears it.

Andrew