Re: [PATCH net v2] net: phylink: allow stopping a suspended instance

From: Andrew Lunn

Date: Wed Oct 14 2026 - 12:37:37 EST


On Tue, Oct 13, 2026 at 01:46:24PM -0600, James Hilliard wrote:
> On Mon, Oct 12, 2026 at 7:22 PM Andrew Lunn <andrew@xxxxxxx> wrote:
> >
> > On Mon, Oct 05, 2026 at 01:09:05PM -0600, James Hilliard wrote:
> > > After a failed MAC resume, a driver must be able to stop phylink without
> > > resuming it and reconfiguring the failed MAC. This is needed when recovery
> > > leaves the interface administratively up but detached until a subsequent
> > > down/up: ndo_stop() must finish the suspended phylink lifetime even though
> > > the MAC could not be restored. The missing transition was identified by
> > > code inspection of the stmmac recovery paths.
> >
> > I don't particularly like this. It feels like a workaround for a
> > broken MAC. It would be better to fix the MAC so that resume does not
> > fail.
>
> Fixing an identified cause of resume failure belongs in the MAC
> driver. The intended purpose here is narrower: allow orderly shutdown
> after the driver has returned an error, rather than recover the MAC
> through phylink.
>
> stmmac_resume() already returns before phylink_resume() when hardware
> setup fails.

But why did the hardware setup fail?

This is what i mean about it being a workaround.

Andrew