From c1f6a9fd593afff24e14bbc493d71855a605334c Mon Sep 17 00:00:00 2001 From: Josef Schlehofer <josef.schlehofer@nic.cz> Date: Mon, 19 Dec 2022 16:16:10 +0100 Subject: [PATCH] patches/openwrt: drop Marvell hack switches This was superseded by patch from OpenWrt [1], which was discussed in OpenWrt mailing list [1] https://github.com/openwrt/openwrt/commit/8be6350f6646b37929f40a9a482343f22af2065b [2] https://lists.infradead.org/pipermail/openwrt-devel/2022-December/039950.html --- ...d-generic-kernel-config-for-5.15-LTS.patch | 23 ++++--- ...002-Generic-patches-hack-5.15-kernel.patch | 64 +++++++++++++++-- ...-5.15-config-for-mvebu-and-cortexa53.patch | 25 +++++-- .../0012-separate-kmod-marvell-switch.patch | 68 ------------------- .../0013-mvebu-cortexa9-add-config-5.15.patch | 21 ------ .../hack/0001-Hack-for-Marvell-switches.patch | 36 ---------- 6 files changed, 91 insertions(+), 146 deletions(-) delete mode 100644 patches/openwrt/a-new-kernel-5.15/0012-separate-kmod-marvell-switch.patch delete mode 100644 patches/openwrt/a-new-kernel-5.15/0013-mvebu-cortexa9-add-config-5.15.patch delete mode 100644 patches/updater-lists/hack/0001-Hack-for-Marvell-switches.patch diff --git a/patches/openwrt/a-new-kernel-5.15/0002-Add-generic-kernel-config-for-5.15-LTS.patch b/patches/openwrt/a-new-kernel-5.15/0002-Add-generic-kernel-config-for-5.15-LTS.patch index 4b696ab79..88d156d0e 100644 --- a/patches/openwrt/a-new-kernel-5.15/0002-Add-generic-kernel-config-for-5.15-LTS.patch +++ b/patches/openwrt/a-new-kernel-5.15/0002-Add-generic-kernel-config-for-5.15-LTS.patch @@ -1,19 +1,19 @@ -From 7e84d1b498ce546f674f30635e72bd41cba48bd4 Mon Sep 17 00:00:00 2001 +From d5dbc4eb86fee28f84048089cd14bc452e36a471 Mon Sep 17 00:00:00 2001 From: Josef Schlehofer <pepe.schlehofer@gmail.com> -Date: Sun, 11 Dec 2022 21:33:31 +0100 -Subject: [PATCH] Backport generic config for Linux kernel 5.15 +Date: Mon, 19 Dec 2022 16:10:48 +0100 +Subject: [PATCH] Generic config 5.15 --- - target/linux/generic/config-5.15 | 7556 ++++++++++++++++++++++++++++++ - 1 file changed, 7556 insertions(+) + target/linux/generic/config-5.15 | 7563 ++++++++++++++++++++++++++++++ + 1 file changed, 7563 insertions(+) create mode 100644 target/linux/generic/config-5.15 diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15 new file mode 100644 -index 0000000000..52aba2fa0e +index 0000000000..a91e0fc8e9 --- /dev/null +++ b/target/linux/generic/config-5.15 -@@ -0,0 +1,7556 @@ +@@ -0,0 +1,7563 @@ +# CONFIG_104_QUAD_8 is not set +CONFIG_32BIT=y +CONFIG_64BIT_TIME=y @@ -1813,6 +1813,7 @@ index 0000000000..52aba2fa0e +# CONFIG_DVB_TUNER_DIB0090 is not set +# CONFIG_DVB_TUNER_ITD1000 is not set +# CONFIG_DVB_ULE_DEBUG is not set ++# CONFIG_DVB_USB is not set +# CONFIG_DVB_USB_V2 is not set +# CONFIG_DVB_VES1820 is not set +# CONFIG_DVB_VES1X93 is not set @@ -2125,6 +2126,7 @@ index 0000000000..52aba2fa0e +# CONFIG_FUJITSU_ES is not set +# CONFIG_FUJITSU_LAPTOP is not set +# CONFIG_FUJITSU_TABLET is not set ++# CONFIG_FUNCTION_ERROR_INJECTION is not set +# CONFIG_FUNCTION_TRACER is not set +# CONFIG_FUSE_FS is not set +# CONFIG_FUSION is not set @@ -2919,8 +2921,11 @@ index 0000000000..52aba2fa0e +# CONFIG_IR_RC5_DECODER is not set +# CONFIG_IR_RC6_DECODER is not set +# CONFIG_IR_REDRAT3 is not set ++# CONFIG_IR_SERIAL is not set ++# CONFIG_IR_SIR is not set +# CONFIG_IR_SONY_DECODER is not set +# CONFIG_IR_STREAMZAP is not set ++# CONFIG_IR_TOY is not set +# CONFIG_IR_TTUSBIR is not set +# CONFIG_ISA_BUS is not set +# CONFIG_ISA_BUS_API is not set @@ -3189,6 +3194,7 @@ index 0000000000..52aba2fa0e +CONFIG_LINEAR_RANGES=y +# CONFIG_LIQUIDIO is not set +# CONFIG_LIQUIDIO_VF is not set ++# CONFIG_LIRC is not set +# CONFIG_LIS3L02DQ is not set +# CONFIG_LITEX_LITEETH is not set +# CONFIG_LITEX_SOC_CONTROLLER is not set @@ -4062,7 +4068,7 @@ index 0000000000..52aba2fa0e +# CONFIG_NET_DSA_MV88E6131 is not set +# CONFIG_NET_DSA_MV88E6171 is not set +# CONFIG_NET_DSA_MV88E6352 is not set -+CONFIG_NET_DSA_MV88E6XXX=y ++# CONFIG_NET_DSA_MV88E6XXX is not set +# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set +# CONFIG_NET_DSA_MV88E6XXX_PTP is not set +# CONFIG_NET_DSA_QCA8K is not set @@ -4961,6 +4967,7 @@ index 0000000000..52aba2fa0e +# CONFIG_RC_DECODERS is not set +# CONFIG_RC_LOOPBACK is not set +# CONFIG_RC_MAP is not set ++# CONFIG_RC_XBOX_DVD is not set +# CONFIG_RDS is not set +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_GZIP is not set diff --git a/patches/openwrt/a-new-kernel-5.15/0002-Generic-patches-hack-5.15-kernel.patch b/patches/openwrt/a-new-kernel-5.15/0002-Generic-patches-hack-5.15-kernel.patch index bf8fc7bf1..e20a0844a 100644 --- a/patches/openwrt/a-new-kernel-5.15/0002-Generic-patches-hack-5.15-kernel.patch +++ b/patches/openwrt/a-new-kernel-5.15/0002-Generic-patches-hack-5.15-kernel.patch @@ -1,6 +1,6 @@ -From 7192bc48404d4aca2a777bd80b95593b5fd2e508 Mon Sep 17 00:00:00 2001 +From b934e6c50e6a67cad0ca2fdf65dff593f60537a8 Mon Sep 17 00:00:00 2001 From: Josef Schlehofer <pepe.schlehofer@gmail.com> -Date: Sun, 11 Dec 2022 22:07:51 +0100 +Date: Mon, 19 Dec 2022 16:01:26 +0100 Subject: [PATCH] Backport generic hack folder for 5.15 --- @@ -20,6 +20,7 @@ Subject: [PATCH] Backport generic hack folder for 5.15 .../260-crypto_test_dependencies.patch | 52 + .../hack-5.15/261-lib-arc4-unhide.patch | 24 + .../generic/hack-5.15/280-rfkill-stubs.patch | 84 + + ...v88e6xxx-depend-on-PTP-conditionally.patch | 44 + ...cache-use-more-efficient-cache-blast.patch | 64 + .../321-powerpc_crtsavres_prereq.patch | 38 + ...rans-call-add-disks-after-mtd-device.patch | 98 + @@ -55,7 +56,7 @@ Subject: [PATCH] Backport generic hack folder for 5.15 .../911-kobject_add_broadcast_uevent.patch | 76 + .../hack-5.15/920-device_tree_cmdline.patch | 21 + ...vert-driver-core-Set-fw_devlink-on-b.patch | 30 + - 51 files changed, 9089 insertions(+) + 52 files changed, 9133 insertions(+) create mode 100644 target/linux/generic/hack-5.15/204-module_strip.patch create mode 100644 target/linux/generic/hack-5.15/205-kconfig-abort-configuration-on-unset-symbol.patch create mode 100644 target/linux/generic/hack-5.15/210-darwin_scripts_include.patch @@ -72,6 +73,7 @@ Subject: [PATCH] Backport generic hack folder for 5.15 create mode 100644 target/linux/generic/hack-5.15/260-crypto_test_dependencies.patch create mode 100644 target/linux/generic/hack-5.15/261-lib-arc4-unhide.patch create mode 100644 target/linux/generic/hack-5.15/280-rfkill-stubs.patch + create mode 100644 target/linux/generic/hack-5.15/290-net-dsa-mv88e6xxx-depend-on-PTP-conditionally.patch create mode 100644 target/linux/generic/hack-5.15/300-MIPS-r4k_cache-use-more-efficient-cache-blast.patch create mode 100644 target/linux/generic/hack-5.15/321-powerpc_crtsavres_prereq.patch create mode 100644 target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch @@ -4511,6 +4513,56 @@ index 0000000000..7a650d132e +-obj-$(CONFIG_RFKILL) += rfkill.o ++obj-$(CONFIG_RFKILL_FULL) += rfkill.o + obj-$(CONFIG_RFKILL_GPIO) += rfkill-gpio.o +diff --git a/target/linux/generic/hack-5.15/290-net-dsa-mv88e6xxx-depend-on-PTP-conditionally.patch b/target/linux/generic/hack-5.15/290-net-dsa-mv88e6xxx-depend-on-PTP-conditionally.patch +new file mode 100644 +index 0000000000..86b03d156e +--- /dev/null ++++ b/target/linux/generic/hack-5.15/290-net-dsa-mv88e6xxx-depend-on-PTP-conditionally.patch +@@ -0,0 +1,44 @@ ++From e6866ed4219b8c7754dcd3eb1a654f6f524b0e56 Mon Sep 17 00:00:00 2001 ++From: "Johnny S. Lee" <foss@jsl.io> ++Date: Thu, 15 Dec 2022 17:49:04 +0800 ++Subject: [PATCH] net: dsa: mv88e6xxx: depend on PTP conditionally ++ ++PTP hardware timestamping related objects are not linked when PTP ++support for MV88E6xxx (NET_DSA_MV88E6XXX_PTP) is disabled, therefore ++NET_DSA_MV88E6XXX should not depend on PTP_1588_CLOCK_OPTIONAL ++regardless of NET_DSA_MV88E6XXX_PTP. ++ ++Instead, condition more strictly on how NET_DSA_MV88E6XXX_PTP's ++dependencies are met, making sure that it cannot be enabled when ++NET_DSA_MV88E6XXX=y and PTP_1588_CLOCK=m. ++ ++In other words, this commit allows NET_DSA_MV88E6XXX to be built-in ++while PTP_1588_CLOCK is a module, as long as NET_DSA_MV88E6XXX_PTP is ++prevented from being enabled. ++ ++Fixes: e5f31552674e ("ethernet: fix PTP_1588_CLOCK dependencies") ++Signed-off-by: Johnny S. Lee <foss@jsl.io> ++--- ++ drivers/net/dsa/mv88e6xxx/Kconfig | 4 ++-- ++ 1 file changed, 2 insertions(+), 2 deletions(-) ++ ++--- a/drivers/net/dsa/mv88e6xxx/Kconfig +++++ b/drivers/net/dsa/mv88e6xxx/Kconfig ++@@ -2,7 +2,6 @@ ++ config NET_DSA_MV88E6XXX ++ tristate "Marvell 88E6xxx Ethernet switch fabric support" ++ depends on NET_DSA ++- depends on PTP_1588_CLOCK_OPTIONAL ++ select IRQ_DOMAIN ++ select NET_DSA_TAG_EDSA ++ select NET_DSA_TAG_DSA ++@@ -13,7 +12,8 @@ config NET_DSA_MV88E6XXX ++ config NET_DSA_MV88E6XXX_PTP ++ bool "PTP support for Marvell 88E6xxx" ++ default n ++- depends on NET_DSA_MV88E6XXX && PTP_1588_CLOCK +++ depends on (NET_DSA_MV88E6XXX = y && PTP_1588_CLOCK = y) || \ +++ (NET_DSA_MV88E6XXX = m && PTP_1588_CLOCK) ++ help ++ Say Y to enable PTP hardware timestamping on Marvell 88E6xxx switch ++ chips that support it. diff --git a/target/linux/generic/hack-5.15/300-MIPS-r4k_cache-use-more-efficient-cache-blast.patch b/target/linux/generic/hack-5.15/300-MIPS-r4k_cache-use-more-efficient-cache-blast.patch new file mode 100644 index 0000000000..f21f200136 @@ -5998,7 +6050,7 @@ index 0000000000..9d71a741b2 + skb_dst_set(skb, &tunnel_dst->dst); diff --git a/target/linux/generic/hack-5.15/601-of_net-add-mac-address-ascii-support.patch b/target/linux/generic/hack-5.15/601-of_net-add-mac-address-ascii-support.patch new file mode 100644 -index 0000000000..83483751f8 +index 0000000000..4ab05b4ea6 --- /dev/null +++ b/target/linux/generic/hack-5.15/601-of_net-add-mac-address-ascii-support.patch @@ -0,0 +1,112 @@ @@ -6026,7 +6078,7 @@ index 0000000000..83483751f8 ++ ++ mac = nvmem_cell_read(cell, &len); ++ if (IS_ERR(mac)) -++ return PTR_ERR(mac); +++ return mac; ++ if (len != ETH_ALEN) { ++ kfree(mac); ++ return ERR_PTR(-EINVAL); @@ -6043,7 +6095,7 @@ index 0000000000..83483751f8 ++ ++ mac_ascii = nvmem_cell_read(cell, &len); ++ if (IS_ERR(mac_ascii)) -++ return PTR_ERR(mac_ascii); +++ return mac_ascii; ++ if (len != ETH_ALEN*2+5) { ++ kfree(mac_ascii); ++ return ERR_PTR(-EINVAL); diff --git a/patches/openwrt/a-new-kernel-5.15/0003-Kernel-5.15-config-for-mvebu-and-cortexa53.patch b/patches/openwrt/a-new-kernel-5.15/0003-Kernel-5.15-config-for-mvebu-and-cortexa53.patch index a94568d49..3346582b4 100644 --- a/patches/openwrt/a-new-kernel-5.15/0003-Kernel-5.15-config-for-mvebu-and-cortexa53.patch +++ b/patches/openwrt/a-new-kernel-5.15/0003-Kernel-5.15-config-for-mvebu-and-cortexa53.patch @@ -1,14 +1,16 @@ -From 2760786696d69ecdf92dd9f1fe126c8808c15c06 Mon Sep 17 00:00:00 2001 +From f6aeddea43cb3a65c83f255a6bf0202f6c0655b1 Mon Sep 17 00:00:00 2001 From: Josef Schlehofer <pepe.schlehofer@gmail.com> -Date: Mon, 23 May 2022 10:32:31 +0200 -Subject: [PATCH] Kernel 5.15 config for mvebu and cortexa53 +Date: Mon, 19 Dec 2022 16:04:18 +0100 +Subject: [PATCH] Kernel 5.15 config for mvebu --- target/linux/mvebu/config-5.15 | 435 +++++++++++++++++++++++ - target/linux/mvebu/cortexa53/config-5.15 | 82 +++++ - 2 files changed, 517 insertions(+) + target/linux/mvebu/cortexa53/config-5.15 | 83 +++++ + target/linux/mvebu/cortexa9/config-5.15 | 2 + + 3 files changed, 520 insertions(+) create mode 100644 target/linux/mvebu/config-5.15 create mode 100644 target/linux/mvebu/cortexa53/config-5.15 + create mode 100644 target/linux/mvebu/cortexa9/config-5.15 diff --git a/target/linux/mvebu/config-5.15 b/target/linux/mvebu/config-5.15 new file mode 100644 @@ -453,10 +455,10 @@ index 0000000000..0811ee6d4c +CONFIG_ZSTD_DECOMPRESS=y diff --git a/target/linux/mvebu/cortexa53/config-5.15 b/target/linux/mvebu/cortexa53/config-5.15 new file mode 100644 -index 0000000000..3c195291d1 +index 0000000000..27d410f68b --- /dev/null +++ b/target/linux/mvebu/cortexa53/config-5.15 -@@ -0,0 +1,82 @@ +@@ -0,0 +1,83 @@ +CONFIG_64BIT=y +CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y @@ -495,6 +497,7 @@ index 0000000000..3c195291d1 +CONFIG_ARM_PSCI_FW=y +CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y +CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y ++CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_DMA_DIRECT_REMAP=y +CONFIG_FRAME_POINTER=y +CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y @@ -539,6 +542,14 @@ index 0000000000..3c195291d1 +CONFIG_UNMAP_KERNEL_AT_EL0=y +CONFIG_VMAP_STACK=y +CONFIG_ZONE_DMA32=y +diff --git a/target/linux/mvebu/cortexa9/config-5.15 b/target/linux/mvebu/cortexa9/config-5.15 +new file mode 100644 +index 0000000000..b737c44d42 +--- /dev/null ++++ b/target/linux/mvebu/cortexa9/config-5.15 +@@ -0,0 +1,2 @@ ++CONFIG_PHY_MVEBU_A38X_COMPHY=y ++CONFIG_RTC_DRV_MV=y -- 2.34.1 diff --git a/patches/openwrt/a-new-kernel-5.15/0012-separate-kmod-marvell-switch.patch b/patches/openwrt/a-new-kernel-5.15/0012-separate-kmod-marvell-switch.patch deleted file mode 100644 index fb0d9ead1..000000000 --- a/patches/openwrt/a-new-kernel-5.15/0012-separate-kmod-marvell-switch.patch +++ /dev/null @@ -1,68 +0,0 @@ -From f9d8784bd6ab582e801454bcb752c3d4dd16ecb5 Mon Sep 17 00:00:00 2001 -From: Josef Schlehofer <pepe.schlehofer@gmail.com> -Date: Mon, 27 Jun 2022 14:22:16 +0200 -Subject: [PATCH] Try this for Marvell switches. We will see - ---- - package/kernel/linux/modules/dsa.mk | 49 +++++++++++++++++++++++++++++ - 1 file changed, 49 insertions(+) - create mode 100644 package/kernel/linux/modules/dsa.mk - -diff --git a/package/kernel/linux/modules/dsa.mk b/package/kernel/linux/modules/dsa.mk -new file mode 100644 -index 0000000000..4df86325b3 ---- /dev/null -+++ b/package/kernel/linux/modules/dsa.mk -@@ -0,0 +1,49 @@ -+DSA_MENU:=DSA Support -+ -+define KernelPackage/dsa -+ SUBMENU:=$(DSA_MENU) -+ TITLE:=DSA support -+ KCONFIG:=\ -+ CONFIG_NET_DSA \ -+ CONFIG_NET_SWITCHDEV=y \ -+ CONFIG_NET_DSA_HWMON=n -+ DEPENDS:=+kmod-libphy -+ifeq ($(CONFIG_OF),y) -+ DEPENDS+=+kmod-of-mdio -+endif -+ FILES:=$(LINUX_DIR)/net/dsa/dsa_core.ko -+ AUTOLOAD:=$(call AutoLoad,34,dsa_core) -+endef -+ -+define KernelPackage/dsa/description -+ Kernel module for DSA support. -+endef -+ -+$(eval $(call KernelPackage,dsa)) -+ -+ -+define AddDepends/dsa -+ SUBMENU:=$(DSA_MENU) -+ DEPENDS+=kmod-dsa $(1) -+endef -+ -+ -+define KernelPackage/dsa-mv88e6xxx -+ TITLE:=Marvell 88E6XXX switch support -+ KCONFIG:=CONFIG_NET_DSA_MV88E6XXX -+ FILES:=$(LINUX_DIR)/drivers/net/dsa/mv88e6xxx/mv88e6xxx.ko -+ AUTOLOAD:=$(call AutoLoad,34,mv88e6xxx) -+ $(call AddDepends/dsa) -+endef -+ -+define KernelPackage/dsa-mv88e6xxx/description -+ This enables support for the Marvell 88E6XXX ethernet switch chips. -+endef -+ -+$(eval $(call KernelPackage,dsa-mv88e6xxx)) -+ -+define AddDepends/dsa-mv88e6xxx -+ SUBMENU:=$(DSA_MENU) -+ DEPENDS+=kmod-dsa kmod-dsa-mv88e6xxx $(1) -+endef -+ --- -2.34.1 - diff --git a/patches/openwrt/a-new-kernel-5.15/0013-mvebu-cortexa9-add-config-5.15.patch b/patches/openwrt/a-new-kernel-5.15/0013-mvebu-cortexa9-add-config-5.15.patch deleted file mode 100644 index c9ebb8583..000000000 --- a/patches/openwrt/a-new-kernel-5.15/0013-mvebu-cortexa9-add-config-5.15.patch +++ /dev/null @@ -1,21 +0,0 @@ -From bab90049d7b052e933ae7ba522a600e90d664556 Mon Sep 17 00:00:00 2001 -From: Josef Schlehofer <pepe.schlehofer@gmail.com> -Date: Wed, 13 Jul 2022 12:35:46 +0200 -Subject: [PATCH] mvebu/cortexa9: add config-5.15 - ---- - target/linux/mvebu/cortexa9/config-5.15 | 2 ++ - 1 file changed, 2 insertions(+) - create mode 100644 target/linux/mvebu/cortexa9/config-5.15 - -diff --git a/target/linux/mvebu/cortexa9/config-5.15 b/target/linux/mvebu/cortexa9/config-5.15 -new file mode 100644 -index 0000000000..b737c44d42 ---- /dev/null -+++ b/target/linux/mvebu/cortexa9/config-5.15 -@@ -0,0 +1,2 @@ -+CONFIG_PHY_MVEBU_A38X_COMPHY=y -+CONFIG_RTC_DRV_MV=y --- -2.34.1 - diff --git a/patches/updater-lists/hack/0001-Hack-for-Marvell-switches.patch b/patches/updater-lists/hack/0001-Hack-for-Marvell-switches.patch deleted file mode 100644 index 0371d8b0f..000000000 --- a/patches/updater-lists/hack/0001-Hack-for-Marvell-switches.patch +++ /dev/null @@ -1,36 +0,0 @@ -From be4e885d473ffe96bcdf52d2b431d490d26cb969 Mon Sep 17 00:00:00 2001 -From: Josef Schlehofer <pepe.schlehofer@gmail.com> -Date: Mon, 27 Jun 2022 14:28:56 +0200 -Subject: [PATCH] Hack for Marvell switches - -I am not sure if this is going to work, but lets try ---- - kmod-mox.list | 3 +++ - kmod-omnia.list | 3 +++ - 2 files changed, 6 insertions(+) - -diff --git a/kmod-mox.list b/kmod-mox.list -index fe1381a..19b5028 100644 ---- a/kmod-mox.list -+++ b/kmod-mox.list -@@ -7,3 +7,6 @@ gpio-button-hotplug - mwlwifi - mwifiex-sdio - btmrvl -+ -+# Hack -+dsa-mv88e6xxx -diff --git a/kmod-omnia.list b/kmod-omnia.list -index 8ae58d1..fccb6fd 100644 ---- a/kmod-omnia.list -+++ b/kmod-omnia.list -@@ -8,3 +8,6 @@ eeprom-at24 - ledtrig-gpio - ledtrig-oneshot - ledtrig-transient -+ -+# Hack -+dsa-mv88e6xxx --- -2.34.1 - -- GitLab