Re: [PATCH] net: sfp: Always call `sfp_sm_mod_remove()` on remove

From: Andrew Lunn
Date: Thu Jun 06 2024 - 12:36:40 EST


On Thu, Jun 06, 2024 at 08:28:30AM -0700, Jakub Kicinski wrote:
> On Thu, 6 Jun 2024 17:21:45 +0200 Andrew Lunn wrote:
> > I was expecting Russell to review this. Maybe he missed it.
>
> While it's fresh in your mind - does it look like a fix to you?
> From a quick look - we're failing to unregister a device?

Yes. A Fixes of:

commit d2e816c0293fc263b3f168c14992a5f1a50d7593
Author: Russell King <rmk+kernel@xxxxxxxxxxxxxxx>
Date: Sun Nov 10 14:06:28 2019 +0000

net: sfp: handle module remove outside state machine

Removing a module resets the module state machine back to its initial
state. Rather than explicitly handling this in every state, handle it
early on outside of the state machine.

is probably best, since that refactored to code.

Andrew