Re: [PATCH net] net: phy: nxp-c45-tja11xx: add remove callback

From: Paolo Abeni
Date: Tue Apr 11 2023 - 06:07:10 EST


On Thu, 2023-04-06 at 12:59 +0300, Radu Pirea (OSS) wrote:
> Unregister PTP clock when the driver is removed.
> Purge the RX and TX skb queues.
>
> Fixes: 514def5dd339 ("phy: nxp-c45-tja11xx: add timestamping support")
> CC: stable@xxxxxxxxxxxxxxx # 5.15+
> Signed-off-by: Radu Pirea (OSS) <radu-nicolae.pirea@xxxxxxxxxxx>

Andrew: my understanding is that a connected phy, maintains a reference
to the relevant driver via phydev->mdio.dev.driver->owner, and such
reference is dropped by phy_disconnect() via phy_detach().

So remove can invoked only after phy_disconnect

Does the above sounds reasonable/answer your question?

Thanks

Paolo