net: sfp: handle module remove outside state machine
authorRussell King <rmk+kernel@armlinux.org.uk>
Sun, 10 Nov 2019 14:06:28 +0000 (14:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Nov 2019 00:17:00 +0000 (16:17 -0800)
commitd2e816c0293fc263b3f168c14992a5f1a50d7593
tree9a45992e90b536fcd201ebfbbc7e8cf0d9ffd093
parent0936ebc42f5909da7cf4c58468d4107f7029fe29
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.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/sfp.c