From ec2f7a47d379c3828eec930df881b09acc6fec06 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ren=C3=A9=20van=20Dorst?= Date: Tue, 7 Apr 2020 23:50:31 +0200 Subject: [PATCH] kernel: add module to support SFP cages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Enables kernel SFP case support. Signed-off-by: René van Dorst --- package/kernel/linux/modules/netdevices.mk | 20 ++++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index bb924477806..81b23f98df6 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -1141,3 +1141,23 @@ define KernelPackage/mlx5-core/description endef $(eval $(call KernelPackage,mlx5-core)) + + +define KernelPackage/sfp + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=SFP cage support + DEPENDS:=+kmod-i2c-core +kmod-hwmon-core + KCONFIG:= \ + CONFIG_SFP=m \ + CONFIG_MDIO_I2C=m + FILES:= \ + $(LINUX_DIR)/drivers/net/phy/sfp.ko \ + $(LINUX_DIR)/drivers/net/phy/mdio-i2c.ko + AUTOLOAD:=$(call AutoProbe,mdio-i2c sfp) +endef + +define KernelPackage/SFP/description + Kernel module to support SFP cages +endef + +$(eval $(call KernelPackage,sfp)) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 739655f8370..d5527cd98dd 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -820,7 +820,7 @@ TARGET_DEVICES += ubnt_edgerouter-x define Device/ubnt_edgerouter-x-sfp $(Device/ubnt_edgerouter_common) DEVICE_MODEL := EdgeRouter X SFP - DEVICE_PACKAGES += kmod-i2c-algo-pca kmod-gpio-pca953x + DEVICE_PACKAGES += kmod-i2c-algo-pca kmod-gpio-pca953x kmod-sfp SUPPORTED_DEVICES += ubnt-erx-sfp ubiquiti,edgerouterx-sfp endef TARGET_DEVICES += ubnt_edgerouter-x-sfp -- 2.30.2