From cd49540742e4546f479c4fdedcbe6fb89b247da3 Mon Sep 17 00:00:00 2001 From: Chen Minqiang Date: Mon, 31 Aug 2020 22:35:03 +0800 Subject: [PATCH] kernel: Make kmod-sfp depend on kmod-libphy With kernel 5.4 kmod-sfp is depending on kmod-libphy, add this missing dependency. This also make phylink tristate so that kmod build work Signed-off-by: Chen Minqiang --- package/kernel/linux/modules/netdevices.mk | 3 ++- .../hack-5.4/999-make-phylink-tristate.patch | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 target/linux/generic/hack-5.4/999-make-phylink-tristate.patch diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 5db4e36552..eb73f7ebf7 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -111,6 +111,7 @@ $(eval $(call KernelPackage,libphy)) define KernelPackage/phylink SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Model for MAC to optional PHY connection + DEPENDS:=+LINUX_5_4:kmod-libphy KCONFIG:=CONFIG_PHYLINK FILES:=$(LINUX_DIR)/drivers/net/phy/phylink.ko AUTOLOAD:=$(call AutoLoad,15,phylink,1) @@ -1227,7 +1228,7 @@ $(eval $(call KernelPackage,sfc)) define KernelPackage/sfp SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=SFP cage support - DEPENDS:=+kmod-i2c-core +kmod-hwmon-core +kmod-phylink + DEPENDS:=+kmod-i2c-core +kmod-hwmon-core +kmod-phylink +LINUX_5_4:kmod-libphy KCONFIG:= \ CONFIG_SFP \ CONFIG_MDIO_I2C diff --git a/target/linux/generic/hack-5.4/999-make-phylink-tristate.patch b/target/linux/generic/hack-5.4/999-make-phylink-tristate.patch new file mode 100644 index 0000000000..6603ab9e23 --- /dev/null +++ b/target/linux/generic/hack-5.4/999-make-phylink-tristate.patch @@ -0,0 +1,13 @@ +diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig +index e351d65533aa..ac3b50090502 100644 +--- a/drivers/net/phy/Kconfig ++++ b/drivers/net/phy/Kconfig +@@ -239,7 +239,7 @@ endif + endif + + config PHYLINK +- tristate ++ tristate "Phylink config support" + depends on NETDEVICES + select PHYLIB + select SWPHY