diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2020-02-23 13:20:11 +0100 |
---|---|---|
committer | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2020-02-28 17:50:45 +0100 |
commit | c16517d26de30c90dabce1e456615fd7fbdce07c (patch) | |
tree | e7371ee12a3c413a064885b634ee4c975ad7f96a /target/linux/generic/pending-5.4/754-net-sfp-fix-unbind.patch | |
parent | 955634b473284847e3c8281a6ac85655329d8b06 (diff) | |
download | upstream-c16517d26de30c90dabce1e456615fd7fbdce07c.tar.gz upstream-c16517d26de30c90dabce1e456615fd7fbdce07c.tar.bz2 upstream-c16517d26de30c90dabce1e456615fd7fbdce07c.zip |
kernel: copy kernel 4.19 code to 5.4
No changes were done to the patches while coping them. Currently they do
not apply on top of kernel 5.4.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/generic/pending-5.4/754-net-sfp-fix-unbind.patch')
-rw-r--r-- | target/linux/generic/pending-5.4/754-net-sfp-fix-unbind.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/generic/pending-5.4/754-net-sfp-fix-unbind.patch b/target/linux/generic/pending-5.4/754-net-sfp-fix-unbind.patch new file mode 100644 index 0000000000..55fabafa81 --- /dev/null +++ b/target/linux/generic/pending-5.4/754-net-sfp-fix-unbind.patch @@ -0,0 +1,28 @@ +From 729fd05aac22cdf1e502fbf1bf80e5ebba0d9fbc Mon Sep 17 00:00:00 2001 +From: Russell King <rmk+kernel@armlinux.org.uk> +Date: Tue, 3 Dec 2019 17:48:28 +0000 +Subject: [PATCH] net: sfp: fix unbind + +When unbinding, we don't correctly tear down the module state, leaving +(for example) the hwmon registration behind. Ensure everything is +properly removed by sending a remove event at unbind. + +Fixes: 6b0da5c9c1a3 ("net: sfp: track upstream's attachment state in state machine") +Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> +--- + drivers/net/phy/sfp.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/net/phy/sfp.c ++++ b/drivers/net/phy/sfp.c +@@ -2260,6 +2260,10 @@ static int sfp_remove(struct platform_de + + sfp_unregister_socket(sfp->sfp_bus); + ++ rtnl_lock(); ++ sfp_sm_event(sfp, SFP_E_REMOVE); ++ rtnl_unlock(); ++ + return 0; + } + |