diff options
author | Russell King <linux@armlinux.org.uk> | 2019-11-27 11:45:25 +0000 |
---|---|---|
committer | Jonas Gorski <jonas.gorski@gmail.com> | 2020-01-21 22:32:48 +0100 |
commit | 1c16b574c4f77a30a0268acee30be96ae0dc5948 (patch) | |
tree | 716fd94ee81e332ba19e1af7bf98371120ea1856 /target/linux/generic/backport-4.19/721-v5.5-net-sfp-move-tx-disable-on-device-down-to-main-state.patch | |
parent | a07638eb24b8310a35ea6c3b09f6db59bb31cd68 (diff) | |
download | upstream-1c16b574c4f77a30a0268acee30be96ae0dc5948.tar.gz upstream-1c16b574c4f77a30a0268acee30be96ae0dc5948.tar.bz2 upstream-1c16b574c4f77a30a0268acee30be96ae0dc5948.zip |
kernel: add backported phy/phylink/sfp patches
Backport the phy/phylink/sfp patches currently queued in netdev or in
mainline necessary to support GPON popular modules, specifically to
support Huawei and Nokia GPON modules.
Signed-off-by: Russell King <linux@armlinux.org.uk>
[jonas.gorski: include kernel version in file names, refresh patches]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Diffstat (limited to 'target/linux/generic/backport-4.19/721-v5.5-net-sfp-move-tx-disable-on-device-down-to-main-state.patch')
-rw-r--r-- | target/linux/generic/backport-4.19/721-v5.5-net-sfp-move-tx-disable-on-device-down-to-main-state.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/target/linux/generic/backport-4.19/721-v5.5-net-sfp-move-tx-disable-on-device-down-to-main-state.patch b/target/linux/generic/backport-4.19/721-v5.5-net-sfp-move-tx-disable-on-device-down-to-main-state.patch new file mode 100644 index 0000000000..5b3caaf0fd --- /dev/null +++ b/target/linux/generic/backport-4.19/721-v5.5-net-sfp-move-tx-disable-on-device-down-to-main-state.patch @@ -0,0 +1,41 @@ +From 7e89b737c97a9e7a81dd1584000bc136b92f12fd Mon Sep 17 00:00:00 2001 +From: Russell King <rmk+kernel@armlinux.org.uk> +Date: Fri, 11 Oct 2019 22:14:47 +0100 +Subject: [PATCH 619/660] net: sfp: move tx disable on device down to main + state machine + +Move the tx disable assertion on device down to the main state +machine. + +Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> +--- + drivers/net/phy/sfp.c | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +--- a/drivers/net/phy/sfp.c ++++ b/drivers/net/phy/sfp.c +@@ -1489,15 +1489,8 @@ static void sfp_sm_device(struct sfp *sf + break; + + case SFP_DEV_UP: +- if (event == SFP_E_DEV_DOWN) { +- /* If the module has a PHY, avoid raising TX disable +- * as this resets the PHY. Otherwise, raise it to +- * turn the laser off. +- */ +- if (!sfp->mod_phy) +- sfp_module_tx_disable(sfp); ++ if (event == SFP_E_DEV_DOWN) + sfp->sm_dev_state = SFP_DEV_DOWN; +- } + break; + } + } +@@ -1559,6 +1552,7 @@ static void sfp_sm_main(struct sfp *sfp, + sfp_sm_link_down(sfp); + if (sfp->mod_phy) + sfp_sm_phy_detach(sfp); ++ sfp_module_tx_disable(sfp); + sfp_sm_next(sfp, SFP_S_DOWN, 0); + return; + } |