Re: [PATCH net] net: emac: release DT PHY resources on teardown
From: Andrew Lunn
Date: Wed Oct 21 2026 - 10:00:34 EST
On Tue, Oct 20, 2026 at 08:11:02PM -0700, Rosen Penev wrote:
> On Tue Oct 20, 2026 at 6:05 PM PDT, Andrew Lunn wrote:
> > On Tue, Oct 20, 2026 at 03:30:02PM -0700, Rosen Penev wrote:
> >> Disconnect PHYLIB PHYs and deregister fixed PHYs during both probe
> >> unwind and driver removal. Without this cleanup, unbinding a DT-based
> >> EMAC can leave its PHY attached to the freed netdev, while fixed-link
> >> instances retain their registered fixed PHY.
> >
> > This driver is quite convoluted with its PHY handling.
> I agree. I got this LLM to convert the whole thing to phylink. It tested
> a bunch of stuff over serial and ethernet, which works. That's net-next
> material though. It'll probably get rejected.
What is important here is you have the hardware and you have tested
it. That is better than most LLM generated patches which sometime
don't even build, and most of the time are never run on hardware
before submission.
If your patchset for phylink is up to mainline quality, post it.
We push back on LLM generated patches which are of obvious bad
quality. But we have no problems with good quality patches tested on
real hardware.
Andrew