mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 22:23:27 +00:00
667f6c7f49
Manually rebased patches: bcm27xx/patches-5.4/950-0135-spi-spi-bcm2835-Disable-forced-software-CS.patch generic-backport/744-v5.5-net-sfp-soft-status-and-control-support.patch layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch mvebu/patches-5.4/521-arm64-dts-marvell-espressobin-Add-ethernet-switch-al.patch Removed: layerscape/patches-5.4/819-uart-0012-tty-serial-lpuart-add-LS1028A-support.patch All modifications made by update_kernel.sh Build system: x86_64 Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711, lantiq/Easybox 904 xDSL, x86_64 Run-tested: ipq806x/R7800, lantiq/Easybox 904 xDSL, x86_64 No dmesg regressions, everything functional Signed-off-by: John Audia <graysky@archlinux.us> Co-developed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
29 lines
848 B
Diff
29 lines
848 B
Diff
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
|
|
@@ -2344,6 +2344,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;
|
|
}
|
|
|