1 From 7e89b737c97a9e7a81dd1584000bc136b92f12fd Mon Sep 17 00:00:00 2001
2 From: Russell King <rmk+kernel@armlinux.org.uk>
3 Date: Fri, 11 Oct 2019 22:14:47 +0100
4 Subject: [PATCH 619/660] net: sfp: move tx disable on device down to main
7 Move the tx disable assertion on device down to the main state
10 Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
12 drivers/net/phy/sfp.c | 10 ++--------
13 1 file changed, 2 insertions(+), 8 deletions(-)
15 --- a/drivers/net/phy/sfp.c
16 +++ b/drivers/net/phy/sfp.c
17 @@ -1489,15 +1489,8 @@ static void sfp_sm_device(struct sfp *sf
21 - if (event == SFP_E_DEV_DOWN) {
22 - /* If the module has a PHY, avoid raising TX disable
23 - * as this resets the PHY. Otherwise, raise it to
24 - * turn the laser off.
27 - sfp_module_tx_disable(sfp);
28 + if (event == SFP_E_DEV_DOWN)
29 sfp->sm_dev_state = SFP_DEV_DOWN;
34 @@ -1559,6 +1552,7 @@ static void sfp_sm_main(struct sfp *sfp,
35 sfp_sm_link_down(sfp);
37 sfp_sm_phy_detach(sfp);
38 + sfp_module_tx_disable(sfp);
39 sfp_sm_next(sfp, SFP_S_DOWN, 0);