From 2496f436a837f4d56a13883497ab5d07fb01d0f7 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Tue, 13 Feb 2024 01:03:44 +0100 Subject: [PATCH 01/41] build: use zstd for IB, toolchain, SDK and LLVM compression Use similar efficient but faster compression algorithm. Signed-off-by: Paul Spooren --- target/imagebuilder/Makefile | 9 +++++---- target/llvm-bpf/Makefile | 4 ++-- target/sdk/Makefile | 9 +++++---- target/toolchain/Makefile | 8 ++++---- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile index c768c992ea..bfc72dacd0 100644 --- a/target/imagebuilder/Makefile +++ b/target/imagebuilder/Makefile @@ -24,7 +24,7 @@ BUNDLER_COMMAND := PATH=$(BUNDLER_PATH) $(XARGS) $(SCRIPT_DIR)/bundle-libraries. all: compile -$(BIN_DIR)/$(IB_NAME).tar.xz: clean +$(BIN_DIR)/$(IB_NAME).tar.zst: clean rm -rf $(PKG_BUILD_DIR) mkdir -p $(IB_KDIR) $(IB_LDIR) $(PKG_BUILD_DIR)/staging_dir/host/lib \ $(PKG_BUILD_DIR)/target/linux $(PKG_BUILD_DIR)/scripts $(IB_DTSDIR) @@ -118,15 +118,16 @@ endif $(BUNDLER_COMMAND)) $(CP) $(TOPDIR)/staging_dir/host/lib/libfakeroot* $(PKG_BUILD_DIR)/staging_dir/host/lib STRIP=$(STAGING_DIR_HOST)/bin/sstrip $(SCRIPT_DIR)/rstrip.sh $(PKG_BUILD_DIR)/staging_dir/host/bin/ + (cd $(BUILD_DIR); \ - tar -I '$(STAGING_DIR_HOST)/bin/xz -7e -T$(if $(filter 1,$(NPROC)),2,0)' -cf $@ $(IB_NAME) \ + tar -I '$(STAGING_DIR_HOST)/bin/zstd -T0 --ultra -20' -cf $@ $(IB_NAME) \ --mtime="$(shell date --date=@$(SOURCE_DATE_EPOCH))"; \ ) download: prepare: -compile: $(BIN_DIR)/$(IB_NAME).tar.xz +compile: $(BIN_DIR)/$(IB_NAME).tar.zst install: compile clean: FORCE - rm -rf $(PKG_BUILD_DIR) $(BIN_DIR)/$(IB_NAME).tar.xz + rm -rf $(PKG_BUILD_DIR) $(BIN_DIR)/$(IB_NAME).tar.zst diff --git a/target/llvm-bpf/Makefile b/target/llvm-bpf/Makefile index 6cadf693ef..a61bda923a 100644 --- a/target/llvm-bpf/Makefile +++ b/target/llvm-bpf/Makefile @@ -12,11 +12,11 @@ override MAKEFLAGS= LLVM_VERSION := $(shell cat $(STAGING_DIR_HOST)/llvm-bpf/.llvm-version) LLVM_BPF_PREFIX := llvm-bpf-$(LLVM_VERSION).$(HOST_OS)-$(HOST_ARCH) -LLVM_TAR := $(BIN_DIR)/$(LLVM_BPF_PREFIX).tar.xz +LLVM_TAR := $(BIN_DIR)/$(LLVM_BPF_PREFIX).tar.zst $(LLVM_TAR): $(STAGING_DIR_HOST)/llvm-bpf/.llvm-version tar -C $(STAGING_DIR_HOST) \ - -I '$(STAGING_DIR_HOST)/bin/xz -7e -T$(if $(filter 1,$(NPROC)),2,0)' \ + -I '$(STAGING_DIR_HOST)/bin/zstd -T0 --ultra -20' \ $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \ -cf $@.tmp llvm-bpf $(LLVM_BPF_PREFIX) mv $@.tmp $@ diff --git a/target/sdk/Makefile b/target/sdk/Makefile index d0c0ab7a2b..f4b7640d2c 100644 --- a/target/sdk/Makefile +++ b/target/sdk/Makefile @@ -101,7 +101,7 @@ USERSPACE_FILES := $(patsubst $(TOPDIR)/%,%,$(wildcard $(addprefix $(LINUX_DIR)/ all: compile -$(BIN_DIR)/$(SDK_NAME).tar.xz: clean +$(BIN_DIR)/$(SDK_NAME).tar.zst: clean mkdir -p \ $(SDK_BUILD_DIR)/dl \ $(SDK_BUILD_DIR)/package \ @@ -181,15 +181,16 @@ $(BIN_DIR)/$(SDK_NAME).tar.xz: clean find $(SDK_BUILD_DIR) -name .svn | $(XARGS) rm -rf find $(SDK_BUILD_DIR) -name CVS | $(XARGS) rm -rf -make -C $(SDK_BUILD_DIR)/scripts/config clean + (cd $(BUILD_DIR); \ - tar -I '$(STAGING_DIR_HOST)/bin/xz -7e -T$(if $(filter 1,$(NPROC)),2,0)' -cf $@ $(SDK_NAME) \ + tar -I '$(STAGING_DIR_HOST)/bin/zstd -T0 --ultra -20' -cf $@ $(SDK_NAME) \ --mtime="$(shell date --date=@$(SOURCE_DATE_EPOCH))"; \ ) download: prepare: -compile: $(BIN_DIR)/$(SDK_NAME).tar.xz +compile: $(BIN_DIR)/$(SDK_NAME).tar.zst install: compile clean: - rm -rf $(SDK_BUILD_DIR) $(BIN_DIR)/$(SDK_NAME).tar.xz + rm -rf $(SDK_BUILD_DIR) $(BIN_DIR)/$(SDK_NAME).tar.zst diff --git a/target/toolchain/Makefile b/target/toolchain/Makefile index c33bccee69..9c0fdc4c7e 100644 --- a/target/toolchain/Makefile +++ b/target/toolchain/Makefile @@ -26,7 +26,7 @@ all: compile TOOLCHAIN_PREFIX:=$(TOOLCHAIN_BUILD_DIR)/toolchain-$(ARCH)$(ARCH_SUFFIX)_gcc-$(GCCV)$(DIR_SUFFIX) -$(BIN_DIR)/$(TOOLCHAIN_NAME).tar.xz: clean +$(BIN_DIR)/$(TOOLCHAIN_NAME).tar.zst: clean mkdir -p $(TOOLCHAIN_BUILD_DIR) $(TAR) -cf - -C $(TOPDIR)/staging_dir/ \ $(foreach exclude,$(EXCLUDE_DIRS),--exclude="$(exclude)") \ @@ -62,14 +62,14 @@ $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.xz: clean find $(TOOLCHAIN_BUILD_DIR) -name CVS | $(XARGS) rm -rf mkdir -p $(BIN_DIR) (cd $(BUILD_DIR); \ - tar -I '$(STAGING_DIR_HOST)/bin/xz -7e -T$(if $(filter 1,$(NPROC)),2,0)' -cf $@ $(TOOLCHAIN_NAME) \ + tar -I '$(STAGING_DIR_HOST)/bin/zstd -T0 --ultra -20' -cf $@ $(TOOLCHAIN_NAME) \ --mtime="$(shell date --date=@$(SOURCE_DATE_EPOCH))"; \ ) download: prepare: -compile: $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.xz +compile: $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.zst install: compile clean: - rm -rf $(TOOLCHAIN_BUILD_DIR) $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.xz + rm -rf $(TOOLCHAIN_BUILD_DIR) $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.zst From 5b07c37dfa4625ad0256bf7a4f8386abe72a694b Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Wed, 3 Apr 2024 15:31:29 -0700 Subject: [PATCH 02/41] libbpf: Update to v1.4.0 Update to the latest upstream release to include recent improvements and bugfixes, and update copyright. Remove MAKE_VARS usage in Makefile and drop 001-cflags.patch which are no longer needed. Also add flags to disable LTO, mistakenly dropped earlier. Link: https://github.com/libbpf/libbpf/releases/tag/v1.4.0 Signed-off-by: Tony Ambardar --- package/libs/libbpf/Makefile | 14 +++++--------- package/libs/libbpf/patches/001-cflags.patch | 10 ---------- 2 files changed, 5 insertions(+), 19 deletions(-) delete mode 100644 package/libs/libbpf/patches/001-cflags.patch diff --git a/package/libs/libbpf/Makefile b/package/libs/libbpf/Makefile index 913c025e54..666786e9f6 100644 --- a/package/libs/libbpf/Makefile +++ b/package/libs/libbpf/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2020-2023 Tony Ambardar +# Copyright (C) 2020-2024 Tony Ambardar # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,19 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libbpf -PKG_VERSION:=1.3.0 +PKG_VERSION:=1.4.0 PKG_RELEASE:=1 PKG_SOURCE_URL:=https://github.com/libbpf/libbpf -PKG_MIRROR_HASH:=669d8db696f86f640f86edc358bffa2af8dda656b8e787b095de3578bd8d94ff +PKG_MIRROR_HASH:=4c37636699c604de345937bdbdf8f2e6ce69cbf768a4aa669c32b542e5302de6 PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=v1.3.0 +PKG_SOURCE_VERSION:=v1.4.0 PKG_ABI_VERSION:=$(firstword $(subst .,$(space),$(PKG_VERSION))) PKG_MAINTAINER:=Tony Ambardar PKG_CPE_ID:=cpe:/a:libbpf_project:libbpf -PKG_BUILD_FLAGS:=no-mips16 +PKG_BUILD_FLAGS:=no-mips16 no-gc-sections no-lto PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -41,10 +41,6 @@ define Package/libbpf/description libbpf is a library for loading eBPF programs and reading and manipulating eBPF objects from user-space. endef -MAKE_VARS = \ - EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" - MAKE_FLAGS += \ $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \ LIBSUBDIR=lib diff --git a/package/libs/libbpf/patches/001-cflags.patch b/package/libs/libbpf/patches/001-cflags.patch deleted file mode 100644 index 4c0e93a75b..0000000000 --- a/package/libs/libbpf/patches/001-cflags.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/Makefile -+++ b/src/Makefile -@@ -34,6 +34,7 @@ ALL_CFLAGS := $(INCLUDES) - - SHARED_CFLAGS += -fPIC -fvisibility=hidden -DSHARED - -+CFLAGS = $(EXTRA_CFLAGS) - CFLAGS ?= -g -O2 -Werror -Wall -std=gnu89 - ALL_CFLAGS += $(CFLAGS) \ - -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \ From 4d8a9a954a609bc38047819a83e15b52bb004597 Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Wed, 3 Apr 2024 15:31:22 -0700 Subject: [PATCH 03/41] bpftool: Update to v7.4.0 Update to the latest upstream release to include recent improvements and bugfixes. Update copyright, fix typo in PKG_NAME, and remove unneeded use of MAKE_VARS definition in Makefile. Drop 001-cflags.patch and simplify 002-includes.patch after refreshing. Also simplify LTO/DCE build flags. Link: https://github.com/libbpf/bpftool/releases/tag/v7.4.0 Signed-off-by: Tony Ambardar --- package/network/utils/bpftool/Makefile | 19 ++++++------------- .../utils/bpftool/patches/001-cflags.patch | 10 ---------- .../utils/bpftool/patches/002-includes.patch | 11 ----------- 3 files changed, 6 insertions(+), 34 deletions(-) delete mode 100644 package/network/utils/bpftool/patches/001-cflags.patch diff --git a/package/network/utils/bpftool/Makefile b/package/network/utils/bpftool/Makefile index d81cf95102..45f8904d8d 100644 --- a/package/network/utils/bpftool/Makefile +++ b/package/network/utils/bpftool/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2020-2023 Tony Ambardar +# Copyright (C) 2020-2024 Tony Ambardar # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,18 +7,18 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=bpftools -PKG_VERSION:=7.3.0 +PKG_NAME:=bpftool +PKG_VERSION:=7.4.0 PKG_RELEASE:=1 PKG_SOURCE_URL:=https://github.com/libbpf/bpftool -PKG_MIRROR_HASH:=42030a007714aa075fbd402ccb0196e4892344fb7215b4f51a99b633cc5104fa +PKG_MIRROR_HASH:=18e22f72e67ff402b5ecaf314445f25c40bfe23299cb783b5834a496297c51ed PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=v7.3.0 +PKG_SOURCE_VERSION:=v7.4.0 PKG_MAINTAINER:=Tony Ambardar -PKG_BUILD_FLAGS:=no-mips16 +PKG_BUILD_FLAGS:=no-mips16 gc-sections lto PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -62,19 +62,12 @@ define Package/bpftool-full/description eBPF programs and jited code. endef -TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto -TARGET_LDFLAGS += -Wl,--gc-sections -flto - ifeq ($(BUILD_VARIANT),full) full:=1 else full:=0 endif -MAKE_VARS = \ - EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" - MAKE_FLAGS += \ OUTPUT="$(PKG_BUILD_DIR)/" \ prefix="/usr" \ diff --git a/package/network/utils/bpftool/patches/001-cflags.patch b/package/network/utils/bpftool/patches/001-cflags.patch deleted file mode 100644 index 39cef10c72..0000000000 --- a/package/network/utils/bpftool/patches/001-cflags.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/libbpf/src/Makefile -+++ b/libbpf/src/Makefile -@@ -34,6 +34,7 @@ ALL_CFLAGS := $(INCLUDES) - - SHARED_CFLAGS += -fPIC -fvisibility=hidden -DSHARED - -+CFLAGS = $(EXTRA_CFLAGS) - CFLAGS ?= -g -O2 -Werror -Wall -std=gnu89 - ALL_CFLAGS += $(CFLAGS) \ - -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \ diff --git a/package/network/utils/bpftool/patches/002-includes.patch b/package/network/utils/bpftool/patches/002-includes.patch index ac1b5fcc22..e6ec3f262b 100644 --- a/package/network/utils/bpftool/patches/002-includes.patch +++ b/package/network/utils/bpftool/patches/002-includes.patch @@ -1,14 +1,3 @@ ---- a/libbpf/include/linux/list.h -+++ b/libbpf/include/linux/list.h -@@ -3,6 +3,8 @@ - #ifndef __LINUX_LIST_H - #define __LINUX_LIST_H - -+#include -+ - #define LIST_HEAD_INIT(name) { &(name), &(name) } - #define LIST_HEAD(name) \ - struct list_head name = LIST_HEAD_INIT(name) --- a/src/Makefile +++ b/src/Makefile @@ -73,10 +73,10 @@ CFLAGS += -W -Wall -Wextra -Wno-unused-p From 166ed4f50a75aa51c249bea9ba1884203eeb1c87 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sat, 13 Apr 2024 11:25:52 +0200 Subject: [PATCH 04/41] CI: labeler: add d1 target Add support for 'd1' target and its specific packages in labeler. Signed-off-by: Robert Marko --- .github/labeler.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/labeler.yml b/.github/labeler.yml index 1813b7f849..5cbf2ac987 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -30,6 +30,10 @@ - "package/boot/arm-trusted-firmware-bcm63xx/**" "target/bmips": - "target/linux/bmips/**" +"target/d1": + - "target/linux/d1/**" + - "package/boot/uboot-d1/**" + - "package/boot/opensbi/**" "target/gemini": - "target/linux/gemini/**" "target/imx": From 291efaf765dd533b28b7f9444cdaeaa2198458ef Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Sat, 13 Apr 2024 13:15:59 +0300 Subject: [PATCH 05/41] realtek: fix filter_port_list_reverse calls The function introduced in commit 7cbfe5654d6e is named filter_port_list_reverse, not filter_port_list_reversed. Fixes the following error on hpe,1920-8g-poe-65w and hpe,1920-8g-poe-180w. /bin/board_detect: /etc/board.d/02_network: line 84: filter_port_list_reversed: not found Fixes: 7cbfe5654d6e ("realtek: move port filtering out of uci_set_poe()") Signed-off-by: Stijn Tintel Acked-by: Sander Vanheule --- target/linux/realtek/base-files/etc/board.d/02_network | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network index fe3027879c..35c79cffa2 100644 --- a/target/linux/realtek/base-files/etc/board.d/02_network +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -84,10 +84,10 @@ engenius,ews2910p) ucidef_set_poe 60 "$(filter_port_list "$lan_list" "lan9 lan10")" ;; hpe,1920-8g-poe-65w) - ucidef_set_poe 65 "$(filter_port_list_reversed "$lan_list" "lan9 lan10")" + ucidef_set_poe 65 "$(filter_port_list_reverse "$lan_list" "lan9 lan10")" ;; hpe,1920-8g-poe-180w) - ucidef_set_poe 180 "$(filter_port_list_reversed "$lan_list" "lan9 lan10")" + ucidef_set_poe 180 "$(filter_port_list_reverse "$lan_list" "lan9 lan10")" ;; netgear,gs110tpp-v1) ucidef_set_poe 130 "$(filter_port_list "$lan_list" "lan9 lan10")" From 0db68a789f08a173fe82b3b99364a8924953f3a1 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Sat, 13 Apr 2024 13:04:58 +0800 Subject: [PATCH 06/41] uboot-d1: define default BUILD_SUBTARGET As commit 3ce1e4c3d3da ("d1: define subtarget specifically") added the 'generic' subtarget, without 'BUILD_SUBTARGET' the correspond U-Boot package will be no longer selected automatically. Fixes: 3ce1e4c3d3da ("d1: define subtarget specifically") Signed-off-by: Tianling Shen --- package/boot/uboot-d1/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/boot/uboot-d1/Makefile b/package/boot/uboot-d1/Makefile index 610dc5b498..083a219baf 100644 --- a/package/boot/uboot-d1/Makefile +++ b/package/boot/uboot-d1/Makefile @@ -19,6 +19,7 @@ include $(INCLUDE_DIR)/package.mk define U-Boot/Default BUILD_TARGET:=d1 + BUILD_SUBTARGET:=generic UBOOT_IMAGE:=u-boot-sunxi-with-spl.bin UENV:=default DTS_DIR:=arch/riscv/dts From 1ee5b7e506f937e16737472eed02bc5409716304 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 10 Apr 2024 13:46:40 +0200 Subject: [PATCH 07/41] hostapd: fix a crash corner case On some setup failures, iface->bss can be NULL Signed-off-by: Felix Fietkau --- package/network/services/hostapd/src/src/ap/ucode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c index 16d1b51536..d344190208 100644 --- a/package/network/services/hostapd/src/src/ap/ucode.c +++ b/package/network/services/hostapd/src/src/ap/ucode.c @@ -51,7 +51,7 @@ hostapd_ucode_update_bss_list(struct hostapd_iface *iface, uc_value_t *if_bss, u int i; list = ucv_array_new(vm); - for (i = 0; i < iface->num_bss; i++) { + for (i = 0; iface->bss && i < iface->num_bss; i++) { struct hostapd_data *hapd = iface->bss[i]; uc_value_t *val = hostapd_ucode_bss_get_uval(hapd); From ab9a29a3209ea9d1843496bdaf0ea912be0dda99 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 13 Apr 2024 16:05:07 +0200 Subject: [PATCH 08/41] mac80211: improve mesh fast tx patch Change hash key struct size for faster lookup. Fix clearing cache entries for forwarding Signed-off-by: Felix Fietkau --- ...it-mesh-fast-tx-cache-into-local-proxied.patch | 15 ++++++++++----- ...1-fix-race-condition-on-enabling-fast-xm.patch | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package/kernel/mac80211/patches/subsys/310-mac80211-split-mesh-fast-tx-cache-into-local-proxied.patch b/package/kernel/mac80211/patches/subsys/310-mac80211-split-mesh-fast-tx-cache-into-local-proxied.patch index 4853cef723..e142cfa4fe 100644 --- a/package/kernel/mac80211/patches/subsys/310-mac80211-split-mesh-fast-tx-cache-into-local-proxied.patch +++ b/package/kernel/mac80211/patches/subsys/310-mac80211-split-mesh-fast-tx-cache-into-local-proxied.patch @@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h -@@ -134,9 +134,33 @@ struct mesh_path { +@@ -134,9 +134,38 @@ struct mesh_path { #define MESH_FAST_TX_CACHE_TIMEOUT 8000 /* msecs */ /** @@ -47,13 +47,18 @@ Signed-off-by: Felix Fietkau + * @MESH_FAST_TX_TYPE_LOCAL: tx from the local vif address as SA + * @MESH_FAST_TX_TYPE_PROXIED: local tx with a different SA (e.g. bridged) + * @MESH_FAST_TX_TYPE_FORWARDED: forwarded from a different mesh point ++ * @NUM_MESH_FAST_TX_TYPE: number of entry types + */ +enum ieee80211_mesh_fast_tx_type { + MESH_FAST_TX_TYPE_LOCAL, + MESH_FAST_TX_TYPE_PROXIED, + MESH_FAST_TX_TYPE_FORWARDED, ++ ++ /* must be last */ ++ NUM_MESH_FAST_TX_TYPE +}; + ++ +/** + * struct ieee80211_mesh_fast_tx_key - cached mesh fast tx entry key + * @@ -62,7 +67,7 @@ Signed-off-by: Felix Fietkau + */ +struct ieee80211_mesh_fast_tx_key { + u8 addr[ETH_ALEN] __aligned(2); -+ enum ieee80211_mesh_fast_tx_type type; ++ u16 type; +}; + +/** @@ -73,7 +78,7 @@ Signed-off-by: Felix Fietkau * @fast_tx: base fast_tx data * @hdr: cached mesh and rfc1042 headers * @hdrlen: length of mesh + rfc1042 -@@ -147,7 +171,7 @@ struct mesh_path { +@@ -147,7 +176,7 @@ struct mesh_path { */ struct ieee80211_mesh_fast_tx { struct rhash_head rhash; @@ -82,7 +87,7 @@ Signed-off-by: Felix Fietkau struct ieee80211_fast_tx fast_tx; u8 hdr[sizeof(struct ieee80211s_hdr) + sizeof(rfc1042_header)]; -@@ -333,7 +357,8 @@ void mesh_path_tx_root_frame(struct ieee +@@ -333,7 +362,8 @@ void mesh_path_tx_root_frame(struct ieee bool mesh_action_is_path_sel(struct ieee80211_mgmt *mgmt); struct ieee80211_mesh_fast_tx * @@ -178,7 +183,7 @@ Signed-off-by: Felix Fietkau - entry = rhashtable_lookup_fast(&cache->rht, addr, fast_tx_rht_params); - if (entry) - mesh_fast_tx_entry_free(cache, entry); -+ for (i = MESH_FAST_TX_TYPE_LOCAL; i < MESH_FAST_TX_TYPE_FORWARDED; i++) { ++ for (i = 0; i < NUM_MESH_FAST_TX_TYPE; i++) { + key.type = i; + entry = rhashtable_lookup_fast(&cache->rht, &key, fast_tx_rht_params); + if (entry) diff --git a/package/kernel/mac80211/patches/subsys/314-wifi-mac80211-fix-race-condition-on-enabling-fast-xm.patch b/package/kernel/mac80211/patches/subsys/314-wifi-mac80211-fix-race-condition-on-enabling-fast-xm.patch index 12ed2142ab..e7a7010c7f 100644 --- a/package/kernel/mac80211/patches/subsys/314-wifi-mac80211-fix-race-condition-on-enabling-fast-xm.patch +++ b/package/kernel/mac80211/patches/subsys/314-wifi-mac80211-fix-race-condition-on-enabling-fast-xm.patch @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c -@@ -914,6 +914,7 @@ static int sta_info_insert_finish(struct +@@ -918,6 +918,7 @@ static int sta_info_insert_finish(struct if (ieee80211_vif_is_mesh(&sdata->vif)) mesh_accept_plinks_update(sdata); From c97be14c8c12de613c5a930ece7ddf2cd6b579bf Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Fri, 12 Apr 2024 13:44:39 +0200 Subject: [PATCH 09/41] ramips: mt7620a_tplink_archer.dtsi - remove unnecessary nvmem-cells definitions Remove unnecessary nvmem-cells definitions that are being redefined anyway. Signed-off-by: Mieczyslaw Nalewaj --- target/linux/ramips/dts/mt7620a_tplink_archer.dtsi | 7 ------- 1 file changed, 7 deletions(-) diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi index 4ba19be495..4bcefd2346 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi +++ b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi @@ -132,11 +132,6 @@ status = "okay"; }; -&wmac { - nvmem-cells = <&eeprom_radio_0>; - nvmem-cell-names = "eeprom"; -}; - &pcie { status = "okay"; }; @@ -144,8 +139,6 @@ &pcie0 { wifi: mt76@0,0 { reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_radio_8000>; - nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; From 6258492e1b388aed4b0500d14954d5c2f3a5e21e Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Fri, 12 Apr 2024 13:57:26 +0200 Subject: [PATCH 10/41] ramips: TP-Link Archer C2 v1: simplification of the dts definition Import from the mt7620a_tplink_archer.dtsi file and thus simplify the rest of the definition. Signed-off-by: Mieczyslaw Nalewaj --- .../dts/mt7620a_tplink_archer-c2-v1.dts | 143 ++---------------- 1 file changed, 10 insertions(+), 133 deletions(-) diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts index 33642114cb..ea3533e446 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts @@ -1,9 +1,9 @@ -#include "mt7620a.dtsi" +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include -#include #include +#include "mt7620a_tplink_archer.dtsi" + / { compatible = "tplink,archer-c2-v1", "ralink,mt7620a-soc"; model = "TP-Link Archer C2 v1"; @@ -15,9 +15,6 @@ led-upgrade = &led_wps; }; - chosen { - bootargs = "console=ttyS0,115200"; - }; leds { compatible = "gpio-leds"; @@ -56,22 +53,6 @@ }; }; - keys { - compatible = "gpio-keys"; - - reset_wps { - label = "reset_wps"; - gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - - rfkill { - label = "rfkill"; - gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; - rtl8367rb { compatible = "realtek,rtl8367b"; cpu_port = <6>; @@ -80,81 +61,10 @@ }; }; -&spi0 { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <30000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x20000>; - read-only; - }; - - partition@20000 { - compatible = "tplink,firmware"; - label = "firmware"; - reg = <0x20000 0x7a0000>; - }; - - partition@7c0000 { - label = "config"; - reg = <0x7c0000 0x10000>; - read-only; - }; - - partition@7d0000 { - label = "rom"; - reg = <0x7d0000 0x10000>; - read-only; - - nvmem-layout { - compatible = "fixed-layout"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_rom_f100: macaddr@f100 { - compatible = "mac-base"; - reg = <0xf100 0x6>; - #nvmem-cell-cells = <1>; - }; - }; - }; - - partition@7e0000 { - label = "romfile"; - reg = <0x7e0000 0x10000>; - read-only; - }; - - partition@7f0000 { - label = "radio"; - reg = <0x7f0000 0x10000>; - read-only; - - nvmem-layout { - compatible = "fixed-layout"; - #address-cells = <1>; - #size-cells = <1>; - - eeprom_radio_0: eeprom@0 { - reg = <0x0 0x200>; - }; - - eeprom_radio_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; - }; - }; - }; +&state_default { + gpio { + groups = "i2c", "uartf", "wled", "ephy", "spi refclk"; + function = "gpio"; }; }; @@ -176,46 +86,13 @@ }; }; -&gpio1 { - status = "okay"; -}; - -&gpio2 { - status = "okay"; -}; - -&gpio3 { - status = "okay"; -}; - -&state_default { - gpio { - groups = "i2c", "uartf", "wled", "ephy", "spi refclk"; - function = "gpio"; - }; -}; &wmac { nvmem-cells = <&eeprom_radio_0>, <&macaddr_rom_f100 0>; nvmem-cell-names = "eeprom", "mac-address"; }; -&ehci { - status = "okay"; -}; - -&ohci { - status = "okay"; -}; - -&pcie { - status = "okay"; -}; - -&pcie0 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100 (-1)>; - nvmem-cell-names = "eeprom", "mac-address"; - }; +&wifi { + nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100 (-1)>; + nvmem-cell-names = "eeprom", "mac-address"; }; From ada3c41acd22357689e700f1475ab376b6628d00 Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Fri, 12 Apr 2024 16:14:18 +0200 Subject: [PATCH 11/41] ramips: mt7620a_tplink_archer.dtsi rename to mt7620a_tplink_8m.dtsi Change the name mt7620a_tplink_archer.dtsi to mt7620a_tplink_8m.dtsi because it will also be a base for TP-Link non-Archer routers. Signed-off-by: Mieczyslaw Nalewaj --- .../dts/{mt7620a_tplink_archer.dtsi => mt7620a_tplink_8m.dtsi} | 0 target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts | 2 +- target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts | 2 +- target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts | 2 +- target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts | 2 +- target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) rename target/linux/ramips/dts/{mt7620a_tplink_archer.dtsi => mt7620a_tplink_8m.dtsi} (100%) diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi b/target/linux/ramips/dts/mt7620a_tplink_8m.dtsi similarity index 100% rename from target/linux/ramips/dts/mt7620a_tplink_archer.dtsi rename to target/linux/ramips/dts/mt7620a_tplink_8m.dtsi diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts index ea3533e446..10756e3b3c 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts @@ -2,7 +2,7 @@ #include -#include "mt7620a_tplink_archer.dtsi" +#include "mt7620a_tplink_8m.dtsi" / { compatible = "tplink,archer-c2-v1", "ralink,mt7620a-soc"; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts index 726a86ae17..285e27c357 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts @@ -1,6 +1,6 @@ #include -#include "mt7620a_tplink_archer.dtsi" +#include "mt7620a_tplink_8m.dtsi" / { compatible = "tplink,archer-c20-v1", "ralink,mt7620a-soc"; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts index a977156e5f..12141a6e59 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts @@ -1,6 +1,6 @@ #include -#include "mt7620a_tplink_archer.dtsi" +#include "mt7620a_tplink_8m.dtsi" / { compatible = "tplink,archer-c20i", "ralink,mt7620a-soc"; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts index fcebf87c3f..1ed156e8af 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts @@ -2,7 +2,7 @@ #include -#include "mt7620a_tplink_archer.dtsi" +#include "mt7620a_tplink_8m.dtsi" / { compatible = "tplink,archer-c5-v4", "ralink,mt7620a-soc"; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts index cfb31b47fe..97b803470d 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts @@ -1,6 +1,6 @@ #include -#include "mt7620a_tplink_archer.dtsi" +#include "mt7620a_tplink_8m.dtsi" / { compatible = "tplink,archer-c50-v1", "ralink,mt7620a-soc"; From c08f8a4a4913d80ed3fb261dadc711e94b8428dd Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Fri, 12 Apr 2024 16:44:23 +0200 Subject: [PATCH 12/41] ramips: add support for TP-Link EC220-G5 v2 TP-Link EC220-G5 v2 is a dual band router with 4 GbE ports Advertised as AC1200 for its 867Mbps (2x2) 5GHz band and 300 Mbps (2x2) 2.4GHz band. Specs: - SoC: MediaTek MT7620A - Ethernet: 4x GbE ports (Realtek RTL8367S) - Wireless 2.4GHz: MediaTek MT7620A - Wireless 5GHz: MediaTek MT7612E - RAM: 64MiB - ROM: 8MiB (W25Q64BV) - 2 Buttons (WPS and reset) - 7 LEDs Flash instructions via serial console: 1. Rename the factory.bin to to test.bin 2. start a TFTP server from IP address 192.168.0.225 and serve the image named test.bin 3. connect your device to the LAN port 4. power up the router and press 4 on the console to stop the boot process. 5. enter the following commands on the router console tftp 0x80060000 test.bin erase tplink 0x20000 0x7a0000 cp.b 0x80060000 0x20000 0x7a0000 reset Flash instructions via TFTP: 1. Update orginal firmware of the router to the latest one. 2. Rename openwrt-ramips-mt7620-tplink_ec220-g5-v2-squashfs-tftp-recovery.bin to tp_recovery.bin 3. Change computer IP to 192.168.0.66 4. Run TFTP serwer 5. Start the router with the reset button pressed, the file will be automatically downloaded and after a while the router will restart. 6. After updating, set your computer's IP to DHCP Signed-off-by: Mieczyslaw Nalewaj --- .../ramips/dts/mt7620a_tplink_ec220-g5-v2.dts | 144 ++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 16 ++ .../mt7620/base-files/etc/board.d/01_leds | 4 + .../mt7620/base-files/etc/board.d/02_network | 9 +- 4 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/dts/mt7620a_tplink_ec220-g5-v2.dts diff --git a/target/linux/ramips/dts/mt7620a_tplink_ec220-g5-v2.dts b/target/linux/ramips/dts/mt7620a_tplink_ec220-g5-v2.dts new file mode 100644 index 0000000000..6ac1a9c5d5 --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_tplink_ec220-g5-v2.dts @@ -0,0 +1,144 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include + +#include "mt7620a_tplink_8m.dtsi" + +/ { + compatible = "tplink,ec220-g5-v2", "ralink,mt7620a-soc"; + model = "TP-Link EC220-G5 v2"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + label-mac-device = ðernet; + }; + + leds { + compatible = "gpio-leds"; + + led_power: led-0 { + function = LED_FUNCTION_POWER; + color = ; + gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; + }; + + led-1 { + function = LED_FUNCTION_WAN; + color = ; + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + }; + + led-2 { + function = LED_FUNCTION_WAN; + color = ; + gpios = <&gpio2 13 GPIO_ACTIVE_LOW>; + }; + + led-3 { + function = LED_FUNCTION_LAN; + color = ; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + }; + + led-4 { + function = LED_FUNCTION_WLAN_2GHZ; + color = ; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + led-5 { + function = LED_FUNCTION_WLAN_5GHZ; + color = ; + gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + led-6 { + function = LED_FUNCTION_WPS; + color = ; + gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + rfkill { + label = "rfkill"; + gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + rtl8367s { + compatible = "realtek,rtl8367b"; + cpu_port = <7>; + realtek,extif2 = <1 0 1 1 1 1 1 1 2>; + mii-bus = <&mdio0>; + phy-id = <29>; + }; +}; + +&spi0 { + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + }; +}; + +&state_default { + gpio { + groups = "i2c", "uartf", "ephy", "rgmii2"; + function = "gpio"; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &mdio_pins>; + + port@5 { + status = "okay"; + mediatek,fixed-link = <1000 1 1 1>; + phy-mode = "rgmii"; + }; + + mdio0: mdio-bus { + status = "okay"; + reset-gpios = <&gpio2 20 GPIO_ACTIVE_LOW>; + reset-delay-us = <10000>; + }; +}; + +&ehci { + status = "disabled"; +}; + +&ohci { + status = "disabled"; +}; + +&wmac { + pinctrl-names = "default", "pa_gpio"; + pinctrl-0 = <&pa_pins>; + pinctrl-1 = <&pa_gpio_pins>; + + nvmem-cells = <&eeprom_radio_0>, <&macaddr_rom_f100 0>; + nvmem-cell-names = "eeprom", "mac-address"; +}; + + +&wifi { + nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100 2>; + nvmem-cell-names = "eeprom", "mac-address"; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index b35359aefe..f7238c2b1f 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -1273,6 +1273,22 @@ define Device/tplink_archer-mr200 endef TARGET_DEVICES += tplink_archer-mr200 +define Device/tplink_ec220-g5-v2 + $(Device/tplink-v2) + SOC := mt7620a + IMAGE_SIZE := 7808k + TPLINK_FLASHLAYOUT := 8Mmtk + TPLINK_HWID := 0x02015a15 + TPLINK_HWREV := 0x55000600 + TPLINK_HWREVADD := 0x03000000 + IMAGES += tftp-recovery.bin + IMAGE/tftp-recovery.bin := pad-extra 128k | $$(IMAGE/factory.bin) + DEVICE_MODEL := EC220-G5 + DEVICE_VARIANT := v2 + DEVICE_PACKAGES := kmod-mt76x2 kmod-switch-rtl8367b +endef +TARGET_DEVICES += tplink_ec220-g5-v2 + define Device/tplink_re200-v1 $(Device/tplink-v1) SOC := mt7620a diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds index a56ae8f0bf..261e54f5e1 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds @@ -242,6 +242,10 @@ tplink,archer-mr200) ucidef_set_led_netdev "lan" "lan" "white:lan" "eth0.1" ucidef_set_led_netdev "wan" "wan" "white:wan" "usb0" ;; +tplink,ec220-g5-v2) + ucidef_set_led_switch "lan" "lan" "green:lan" "switch1" "0x17" + ucidef_set_led_switch "wan" "wan" "orange:wan" "switch1" "0x08" + ;; tplink,re200-v1) ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0" ;; diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index 8cc6091e23..63f7e41ac2 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -247,6 +247,12 @@ ramips_setup_interfaces() "0:lan" "1:lan" "2:lan" "3:lan" "6t@eth0" ucidef_set_interface_wan "usb0" ;; + tplink,ec220-g5-v2) + ucidef_add_switch "switch0" + ucidef_add_switch_attr "switch0" "enable" "0" + ucidef_add_switch "switch1" \ + "0:lan:3" "1:lan:2" "2:lan:1" "4:lan:4" "3:wan" "7@eth0" + ;; wavlink,wl-wn535k1) ucidef_add_switch "switch0" \ "2:lan:2" "5:lan:1" "4:wan" "6@eth0" @@ -416,7 +422,8 @@ ramips_setup_macs() tplink,archer-c20i|\ tplink,archer-c5-v4|\ tplink,archer-c50-v1|\ - tplink,archer-mr200) + tplink,archer-mr200|\ + tplink,ec220-g5-v2) wan_mac=$(macaddr_add "$(mtd_get_mac_binary rom 0xf100)" 1) ;; wavlink,wl-wn535k1) From eb13076e77c412cfe4dd6de48138507ea6f3c8b3 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 12 Apr 2024 13:24:38 +0100 Subject: [PATCH 13/41] mediatek: fix DTS defining mt7530 switch phys but not referencing them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The upstream solution to define the MDIO bus in DT is a bit more strict than our previous downstream solution doing the same thing and now requires switch PHYs to be referenced in DT as well. Arınç Ünal told us in #15141: "With [the now upstream patch written by him which we backported], the switch MDIO bus won't be assigned to ds->user_mii_bus when the switch MDIO bus is defined on the device tree anymore. This was not the case with the downstream patch. When ds->user_mii_bus is populated, DSA will 1:1 map the port with PHY. Meaning port with address 1 will be mapped to PHY with address 1. Because that ds->user_mii_bus is not populated when the switch MDIO bus is defined on the device tree, on every port node, the PHY address must be supplied by the phy-handle property." Add those phy-handles to affected devices' DT. Fixes: 4354b34f6f ("generic: 6.6: sync mt7530 DSA driver with upstream") Fixes: 401a6ccfaf ("generic: 6.1: sync mt7530 DSA driver with upstream") Signed-off-by: Daniel Golle --- .../linux/mediatek/dts/mt7986a-acer-predator-w6.dts | 12 ++++++++---- .../linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts | 12 ++++++++---- .../linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts | 12 ++++++++---- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts b/target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts index 6bff786558..612f3c7334 100644 --- a/target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts +++ b/target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts @@ -348,21 +348,25 @@ port@0 { reg = <0>; label = "game"; + phy-handle = <&swphy0>; }; port@1 { reg = <1>; label = "lan1"; + phy-handle = <&swphy1>; }; port@2 { reg = <2>; label = "lan2"; + phy-handle = <&swphy2>; }; port@3 { reg = <3>; label = "lan3"; + phy-handle = <&swphy3>; }; port@6 { @@ -383,7 +387,7 @@ #address-cells = <1>; #size-cells = <0>; - phy@0 { + swphy0: phy@0 { reg = <0>; mediatek,led-config = < @@ -397,7 +401,7 @@ >; }; - phy@1 { + swphy1: phy@1 { reg = <1>; mediatek,led-config = < @@ -411,7 +415,7 @@ >; }; - phy@2 { + swphy2: phy@2 { reg = <2>; mediatek,led-config = < @@ -425,7 +429,7 @@ >; }; - phy@3 { + swphy3: phy@3 { reg = <3>; mediatek,led-config = < diff --git a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts index 22530df9bb..e40602fa21 100644 --- a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts +++ b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts @@ -286,21 +286,25 @@ port@1 { reg = <1>; label = "lan1"; + phy-handle = <&swphy1>; }; port@2 { reg = <2>; label = "lan2"; + phy-handle = <&swphy2>; }; port@3 { reg = <3>; label = "lan3"; + phy-handle = <&swphy3>; }; port@4 { reg = <4>; label = "lan4"; + phy-handle = <&swphy4>; }; port@6 { @@ -321,7 +325,7 @@ #address-cells = <1>; #size-cells = <0>; - phy@1 { + swphy1: phy@1 { reg = <1>; mediatek,led-config = < @@ -335,7 +339,7 @@ >; }; - phy@2 { + swphy2: phy@2 { reg = <2>; mediatek,led-config = < @@ -349,7 +353,7 @@ >; }; - phy@3 { + swphy3: phy@3 { reg = <3>; mediatek,led-config = < @@ -363,7 +367,7 @@ >; }; - phy@4 { + swphy4: phy@4 { reg = <4>; mediatek,led-config = < diff --git a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts index bde2525cd7..1cdfb5f155 100644 --- a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts +++ b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts @@ -298,21 +298,25 @@ port@1 { reg = <4>; label = "lan1"; + phy-handle = <&swphy1>; }; port@2 { reg = <3>; label = "lan2"; + phy-handle = <&swphy2>; }; port@3 { reg = <2>; label = "lan3"; + phy-handle = <&swphy3>; }; port@4 { reg = <1>; label = "lan4"; + phy-handle = <&swphy4>; }; port@5 { @@ -341,7 +345,7 @@ #address-cells = <1>; #size-cells = <0>; - phy@1 { + swphy1: phy@1 { reg = <1>; mediatek,led-config = < @@ -355,7 +359,7 @@ >; }; - phy@2 { + swphy2: phy@2 { reg = <2>; mediatek,led-config = < @@ -369,7 +373,7 @@ >; }; - phy@3 { + swphy3: phy@3 { reg = <3>; mediatek,led-config = < @@ -383,7 +387,7 @@ >; }; - phy@4 { + swphy4: phy@4 { reg = <4>; mediatek,led-config = < From 5fe0d296c1edc7cc69127e02cda22b8b5025e7d9 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Thu, 11 Apr 2024 21:08:44 +0200 Subject: [PATCH 14/41] mac80211: ath11k: support DT property to limit channels Limiting allowed channels per device may be required and is commonly supported on other drivers, so include a pending patch to add support for the same. Signed-off-by: Robert Marko --- ...-add-support-DT-ieee80211-freq-limit.patch | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 package/kernel/mac80211/patches/ath11k/101-wifi-ath11k-add-support-DT-ieee80211-freq-limit.patch diff --git a/package/kernel/mac80211/patches/ath11k/101-wifi-ath11k-add-support-DT-ieee80211-freq-limit.patch b/package/kernel/mac80211/patches/ath11k/101-wifi-ath11k-add-support-DT-ieee80211-freq-limit.patch new file mode 100644 index 0000000000..9571f7f207 --- /dev/null +++ b/package/kernel/mac80211/patches/ath11k/101-wifi-ath11k-add-support-DT-ieee80211-freq-limit.patch @@ -0,0 +1,24 @@ +From 1338da257f299d35b4d954b9fda2cc7e0a54a69d Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Sun, 11 Jun 2023 14:37:32 +0200 +Subject: [PATCH] wifi: ath11k: add support DT ieee80211-freq-limit + +The common DT property can be used to limit the available +channels/frequencies. But ath11k has to manually call +wiphy_read_of_freq_limits(). + +Signed-off-by: Christian Lamparter +--- + drivers/net/wireless/ath/ath11k/mac.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/wireless/ath/ath11k/mac.c ++++ b/drivers/net/wireless/ath/ath11k/mac.c +@@ -9455,6 +9455,7 @@ static int __ath11k_mac_register(struct + if (ret) + goto err; + ++ wiphy_read_of_freq_limits(ar->hw->wiphy); + ath11k_mac_setup_ht_vht_cap(ar, cap, &ht_cap); + ath11k_mac_setup_he_cap(ar, cap); + From fc62d66c20b9e9f52ed787d2079baab06108b959 Mon Sep 17 00:00:00 2001 From: Rodrigo Balerdi Date: Thu, 11 Apr 2024 15:44:10 -0300 Subject: [PATCH 15/41] ipq40xx: whw03v2: fix handling of RGB LED The RGB LED should glow green in the 'running' state, but it was glowing cyan because the blue component defaulted to 'on'. Signed-off-by: Rodrigo Balerdi --- .../files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts | 3 --- .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts | 3 --- 2 files changed, 6 deletions(-) diff --git a/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts index 7b3f1c8bb7..9176ace23d 100644 --- a/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts +++ b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts @@ -277,21 +277,18 @@ led_red: red@0 { color = ; function = LED_FUNCTION_INDICATOR; - linux,default-trigger = "none"; reg = <0>; }; led_green: green@1 { color = ; function = LED_FUNCTION_INDICATOR; - linux,default-trigger = "none"; reg = <1>; }; led_blue: blue@2 { color = ; function = LED_FUNCTION_INDICATOR; - linux,default-trigger = "default-on"; reg = <2>; }; }; diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts index 7b3f1c8bb7..9176ace23d 100644 --- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts +++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts @@ -277,21 +277,18 @@ led_red: red@0 { color = ; function = LED_FUNCTION_INDICATOR; - linux,default-trigger = "none"; reg = <0>; }; led_green: green@1 { color = ; function = LED_FUNCTION_INDICATOR; - linux,default-trigger = "none"; reg = <1>; }; led_blue: blue@2 { color = ; function = LED_FUNCTION_INDICATOR; - linux,default-trigger = "default-on"; reg = <2>; }; }; From c2f52e42b1e9f736edd6e4545ebe3435db6605ee Mon Sep 17 00:00:00 2001 From: Rodrigo Balerdi Date: Sat, 13 Apr 2024 16:36:31 -0300 Subject: [PATCH 16/41] ipq40xx: whw03v2: change LED color for 'running' state to blue Change the RGB indicator LED color for the running state from green to blue. There are various reasons for this change: - In stock firmware, green means internet connection is up, red means it is down, and blue means indeterminate. To track stock behavior as closely as possible, OpenWrt should indicate blue by default. - In the current 23.x OpenWrt releases for this router, the led glows blue all the time -not green- because the bootloader sets it blue and there is an OpenWrt bug that makes it unable to control the LED. The bug is fixed in master, so without this commit there would be an unexpected change of behavior for this device in the next release. - The ports other closely related Linksys devices (such as EA8300 and MR8300) get this right and use blue for the running state. Signed-off-by: Rodrigo Balerdi --- .../files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts | 2 +- .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts index 9176ace23d..96733d8780 100644 --- a/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts +++ b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts @@ -13,7 +13,7 @@ aliases { led-boot = &led_blue; led-failsafe = &led_red; - led-running = &led_green; + led-running = &led_blue; led-upgrade = &led_red; }; diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts index 9176ace23d..96733d8780 100644 --- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts +++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts @@ -13,7 +13,7 @@ aliases { led-boot = &led_blue; led-failsafe = &led_red; - led-running = &led_green; + led-running = &led_blue; led-upgrade = &led_red; }; From a205a5734eda4604a19b6cb0f65909ef69730699 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 12 Apr 2024 21:51:50 +0200 Subject: [PATCH 17/41] netifd: rewrite packet steering script The new script uses a different strategy compared to the previous one. Instead of trying to split flows by hash and spread them to all CPUs, use RPS to redirect packets to a single core only. Try to spread NAPI thread and RPS target CPUs across available CPUs and try to ensure that the NAPI thread is on a different CPU than the RPS target. This significantly reduces cycles wasted on the scheduler. Signed-off-by: Felix Fietkau --- package/network/config/netifd/Makefile | 2 +- .../netifd/files/etc/init.d/packet_steering | 7 +- .../usr/libexec/network/packet-steering.sh | 70 ------ .../usr/libexec/network/packet-steering.uc | 200 ++++++++++++++++++ 4 files changed, 207 insertions(+), 72 deletions(-) delete mode 100755 package/network/config/netifd/files/usr/libexec/network/packet-steering.sh create mode 100755 package/network/config/netifd/files/usr/libexec/network/packet-steering.uc diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index 35b5c0b277..d80c2eeed6 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/cmake.mk define Package/netifd SECTION:=base CATEGORY:=Base system - DEPENDS:=+libuci +libnl-tiny +libubus +ubus +ubusd +jshn +libubox +libudebug + DEPENDS:=+libuci +libnl-tiny +libubus +ubus +ubusd +jshn +libubox +libudebug +ucode +ucode-mod-fs TITLE:=OpenWrt Network Interface Configuration Daemon endef diff --git a/package/network/config/netifd/files/etc/init.d/packet_steering b/package/network/config/netifd/files/etc/init.d/packet_steering index 9d8f791e23..d6f6afc2e1 100755 --- a/package/network/config/netifd/files/etc/init.d/packet_steering +++ b/package/network/config/netifd/files/etc/init.d/packet_steering @@ -14,5 +14,10 @@ service_triggers() { } reload_service() { - /usr/libexec/network/packet-steering.sh + packet_steering="$(uci get "network.@globals[0].packet_steering")" + if [ -e "/usr/libexec/platform/packet-steering.sh" ]; then + /usr/libexec/platform/packet-steering.sh "$packet_steering" + else + /usr/libexec/network/packet-steering.uc "$packet_steering" + fi } diff --git a/package/network/config/netifd/files/usr/libexec/network/packet-steering.sh b/package/network/config/netifd/files/usr/libexec/network/packet-steering.sh deleted file mode 100755 index 799c080805..0000000000 --- a/package/network/config/netifd/files/usr/libexec/network/packet-steering.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh -NPROCS="$(grep -c "^processor.*:" /proc/cpuinfo)" -[ "$NPROCS" -gt 1 ] || exit - -PROC_MASK="$(( (1 << $NPROCS) - 1 ))" - -find_irq_cpu() { - local dev="$1" - local match="$(grep -m 1 "$dev\$" /proc/interrupts)" - local cpu=0 - - [ -n "$match" ] && { - set -- $match - shift - for cur in $(seq 1 $NPROCS); do - [ "$1" -gt 0 ] && { - cpu=$(($cur - 1)) - break - } - shift - done - } - - echo "$cpu" -} - -set_hex_val() { - local file="$1" - local val="$2" - val="$(printf %x "$val")" - [ -n "$DEBUG" ] && echo "$file = $val" - echo "$val" > "$file" -} - -packet_steering="$(uci get "network.@globals[0].packet_steering")" -[ "$packet_steering" != 1 ] && exit 0 - -exec 512>/var/lock/smp_tune.lock -flock 512 || exit 1 - -[ -e "/usr/libexec/platform/packet-steering.sh" ] && { - /usr/libexec/platform/packet-steering.sh - exit 0 -} - -for dev in /sys/class/net/*; do - [ -d "$dev" ] || continue - - # ignore virtual interfaces - [ -n "$(ls "${dev}/" | grep '^lower_')" ] && continue - [ -d "${dev}/device" ] || continue - - device="$(readlink "${dev}/device")" - device="$(basename "$device")" - irq_cpu="$(find_irq_cpu "$device")" - irq_cpu_mask="$((1 << $irq_cpu))" - - for q in ${dev}/queues/tx-*; do - set_hex_val "$q/xps_cpus" "$PROC_MASK" - done - - # ignore dsa slave ports for RPS - subsys="$(readlink "${dev}/device/subsystem")" - subsys="$(basename "$subsys")" - [ "$subsys" = "mdio_bus" ] && continue - - for q in ${dev}/queues/rx-*; do - set_hex_val "$q/rps_cpus" "$PROC_MASK" - done -done diff --git a/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc b/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc new file mode 100755 index 0000000000..f146a96e41 --- /dev/null +++ b/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc @@ -0,0 +1,200 @@ +#!/usr/bin/env ucode +'use strict'; +import { glob, basename, dirname, readlink, readfile, realpath, writefile, error, open } from "fs"; + +let napi_weight = 1.0; +let cpu_thread_weight = 0.75; +let rx_weight = 0.75; +let eth_bias = 2.0; +let debug = 0, do_nothing = 0; +let disable; +let cpus; + +for (let arg in ARGV) { + switch (arg) { + case "-d": + debug++; + break; + case "-n": + do_nothing++; + break; + case '0': + disable = true; + break; + } +} + +function task_name(pid) +{ + let stat = open(`/proc/${pid}/status`, "r"); + let line = stat.read("line"); + stat.close(); + return trim(split(line, "\t", 2)[1]); +} + +function set_task_cpu(pid, cpu) { + if (disable) + cpu = join(",", map(cpus, (cpu) => cpu.id)); + if (debug || do_nothing) + warn(`taskset -p -c ${cpu} ${task_name(pid)}\n`); + if (!do_nothing) + system(`taskset -p -c ${cpu} ${pid}`); +} + +function set_netdev_cpu(dev, cpu) { + let queues = glob(`/sys/class/net/${dev}/queues/rx-*/rps_cpus`); + let val = sprintf("%x", (1 << int(cpu))); + if (disable) + val = 0; + for (let queue in queues) { + if (debug || do_nothing) + warn(`echo ${val} > ${queue}\n`); + if (!do_nothing) + writefile(queue, `${val}`); + } +} + +function task_device_match(name, device) +{ + let napi_match = match(name, /napi\/([^-+])-\d+/); + if (!napi_match) + napi_match = match(name, /mt76-tx (phy\d+)/); + if (napi_match && + (index(device.phy, napi_match[1]) >= 0 || + index(device.netdev, napi_match[1]) >= 0)) + return true; + + if (device.driver == "mtk_soc_eth" && match(name, /napi\/mtk_eth-/)) + return true; + + return false; +} + +cpus = map(glob("/sys/bus/cpu/devices/*"), (path) => { + return { + id: int(match(path, /.*cpu(\d+)/)[1]), + core: int(trim(readfile(`${path}/topology/core_id`))), + load: 0.0, + }; +}); + +cpus = slice(cpus, 0, 64); +if (length(cpus) < 2) + exit(0); + +function cpu_add_weight(cpu_id, weight) +{ + let cpu = cpus[cpu_id]; + cpu.load += weight; + for (let sibling in cpus) { + if (sibling == cpu || sibling.core != cpu.core) + continue; + sibling.load += weight * cpu_thread_weight; + } +} + +function get_next_cpu(weight, prev_cpu) +{ + if (disable) + return 0; + + let sort_cpus = sort(slice(cpus), (a, b) => a.load - b.load); + let idx = 0; + + if (prev_cpu != null && sort_cpus[idx].id == prev_cpu) + idx++; + + let cpu = sort_cpus[idx].id; + cpu_add_weight(cpu, weight); + return cpu; +} + +let phys_devs = {}; +let netdev_phys = {}; +let netdevs = map(glob("/sys/class/net/*"), (dev) => basename(dev)); + +for (let dev in netdevs) { + let pdev_path = realpath(`/sys/class/net/${dev}/device`); + if (!pdev_path) + continue; + + if (length(glob(`/sys/class/net/${dev}/lower_*`)) > 0) + continue; + + let pdev = phys_devs[pdev_path]; + if (!pdev) { + pdev = phys_devs[pdev_path] = { + path: pdev_path, + driver: basename(readlink(`${pdev_path}/driver`)), + netdev: [], + phy: [], + tasks: [], + }; + } + + let phyidx = trim(readfile(`/sys/class/net/${dev}/phy80211/index`)); + if (phyidx != null) { + let phy = `phy${phyidx}`; + if (index(pdev.phy, phy) < 0) + push(pdev.phy, phy); + } + + push(pdev.netdev, dev); + netdev_phys[dev] = pdev; +} + +for (let path in glob("/proc/*/exe")) { + readlink(path); + if (error() != "No such file or directory") + continue; + + let pid = basename(dirname(path)); + let name = task_name(pid); + for (let devname in phys_devs) { + let dev = phys_devs[devname]; + if (!task_device_match(name, dev)) + continue; + + push(dev.tasks, pid); + break; + } +} + +function assign_dev_cpu(dev) { + if (length(dev.tasks) > 0) { + let cpu = dev.napi_cpu = get_next_cpu(napi_weight); + for (let task in dev.tasks) + set_task_cpu(task, cpu); + } + + if (length(dev.netdev) > 0) { + let cpu = dev.rx_cpu = get_next_cpu(rx_weight, dev.napi_cpu); + for (let netdev in dev.netdev) + set_netdev_cpu(netdev, cpu); + } +} + +// Assign ethernet devices first +for (let devname in phys_devs) { + let dev = phys_devs[devname]; + if (!length(dev.phy)) + assign_dev_cpu(dev); +} + +// Add bias to avoid assigning other tasks to CPUs with ethernet NAPI +for (let devname in phys_devs) { + let dev = phys_devs[devname]; + if (!length(dev.tasks) || dev.napi_cpu == null) + continue; + cpu_add_weight(dev.napi_cpu, eth_bias); +} + +// Assign WLAN devices +for (let devname in phys_devs) { + let dev = phys_devs[devname]; + if (length(dev.phy) > 0) + assign_dev_cpu(dev); +} + +if (debug > 1) + warn(sprintf("devices: %.J\ncpus: %.J\n", phys_devs, cpus)); From e609b7486fbd22c3e48194c9182f948f21b8a204 Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Tue, 5 Mar 2024 03:20:07 -0800 Subject: [PATCH 18/41] elfutils: update to 1.91 Release Notes: https://sourceware.org/pipermail/elfutils-devel/2024q1/006876.html Refresh patch: - 005-build_only_libs.patch Signed-off-by: Tony Ambardar --- package/libs/elfutils/Makefile | 4 ++-- package/libs/elfutils/patches/005-build_only_libs.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile index f7364c36be..ac5841c604 100644 --- a/package/libs/elfutils/Makefile +++ b/package/libs/elfutils/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=elfutils -PKG_VERSION:=0.189 +PKG_VERSION:=0.191 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION) -PKG_HASH:=39bd8f1a338e2b7cd4abc3ff11a0eddc6e690f69578a57478d8179b4148708c8 +PKG_HASH:=df76db71366d1d708365fc7a6c60ca48398f14367eb2b8954efc8897147ad871 PKG_MAINTAINER:=Luiz Angelo Daros de Luca PKG_LICENSE:=GPL-3.0-or-later diff --git a/package/libs/elfutils/patches/005-build_only_libs.patch b/package/libs/elfutils/patches/005-build_only_libs.patch index 304b85c47a..598b734874 100644 --- a/package/libs/elfutils/patches/005-build_only_libs.patch +++ b/package/libs/elfutils/patches/005-build_only_libs.patch @@ -7,5 +7,5 @@ - libasm debuginfod src po doc tests + libasm - EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ + EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING SECURITY \ COPYING COPYING-GPLV2 COPYING-LGPLV3 From 87d7fa8885e0bb09ee088bdcc1060ac99699d39e Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Fri, 1 Mar 2024 22:51:25 +0200 Subject: [PATCH 19/41] toolchain/musl: Update to 1.2.5 Update musl C library to 1.2.5 This release adds extension functions statx and preadv2/pwritev2, with fallback implementations for older kernels, and adds two new ports: loongarch64 and riscv32. Minor changes to the printf family of functions have been made for conformance to new standards interpretations/requirements. TLSDESC support for riscv64 has also been added. Bugs fixed include some DNS issues related to new TCP fallback functionality, several rare race conditions, potentially incorrect return value when glob aborts, and several signifiant arch-specific bugs affecting TLSDESC on arm, riscv64 icache flushing, and sh sigsetjmp and dlsym RTLD_NEXT. 1.2.5 release notes: new features: - statx function (linux extension; via syscall and fallback using fstatat) - clone function is now usable and gives _Fork-like consistency in child - statvfs now provides f_type result - preadv2 and pwritev2 (linux extension) syscall wrappers - riscv64 TLSDESC support new ports: - loongarch64 - riscv32 compatibility: - DNS resolver can now handle answers with long CNAME chains - string.h no longer provides (C23-incompat) non-prototype decl of basename - fstatat statx backend now matches stat syscall non-automounting behavior - mntent interfaces now handle escaped whitespace in paths/options standards updates: - printf %lc of nul wchar now produces output - snprintf and swprintf no longer fail on n > INT_MAX - ppoll is now exposed in default feature profile bugs fixed: - some long DNS answers were wrongly rejected despite new TCP support - glob could wrongly return GLOB_NOMATCH if aborted before any matches - multithreaded set*id could malfunction from thread sequencing logic bug - certain use of threads after fork could deadlock thread-list lock - posix_spawn child could deadlock in race with async parent death - mbrtowc return value was wrong if argument n exceeded UINT_MAX - 80-bit extended acoshl and powl got some corner cases wrong - syslog incorrectly generated localized timestamps arch-specific bugs fixed: - arm (32-bit) TLSDESC malfunctioned due to addends being processed wrong - riscv64 icache flush operation was non-functional - sh sigsetjmp failed to properly restore call-saved register r8 on return - sh dlsym RTLD_NEXT did not identify calling module correctly Signed-off-by: Hannu Nyman [Removed patch adding basename hack again] Signed-off-by: Hauke Mehrtens --- toolchain/musl/common.mk | 4 ++-- toolchain/musl/patches/900-iconv_size_hack.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk index 94444eaf75..35bdfd184b 100644 --- a/toolchain/musl/common.mk +++ b/toolchain/musl/common.mk @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk PKG_NAME:=musl -PKG_VERSION:=1.2.4 +PKG_VERSION:=1.2.5 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://musl.libc.org/releases/ -PKG_HASH:=7a35eae33d5372a7c0da1188de798726f68825513b7ae3ebe97aaaa52114f039 +PKG_HASH:=a9a118bbe84d8764da0ea0d28b3ab3fae8477fc7e4085d90102b8596fc7c75e4 PKG_CPE_ID:=cpe:/a:musl-libc:musl LIBC_SO_VERSION:=$(PKG_VERSION) diff --git a/toolchain/musl/patches/900-iconv_size_hack.patch b/toolchain/musl/patches/900-iconv_size_hack.patch index 461a204a4c..ad1dc4b109 100644 --- a/toolchain/musl/patches/900-iconv_size_hack.patch +++ b/toolchain/musl/patches/900-iconv_size_hack.patch @@ -6,7 +6,7 @@ "ucs2\0\0\314" +#ifdef FULL_ICONV "eucjp\0\0\320" - "shiftjis\0sjis\0\0\321" + "shiftjis\0sjis\0cp932\0\0\321" "iso2022jp\0\0\322" @@ -56,6 +57,7 @@ static const unsigned char charmaps[] = "gb2312\0\0\332" From 9d95934289facdf7b539a2ae60cbb24a7d5df84c Mon Sep 17 00:00:00 2001 From: John Audia Date: Wed, 10 Apr 2024 15:16:18 -0400 Subject: [PATCH 20/41] kernel: bump 6.6 to 6.6.26 Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.26 Manually rebased: generic/hack-6.6/210-darwin_scripts_include.patch Added pending: generic/pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch All other patches automatically rebased. Build system: x86/64 Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, flogic/glinet_gl-mt6000 Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, flogic/glinet_gl-mt6000 Signed-off-by: John Audia --- include/kernel-6.6 | 4 +-- .../generic/hack-6.6/204-module_strip.patch | 12 +++---- .../hack-6.6/210-darwin_scripts_include.patch | 2 +- .../721-net-add-packet-mangeling.patch | 4 +-- ...vert-driver-core-Set-fw_devlink-on-b.patch | 2 +- ...etfilter_match_bypass_default_checks.patch | 2 +- .../pending-6.6/655-increase_skb_pad.patch | 2 +- ...T-skip-GRO-for-foreign-MAC-addresses.patch | 4 +-- ...les-ignore-EOPNOTSUPP-on-flowtable-d.patch | 2 +- ...equest-assisted-learning-on-CPU-port.patch | 2 +- ...ns-stackleak-Avoid-.head.txt.section.patch | 31 +++++++++++++++++++ ...dsa-add-out-of-band-tagging-protocol.patch | 2 +- 12 files changed, 50 insertions(+), 19 deletions(-) create mode 100644 target/linux/generic/pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch diff --git a/include/kernel-6.6 b/include/kernel-6.6 index 5c67d52577..04a23c4e11 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .25 -LINUX_KERNEL_HASH-6.6.25 = 99d210be87908233a55b0fadc0dccd3b95926c0651b6b82e37350b2029de1f44 +LINUX_VERSION-6.6 = .26 +LINUX_KERNEL_HASH-6.6.26 = af54b449f4fb93b8e8daa346144a7309e8e95174bd962c4b5917cf56120456d9 diff --git a/target/linux/generic/hack-6.6/204-module_strip.patch b/target/linux/generic/hack-6.6/204-module_strip.patch index 32a83ece9f..c4e864c873 100644 --- a/target/linux/generic/hack-6.6/204-module_strip.patch +++ b/target/linux/generic/hack-6.6/204-module_strip.patch @@ -141,7 +141,7 @@ Signed-off-by: Felix Fietkau if (err) --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c -@@ -1745,7 +1745,9 @@ static void read_symbols(const char *mod +@@ -1690,7 +1690,9 @@ static void read_symbols(const char *mod symname = remove_dot(info.strtab + sym->st_name); handle_symbol(mod, &info, sym, symname); @@ -151,7 +151,7 @@ Signed-off-by: Felix Fietkau } check_sec_ref(mod, &info); -@@ -1918,8 +1920,10 @@ static void add_header(struct buffer *b, +@@ -1863,8 +1865,10 @@ static void add_header(struct buffer *b, buf_printf(b, "BUILD_SALT;\n"); buf_printf(b, "BUILD_LTO_INFO;\n"); buf_printf(b, "\n"); @@ -162,7 +162,7 @@ Signed-off-by: Felix Fietkau buf_printf(b, "\n"); buf_printf(b, "__visible struct module __this_module\n"); buf_printf(b, "__section(\".gnu.linkonce.this_module\") = {\n"); -@@ -1933,8 +1937,10 @@ static void add_header(struct buffer *b, +@@ -1878,8 +1882,10 @@ static void add_header(struct buffer *b, buf_printf(b, "\t.arch = MODULE_ARCH_INIT,\n"); buf_printf(b, "};\n"); @@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau buf_printf(b, "\n" -@@ -1942,8 +1948,10 @@ static void add_header(struct buffer *b, +@@ -1887,8 +1893,10 @@ static void add_header(struct buffer *b, "MODULE_INFO(retpoline, \"Y\");\n" "#endif\n"); @@ -184,7 +184,7 @@ Signed-off-by: Felix Fietkau if (strstarts(mod->name, "tools/testing")) buf_printf(b, "\nMODULE_INFO(test, \"Y\");\n"); -@@ -2053,11 +2061,13 @@ static void add_depends(struct buffer *b +@@ -1998,11 +2006,13 @@ static void add_depends(struct buffer *b static void add_srcversion(struct buffer *b, struct module *mod) { @@ -198,7 +198,7 @@ Signed-off-by: Felix Fietkau } static void write_buf(struct buffer *b, const char *fname) -@@ -2140,7 +2150,9 @@ static void write_mod_c_file(struct modu +@@ -2085,7 +2095,9 @@ static void write_mod_c_file(struct modu add_exported_symbols(&buf, mod); add_versions(&buf, mod); add_depends(&buf, mod); diff --git a/target/linux/generic/hack-6.6/210-darwin_scripts_include.patch b/target/linux/generic/hack-6.6/210-darwin_scripts_include.patch index c9612536de..b94554ffce 100644 --- a/target/linux/generic/hack-6.6/210-darwin_scripts_include.patch +++ b/target/linux/generic/hack-6.6/210-darwin_scripts_include.patch @@ -3048,6 +3048,6 @@ Signed-off-by: Florian Fainelli +#else +#include "elf.h" +#endif + #include "../../include/linux/module_symbol.h" #include "list.h" - #include "elfconfig.h" diff --git a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch index 2fd8aef2b5..96e77ea9db 100644 --- a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch +++ b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch @@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau */ --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -3075,6 +3075,10 @@ static inline int pskb_trim(struct sk_bu +@@ -3070,6 +3070,10 @@ static inline int pskb_trim(struct sk_bu return (len < skb->len) ? __pskb_trim(skb, len) : 0; } @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau /** * pskb_trim_unique - remove end from a paged unique (not cloned) buffer * @skb: buffer to alter -@@ -3240,16 +3244,6 @@ static inline struct sk_buff *dev_alloc_ +@@ -3235,16 +3239,6 @@ static inline struct sk_buff *dev_alloc_ } diff --git a/target/linux/generic/hack-6.6/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch b/target/linux/generic/hack-6.6/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch index 2cec82bb01..1c5fb11ff5 100644 --- a/target/linux/generic/hack-6.6/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch +++ b/target/linux/generic/hack-6.6/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch @@ -19,7 +19,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/base/core.c +++ b/drivers/base/core.c -@@ -1642,7 +1642,7 @@ static void device_links_purge(struct de +@@ -1657,7 +1657,7 @@ static void device_links_purge(struct de #define FW_DEVLINK_FLAGS_RPM (FW_DEVLINK_FLAGS_ON | \ DL_FLAG_PM_RUNTIME) diff --git a/target/linux/generic/pending-6.6/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-6.6/610-netfilter_match_bypass_default_checks.patch index 67dcf25a0d..0717c4dc1f 100644 --- a/target/linux/generic/pending-6.6/610-netfilter_match_bypass_default_checks.patch +++ b/target/linux/generic/pending-6.6/610-netfilter_match_bypass_default_checks.patch @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau for (i = sizeof(struct ipt_entry); i < e->target_offset; i += m->u.match_size) { -@@ -1221,12 +1258,15 @@ compat_copy_entry_to_user(struct ipt_ent +@@ -1223,12 +1260,15 @@ compat_copy_entry_to_user(struct ipt_ent compat_uint_t origsize; const struct xt_entry_match *ematch; int ret = 0; diff --git a/target/linux/generic/pending-6.6/655-increase_skb_pad.patch b/target/linux/generic/pending-6.6/655-increase_skb_pad.patch index 3e13511e8b..1cdf81afa4 100644 --- a/target/linux/generic/pending-6.6/655-increase_skb_pad.patch +++ b/target/linux/generic/pending-6.6/655-increase_skb_pad.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -3041,7 +3041,7 @@ static inline int pskb_network_may_pull( +@@ -3036,7 +3036,7 @@ static inline int pskb_network_may_pull( * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) */ #ifndef NET_SKB_PAD diff --git a/target/linux/generic/pending-6.6/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-6.6/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index b1f517d17a..0859e217cd 100644 --- a/target/linux/generic/pending-6.6/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-6.6/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau #endif --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -964,6 +964,7 @@ struct sk_buff { +@@ -959,6 +959,7 @@ struct sk_buff { #ifdef CONFIG_IPV6_NDISC_NODETYPE __u8 ndisc_nodetype:2; #endif @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau __u8 ipvs_property:1; --- a/net/core/gro.c +++ b/net/core/gro.c -@@ -445,6 +445,9 @@ static enum gro_result dev_gro_receive(s +@@ -446,6 +446,9 @@ static enum gro_result dev_gro_receive(s enum gro_result ret; int same_flow; diff --git a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch index c3d92da5f9..e54dcdadbb 100644 --- a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch +++ b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c -@@ -8221,7 +8221,7 @@ static int nft_register_flowtable_net_ho +@@ -8260,7 +8260,7 @@ static int nft_register_flowtable_net_ho err = flowtable->data.type->setup(&flowtable->data, hook->ops.dev, FLOW_BLOCK_BIND); diff --git a/target/linux/generic/pending-6.6/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-6.6/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch index 332d7e721a..d11e0eda66 100644 --- a/target/linux/generic/pending-6.6/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch +++ b/target/linux/generic/pending-6.6/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch @@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -6883,6 +6883,7 @@ static int mv88e6xxx_register_switch(str +@@ -6887,6 +6887,7 @@ static int mv88e6xxx_register_switch(str ds->ops = &mv88e6xxx_switch_ops; ds->ageing_time_min = chip->info->age_time_coeff; ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX; diff --git a/target/linux/generic/pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch b/target/linux/generic/pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch new file mode 100644 index 0000000000..74b2fb5b8e --- /dev/null +++ b/target/linux/generic/pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch @@ -0,0 +1,31 @@ +From e7d24c0aa8e678f41457d1304e2091cac6fd1a2e Mon Sep 17 00:00:00 2001 +From: Ard Biesheuvel +Date: Thu, 28 Mar 2024 07:42:57 +0100 +Subject: gcc-plugins/stackleak: Avoid .head.text section + +The .head.text section carries the startup code that runs with the MMU +off or with a translation of memory that deviates from the ordinary one. +So avoid instrumentation with the stackleak plugin, which already avoids +.init.text and .noinstr.text entirely. + +Fixes: 48204aba801f1b51 ("x86/sme: Move early SME kernel encryption handling into .head.text") +Reported-by: kernel test robot +Closes: https://lore.kernel.org/oe-lkp/202403221630.2692c998-oliver.sang@intel.com +Signed-off-by: Ard Biesheuvel +Link: https://lore.kernel.org/r/20240328064256.2358634-2-ardb+git@google.com +Signed-off-by: Kees Cook +--- + scripts/gcc-plugins/stackleak_plugin.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/scripts/gcc-plugins/stackleak_plugin.c ++++ b/scripts/gcc-plugins/stackleak_plugin.c +@@ -467,6 +467,8 @@ static bool stackleak_gate(void) + return false; + if (STRING_EQUAL(section, ".entry.text")) + return false; ++ if (STRING_EQUAL(section, ".head.text")) ++ return false; + } + + return track_frame_size >= 0; diff --git a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch index 9257f916ca..a45c41ea9a 100644 --- a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch +++ b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch @@ -93,7 +93,7 @@ Signed-off-by: Maxime Chevallier +#endif --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -4637,6 +4637,9 @@ enum skb_ext_id { +@@ -4632,6 +4632,9 @@ enum skb_ext_id { #if IS_ENABLED(CONFIG_MCTP_FLOWS) SKB_EXT_MCTP, #endif From ec97609154db1c7ddc88f87b5a76bd931c998d51 Mon Sep 17 00:00:00 2001 From: John Audia Date: Wed, 10 Apr 2024 16:24:49 -0400 Subject: [PATCH 21/41] x86: generic: config-6.6: refresh Ran `make kernel_menuconfig` Reference to CONFIG_SPECTRE_BHI_ON=y[1] 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v6.6.26&id2=v6.6.25 Signed-off-by: John Audia --- target/linux/x86/config-6.6 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/target/linux/x86/config-6.6 b/target/linux/x86/config-6.6 index 77d07482b3..d9c2a0c4a2 100644 --- a/target/linux/x86/config-6.6 +++ b/target/linux/x86/config-6.6 @@ -265,7 +265,10 @@ CONFIG_NEED_PER_CPU_KM=y CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y CONFIG_NEED_SG_DMA_LENGTH=y # CONFIG_NET5501 is not set +CONFIG_NET_EGRESS=y +CONFIG_NET_INGRESS=y # CONFIG_NET_NS is not set +CONFIG_NET_XGRESS=y CONFIG_NLS=y # CONFIG_NMI_CHECK_CPU is not set # CONFIG_NOHIGHMEM is not set @@ -284,6 +287,7 @@ CONFIG_PAGE_OFFSET=0xC0000000 CONFIG_PAGE_POOL=y CONFIG_PAGE_SIZE_LESS_THAN_256KB=y CONFIG_PAGE_SIZE_LESS_THAN_64KB=y +CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y CONFIG_PC104=y # CONFIG_PC8736x_GPIO is not set # CONFIG_PC87413_WDT is not set @@ -356,6 +360,9 @@ CONFIG_SG_POOL=y CONFIG_SOFTIRQ_ON_OWN_STACK=y CONFIG_SPARSEMEM_STATIC=y CONFIG_SPARSE_IRQ=y +# CONFIG_SPECTRE_BHI_AUTO is not set +# CONFIG_SPECTRE_BHI_OFF is not set +CONFIG_SPECTRE_BHI_ON=y CONFIG_SPECULATION_MITIGATIONS=y CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y # CONFIG_STATIC_CALL_SELFTEST is not set From 86171d4d6e5a3da226f40e290194779608f67705 Mon Sep 17 00:00:00 2001 From: John Audia Date: Sat, 13 Apr 2024 08:19:04 -0400 Subject: [PATCH 22/41] kernel: bump 6.6 to 6.6.27 Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.27 Removed upstreamed: pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch[1] All patches automatically rebased. 1. https://github.com/gregkh/linux/commit/9dff96b8b3a404d3b3581af46450f2efeb7d290a Build system: x86/64 Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64/AMD Cezanne Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64/AMD Cezanne Signed-off-by: John Audia --- include/kernel-6.6 | 4 +-- ...HY-package-API-to-support-multiple-g.patch | 14 ++++----- ...-add-devm-of_phy_package_join-helper.patch | 8 ++--- ...whether-link-has-changed-in-c37_read.patch | 4 +-- ...-support-for-PHY-LEDs-polarity-modes.patch | 4 +-- ...-a-separate-timeout-parameter-for-wa.patch | 16 +++++----- .../generic/hack-6.6/204-module_strip.patch | 12 +++---- .../721-net-add-packet-mangeling.patch | 4 +-- .../pending-6.6/655-increase_skb_pad.patch | 2 +- ...Add-support-for-MAP-E-FMRs-mesh-mode.patch | 14 ++++----- ...detach-callback-to-struct-phy_driver.patch | 2 +- ...ns-stackleak-Avoid-.head.txt.section.patch | 31 ------------------- ...dsa-add-out-of-band-tagging-protocol.patch | 2 +- 13 files changed, 43 insertions(+), 74 deletions(-) delete mode 100644 target/linux/generic/pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch diff --git a/include/kernel-6.6 b/include/kernel-6.6 index 04a23c4e11..768285e092 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .26 -LINUX_KERNEL_HASH-6.6.26 = af54b449f4fb93b8e8daa346144a7309e8e95174bd962c4b5917cf56120456d9 +LINUX_VERSION-6.6 = .27 +LINUX_KERNEL_HASH-6.6.27 = 639e50060e3c8f23ed017cb10cfeacc6ba88ff5583812bb76859b4cc6a128291 diff --git a/target/linux/generic/backport-6.6/714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch b/target/linux/generic/backport-6.6/714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch index b95f15a581..68f855283e 100644 --- a/target/linux/generic/backport-6.6/714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch +++ b/target/linux/generic/backport-6.6/714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch @@ -121,7 +121,7 @@ Signed-off-by: David S. Miller u32 vsc85xx_csr_read(struct phy_device *phydev, --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1650,20 +1650,22 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1 +@@ -1658,20 +1658,22 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1 /** * phy_package_join - join a common PHY group * @phydev: target phy_device struct @@ -151,7 +151,7 @@ Signed-off-by: David S. Miller * * This will set the shared pointer of the phydev to the shared storage. * If this is the first call for a this cookie the shared storage will be -@@ -1673,17 +1675,17 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1 +@@ -1681,17 +1683,17 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1 * Returns < 1 on error, 0 on success. Esp. calling phy_package_join() * with the same cookie but a different priv_size is an error. */ @@ -172,7 +172,7 @@ Signed-off-by: David S. Miller if (!shared) { ret = -ENOMEM; shared = kzalloc(sizeof(*shared), GFP_KERNEL); -@@ -1695,9 +1697,9 @@ int phy_package_join(struct phy_device * +@@ -1703,9 +1705,9 @@ int phy_package_join(struct phy_device * goto err_free; shared->priv_size = priv_size; } @@ -184,7 +184,7 @@ Signed-off-by: David S. Miller } else { ret = -EINVAL; if (priv_size && priv_size != shared->priv_size) -@@ -1735,7 +1737,7 @@ void phy_package_leave(struct phy_device +@@ -1743,7 +1745,7 @@ void phy_package_leave(struct phy_device return; if (refcount_dec_and_mutex_lock(&shared->refcnt, &bus->shared_lock)) { @@ -193,7 +193,7 @@ Signed-off-by: David S. Miller mutex_unlock(&bus->shared_lock); kfree(shared->priv); kfree(shared); -@@ -1754,7 +1756,8 @@ static void devm_phy_package_leave(struc +@@ -1762,7 +1764,8 @@ static void devm_phy_package_leave(struc * devm_phy_package_join - resource managed phy_package_join() * @dev: device that is registering this PHY package * @phydev: target phy_device struct @@ -203,7 +203,7 @@ Signed-off-by: David S. Miller * @priv_size: if non-zero allocate this amount of bytes for private data * * Managed phy_package_join(). Shared storage fetched by this function, -@@ -1762,7 +1765,7 @@ static void devm_phy_package_leave(struc +@@ -1770,7 +1773,7 @@ static void devm_phy_package_leave(struc * phy_package_join() for more information. */ int devm_phy_package_join(struct device *dev, struct phy_device *phydev, @@ -212,7 +212,7 @@ Signed-off-by: David S. Miller { struct phy_device **ptr; int ret; -@@ -1772,7 +1775,7 @@ int devm_phy_package_join(struct device +@@ -1780,7 +1783,7 @@ int devm_phy_package_join(struct device if (!ptr) return -ENOMEM; diff --git a/target/linux/generic/backport-6.6/716-v6.9-03-net-phy-add-devm-of_phy_package_join-helper.patch b/target/linux/generic/backport-6.6/716-v6.9-03-net-phy-add-devm-of_phy_package_join-helper.patch index f3e814b1a0..25f6c5ccda 100644 --- a/target/linux/generic/backport-6.6/716-v6.9-03-net-phy-add-devm-of_phy_package_join-helper.patch +++ b/target/linux/generic/backport-6.6/716-v6.9-03-net-phy-add-devm-of_phy_package_join-helper.patch @@ -27,7 +27,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1698,6 +1698,7 @@ int phy_package_join(struct phy_device * +@@ -1706,6 +1706,7 @@ int phy_package_join(struct phy_device * shared->priv_size = priv_size; } shared->base_addr = base_addr; @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller refcount_set(&shared->refcnt, 1); bus->shared[base_addr] = shared; } else { -@@ -1721,6 +1722,63 @@ err_unlock: +@@ -1729,6 +1730,63 @@ err_unlock: EXPORT_SYMBOL_GPL(phy_package_join); /** @@ -99,7 +99,7 @@ Signed-off-by: David S. Miller * phy_package_leave - leave a common PHY group * @phydev: target phy_device struct * -@@ -1736,6 +1794,10 @@ void phy_package_leave(struct phy_device +@@ -1744,6 +1802,10 @@ void phy_package_leave(struct phy_device if (!shared) return; @@ -110,7 +110,7 @@ Signed-off-by: David S. Miller if (refcount_dec_and_mutex_lock(&shared->refcnt, &bus->shared_lock)) { bus->shared[shared->base_addr] = NULL; mutex_unlock(&bus->shared_lock); -@@ -1789,6 +1851,40 @@ int devm_phy_package_join(struct device +@@ -1797,6 +1859,40 @@ int devm_phy_package_join(struct device EXPORT_SYMBOL_GPL(devm_phy_package_join); /** diff --git a/target/linux/generic/backport-6.6/716-v6.9-06-net-phy-provide-whether-link-has-changed-in-c37_read.patch b/target/linux/generic/backport-6.6/716-v6.9-06-net-phy-provide-whether-link-has-changed-in-c37_read.patch index 0441c8f60f..a96b9f1b66 100644 --- a/target/linux/generic/backport-6.6/716-v6.9-06-net-phy-provide-whether-link-has-changed-in-c37_read.patch +++ b/target/linux/generic/backport-6.6/716-v6.9-06-net-phy-provide-whether-link-has-changed-in-c37_read.patch @@ -41,7 +41,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -2607,12 +2607,15 @@ EXPORT_SYMBOL(genphy_read_status); +@@ -2615,12 +2615,15 @@ EXPORT_SYMBOL(genphy_read_status); /** * genphy_c37_read_status - check the link status and update current link state * @phydev: target phy_device struct @@ -58,7 +58,7 @@ Signed-off-by: David S. Miller { int lpa, err, old_link = phydev->link; -@@ -2622,9 +2625,13 @@ int genphy_c37_read_status(struct phy_de +@@ -2630,9 +2633,13 @@ int genphy_c37_read_status(struct phy_de return err; /* why bother the PHY if nothing can have changed */ diff --git a/target/linux/generic/backport-6.6/835-v6.9-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch b/target/linux/generic/backport-6.6/835-v6.9-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch index 30390299c8..104f961c02 100644 --- a/target/linux/generic/backport-6.6/835-v6.9-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch +++ b/target/linux/generic/backport-6.6/835-v6.9-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch @@ -28,7 +28,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -3198,6 +3198,7 @@ static int of_phy_led(struct phy_device +@@ -3201,6 +3201,7 @@ static int of_phy_led(struct phy_device struct device *dev = &phydev->mdio.dev; struct led_init_data init_data = {}; struct led_classdev *cdev; @@ -36,7 +36,7 @@ Signed-off-by: Jakub Kicinski struct phy_led *phyled; u32 index; int err; -@@ -3215,6 +3216,21 @@ static int of_phy_led(struct phy_device +@@ -3218,6 +3219,21 @@ static int of_phy_led(struct phy_device if (index > U8_MAX) return -EINVAL; diff --git a/target/linux/generic/backport-6.6/850-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch b/target/linux/generic/backport-6.6/850-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch index 23f20ed65e..94d9bcd93d 100644 --- a/target/linux/generic/backport-6.6/850-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch +++ b/target/linux/generic/backport-6.6/850-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch @@ -23,7 +23,7 @@ Signed-off-by: Manivannan Sadhasivam --- a/drivers/bus/mhi/host/init.c +++ b/drivers/bus/mhi/host/init.c -@@ -881,6 +881,7 @@ static int parse_config(struct mhi_contr +@@ -882,6 +882,7 @@ static int parse_config(struct mhi_contr if (!mhi_cntrl->timeout_ms) mhi_cntrl->timeout_ms = MHI_TIMEOUT_MS; @@ -33,7 +33,7 @@ Signed-off-by: Manivannan Sadhasivam if (!mhi_cntrl->buffer_len) --- a/drivers/bus/mhi/host/internal.h +++ b/drivers/bus/mhi/host/internal.h -@@ -321,7 +321,7 @@ int __must_check mhi_read_reg_field(stru +@@ -324,7 +324,7 @@ int __must_check mhi_read_reg_field(stru u32 *out); int __must_check mhi_poll_reg_field(struct mhi_controller *mhi_cntrl, void __iomem *base, u32 offset, u32 mask, @@ -60,7 +60,7 @@ Signed-off-by: Manivannan Sadhasivam ret = mhi_read_reg_field(mhi_cntrl, base, offset, mask, &out); --- a/drivers/bus/mhi/host/pm.c +++ b/drivers/bus/mhi/host/pm.c -@@ -163,6 +163,7 @@ int mhi_ready_state_transition(struct mh +@@ -171,6 +171,7 @@ int mhi_ready_state_transition(struct mh enum mhi_pm_state cur_state; struct device *dev = &mhi_cntrl->mhi_dev->dev; u32 interval_us = 25000; /* poll register field every 25 milliseconds */ @@ -68,7 +68,7 @@ Signed-off-by: Manivannan Sadhasivam int ret, i; /* Check if device entered error state */ -@@ -173,14 +174,18 @@ int mhi_ready_state_transition(struct mh +@@ -181,14 +182,18 @@ int mhi_ready_state_transition(struct mh /* Wait for RESET to be cleared and READY bit to be set by the device */ ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL, @@ -89,7 +89,7 @@ Signed-off-by: Manivannan Sadhasivam if (ret) { dev_err(dev, "Device failed to enter MHI Ready\n"); return ret; -@@ -479,7 +484,7 @@ static void mhi_pm_disable_transition(st +@@ -487,7 +492,7 @@ static void mhi_pm_disable_transition(st /* Wait for the reset bit to be cleared by the device */ ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL, @@ -98,7 +98,7 @@ Signed-off-by: Manivannan Sadhasivam if (ret) dev_err(dev, "Device failed to clear MHI Reset\n"); -@@ -492,8 +497,8 @@ static void mhi_pm_disable_transition(st +@@ -500,8 +505,8 @@ static void mhi_pm_disable_transition(st if (!MHI_IN_PBL(mhi_get_exec_env(mhi_cntrl))) { /* wait for ready to be set */ ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs, @@ -109,7 +109,7 @@ Signed-off-by: Manivannan Sadhasivam if (ret) dev_err(dev, "Device failed to enter READY state\n"); } -@@ -1111,7 +1116,8 @@ int mhi_async_power_up(struct mhi_contro +@@ -1125,7 +1130,8 @@ int mhi_async_power_up(struct mhi_contro if (state == MHI_STATE_SYS_ERR) { mhi_set_mhi_state(mhi_cntrl, MHI_STATE_RESET); ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL, @@ -119,7 +119,7 @@ Signed-off-by: Manivannan Sadhasivam if (ret) { dev_info(dev, "Failed to reset MHI due to syserr state\n"); goto error_exit; -@@ -1202,14 +1208,18 @@ EXPORT_SYMBOL_GPL(mhi_power_down); +@@ -1216,14 +1222,18 @@ EXPORT_SYMBOL_GPL(mhi_power_down); int mhi_sync_power_up(struct mhi_controller *mhi_cntrl) { int ret = mhi_async_power_up(mhi_cntrl); diff --git a/target/linux/generic/hack-6.6/204-module_strip.patch b/target/linux/generic/hack-6.6/204-module_strip.patch index c4e864c873..8619c29073 100644 --- a/target/linux/generic/hack-6.6/204-module_strip.patch +++ b/target/linux/generic/hack-6.6/204-module_strip.patch @@ -141,7 +141,7 @@ Signed-off-by: Felix Fietkau if (err) --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c -@@ -1690,7 +1690,9 @@ static void read_symbols(const char *mod +@@ -1692,7 +1692,9 @@ static void read_symbols(const char *mod symname = remove_dot(info.strtab + sym->st_name); handle_symbol(mod, &info, sym, symname); @@ -151,7 +151,7 @@ Signed-off-by: Felix Fietkau } check_sec_ref(mod, &info); -@@ -1863,8 +1865,10 @@ static void add_header(struct buffer *b, +@@ -1865,8 +1867,10 @@ static void add_header(struct buffer *b, buf_printf(b, "BUILD_SALT;\n"); buf_printf(b, "BUILD_LTO_INFO;\n"); buf_printf(b, "\n"); @@ -162,7 +162,7 @@ Signed-off-by: Felix Fietkau buf_printf(b, "\n"); buf_printf(b, "__visible struct module __this_module\n"); buf_printf(b, "__section(\".gnu.linkonce.this_module\") = {\n"); -@@ -1878,8 +1882,10 @@ static void add_header(struct buffer *b, +@@ -1880,8 +1884,10 @@ static void add_header(struct buffer *b, buf_printf(b, "\t.arch = MODULE_ARCH_INIT,\n"); buf_printf(b, "};\n"); @@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau buf_printf(b, "\n" -@@ -1887,8 +1893,10 @@ static void add_header(struct buffer *b, +@@ -1889,8 +1895,10 @@ static void add_header(struct buffer *b, "MODULE_INFO(retpoline, \"Y\");\n" "#endif\n"); @@ -184,7 +184,7 @@ Signed-off-by: Felix Fietkau if (strstarts(mod->name, "tools/testing")) buf_printf(b, "\nMODULE_INFO(test, \"Y\");\n"); -@@ -1998,11 +2006,13 @@ static void add_depends(struct buffer *b +@@ -2000,11 +2008,13 @@ static void add_depends(struct buffer *b static void add_srcversion(struct buffer *b, struct module *mod) { @@ -198,7 +198,7 @@ Signed-off-by: Felix Fietkau } static void write_buf(struct buffer *b, const char *fname) -@@ -2085,7 +2095,9 @@ static void write_mod_c_file(struct modu +@@ -2087,7 +2097,9 @@ static void write_mod_c_file(struct modu add_exported_symbols(&buf, mod); add_versions(&buf, mod); add_depends(&buf, mod); diff --git a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch index 96e77ea9db..8ef5faa3b1 100644 --- a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch +++ b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch @@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau */ --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -3070,6 +3070,10 @@ static inline int pskb_trim(struct sk_bu +@@ -3081,6 +3081,10 @@ static inline int pskb_trim(struct sk_bu return (len < skb->len) ? __pskb_trim(skb, len) : 0; } @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau /** * pskb_trim_unique - remove end from a paged unique (not cloned) buffer * @skb: buffer to alter -@@ -3235,16 +3239,6 @@ static inline struct sk_buff *dev_alloc_ +@@ -3246,16 +3250,6 @@ static inline struct sk_buff *dev_alloc_ } diff --git a/target/linux/generic/pending-6.6/655-increase_skb_pad.patch b/target/linux/generic/pending-6.6/655-increase_skb_pad.patch index 1cdf81afa4..31a40f1cdf 100644 --- a/target/linux/generic/pending-6.6/655-increase_skb_pad.patch +++ b/target/linux/generic/pending-6.6/655-increase_skb_pad.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -3036,7 +3036,7 @@ static inline int pskb_network_may_pull( +@@ -3047,7 +3047,7 @@ static inline int pskb_network_may_pull( * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) */ #ifndef NET_SKB_PAD diff --git a/target/linux/generic/pending-6.6/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/pending-6.6/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index 06126d65d3..0d65fa7272 100644 --- a/target/linux/generic/pending-6.6/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/pending-6.6/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -361,7 +361,7 @@ Signed-off-by: Steven Barth memcpy(p->name, u->name, sizeof(u->name)); } -@@ -1963,6 +2133,15 @@ static int ip6_tnl_validate(struct nlatt +@@ -1964,6 +2134,15 @@ static int ip6_tnl_validate(struct nlatt return 0; } @@ -377,7 +377,7 @@ Signed-off-by: Steven Barth static void ip6_tnl_netlink_parms(struct nlattr *data[], struct __ip6_tnl_parm *parms) { -@@ -2000,6 +2179,46 @@ static void ip6_tnl_netlink_parms(struct +@@ -2001,6 +2180,46 @@ static void ip6_tnl_netlink_parms(struct if (data[IFLA_IPTUN_FWMARK]) parms->fwmark = nla_get_u32(data[IFLA_IPTUN_FWMARK]); @@ -424,7 +424,7 @@ Signed-off-by: Steven Barth } static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev, -@@ -2083,6 +2302,12 @@ static void ip6_tnl_dellink(struct net_d +@@ -2084,6 +2303,12 @@ static void ip6_tnl_dellink(struct net_d static size_t ip6_tnl_get_size(const struct net_device *dev) { @@ -437,7 +437,7 @@ Signed-off-by: Steven Barth return /* IFLA_IPTUN_LINK */ nla_total_size(4) + -@@ -2112,6 +2337,24 @@ static size_t ip6_tnl_get_size(const str +@@ -2113,6 +2338,24 @@ static size_t ip6_tnl_get_size(const str nla_total_size(0) + /* IFLA_IPTUN_FWMARK */ nla_total_size(4) + @@ -462,7 +462,7 @@ Signed-off-by: Steven Barth 0; } -@@ -2119,6 +2362,9 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2120,6 +2363,9 @@ static int ip6_tnl_fill_info(struct sk_b { struct ip6_tnl *tunnel = netdev_priv(dev); struct __ip6_tnl_parm *parm = &tunnel->parms; @@ -472,7 +472,7 @@ Signed-off-by: Steven Barth if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) || nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) || -@@ -2128,9 +2374,27 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2129,9 +2375,27 @@ static int ip6_tnl_fill_info(struct sk_b nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) || nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) || nla_put_u8(skb, IFLA_IPTUN_PROTO, parm->proto) || @@ -501,7 +501,7 @@ Signed-off-by: Steven Barth if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) || -@@ -2170,6 +2434,7 @@ static const struct nla_policy ip6_tnl_p +@@ -2171,6 +2435,7 @@ static const struct nla_policy ip6_tnl_p [IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 }, [IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG }, [IFLA_IPTUN_FWMARK] = { .type = NLA_U32 }, diff --git a/target/linux/generic/pending-6.6/703-phy-add-detach-callback-to-struct-phy_driver.patch b/target/linux/generic/pending-6.6/703-phy-add-detach-callback-to-struct-phy_driver.patch index 5166dd2115..c544a06dfc 100644 --- a/target/linux/generic/pending-6.6/703-phy-add-detach-callback-to-struct-phy_driver.patch +++ b/target/linux/generic/pending-6.6/703-phy-add-detach-callback-to-struct-phy_driver.patch @@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1900,6 +1900,9 @@ void phy_detach(struct phy_device *phyde +@@ -1908,6 +1908,9 @@ void phy_detach(struct phy_device *phyde if (phydev->devlink) device_link_del(phydev->devlink); diff --git a/target/linux/generic/pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch b/target/linux/generic/pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch deleted file mode 100644 index 74b2fb5b8e..0000000000 --- a/target/linux/generic/pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch +++ /dev/null @@ -1,31 +0,0 @@ -From e7d24c0aa8e678f41457d1304e2091cac6fd1a2e Mon Sep 17 00:00:00 2001 -From: Ard Biesheuvel -Date: Thu, 28 Mar 2024 07:42:57 +0100 -Subject: gcc-plugins/stackleak: Avoid .head.text section - -The .head.text section carries the startup code that runs with the MMU -off or with a translation of memory that deviates from the ordinary one. -So avoid instrumentation with the stackleak plugin, which already avoids -.init.text and .noinstr.text entirely. - -Fixes: 48204aba801f1b51 ("x86/sme: Move early SME kernel encryption handling into .head.text") -Reported-by: kernel test robot -Closes: https://lore.kernel.org/oe-lkp/202403221630.2692c998-oliver.sang@intel.com -Signed-off-by: Ard Biesheuvel -Link: https://lore.kernel.org/r/20240328064256.2358634-2-ardb+git@google.com -Signed-off-by: Kees Cook ---- - scripts/gcc-plugins/stackleak_plugin.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/scripts/gcc-plugins/stackleak_plugin.c -+++ b/scripts/gcc-plugins/stackleak_plugin.c -@@ -467,6 +467,8 @@ static bool stackleak_gate(void) - return false; - if (STRING_EQUAL(section, ".entry.text")) - return false; -+ if (STRING_EQUAL(section, ".head.text")) -+ return false; - } - - return track_frame_size >= 0; diff --git a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch index a45c41ea9a..4131b6914d 100644 --- a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch +++ b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch @@ -93,7 +93,7 @@ Signed-off-by: Maxime Chevallier +#endif --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -4632,6 +4632,9 @@ enum skb_ext_id { +@@ -4643,6 +4643,9 @@ enum skb_ext_id { #if IS_ENABLED(CONFIG_MCTP_FLOWS) SKB_EXT_MCTP, #endif From 9ea685d8624ad63ed29573ceca755d1a431b4ed3 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 13 Apr 2024 18:25:16 +0200 Subject: [PATCH 23/41] kernel: Reorder generic kernel 6.1 config This reordering was done using these commands: ./scripts/kconfig.pl '+' target/linux/generic/config-6.1 /dev/null > target/linux/generic/config-6.1-new mv target/linux/generic/config-6.1-new target/linux/generic/config-6.1 Signed-off-by: Hauke Mehrtens --- target/linux/generic/config-6.1 | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/target/linux/generic/config-6.1 b/target/linux/generic/config-6.1 index 7487ade308..bfa3faae83 100644 --- a/target/linux/generic/config-6.1 +++ b/target/linux/generic/config-6.1 @@ -155,9 +155,9 @@ CONFIG_AF_UNIX_OOB=y # CONFIG_AHCI_QORIQ is not set # CONFIG_AHCI_XGENE is not set CONFIG_AIO=y -# CONFIG_AIR_EN8811H_PHY is not set # CONFIG_AIRO is not set # CONFIG_AIRO_CS is not set +# CONFIG_AIR_EN8811H_PHY is not set # CONFIG_AIX_PARTITION is not set # CONFIG_AK09911 is not set # CONFIG_AK8974 is not set @@ -367,6 +367,7 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 # CONFIG_ARM64_ERRATUM_2441007 is not set # CONFIG_ARM64_ERRATUM_2441009 is not set # CONFIG_ARM64_ERRATUM_2658417 is not set +# CONFIG_ARM64_ERRATUM_2966298 is not set # CONFIG_ARM64_ERRATUM_819472 is not set # CONFIG_ARM64_ERRATUM_824069 is not set # CONFIG_ARM64_ERRATUM_826319 is not set @@ -376,7 +377,6 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 # CONFIG_ARM64_ERRATUM_843419 is not set # CONFIG_ARM64_ERRATUM_845719 is not set # CONFIG_ARM64_ERRATUM_858921 is not set -# CONFIG_ARM64_ERRATUM_2966298 is not set # CONFIG_ARM64_HW_AFDBM is not set # CONFIG_ARM64_LSE_ATOMICS is not set CONFIG_ARM64_MODULE_PLTS=y @@ -3341,9 +3341,9 @@ CONFIG_LOCKDEP_STACK_TRACE_BITS=19 CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS=14 CONFIG_LOCKDEP_SUPPORT=y CONFIG_LOCKD_V4=y -CONFIG_LOCK_MM_AND_FIND_VMA=y # CONFIG_LOCKUP_DETECTOR is not set # CONFIG_LOCK_EVENT_COUNTS is not set +CONFIG_LOCK_MM_AND_FIND_VMA=y # CONFIG_LOCK_STAT is not set # CONFIG_LOCK_TORTURE_TEST is not set # CONFIG_LOGFS is not set @@ -4427,6 +4427,7 @@ CONFIG_NEW_LEDS=y # CONFIG_NFC is not set # CONFIG_NFP is not set # CONFIG_NFSD is not set +# CONFIG_NFSD_V2 is not set # CONFIG_NFSD_V2_ACL is not set CONFIG_NFSD_V3=y # CONFIG_NFSD_V3_ACL is not set @@ -4438,7 +4439,6 @@ CONFIG_NFS_COMMON=y # CONFIG_NFS_FSCACHE is not set # CONFIG_NFS_SWAP is not set # CONFIG_NFS_V2 is not set -# CONFIG_NFSD_V2 is not set CONFIG_NFS_V3=y # CONFIG_NFS_V3_ACL is not set # CONFIG_NFS_V4 is not set @@ -5081,9 +5081,9 @@ CONFIG_PWRSEQ_SIMPLE=y # CONFIG_QCA7000 is not set # CONFIG_QCA7000_SPI is not set # CONFIG_QCA7000_UART is not set -# CONFIG_QCA83XX_PHY is not set # CONFIG_QCA807X_PHY is not set # CONFIG_QCA808X_PHY is not set +# CONFIG_QCA83XX_PHY is not set # CONFIG_QCOM_A7PLL is not set # CONFIG_QCOM_BAM_DMUX is not set # CONFIG_QCOM_EMAC is not set @@ -7026,8 +7026,8 @@ CONFIG_TRAD_SIGNALS=y # CONFIG_TRUSTED_FOUNDATIONS is not set # CONFIG_TRUSTED_KEYS is not set # CONFIG_TRUSTED_KEYS_CAAM is not set -# CONFIG_TRUSTED_KEYS_TPM is not set # CONFIG_TRUSTED_KEYS_TEE is not set +# CONFIG_TRUSTED_KEYS_TPM is not set # CONFIG_TSL2583 is not set # CONFIG_TSL2591 is not set # CONFIG_TSL2772 is not set @@ -7078,8 +7078,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" # CONFIG_UFS_FS is not set # CONFIG_UHID is not set CONFIG_UID16=y -# CONFIG_UIO is not set # CONFIG_UIMAGE_FIT_BLK is not set +# CONFIG_UIO is not set # CONFIG_ULTRA is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_UNICODE is not set @@ -7124,8 +7124,8 @@ CONFIG_USB_BELKIN=y # CONFIG_USB_CDNS3 is not set # CONFIG_USB_CDNS3_IMX is not set # CONFIG_USB_CDNS3_PCI_WRAP is not set -# CONFIG_USB_CDNS_SUPPORT is not set # CONFIG_USB_CDNSP_PCI is not set +# CONFIG_USB_CDNS_SUPPORT is not set # CONFIG_USB_CHAOSKEY is not set # CONFIG_USB_CHIPIDEA is not set # CONFIG_USB_CHIPIDEA_GENERIC is not set @@ -7692,12 +7692,12 @@ CONFIG_VHOST_MENU=y # CONFIG_VIDEO_SMIAPP is not set # CONFIG_VIDEO_SOLO6X10 is not set # CONFIG_VIDEO_SONY_BTF_MPX is not set -# CONFIG_VIDEO_SUN4I_CSI is not set -# CONFIG_VIDEO_SUN6I_CSI is not set -# CONFIG_VIDEO_SUN8I_A83T_MIPI_CSI2 is not set # CONFIG_VIDEO_SR030PC30 is not set # CONFIG_VIDEO_STK1160_COMMON is not set # CONFIG_VIDEO_ST_MIPID02 is not set +# CONFIG_VIDEO_SUN4I_CSI is not set +# CONFIG_VIDEO_SUN6I_CSI is not set +# CONFIG_VIDEO_SUN8I_A83T_MIPI_CSI2 is not set # CONFIG_VIDEO_TC358743 is not set # CONFIG_VIDEO_TDA1997X is not set # CONFIG_VIDEO_TDA7432 is not set From 2ad898e091cb51b3743b76a95535db1b1226a752 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 29 Mar 2024 23:15:26 +0100 Subject: [PATCH 24/41] kernel: bump 6.1 to 6.1.83 Removed upstreamed: generic/backport-6.1/789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch [1] generic/backport-6.1/789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch [2] generic/backport-6.1/789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch [3] generic/pending-6.1/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch [4] generic/pending-6.1/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch [5] Manual adjusted the following patches: mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.83&id=be4512b9ac6fc53e1ca8daccbda84f643215c547 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.83&id=f1fa919ea59655f73cb3972264e157b8831ba546 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.83&id=86c0c154a759f2af9612a04bdf29110f02dce956 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.83&id=6b62bad2da1b338f452a9380639fc9b093d75a25 5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.83&id=f78807362828ad01db2a9ed005bf79501b620f27 Signed-off-by: Hauke Mehrtens --- include/kernel-6.1 | 4 +- .../patches-6.1/910-mikrotik-rb4xx.patch | 2 +- .../950-0281-gpio-Add-gpio-fsm-driver.patch | 2 +- ...-usb-phy-generic-Get-the-vbus-supply.patch | 6 +- ...om-bcmbca-bcm4908-add-TWD-block-time.patch | 2 +- ...adcom-bcmbca-Add-spi-controller-node.patch | 2 +- ...om-bcmbca-bcm4908-set-brcm-wp-not-co.patch | 2 +- ...om-bcmbca-bcm4908-limit-amount-of-GP.patch | 2 +- ...cit-phylink_generic_validate-referen.patch | 2 +- ..._eth_soc-enable-flow-offloading-supp.patch | 2 +- ..._eth_soc-remove-cpu_relax-in-mtk_pen.patch | 4 +- ..._eth_soc-introduce-mtk_hw_reset-util.patch | 4 +- ..._eth_soc-introduce-mtk_hw_warm_reset.patch | 8 +- ..._eth_soc-align-reset-procedure-to-ve.patch | 10 +- ..._eth_soc-add-dma-checks-to-mtk_hw_re.patch | 8 +- ..._wed-add-reset-reset_complete-callba.patch | 4 +- ..._eth_soc-increase-tx-ring-side-for-Q.patch | 14 +- ..._eth_soc-avoid-port_mg-assignment-on.patch | 4 +- ..._eth_soc-implement-multi-queue-suppo.patch | 62 +++---- ..._eth_soc-fix-VLAN-rx-hardware-accele.patch | 10 +- ..._eth_soc-disable-hardware-DSA-untagg.patch | 4 +- ..._eth_soc-enable-special-tag-when-any.patch | 6 +- ..._eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch | 4 +- ..._eth_soc-fix-tx-throughput-regressio.patch | 2 +- ...t-mtk_eth_soc-add-support-for-MT7981.patch | 4 +- ..._eth_soc-set-MDIO-bus-clock-frequenc.patch | 4 +- ..._eth_soc-switch-to-external-PCS-driv.patch | 10 +- ..._eth_soc-ppe-add-support-for-flow-ac.patch | 10 +- ..._eth_soc-drop-generic-vlan-rx-offloa.patch | 14 +- ..._ppe-add-MTK_FOE_ENTRY_V-1-2-_SIZE-m.patch | 10 +- ..._eth_soc-remove-incorrect-PLL-config.patch | 4 +- ..._eth_soc-remove-mac_pcs_get_state-an.patch | 6 +- ..._eth_soc-add-version-in-mtk_soc_data.patch | 60 +++--- ..._eth_soc-rely-on-MTK_MAX_DEVS-and-re.patch | 30 +-- ..._eth_soc-add-NETSYS_V3-version-suppo.patch | 22 +-- ..._eth_soc-add-basic-support-for-MT798.patch | 10 +- ..._eth_soc-enable-page_pool-support-fo.patch | 2 +- ..._eth_soc-enable-nft-hw-flowtable_off.patch | 2 +- ..._eth_soc-support-per-flow-accounting.patch | 2 +- ...tk_eth_soc-add-reset-bits-for-MT7988.patch | 8 +- ..._eth_soc-add-support-for-in-SoC-SRAM.patch | 24 +-- ..._eth_soc-support-36-bit-DMA-addressi.patch | 16 +- ...k_eth_soc-fix-uninitialized-variable.patch | 4 +- ...revent-possible-incorrect-XTAL-frequ.patch | 172 ----------------- ...ix-link-local-frames-that-ingress-vl.patch | 173 ------------------ ...ix-handling-of-all-link-local-frames.patch | 133 -------------- ...com-nvmem-use-SoC-ID-s-from-bindings.patch | 4 +- ...-nvmem-use-helper-to-get-SMEM-SoC-ID.patch | 4 +- target/linux/generic/config-6.1 | 2 + ...T-skip-GRO-for-foreign-MAC-addresses.patch | 8 +- ...net-mtk_eth_soc-enable-threaded-NAPI.patch | 2 +- ..._eth_soc-work-around-issue-with-send.patch | 6 +- ..._eth_soc-fix-remaining-throughput-re.patch | 4 +- ..._eth_soc-release-MAC_MCR_FORCE_LINK-.patch | 50 ----- ...et-mtk_eth_soc-fix-PPE-hanging-issue.patch | 59 ------ ...ional-threading-for-backlog-processi.patch | 4 +- ...pio-cascade-add-generic-GPIO-cascade.patch | 2 +- .../pending-6.1/920-mangle_bootargs.patch | 4 +- ...-support-for-ATAGs-rootblock-parsing.patch | 2 +- ...ek-mt7986-add-support-for-RX-Wireles.patch | 4 +- ...7986-add-crypto-related-device-nodes.patch | 2 +- ...4-v6.2-arm64-dts-mt7986-add-i2c-node.patch | 2 +- ...-mt7986-add-spi-related-device-nodes.patch | 2 +- ...-mt7986-add-usb-related-device-nodes.patch | 2 +- ...-mt7986-add-mmc-related-device-nodes.patch | 2 +- ...mt7986-add-pcie-related-device-nodes.patch | 2 +- .../012-v6.5-arm64-dts-mt7986-add-PWM.patch | 2 +- ...m64-dts-mt7986-add-thermal-and-efuse.patch | 8 +- ...5-arm64-dts-mt7986-add-thermal-zones.patch | 2 +- ...rm64-dts-mt7986-change-cooling-trips.patch | 2 +- .../100-dts-update-mt7622-rfb1.patch | 8 +- .../106-dts-mt7622-disable_btif.patch | 4 +- .../112-dts-fix-bpi64-lan-names.patch | 2 +- .../114-dts-bpi64-disable-rtc.patch | 2 +- ...-declare-SPI-NAND-present-on-BPI-R64.patch | 2 +- .../131-dts-mt7622-add-snand-support.patch | 2 +- ...dts-fix-wmac-support-for-mt7622-rfb1.patch | 4 +- ...-handle-interrupts-from-MT7531-switc.patch | 2 +- .../331-mt7622-rfb1-enable-bmt.patch | 2 +- ...xx-Move-chip_config-to-driver-s-priv.patch | 2 +- ...xx-Add-controller-s-calibration-para.patch | 4 +- .../862-arm64-dts-mt7986-add-afe.patch | 2 +- ...mt7622-bpi-r64-aliases-for-dtoverlay.patch | 2 +- .../910-dts-mt7622-bpi-r64-wifi-eeprom.patch | 2 +- .../911-dts-mt7622-bpi-r64-add-rootdisk.patch | 6 +- .../930-spi-mt65xx-enable-sel-clk.patch | 2 +- ...986-move-cpuboot-in-a-dedicated-node.patch | 6 +- ...-mt7986-move-ilm-in-a-dedicated-node.patch | 6 +- ...-mt7986-move-dlm-in-a-dedicated-node.patch | 6 +- ...Mangle-bootloader-s-kernel-arguments.patch | 4 +- target/linux/x86/64/config-6.1 | 1 + 91 files changed, 279 insertions(+), 863 deletions(-) delete mode 100644 target/linux/generic/backport-6.1/789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch delete mode 100644 target/linux/generic/backport-6.1/789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch delete mode 100644 target/linux/generic/backport-6.1/789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch delete mode 100644 target/linux/generic/pending-6.1/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch delete mode 100644 target/linux/generic/pending-6.1/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch diff --git a/include/kernel-6.1 b/include/kernel-6.1 index 0c09df7a7d..101dbf34fa 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .82 -LINUX_KERNEL_HASH-6.1.82 = d150d2d9d416877668d8b56f75759f166168d192419eefaa942ed67225cbec06 +LINUX_VERSION-6.1 = .83 +LINUX_KERNEL_HASH-6.1.83 = 88b69611093613ce4494527685f833af0c31b986dcbeda7086f69f18f9e0b190 diff --git a/target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch b/target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch index 9a163e70b3..536d7abf6b 100644 --- a/target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch +++ b/target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch @@ -72,7 +72,7 @@ Submitted-by: Christopher Hill obj-$(CONFIG_MFD_INTEL_M10_BMC) += intel-m10-bmc.o --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -1593,6 +1593,12 @@ config GPIO_SODAVILLE +@@ -1594,6 +1594,12 @@ config GPIO_SODAVILLE help Say Y here to support Intel Sodaville GPIO. diff --git a/target/linux/bcm27xx/patches-6.1/950-0281-gpio-Add-gpio-fsm-driver.patch b/target/linux/bcm27xx/patches-6.1/950-0281-gpio-Add-gpio-fsm-driver.patch index 1e0c3a0d00..7f65a3b660 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0281-gpio-Add-gpio-fsm-driver.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0281-gpio-Add-gpio-fsm-driver.patch @@ -63,7 +63,7 @@ Signed-off-by: Phil Elwell --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -1243,6 +1243,15 @@ config HTC_EGPIO +@@ -1244,6 +1244,15 @@ config HTC_EGPIO several HTC phones. It provides basic support for input pins, output pins, and IRQs. diff --git a/target/linux/bcm27xx/patches-6.1/950-0851-Revert-usb-phy-generic-Get-the-vbus-supply.patch b/target/linux/bcm27xx/patches-6.1/950-0851-Revert-usb-phy-generic-Get-the-vbus-supply.patch index aaf49e6a7c..5d271fe4da 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0851-Revert-usb-phy-generic-Get-the-vbus-supply.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0851-Revert-usb-phy-generic-Get-the-vbus-supply.patch @@ -10,9 +10,9 @@ This reverts commit c0ea202fbc855d60bc4a0603ca52a9e80654b327. --- a/drivers/usb/phy/phy-generic.c +++ b/drivers/usb/phy/phy-generic.c -@@ -265,13 +265,6 @@ int usb_phy_gen_create_phy(struct device - return -EPROBE_DEFER; - } +@@ -272,13 +272,6 @@ int usb_phy_gen_create_phy(struct device + return dev_err_probe(dev, PTR_ERR(nop->vbus_draw), + "could not get vbus regulator\n"); - nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus"); - if (PTR_ERR(nop->vbus_draw) == -ENODEV) diff --git a/target/linux/bcm4908/patches-6.1/035-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch b/target/linux/bcm4908/patches-6.1/035-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch index a3f49ca440..e175f27891 100644 --- a/target/linux/bcm4908/patches-6.1/035-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch +++ b/target/linux/bcm4908/patches-6.1/035-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch @@ -17,7 +17,7 @@ Signed-off-by: Florian Fainelli --- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi -@@ -283,6 +283,11 @@ +@@ -280,6 +280,11 @@ #address-cells = <1>; #size-cells = <1>; diff --git a/target/linux/bcm4908/patches-6.1/036-v6.4-0001-arm64-dts-broadcom-bcmbca-Add-spi-controller-node.patch b/target/linux/bcm4908/patches-6.1/036-v6.4-0001-arm64-dts-broadcom-bcmbca-Add-spi-controller-node.patch index e8e1228179..7476aed05b 100644 --- a/target/linux/bcm4908/patches-6.1/036-v6.4-0001-arm64-dts-broadcom-bcmbca-Add-spi-controller-node.patch +++ b/target/linux/bcm4908/patches-6.1/036-v6.4-0001-arm64-dts-broadcom-bcmbca-Add-spi-controller-node.patch @@ -40,7 +40,7 @@ Signed-off-by: Florian Fainelli }; soc { -@@ -531,6 +537,18 @@ +@@ -528,6 +534,18 @@ #size-cells = <0>; }; diff --git a/target/linux/bcm4908/patches-6.1/130-arm64-dts-broadcom-bcmbca-bcm4908-set-brcm-wp-not-co.patch b/target/linux/bcm4908/patches-6.1/130-arm64-dts-broadcom-bcmbca-bcm4908-set-brcm-wp-not-co.patch index d43d6d84f0..46d632e95d 100644 --- a/target/linux/bcm4908/patches-6.1/130-arm64-dts-broadcom-bcmbca-bcm4908-set-brcm-wp-not-co.patch +++ b/target/linux/bcm4908/patches-6.1/130-arm64-dts-broadcom-bcmbca-bcm4908-set-brcm-wp-not-co.patch @@ -21,7 +21,7 @@ Signed-off-by: Rafał Miłecki --- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi -@@ -596,6 +596,7 @@ +@@ -593,6 +593,7 @@ reg-names = "nand", "nand-int-base"; interrupts = ; interrupt-names = "nand_ctlrdy"; diff --git a/target/linux/bcm4908/patches-6.1/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch b/target/linux/bcm4908/patches-6.1/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch index a7c6d0102f..4adeef8319 100644 --- a/target/linux/bcm4908/patches-6.1/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch +++ b/target/linux/bcm4908/patches-6.1/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch @@ -12,7 +12,7 @@ Signed-off-by: Rafał Miłecki --- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi -@@ -343,7 +343,7 @@ +@@ -340,7 +340,7 @@ gpio0: gpio-controller@500 { compatible = "brcm,bcm6345-gpio"; reg-names = "dirout", "dat"; diff --git a/target/linux/generic/backport-6.1/715-07-v6.2-net-remove-explicit-phylink_generic_validate-referen.patch b/target/linux/generic/backport-6.1/715-07-v6.2-net-remove-explicit-phylink_generic_validate-referen.patch index 28154af920..31fde5f18e 100644 --- a/target/linux/generic/backport-6.1/715-07-v6.2-net-remove-explicit-phylink_generic_validate-referen.patch +++ b/target/linux/generic/backport-6.1/715-07-v6.2-net-remove-explicit-phylink_generic_validate-referen.patch @@ -142,7 +142,7 @@ Signed-off-by: Jakub Kicinski .mac_link_down = prestera_mac_link_down, --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -654,7 +654,6 @@ static void mtk_mac_link_up(struct phyli +@@ -653,7 +653,6 @@ static void mtk_mac_link_up(struct phyli } static const struct phylink_mac_ops mtk_phylink_ops = { diff --git a/target/linux/generic/backport-6.1/724-v6.2-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch b/target/linux/generic/backport-6.1/724-v6.2-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch index 816aa67787..cf0d2a3a89 100644 --- a/target/linux/generic/backport-6.1/724-v6.2-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch +++ b/target/linux/generic/backport-6.1/724-v6.2-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch @@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4333,6 +4333,7 @@ static const struct mtk_soc_data mt7986_ +@@ -4332,6 +4332,7 @@ static const struct mtk_soc_data mt7986_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7986_CLKS_BITMAP, .required_pctl = false, diff --git a/target/linux/generic/backport-6.1/729-07-v6.1-net-ethernet-mtk_eth_soc-remove-cpu_relax-in-mtk_pen.patch b/target/linux/generic/backport-6.1/729-07-v6.1-net-ethernet-mtk_eth_soc-remove-cpu_relax-in-mtk_pen.patch index cefe1eefff..5a79242e3b 100644 --- a/target/linux/generic/backport-6.1/729-07-v6.1-net-ethernet-mtk_eth_soc-remove-cpu_relax-in-mtk_pen.patch +++ b/target/linux/generic/backport-6.1/729-07-v6.1-net-ethernet-mtk_eth_soc-remove-cpu_relax-in-mtk_pen.patch @@ -12,7 +12,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3480,11 +3480,8 @@ static void mtk_pending_work(struct work +@@ -3479,11 +3479,8 @@ static void mtk_pending_work(struct work rtnl_lock(); dev_dbg(eth->dev, "[%s][%d] reset\n", __func__, __LINE__); @@ -25,7 +25,7 @@ Signed-off-by: David S. Miller /* stop all devices to make sure that dma is properly shut down */ for (i = 0; i < MTK_MAC_COUNT; i++) { if (!eth->netdev[i]) -@@ -3518,7 +3515,7 @@ static void mtk_pending_work(struct work +@@ -3517,7 +3514,7 @@ static void mtk_pending_work(struct work dev_dbg(eth->dev, "[%s][%d] reset done\n", __func__, __LINE__); diff --git a/target/linux/generic/backport-6.1/729-18-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_reset-util.patch b/target/linux/generic/backport-6.1/729-18-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_reset-util.patch index c91861a8f1..fde0af25df 100644 --- a/target/linux/generic/backport-6.1/729-18-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_reset-util.patch +++ b/target/linux/generic/backport-6.1/729-18-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_reset-util.patch @@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3256,6 +3256,27 @@ static void mtk_set_mcr_max_rx(struct mt +@@ -3255,6 +3255,27 @@ static void mtk_set_mcr_max_rx(struct mt mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id)); } @@ -44,7 +44,7 @@ Signed-off-by: Paolo Abeni static int mtk_hw_init(struct mtk_eth *eth) { u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA | -@@ -3295,22 +3316,9 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3294,22 +3315,9 @@ static int mtk_hw_init(struct mtk_eth *e return 0; } diff --git a/target/linux/generic/backport-6.1/729-19-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_warm_reset.patch b/target/linux/generic/backport-6.1/729-19-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_warm_reset.patch index 6597eb5b74..e6a94f616e 100644 --- a/target/linux/generic/backport-6.1/729-19-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_warm_reset.patch +++ b/target/linux/generic/backport-6.1/729-19-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_warm_reset.patch @@ -17,7 +17,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3277,7 +3277,54 @@ static void mtk_hw_reset(struct mtk_eth +@@ -3276,7 +3276,54 @@ static void mtk_hw_reset(struct mtk_eth 0x3ffffff); } @@ -73,7 +73,7 @@ Signed-off-by: Paolo Abeni { u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA | ETHSYS_DMA_AG_MAP_PPE; -@@ -3316,7 +3363,12 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3315,7 +3362,12 @@ static int mtk_hw_init(struct mtk_eth *e return 0; } @@ -87,7 +87,7 @@ Signed-off-by: Paolo Abeni if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { /* Set FE to PDMAv2 if necessary */ -@@ -3507,7 +3559,7 @@ static void mtk_pending_work(struct work +@@ -3506,7 +3558,7 @@ static void mtk_pending_work(struct work if (eth->dev->pins) pinctrl_select_state(eth->dev->pins->p, eth->dev->pins->default_state); @@ -96,7 +96,7 @@ Signed-off-by: Paolo Abeni /* restart DMA and enable IRQs */ for (i = 0; i < MTK_MAC_COUNT; i++) { -@@ -4109,7 +4161,7 @@ static int mtk_probe(struct platform_dev +@@ -4108,7 +4160,7 @@ static int mtk_probe(struct platform_dev eth->msg_enable = netif_msg_init(mtk_msg_level, MTK_DEFAULT_MSG_ENABLE); INIT_WORK(ð->pending_work, mtk_pending_work); diff --git a/target/linux/generic/backport-6.1/729-20-v6.3-net-ethernet-mtk_eth_soc-align-reset-procedure-to-ve.patch b/target/linux/generic/backport-6.1/729-20-v6.3-net-ethernet-mtk_eth_soc-align-reset-procedure-to-ve.patch index 55ab19f4c8..7fdf7aa581 100644 --- a/target/linux/generic/backport-6.1/729-20-v6.3-net-ethernet-mtk_eth_soc-align-reset-procedure-to-ve.patch +++ b/target/linux/generic/backport-6.1/729-20-v6.3-net-ethernet-mtk_eth_soc-align-reset-procedure-to-ve.patch @@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2844,14 +2844,29 @@ static void mtk_dma_free(struct mtk_eth +@@ -2843,14 +2843,29 @@ static void mtk_dma_free(struct mtk_eth kfree(eth->scratch_head); } @@ -48,7 +48,7 @@ Signed-off-by: Paolo Abeni schedule_work(ð->pending_work); } -@@ -3331,15 +3346,17 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3330,15 +3345,17 @@ static int mtk_hw_init(struct mtk_eth *e const struct mtk_reg_map *reg_map = eth->soc->reg_map; int i, val, ret; @@ -72,7 +72,7 @@ Signed-off-by: Paolo Abeni if (eth->ethsys) regmap_update_bits(eth->ethsys, ETHSYS_DMA_AG_MAP, dma_mask, -@@ -3468,8 +3485,10 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3467,8 +3484,10 @@ static int mtk_hw_init(struct mtk_eth *e return 0; err_disable_pm: @@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni return ret; } -@@ -3531,30 +3550,53 @@ static int mtk_do_ioctl(struct net_devic +@@ -3530,30 +3549,53 @@ static int mtk_do_ioctl(struct net_devic return -EOPNOTSUPP; } @@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni if (eth->dev->pins) pinctrl_select_state(eth->dev->pins->p, -@@ -3565,15 +3607,19 @@ static void mtk_pending_work(struct work +@@ -3564,15 +3606,19 @@ static void mtk_pending_work(struct work for (i = 0; i < MTK_MAC_COUNT; i++) { if (!test_bit(i, &restart)) continue; diff --git a/target/linux/generic/backport-6.1/729-21-v6.3-net-ethernet-mtk_eth_soc-add-dma-checks-to-mtk_hw_re.patch b/target/linux/generic/backport-6.1/729-21-v6.3-net-ethernet-mtk_eth_soc-add-dma-checks-to-mtk_hw_re.patch index d5a7c0eba2..a77f3da7f8 100644 --- a/target/linux/generic/backport-6.1/729-21-v6.3-net-ethernet-mtk_eth_soc-add-dma-checks-to-mtk_hw_re.patch +++ b/target/linux/generic/backport-6.1/729-21-v6.3-net-ethernet-mtk_eth_soc-add-dma-checks-to-mtk_hw_re.patch @@ -49,7 +49,7 @@ Signed-off-by: Paolo Abeni }; /* strings used by ethtool */ -@@ -3339,6 +3345,102 @@ static void mtk_hw_warm_reset(struct mtk +@@ -3338,6 +3344,102 @@ static void mtk_hw_warm_reset(struct mtk val, rst_mask); } @@ -152,7 +152,7 @@ Signed-off-by: Paolo Abeni static int mtk_hw_init(struct mtk_eth *eth, bool reset) { u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA | -@@ -3657,6 +3759,7 @@ static int mtk_cleanup(struct mtk_eth *e +@@ -3656,6 +3758,7 @@ static int mtk_cleanup(struct mtk_eth *e mtk_unreg_dev(eth); mtk_free_dev(eth); cancel_work_sync(ð->pending_work); @@ -160,7 +160,7 @@ Signed-off-by: Paolo Abeni return 0; } -@@ -4094,6 +4197,7 @@ static int mtk_probe(struct platform_dev +@@ -4093,6 +4196,7 @@ static int mtk_probe(struct platform_dev eth->rx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE; INIT_WORK(ð->rx_dim.work, mtk_dim_rx); @@ -168,7 +168,7 @@ Signed-off-by: Paolo Abeni eth->tx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE; INIT_WORK(ð->tx_dim.work, mtk_dim_tx); -@@ -4296,6 +4400,8 @@ static int mtk_probe(struct platform_dev +@@ -4295,6 +4399,8 @@ static int mtk_probe(struct platform_dev netif_napi_add(ð->dummy_dev, ð->rx_napi, mtk_napi_rx); platform_set_drvdata(pdev, eth); diff --git a/target/linux/generic/backport-6.1/729-22-v6.3-net-ethernet-mtk_wed-add-reset-reset_complete-callba.patch b/target/linux/generic/backport-6.1/729-22-v6.3-net-ethernet-mtk_wed-add-reset-reset_complete-callba.patch index c21d094ae8..3f047da758 100644 --- a/target/linux/generic/backport-6.1/729-22-v6.3-net-ethernet-mtk_wed-add-reset-reset_complete-callba.patch +++ b/target/linux/generic/backport-6.1/729-22-v6.3-net-ethernet-mtk_wed-add-reset-reset_complete-callba.patch @@ -14,7 +14,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3688,6 +3688,11 @@ static void mtk_pending_work(struct work +@@ -3687,6 +3687,11 @@ static void mtk_pending_work(struct work set_bit(MTK_RESETTING, ð->state); mtk_prepare_for_reset(eth); @@ -26,7 +26,7 @@ Signed-off-by: Paolo Abeni /* stop all devices to make sure that dma is properly shut down */ for (i = 0; i < MTK_MAC_COUNT; i++) { -@@ -3725,6 +3730,8 @@ static void mtk_pending_work(struct work +@@ -3724,6 +3729,8 @@ static void mtk_pending_work(struct work clear_bit(MTK_RESETTING, ð->state); diff --git a/target/linux/generic/backport-6.1/730-02-v6.3-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch b/target/linux/generic/backport-6.1/730-02-v6.3-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch index 046a581224..41d1bceac4 100644 --- a/target/linux/generic/backport-6.1/730-02-v6.3-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch +++ b/target/linux/generic/backport-6.1/730-02-v6.3-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -944,7 +944,7 @@ static int mtk_init_fq_dma(struct mtk_et +@@ -943,7 +943,7 @@ static int mtk_init_fq_dma(struct mtk_et { const struct mtk_soc_data *soc = eth->soc; dma_addr_t phy_ring_tail; @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau dma_addr_t dma_addr; int i; -@@ -2208,19 +2208,25 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2207,19 +2207,25 @@ static int mtk_tx_alloc(struct mtk_eth * struct mtk_tx_ring *ring = ð->tx_ring; int i, sz = soc->txrx.txd_size; struct mtk_tx_dma_v2 *txd; @@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau u32 next_ptr = ring->phys + next * sz; txd = ring->dma + i * sz; -@@ -2240,22 +2246,22 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2239,22 +2245,22 @@ static int mtk_tx_alloc(struct mtk_eth * * descriptors in ring->dma_pdma. */ if (!MTK_HAS_CAPS(soc->caps, MTK_QDMA)) { @@ -79,7 +79,7 @@ Signed-off-by: Felix Fietkau ring->thresh = MAX_SKB_FRAGS; /* make sure that all changes to the dma ring are flushed before we -@@ -2267,14 +2273,14 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2266,14 +2272,14 @@ static int mtk_tx_alloc(struct mtk_eth * mtk_w32(eth, ring->phys, soc->reg_map->qdma.ctx_ptr); mtk_w32(eth, ring->phys, soc->reg_map->qdma.dtx_ptr); mtk_w32(eth, @@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau mtk_w32(eth, 0, MT7628_TX_CTX_IDX0); mtk_w32(eth, MT7628_PST_DTX_IDX0, soc->reg_map->pdma.rst_idx); } -@@ -2292,7 +2298,7 @@ static void mtk_tx_clean(struct mtk_eth +@@ -2291,7 +2297,7 @@ static void mtk_tx_clean(struct mtk_eth int i; if (ring->buf) { @@ -105,7 +105,7 @@ Signed-off-by: Felix Fietkau mtk_tx_unmap(eth, &ring->buf[i], NULL, false); kfree(ring->buf); ring->buf = NULL; -@@ -2300,14 +2306,14 @@ static void mtk_tx_clean(struct mtk_eth +@@ -2299,14 +2305,14 @@ static void mtk_tx_clean(struct mtk_eth if (ring->dma) { dma_free_coherent(eth->dma_dev, @@ -122,7 +122,7 @@ Signed-off-by: Felix Fietkau ring->dma_pdma, ring->phys_pdma); ring->dma_pdma = NULL; } -@@ -2832,7 +2838,7 @@ static void mtk_dma_free(struct mtk_eth +@@ -2831,7 +2837,7 @@ static void mtk_dma_free(struct mtk_eth netdev_reset_queue(eth->netdev[i]); if (eth->scratch_ring) { dma_free_coherent(eth->dma_dev, diff --git a/target/linux/generic/backport-6.1/730-03-v6.3-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch b/target/linux/generic/backport-6.1/730-03-v6.3-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch index 7e879ca1d5..c9823daa1d 100644 --- a/target/linux/generic/backport-6.1/730-03-v6.3-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch +++ b/target/linux/generic/backport-6.1/730-03-v6.3-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4479,7 +4479,7 @@ static const struct mtk_soc_data mt7621_ +@@ -4478,7 +4478,7 @@ static const struct mtk_soc_data mt7621_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7621_CLKS_BITMAP, .required_pctl = false, @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau .hash_offset = 2, .foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .txrx = { -@@ -4518,7 +4518,7 @@ static const struct mtk_soc_data mt7623_ +@@ -4517,7 +4517,7 @@ static const struct mtk_soc_data mt7623_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7623_CLKS_BITMAP, .required_pctl = true, diff --git a/target/linux/generic/backport-6.1/730-04-v6.3-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch b/target/linux/generic/backport-6.1/730-04-v6.3-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch index 8ceba7831e..0d462b0c85 100644 --- a/target/linux/generic/backport-6.1/730-04-v6.3-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch +++ b/target/linux/generic/backport-6.1/730-04-v6.3-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch @@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau }, .gdm1_cnt = 0x1c00, .gdma_to_ppe = 0x3333, -@@ -620,6 +624,75 @@ static void mtk_mac_link_down(struct phy +@@ -619,6 +623,75 @@ static void mtk_mac_link_down(struct phy mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id)); } @@ -130,7 +130,7 @@ Signed-off-by: Felix Fietkau static void mtk_mac_link_up(struct phylink_config *config, struct phy_device *phy, unsigned int mode, phy_interface_t interface, -@@ -645,6 +718,8 @@ static void mtk_mac_link_up(struct phyli +@@ -644,6 +717,8 @@ static void mtk_mac_link_up(struct phyli break; } @@ -139,7 +139,7 @@ Signed-off-by: Felix Fietkau /* Configure duplex */ if (duplex == DUPLEX_FULL) mcr |= MAC_MCR_FORCE_DPX; -@@ -1105,7 +1180,8 @@ static void mtk_tx_set_dma_desc_v1(struc +@@ -1104,7 +1179,8 @@ static void mtk_tx_set_dma_desc_v1(struc WRITE_ONCE(desc->txd1, info->addr); @@ -149,7 +149,7 @@ Signed-off-by: Felix Fietkau if (info->last) data |= TX_DMA_LS0; WRITE_ONCE(desc->txd3, data); -@@ -1139,9 +1215,6 @@ static void mtk_tx_set_dma_desc_v2(struc +@@ -1138,9 +1214,6 @@ static void mtk_tx_set_dma_desc_v2(struc data |= TX_DMA_LS0; WRITE_ONCE(desc->txd3, data); @@ -159,7 +159,7 @@ Signed-off-by: Felix Fietkau data = (mac->id + 1) << TX_DMA_FPORT_SHIFT_V2; /* forward port */ data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid); WRITE_ONCE(desc->txd4, data); -@@ -1185,11 +1258,12 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1184,11 +1257,12 @@ static int mtk_tx_map(struct sk_buff *sk .gso = gso, .csum = skb->ip_summed == CHECKSUM_PARTIAL, .vlan = skb_vlan_tag_present(skb), @@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau struct mtk_mac *mac = netdev_priv(dev); struct mtk_eth *eth = mac->hw; const struct mtk_soc_data *soc = eth->soc; -@@ -1197,8 +1271,10 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1196,8 +1270,10 @@ static int mtk_tx_map(struct sk_buff *sk struct mtk_tx_dma *itxd_pdma, *txd_pdma; struct mtk_tx_buf *itx_buf, *tx_buf; int i, n_desc = 1; @@ -184,7 +184,7 @@ Signed-off-by: Felix Fietkau itxd = ring->next_free; itxd_pdma = qdma_to_pdma(ring, itxd); if (itxd == ring->last_free) -@@ -1247,7 +1323,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1246,7 +1322,7 @@ static int mtk_tx_map(struct sk_buff *sk memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info)); txd_info.size = min_t(unsigned int, frag_size, soc->txrx.dma_max_len); @@ -193,7 +193,7 @@ Signed-off-by: Felix Fietkau txd_info.last = i == skb_shinfo(skb)->nr_frags - 1 && !(frag_size - txd_info.size); txd_info.addr = skb_frag_dma_map(eth->dma_dev, frag, -@@ -1286,7 +1362,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1285,7 +1361,7 @@ static int mtk_tx_map(struct sk_buff *sk txd_pdma->txd2 |= TX_DMA_LS1; } @@ -202,7 +202,7 @@ Signed-off-by: Felix Fietkau skb_tx_timestamp(skb); ring->next_free = mtk_qdma_phys_to_virt(ring, txd->txd2); -@@ -1298,8 +1374,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1297,8 +1373,7 @@ static int mtk_tx_map(struct sk_buff *sk wmb(); if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) { @@ -212,7 +212,7 @@ Signed-off-by: Felix Fietkau mtk_w32(eth, txd->txd2, soc->reg_map->qdma.ctx_ptr); } else { int next_idx; -@@ -1368,7 +1443,7 @@ static void mtk_wake_queue(struct mtk_et +@@ -1367,7 +1442,7 @@ static void mtk_wake_queue(struct mtk_et for (i = 0; i < MTK_MAC_COUNT; i++) { if (!eth->netdev[i]) continue; @@ -221,7 +221,7 @@ Signed-off-by: Felix Fietkau } } -@@ -1392,7 +1467,7 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1391,7 +1466,7 @@ static netdev_tx_t mtk_start_xmit(struct tx_num = mtk_cal_txd_req(eth, skb); if (unlikely(atomic_read(&ring->free_count) <= tx_num)) { @@ -230,7 +230,7 @@ Signed-off-by: Felix Fietkau netif_err(eth, tx_queued, dev, "Tx Ring full when queue awake!\n"); spin_unlock(ð->page_lock); -@@ -1418,7 +1493,7 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1417,7 +1492,7 @@ static netdev_tx_t mtk_start_xmit(struct goto drop; if (unlikely(atomic_read(&ring->free_count) <= ring->thresh)) @@ -239,7 +239,7 @@ Signed-off-by: Felix Fietkau spin_unlock(ð->page_lock); -@@ -1585,10 +1660,12 @@ static int mtk_xdp_submit_frame(struct m +@@ -1584,10 +1659,12 @@ static int mtk_xdp_submit_frame(struct m struct skb_shared_info *sinfo = xdp_get_shared_info_from_frame(xdpf); const struct mtk_soc_data *soc = eth->soc; struct mtk_tx_ring *ring = ð->tx_ring; @@ -252,7 +252,7 @@ Signed-off-by: Felix Fietkau }; int err, index = 0, n_desc = 1, nr_frags; struct mtk_tx_buf *htx_buf, *tx_buf; -@@ -1638,6 +1715,7 @@ static int mtk_xdp_submit_frame(struct m +@@ -1637,6 +1714,7 @@ static int mtk_xdp_submit_frame(struct m memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info)); txd_info.size = skb_frag_size(&sinfo->frags[index]); txd_info.last = index + 1 == nr_frags; @@ -260,7 +260,7 @@ Signed-off-by: Felix Fietkau data = skb_frag_address(&sinfo->frags[index]); index++; -@@ -1992,8 +2070,46 @@ rx_done: +@@ -1991,8 +2069,46 @@ rx_done: return done; } @@ -308,7 +308,7 @@ Signed-off-by: Felix Fietkau { const struct mtk_reg_map *reg_map = eth->soc->reg_map; struct mtk_tx_ring *ring = ð->tx_ring; -@@ -2025,12 +2141,9 @@ static int mtk_poll_tx_qdma(struct mtk_e +@@ -2024,12 +2140,9 @@ static int mtk_poll_tx_qdma(struct mtk_e break; if (tx_buf->data != (void *)MTK_DMA_DUMMY_DESC) { @@ -323,7 +323,7 @@ Signed-off-by: Felix Fietkau budget--; } mtk_tx_unmap(eth, tx_buf, &bq, true); -@@ -2049,7 +2162,7 @@ static int mtk_poll_tx_qdma(struct mtk_e +@@ -2048,7 +2161,7 @@ static int mtk_poll_tx_qdma(struct mtk_e } static int mtk_poll_tx_pdma(struct mtk_eth *eth, int budget, @@ -332,7 +332,7 @@ Signed-off-by: Felix Fietkau { struct mtk_tx_ring *ring = ð->tx_ring; struct mtk_tx_buf *tx_buf; -@@ -2067,12 +2180,8 @@ static int mtk_poll_tx_pdma(struct mtk_e +@@ -2066,12 +2179,8 @@ static int mtk_poll_tx_pdma(struct mtk_e break; if (tx_buf->data != (void *)MTK_DMA_DUMMY_DESC) { @@ -347,7 +347,7 @@ Signed-off-by: Felix Fietkau budget--; } mtk_tx_unmap(eth, tx_buf, &bq, true); -@@ -2094,26 +2203,15 @@ static int mtk_poll_tx(struct mtk_eth *e +@@ -2093,26 +2202,15 @@ static int mtk_poll_tx(struct mtk_eth *e { struct mtk_tx_ring *ring = ð->tx_ring; struct dim_sample dim_sample = {}; @@ -379,7 +379,7 @@ Signed-off-by: Felix Fietkau dim_update_sample(eth->tx_events, eth->tx_packets, eth->tx_bytes, &dim_sample); -@@ -2123,7 +2221,7 @@ static int mtk_poll_tx(struct mtk_eth *e +@@ -2122,7 +2220,7 @@ static int mtk_poll_tx(struct mtk_eth *e (atomic_read(&ring->free_count) > ring->thresh)) mtk_wake_queue(eth); @@ -388,7 +388,7 @@ Signed-off-by: Felix Fietkau } static void mtk_handle_status_irq(struct mtk_eth *eth) -@@ -2209,6 +2307,7 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2208,6 +2306,7 @@ static int mtk_tx_alloc(struct mtk_eth * int i, sz = soc->txrx.txd_size; struct mtk_tx_dma_v2 *txd; int ring_size; @@ -396,7 +396,7 @@ Signed-off-by: Felix Fietkau if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) ring_size = MTK_QDMA_RING_SIZE; -@@ -2276,8 +2375,25 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2275,8 +2374,25 @@ static int mtk_tx_alloc(struct mtk_eth * ring->phys + ((ring_size - 1) * sz), soc->reg_map->qdma.crx_ptr); mtk_w32(eth, ring->last_free_ptr, soc->reg_map->qdma.drx_ptr); @@ -424,7 +424,7 @@ Signed-off-by: Felix Fietkau } else { mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0); mtk_w32(eth, ring_size, MT7628_TX_MAX_CNT0); -@@ -2962,7 +3078,7 @@ static int mtk_start_dma(struct mtk_eth +@@ -2961,7 +3077,7 @@ static int mtk_start_dma(struct mtk_eth if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) val |= MTK_MUTLI_CNT | MTK_RESV_BUF | MTK_WCOMP_EN | MTK_DMAD_WR_WDONE | @@ -433,7 +433,7 @@ Signed-off-by: Felix Fietkau else val |= MTK_RX_BT_32DWORDS; mtk_w32(eth, val, reg_map->qdma.glo_cfg); -@@ -3008,6 +3124,45 @@ static void mtk_gdm_config(struct mtk_et +@@ -3007,6 +3123,45 @@ static void mtk_gdm_config(struct mtk_et mtk_w32(eth, 0, MTK_RST_GL); } @@ -479,7 +479,7 @@ Signed-off-by: Felix Fietkau static int mtk_open(struct net_device *dev) { struct mtk_mac *mac = netdev_priv(dev); -@@ -3050,7 +3205,8 @@ static int mtk_open(struct net_device *d +@@ -3049,7 +3204,8 @@ static int mtk_open(struct net_device *d refcount_inc(ð->dma_refcnt); phylink_start(mac->phylink); @@ -489,7 +489,7 @@ Signed-off-by: Felix Fietkau return 0; } -@@ -3759,8 +3915,12 @@ static int mtk_unreg_dev(struct mtk_eth +@@ -3758,8 +3914,12 @@ static int mtk_unreg_dev(struct mtk_eth int i; for (i = 0; i < MTK_MAC_COUNT; i++) { @@ -502,7 +502,7 @@ Signed-off-by: Felix Fietkau unregister_netdev(eth->netdev[i]); } -@@ -3977,6 +4137,23 @@ static int mtk_set_rxnfc(struct net_devi +@@ -3976,6 +4136,23 @@ static int mtk_set_rxnfc(struct net_devi return ret; } @@ -526,7 +526,7 @@ Signed-off-by: Felix Fietkau static const struct ethtool_ops mtk_ethtool_ops = { .get_link_ksettings = mtk_get_link_ksettings, .set_link_ksettings = mtk_set_link_ksettings, -@@ -4011,6 +4188,7 @@ static const struct net_device_ops mtk_n +@@ -4010,6 +4187,7 @@ static const struct net_device_ops mtk_n .ndo_setup_tc = mtk_eth_setup_tc, .ndo_bpf = mtk_xdp, .ndo_xdp_xmit = mtk_xdp_xmit, @@ -534,7 +534,7 @@ Signed-off-by: Felix Fietkau }; static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) -@@ -4020,6 +4198,7 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4019,6 +4197,7 @@ static int mtk_add_mac(struct mtk_eth *e struct phylink *phylink; struct mtk_mac *mac; int id, err; @@ -542,7 +542,7 @@ Signed-off-by: Felix Fietkau if (!_id) { dev_err(eth->dev, "missing mac id\n"); -@@ -4037,7 +4216,10 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4036,7 +4215,10 @@ static int mtk_add_mac(struct mtk_eth *e return -EINVAL; } @@ -554,7 +554,7 @@ Signed-off-by: Felix Fietkau if (!eth->netdev[id]) { dev_err(eth->dev, "alloc_etherdev failed\n"); return -ENOMEM; -@@ -4145,6 +4327,11 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4144,6 +4326,11 @@ static int mtk_add_mac(struct mtk_eth *e else eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN; diff --git a/target/linux/generic/backport-6.1/730-09-v6.3-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch b/target/linux/generic/backport-6.1/730-09-v6.3-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch index b8e3452f30..53d8ff472e 100644 --- a/target/linux/generic/backport-6.1/730-09-v6.3-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch +++ b/target/linux/generic/backport-6.1/730-09-v6.3-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch @@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau #include "mtk_eth_soc.h" #include "mtk_wed.h" -@@ -2021,16 +2022,22 @@ static int mtk_poll_rx(struct napi_struc +@@ -2020,16 +2021,22 @@ static int mtk_poll_rx(struct napi_struc htons(RX_DMA_VPID(trxd.rxd4)), RX_DMA_VID(trxd.rxd4)); } else if (trxd.rxd2 & RX_DMA_VTAG) { @@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau } skb_record_rx_queue(skb, 0); -@@ -2858,15 +2865,30 @@ static netdev_features_t mtk_fix_feature +@@ -2857,15 +2864,30 @@ static netdev_features_t mtk_fix_feature static int mtk_set_features(struct net_device *dev, netdev_features_t features) { @@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau } /* wait for DMA to finish whatever it is doing before we start using it again */ -@@ -3163,11 +3185,45 @@ found: +@@ -3162,11 +3184,45 @@ found: return NOTIFY_DONE; } @@ -135,7 +135,7 @@ Signed-off-by: Felix Fietkau err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); if (err) { -@@ -3688,6 +3744,10 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3687,6 +3743,10 @@ static int mtk_hw_init(struct mtk_eth *e */ val = mtk_r32(eth, MTK_CDMQ_IG_CTRL); mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL); @@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau /* Enable RX VLan Offloading */ mtk_w32(eth, 1, MTK_CDMP_EG_CTRL); -@@ -3907,6 +3967,12 @@ static int mtk_free_dev(struct mtk_eth * +@@ -3906,6 +3966,12 @@ static int mtk_free_dev(struct mtk_eth * free_netdev(eth->netdev[i]); } diff --git a/target/linux/generic/backport-6.1/730-12-v6.3-net-ethernet-mtk_eth_soc-disable-hardware-DSA-untagg.patch b/target/linux/generic/backport-6.1/730-12-v6.3-net-ethernet-mtk_eth_soc-disable-hardware-DSA-untagg.patch index a88df2b8e3..08d72fc820 100644 --- a/target/linux/generic/backport-6.1/730-12-v6.3-net-ethernet-mtk_eth_soc-disable-hardware-DSA-untagg.patch +++ b/target/linux/generic/backport-6.1/730-12-v6.3-net-ethernet-mtk_eth_soc-disable-hardware-DSA-untagg.patch @@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3201,7 +3201,8 @@ static int mtk_open(struct net_device *d +@@ -3200,7 +3200,8 @@ static int mtk_open(struct net_device *d struct mtk_eth *eth = mac->hw; int i, err; @@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) { struct metadata_dst *md_dst = eth->dsa_meta[i]; -@@ -3218,7 +3219,8 @@ static int mtk_open(struct net_device *d +@@ -3217,7 +3218,8 @@ static int mtk_open(struct net_device *d } } else { /* Hardware special tag parsing needs to be disabled if at least diff --git a/target/linux/generic/backport-6.1/730-13-v6.3-net-ethernet-mtk_eth_soc-enable-special-tag-when-any.patch b/target/linux/generic/backport-6.1/730-13-v6.3-net-ethernet-mtk_eth_soc-enable-special-tag-when-any.patch index 8da728b9e9..30c32d5cce 100644 --- a/target/linux/generic/backport-6.1/730-13-v6.3-net-ethernet-mtk_eth_soc-enable-special-tag-when-any.patch +++ b/target/linux/generic/backport-6.1/730-13-v6.3-net-ethernet-mtk_eth_soc-enable-special-tag-when-any.patch @@ -23,7 +23,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3136,7 +3136,7 @@ static void mtk_gdm_config(struct mtk_et +@@ -3135,7 +3135,7 @@ static void mtk_gdm_config(struct mtk_et val |= config; @@ -32,7 +32,7 @@ Signed-off-by: David S. Miller val |= MTK_GDMA_SPECIAL_TAG; mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i)); -@@ -3201,8 +3201,7 @@ static int mtk_open(struct net_device *d +@@ -3200,8 +3200,7 @@ static int mtk_open(struct net_device *d struct mtk_eth *eth = mac->hw; int i, err; @@ -42,7 +42,7 @@ Signed-off-by: David S. Miller for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) { struct metadata_dst *md_dst = eth->dsa_meta[i]; -@@ -3219,8 +3218,7 @@ static int mtk_open(struct net_device *d +@@ -3218,8 +3217,7 @@ static int mtk_open(struct net_device *d } } else { /* Hardware special tag parsing needs to be disabled if at least diff --git a/target/linux/generic/backport-6.1/730-14-v6.3-net-ethernet-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch b/target/linux/generic/backport-6.1/730-14-v6.3-net-ethernet-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch index 51cd572ab2..eb3b0c63bc 100644 --- a/target/linux/generic/backport-6.1/730-14-v6.3-net-ethernet-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch +++ b/target/linux/generic/backport-6.1/730-14-v6.3-net-ethernet-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch @@ -77,7 +77,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1877,7 +1877,9 @@ static int mtk_poll_rx(struct napi_struc +@@ -1876,7 +1876,9 @@ static int mtk_poll_rx(struct napi_struc while (done < budget) { unsigned int pktlen, *rxdcsum; @@ -87,7 +87,7 @@ Signed-off-by: David S. Miller dma_addr_t dma_addr; u32 hash, reason; int mac = 0; -@@ -2017,27 +2019,29 @@ static int mtk_poll_rx(struct napi_struc +@@ -2016,27 +2018,29 @@ static int mtk_poll_rx(struct napi_struc if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX) { if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { diff --git a/target/linux/generic/backport-6.1/730-18-v6.3-net-ethernet-mtk_eth_soc-fix-tx-throughput-regressio.patch b/target/linux/generic/backport-6.1/730-18-v6.3-net-ethernet-mtk_eth_soc-fix-tx-throughput-regressio.patch index ca5b6b3a3e..f6d91d3080 100644 --- a/target/linux/generic/backport-6.1/730-18-v6.3-net-ethernet-mtk_eth_soc-fix-tx-throughput-regressio.patch +++ b/target/linux/generic/backport-6.1/730-18-v6.3-net-ethernet-mtk_eth_soc-fix-tx-throughput-regressio.patch @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -719,8 +719,6 @@ static void mtk_mac_link_up(struct phyli +@@ -718,8 +718,6 @@ static void mtk_mac_link_up(struct phyli break; } diff --git a/target/linux/generic/backport-6.1/733-v6.3-18-net-ethernet-mtk_eth_soc-add-support-for-MT7981.patch b/target/linux/generic/backport-6.1/733-v6.3-18-net-ethernet-mtk_eth_soc-add-support-for-MT7981.patch index a1247218b0..3f3f73183e 100644 --- a/target/linux/generic/backport-6.1/733-v6.3-18-net-ethernet-mtk_eth_soc-add-support-for-MT7981.patch +++ b/target/linux/generic/backport-6.1/733-v6.3-18-net-ethernet-mtk_eth_soc-add-support-for-MT7981.patch @@ -57,7 +57,7 @@ Signed-off-by: Jakub Kicinski mtk_eth_path_name(path), __func__, updated); --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4803,6 +4803,26 @@ static const struct mtk_soc_data mt7629_ +@@ -4802,6 +4802,26 @@ static const struct mtk_soc_data mt7629_ }, }; @@ -84,7 +84,7 @@ Signed-off-by: Jakub Kicinski static const struct mtk_soc_data mt7986_data = { .reg_map = &mt7986_reg_map, .ana_rgc3 = 0x128, -@@ -4845,6 +4865,7 @@ const struct of_device_id of_mtk_match[] +@@ -4844,6 +4864,7 @@ const struct of_device_id of_mtk_match[] { .compatible = "mediatek,mt7622-eth", .data = &mt7622_data}, { .compatible = "mediatek,mt7623-eth", .data = &mt7623_data}, { .compatible = "mediatek,mt7629-eth", .data = &mt7629_data}, diff --git a/target/linux/generic/backport-6.1/733-v6.3-19-net-ethernet-mtk_eth_soc-set-MDIO-bus-clock-frequenc.patch b/target/linux/generic/backport-6.1/733-v6.3-19-net-ethernet-mtk_eth_soc-set-MDIO-bus-clock-frequenc.patch index 1cb1f40538..c60a4337ef 100644 --- a/target/linux/generic/backport-6.1/733-v6.3-19-net-ethernet-mtk_eth_soc-set-MDIO-bus-clock-frequenc.patch +++ b/target/linux/generic/backport-6.1/733-v6.3-19-net-ethernet-mtk_eth_soc-set-MDIO-bus-clock-frequenc.patch @@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -744,8 +744,10 @@ static const struct phylink_mac_ops mtk_ +@@ -743,8 +743,10 @@ static const struct phylink_mac_ops mtk_ static int mtk_mdio_init(struct mtk_eth *eth) { @@ -32,7 +32,7 @@ Signed-off-by: Jakub Kicinski mii_np = of_get_child_by_name(eth->dev->of_node, "mdio-bus"); if (!mii_np) { -@@ -772,6 +774,25 @@ static int mtk_mdio_init(struct mtk_eth +@@ -771,6 +773,25 @@ static int mtk_mdio_init(struct mtk_eth eth->mii_bus->parent = eth->dev; snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np); diff --git a/target/linux/generic/backport-6.1/733-v6.3-20-net-ethernet-mtk_eth_soc-switch-to-external-PCS-driv.patch b/target/linux/generic/backport-6.1/733-v6.3-20-net-ethernet-mtk_eth_soc-switch-to-external-PCS-driv.patch index 110944658d..d73eccedbb 100644 --- a/target/linux/generic/backport-6.1/733-v6.3-20-net-ethernet-mtk_eth_soc-switch-to-external-PCS-driv.patch +++ b/target/linux/generic/backport-6.1/733-v6.3-20-net-ethernet-mtk_eth_soc-switch-to-external-PCS-driv.patch @@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski } return NULL; -@@ -4016,8 +4017,17 @@ static int mtk_unreg_dev(struct mtk_eth +@@ -4015,8 +4016,17 @@ static int mtk_unreg_dev(struct mtk_eth return 0; } @@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski mtk_unreg_dev(eth); mtk_free_dev(eth); cancel_work_sync(ð->pending_work); -@@ -4457,6 +4467,36 @@ void mtk_eth_set_dma_device(struct mtk_e +@@ -4456,6 +4466,36 @@ void mtk_eth_set_dma_device(struct mtk_e rtnl_unlock(); } @@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski static int mtk_probe(struct platform_device *pdev) { struct resource *res = NULL; -@@ -4520,13 +4560,7 @@ static int mtk_probe(struct platform_dev +@@ -4519,13 +4559,7 @@ static int mtk_probe(struct platform_dev } if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII)) { @@ -130,7 +130,7 @@ Signed-off-by: Jakub Kicinski if (err) return err; -@@ -4537,14 +4571,17 @@ static int mtk_probe(struct platform_dev +@@ -4536,14 +4570,17 @@ static int mtk_probe(struct platform_dev "mediatek,pctl"); if (IS_ERR(eth->pctl)) { dev_err(&pdev->dev, "no pctl regmap found\n"); @@ -151,7 +151,7 @@ Signed-off-by: Jakub Kicinski } if (eth->soc->offload_version) { -@@ -4703,6 +4740,8 @@ err_deinit_hw: +@@ -4702,6 +4739,8 @@ err_deinit_hw: mtk_hw_deinit(eth); err_wed_exit: mtk_wed_exit(); diff --git a/target/linux/generic/backport-6.1/733-v6.4-23-net-ethernet-mtk_eth_soc-ppe-add-support-for-flow-ac.patch b/target/linux/generic/backport-6.1/733-v6.4-23-net-ethernet-mtk_eth_soc-ppe-add-support-for-flow-ac.patch index 93eaffa19e..5c3de57591 100644 --- a/target/linux/generic/backport-6.1/733-v6.4-23-net-ethernet-mtk_eth_soc-ppe-add-support-for-flow-ac.patch +++ b/target/linux/generic/backport-6.1/733-v6.4-23-net-ethernet-mtk_eth_soc-ppe-add-support-for-flow-ac.patch @@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4691,8 +4691,8 @@ static int mtk_probe(struct platform_dev +@@ -4690,8 +4690,8 @@ static int mtk_probe(struct platform_dev for (i = 0; i < num_ppe; i++) { u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400; @@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski if (!eth->ppe[i]) { err = -ENOMEM; goto err_deinit_ppe; -@@ -4816,6 +4816,7 @@ static const struct mtk_soc_data mt7622_ +@@ -4815,6 +4815,7 @@ static const struct mtk_soc_data mt7622_ .required_pctl = false, .offload_version = 2, .hash_offset = 2, @@ -46,7 +46,7 @@ Signed-off-by: Jakub Kicinski .foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .txrx = { .txd_size = sizeof(struct mtk_tx_dma), -@@ -4853,6 +4854,7 @@ static const struct mtk_soc_data mt7629_ +@@ -4852,6 +4853,7 @@ static const struct mtk_soc_data mt7629_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7629_CLKS_BITMAP, .required_pctl = false, @@ -54,7 +54,7 @@ Signed-off-by: Jakub Kicinski .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4873,6 +4875,7 @@ static const struct mtk_soc_data mt7981_ +@@ -4872,6 +4874,7 @@ static const struct mtk_soc_data mt7981_ .offload_version = 2, .hash_offset = 4, .foe_entry_size = sizeof(struct mtk_foe_entry), @@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski .txrx = { .txd_size = sizeof(struct mtk_tx_dma_v2), .rxd_size = sizeof(struct mtk_rx_dma_v2), -@@ -4893,6 +4896,7 @@ static const struct mtk_soc_data mt7986_ +@@ -4892,6 +4895,7 @@ static const struct mtk_soc_data mt7986_ .offload_version = 2, .hash_offset = 4, .foe_entry_size = sizeof(struct mtk_foe_entry), diff --git a/target/linux/generic/backport-6.1/733-v6.4-25-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch b/target/linux/generic/backport-6.1/733-v6.4-25-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch index 217e517c3a..7e3d5a3308 100644 --- a/target/linux/generic/backport-6.1/733-v6.4-25-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch +++ b/target/linux/generic/backport-6.1/733-v6.4-25-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch @@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1897,9 +1897,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -1896,9 +1896,7 @@ static int mtk_poll_rx(struct napi_struc while (done < budget) { unsigned int pktlen, *rxdcsum; @@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau dma_addr_t dma_addr; u32 hash, reason; int mac = 0; -@@ -2034,36 +2032,21 @@ static int mtk_poll_rx(struct napi_struc +@@ -2033,36 +2031,21 @@ static int mtk_poll_rx(struct napi_struc skb_checksum_none_assert(skb); skb->protocol = eth_type_trans(skb, netdev); @@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau skb_record_rx_queue(skb, 0); napi_gro_receive(napi, skb); -@@ -2889,29 +2872,11 @@ static netdev_features_t mtk_fix_feature +@@ -2888,29 +2871,11 @@ static netdev_features_t mtk_fix_feature static int mtk_set_features(struct net_device *dev, netdev_features_t features) { @@ -100,7 +100,7 @@ Signed-off-by: Felix Fietkau return 0; } -@@ -3225,30 +3190,6 @@ static int mtk_open(struct net_device *d +@@ -3224,30 +3189,6 @@ static int mtk_open(struct net_device *d struct mtk_eth *eth = mac->hw; int i, err; @@ -131,7 +131,7 @@ Signed-off-by: Felix Fietkau err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); if (err) { netdev_err(dev, "%s: could not attach PHY: %d\n", __func__, -@@ -3287,6 +3228,35 @@ static int mtk_open(struct net_device *d +@@ -3286,6 +3227,35 @@ static int mtk_open(struct net_device *d phylink_start(mac->phylink); netif_tx_start_all_queues(dev); @@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau return 0; } -@@ -3771,10 +3741,9 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3770,10 +3740,9 @@ static int mtk_hw_init(struct mtk_eth *e if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { val = mtk_r32(eth, MTK_CDMP_IG_CTRL); mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL); @@ -180,7 +180,7 @@ Signed-off-by: Felix Fietkau /* set interrupt delays based on current Net DIM sample */ mtk_dim_rx(ð->rx_dim.work); -@@ -4414,7 +4383,7 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4413,7 +4382,7 @@ static int mtk_add_mac(struct mtk_eth *e eth->netdev[id]->hw_features |= NETIF_F_LRO; eth->netdev[id]->vlan_features = eth->soc->hw_features & diff --git a/target/linux/generic/backport-6.1/750-v6.5-01-net-ethernet-mtk_ppe-add-MTK_FOE_ENTRY_V-1-2-_SIZE-m.patch b/target/linux/generic/backport-6.1/750-v6.5-01-net-ethernet-mtk_ppe-add-MTK_FOE_ENTRY_V-1-2-_SIZE-m.patch index d7d1c08fce..afce0cf04c 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-01-net-ethernet-mtk_ppe-add-MTK_FOE_ENTRY_V-1-2-_SIZE-m.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-01-net-ethernet-mtk_ppe-add-MTK_FOE_ENTRY_V-1-2-_SIZE-m.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4765,7 +4765,7 @@ static const struct mtk_soc_data mt7621_ +@@ -4764,7 +4764,7 @@ static const struct mtk_soc_data mt7621_ .required_pctl = false, .offload_version = 1, .hash_offset = 2, @@ -26,7 +26,7 @@ Signed-off-by: David S. Miller .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4786,7 +4786,7 @@ static const struct mtk_soc_data mt7622_ +@@ -4785,7 +4785,7 @@ static const struct mtk_soc_data mt7622_ .offload_version = 2, .hash_offset = 2, .has_accounting = true, @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4805,7 +4805,7 @@ static const struct mtk_soc_data mt7623_ +@@ -4804,7 +4804,7 @@ static const struct mtk_soc_data mt7623_ .required_pctl = true, .offload_version = 1, .hash_offset = 2, @@ -44,7 +44,7 @@ Signed-off-by: David S. Miller .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4843,8 +4843,8 @@ static const struct mtk_soc_data mt7981_ +@@ -4842,8 +4842,8 @@ static const struct mtk_soc_data mt7981_ .required_pctl = false, .offload_version = 2, .hash_offset = 4, @@ -54,7 +54,7 @@ Signed-off-by: David S. Miller .txrx = { .txd_size = sizeof(struct mtk_tx_dma_v2), .rxd_size = sizeof(struct mtk_rx_dma_v2), -@@ -4864,8 +4864,8 @@ static const struct mtk_soc_data mt7986_ +@@ -4863,8 +4863,8 @@ static const struct mtk_soc_data mt7986_ .required_pctl = false, .offload_version = 2, .hash_offset = 4, diff --git a/target/linux/generic/backport-6.1/750-v6.5-02-net-ethernet-mtk_eth_soc-remove-incorrect-PLL-config.patch b/target/linux/generic/backport-6.1/750-v6.5-02-net-ethernet-mtk_eth_soc-remove-incorrect-PLL-config.patch index fb54f404b2..28bf2b6d5f 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-02-net-ethernet-mtk_eth_soc-remove-incorrect-PLL-config.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-02-net-ethernet-mtk_eth_soc-remove-incorrect-PLL-config.patch @@ -95,7 +95,7 @@ Signed-off-by: Paolo Abeni /* mt7623_pad_clk_setup */ for (i = 0 ; i < NUM_TRGMII_CTRL; i++) -@@ -4342,13 +4314,19 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4341,13 +4313,19 @@ static int mtk_add_mac(struct mtk_eth *e mac->phylink_config.mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE | MAC_10 | MAC_100 | MAC_1000 | MAC_2500FD; @@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni if (MTK_HAS_CAPS(mac->hw->soc->caps, MTK_TRGMII) && !mac->id) __set_bit(PHY_INTERFACE_MODE_TRGMII, -@@ -4806,6 +4784,7 @@ static const struct mtk_soc_data mt7623_ +@@ -4805,6 +4783,7 @@ static const struct mtk_soc_data mt7623_ .offload_version = 1, .hash_offset = 2, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, diff --git a/target/linux/generic/backport-6.1/750-v6.5-03-net-ethernet-mtk_eth_soc-remove-mac_pcs_get_state-an.patch b/target/linux/generic/backport-6.1/750-v6.5-03-net-ethernet-mtk_eth_soc-remove-mac_pcs_get_state-an.patch index 293066fa9a..fd458a67bc 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-03-net-ethernet-mtk_eth_soc-remove-mac_pcs_get_state-an.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-03-net-ethernet-mtk_eth_soc-remove-mac_pcs_get_state-an.patch @@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -555,38 +555,6 @@ static int mtk_mac_finish(struct phylink +@@ -554,38 +554,6 @@ static int mtk_mac_finish(struct phylink return 0; } @@ -62,7 +62,7 @@ Signed-off-by: Paolo Abeni static void mtk_mac_link_down(struct phylink_config *config, unsigned int mode, phy_interface_t interface) { -@@ -708,7 +676,6 @@ static void mtk_mac_link_up(struct phyli +@@ -707,7 +675,6 @@ static void mtk_mac_link_up(struct phyli static const struct phylink_mac_ops mtk_phylink_ops = { .mac_select_pcs = mtk_mac_select_pcs, @@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni .mac_config = mtk_mac_config, .mac_finish = mtk_mac_finish, .mac_link_down = mtk_mac_link_down, -@@ -4309,8 +4276,6 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4308,8 +4275,6 @@ static int mtk_add_mac(struct mtk_eth *e mac->phylink_config.dev = ð->netdev[id]->dev; mac->phylink_config.type = PHYLINK_NETDEV; diff --git a/target/linux/generic/backport-6.1/750-v6.5-05-net-ethernet-mtk_eth_soc-add-version-in-mtk_soc_data.patch b/target/linux/generic/backport-6.1/750-v6.5-05-net-ethernet-mtk_eth_soc-add-version-in-mtk_soc_data.patch index 25c87b0415..aa259e7175 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-05-net-ethernet-mtk_eth_soc-add-version-in-mtk_soc_data.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-05-net-ethernet-mtk_eth_soc-add-version-in-mtk_soc_data.patch @@ -23,7 +23,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -580,7 +580,7 @@ static void mtk_set_queue_speed(struct m +@@ -579,7 +579,7 @@ static void mtk_set_queue_speed(struct m FIELD_PREP(MTK_QTX_SCH_MIN_RATE_MAN, 1) | FIELD_PREP(MTK_QTX_SCH_MIN_RATE_EXP, 4) | MTK_QTX_SCH_LEAKY_BUCKET_SIZE; @@ -32,7 +32,7 @@ Signed-off-by: Jakub Kicinski val |= MTK_QTX_SCH_LEAKY_BUCKET_EN; if (IS_ENABLED(CONFIG_SOC_MT7621)) { -@@ -955,7 +955,7 @@ static bool mtk_rx_get_desc(struct mtk_e +@@ -954,7 +954,7 @@ static bool mtk_rx_get_desc(struct mtk_e rxd->rxd1 = READ_ONCE(dma_rxd->rxd1); rxd->rxd3 = READ_ONCE(dma_rxd->rxd3); rxd->rxd4 = READ_ONCE(dma_rxd->rxd4); @@ -41,7 +41,7 @@ Signed-off-by: Jakub Kicinski rxd->rxd5 = READ_ONCE(dma_rxd->rxd5); rxd->rxd6 = READ_ONCE(dma_rxd->rxd6); } -@@ -1013,7 +1013,7 @@ static int mtk_init_fq_dma(struct mtk_et +@@ -1012,7 +1012,7 @@ static int mtk_init_fq_dma(struct mtk_et txd->txd3 = TX_DMA_PLEN0(MTK_QDMA_PAGE_SIZE); txd->txd4 = 0; @@ -50,7 +50,7 @@ Signed-off-by: Jakub Kicinski txd->txd5 = 0; txd->txd6 = 0; txd->txd7 = 0; -@@ -1204,7 +1204,7 @@ static void mtk_tx_set_dma_desc(struct n +@@ -1203,7 +1203,7 @@ static void mtk_tx_set_dma_desc(struct n struct mtk_mac *mac = netdev_priv(dev); struct mtk_eth *eth = mac->hw; @@ -59,7 +59,7 @@ Signed-off-by: Jakub Kicinski mtk_tx_set_dma_desc_v2(dev, txd, info); else mtk_tx_set_dma_desc_v1(dev, txd, info); -@@ -1511,7 +1511,7 @@ static void mtk_update_rx_cpu_idx(struct +@@ -1510,7 +1510,7 @@ static void mtk_update_rx_cpu_idx(struct static bool mtk_page_pool_enabled(struct mtk_eth *eth) { @@ -68,7 +68,7 @@ Signed-off-by: Jakub Kicinski } static struct page_pool *mtk_create_page_pool(struct mtk_eth *eth, -@@ -1853,7 +1853,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -1852,7 +1852,7 @@ static int mtk_poll_rx(struct napi_struc break; /* find out which mac the packet come from. values start at 1 */ @@ -77,7 +77,7 @@ Signed-off-by: Jakub Kicinski mac = RX_DMA_GET_SPORT_V2(trxd.rxd5) - 1; else if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628) && !(trxd.rxd4 & RX_DMA_SPECIAL_TAG)) -@@ -1949,7 +1949,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -1948,7 +1948,7 @@ static int mtk_poll_rx(struct napi_struc skb->dev = netdev; bytes += skb->len; @@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski reason = FIELD_GET(MTK_RXD5_PPE_CPU_REASON, trxd.rxd5); hash = trxd.rxd5 & MTK_RXD5_FOE_ENTRY; if (hash != MTK_RXD5_FOE_ENTRY) -@@ -1974,8 +1974,8 @@ static int mtk_poll_rx(struct napi_struc +@@ -1973,8 +1973,8 @@ static int mtk_poll_rx(struct napi_struc /* When using VLAN untagging in combination with DSA, the * hardware treats the MTK special tag as a VLAN and untags it. */ @@ -97,7 +97,7 @@ Signed-off-by: Jakub Kicinski unsigned int port = RX_DMA_VPID(trxd.rxd3) & GENMASK(2, 0); if (port < ARRAY_SIZE(eth->dsa_meta) && -@@ -2285,7 +2285,7 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2284,7 +2284,7 @@ static int mtk_tx_alloc(struct mtk_eth * txd->txd2 = next_ptr; txd->txd3 = TX_DMA_LS0 | TX_DMA_OWNER_CPU; txd->txd4 = 0; @@ -106,7 +106,7 @@ Signed-off-by: Jakub Kicinski txd->txd5 = 0; txd->txd6 = 0; txd->txd7 = 0; -@@ -2338,14 +2338,14 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2337,14 +2337,14 @@ static int mtk_tx_alloc(struct mtk_eth * FIELD_PREP(MTK_QTX_SCH_MIN_RATE_MAN, 1) | FIELD_PREP(MTK_QTX_SCH_MIN_RATE_EXP, 4) | MTK_QTX_SCH_LEAKY_BUCKET_SIZE; @@ -123,7 +123,7 @@ Signed-off-by: Jakub Kicinski mtk_w32(eth, val, soc->reg_map->qdma.tx_sch_rate + 4); } else { mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0); -@@ -2474,7 +2474,7 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2473,7 +2473,7 @@ static int mtk_rx_alloc(struct mtk_eth * rxd->rxd3 = 0; rxd->rxd4 = 0; @@ -132,7 +132,7 @@ Signed-off-by: Jakub Kicinski rxd->rxd5 = 0; rxd->rxd6 = 0; rxd->rxd7 = 0; -@@ -3025,7 +3025,7 @@ static int mtk_start_dma(struct mtk_eth +@@ -3024,7 +3024,7 @@ static int mtk_start_dma(struct mtk_eth MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO | MTK_RX_2B_OFFSET | MTK_TX_WB_DDONE; @@ -141,7 +141,7 @@ Signed-off-by: Jakub Kicinski val |= MTK_MUTLI_CNT | MTK_RESV_BUF | MTK_WCOMP_EN | MTK_DMAD_WR_WDONE | MTK_CHK_DDONE_EN | MTK_LEAKY_BUCKET_EN; -@@ -3167,7 +3167,7 @@ static int mtk_open(struct net_device *d +@@ -3166,7 +3166,7 @@ static int mtk_open(struct net_device *d phylink_start(mac->phylink); netif_tx_start_all_queues(dev); @@ -150,7 +150,7 @@ Signed-off-by: Jakub Kicinski return 0; if (mtk_uses_dsa(dev) && !eth->prog) { -@@ -3432,7 +3432,7 @@ static void mtk_hw_reset(struct mtk_eth +@@ -3431,7 +3431,7 @@ static void mtk_hw_reset(struct mtk_eth { u32 val; @@ -159,7 +159,7 @@ Signed-off-by: Jakub Kicinski regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, 0); val = RSTCTRL_PPE0_V2; } else { -@@ -3444,7 +3444,7 @@ static void mtk_hw_reset(struct mtk_eth +@@ -3443,7 +3443,7 @@ static void mtk_hw_reset(struct mtk_eth ethsys_reset(eth, RSTCTRL_ETH | RSTCTRL_FE | val); @@ -168,7 +168,7 @@ Signed-off-by: Jakub Kicinski regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, 0x3ffffff); } -@@ -3470,7 +3470,7 @@ static void mtk_hw_warm_reset(struct mtk +@@ -3469,7 +3469,7 @@ static void mtk_hw_warm_reset(struct mtk return; } @@ -177,7 +177,7 @@ Signed-off-by: Jakub Kicinski rst_mask = RSTCTRL_ETH | RSTCTRL_PPE0_V2; else rst_mask = RSTCTRL_ETH | RSTCTRL_PPE0; -@@ -3640,7 +3640,7 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3639,7 +3639,7 @@ static int mtk_hw_init(struct mtk_eth *e else mtk_hw_reset(eth); @@ -186,7 +186,7 @@ Signed-off-by: Jakub Kicinski /* Set FE to PDMAv2 if necessary */ val = mtk_r32(eth, MTK_FE_GLO_MISC); mtk_w32(eth, val | BIT(4), MTK_FE_GLO_MISC); -@@ -3677,7 +3677,7 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3676,7 +3676,7 @@ static int mtk_hw_init(struct mtk_eth *e */ val = mtk_r32(eth, MTK_CDMQ_IG_CTRL); mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL); @@ -195,7 +195,7 @@ Signed-off-by: Jakub Kicinski val = mtk_r32(eth, MTK_CDMP_IG_CTRL); mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL); -@@ -3699,7 +3699,7 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3698,7 +3698,7 @@ static int mtk_hw_init(struct mtk_eth *e mtk_w32(eth, eth->soc->txrx.rx_irq_done_mask, reg_map->qdma.int_grp + 4); mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); @@ -204,7 +204,7 @@ Signed-off-by: Jakub Kicinski /* PSE should not drop port8 and port9 packets from WDMA Tx */ mtk_w32(eth, 0x00000300, PSE_DROP_CFG); -@@ -4488,7 +4488,7 @@ static int mtk_probe(struct platform_dev +@@ -4487,7 +4487,7 @@ static int mtk_probe(struct platform_dev } } @@ -213,7 +213,7 @@ Signed-off-by: Jakub Kicinski res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { err = -EINVAL; -@@ -4596,9 +4596,8 @@ static int mtk_probe(struct platform_dev +@@ -4595,9 +4595,8 @@ static int mtk_probe(struct platform_dev } if (eth->soc->offload_version) { @@ -224,7 +224,7 @@ Signed-off-by: Jakub Kicinski num_ppe = min_t(u32, ARRAY_SIZE(eth->ppe), num_ppe); for (i = 0; i < num_ppe; i++) { u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400; -@@ -4690,6 +4689,7 @@ static const struct mtk_soc_data mt2701_ +@@ -4689,6 +4688,7 @@ static const struct mtk_soc_data mt2701_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7623_CLKS_BITMAP, .required_pctl = true, @@ -232,7 +232,7 @@ Signed-off-by: Jakub Kicinski .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4706,6 +4706,7 @@ static const struct mtk_soc_data mt7621_ +@@ -4705,6 +4705,7 @@ static const struct mtk_soc_data mt7621_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7621_CLKS_BITMAP, .required_pctl = false, @@ -240,7 +240,7 @@ Signed-off-by: Jakub Kicinski .offload_version = 1, .hash_offset = 2, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, -@@ -4726,6 +4727,7 @@ static const struct mtk_soc_data mt7622_ +@@ -4725,6 +4726,7 @@ static const struct mtk_soc_data mt7622_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7622_CLKS_BITMAP, .required_pctl = false, @@ -248,7 +248,7 @@ Signed-off-by: Jakub Kicinski .offload_version = 2, .hash_offset = 2, .has_accounting = true, -@@ -4746,6 +4748,7 @@ static const struct mtk_soc_data mt7623_ +@@ -4745,6 +4747,7 @@ static const struct mtk_soc_data mt7623_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7623_CLKS_BITMAP, .required_pctl = true, @@ -256,7 +256,7 @@ Signed-off-by: Jakub Kicinski .offload_version = 1, .hash_offset = 2, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, -@@ -4768,6 +4771,7 @@ static const struct mtk_soc_data mt7629_ +@@ -4767,6 +4770,7 @@ static const struct mtk_soc_data mt7629_ .required_clks = MT7629_CLKS_BITMAP, .required_pctl = false, .has_accounting = true, @@ -264,7 +264,7 @@ Signed-off-by: Jakub Kicinski .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4785,6 +4789,7 @@ static const struct mtk_soc_data mt7981_ +@@ -4784,6 +4788,7 @@ static const struct mtk_soc_data mt7981_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7981_CLKS_BITMAP, .required_pctl = false, @@ -272,7 +272,7 @@ Signed-off-by: Jakub Kicinski .offload_version = 2, .hash_offset = 4, .has_accounting = true, -@@ -4806,6 +4811,7 @@ static const struct mtk_soc_data mt7986_ +@@ -4805,6 +4810,7 @@ static const struct mtk_soc_data mt7986_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7986_CLKS_BITMAP, .required_pctl = false, @@ -280,7 +280,7 @@ Signed-off-by: Jakub Kicinski .offload_version = 2, .hash_offset = 4, .has_accounting = true, -@@ -4826,6 +4832,7 @@ static const struct mtk_soc_data rt5350_ +@@ -4825,6 +4831,7 @@ static const struct mtk_soc_data rt5350_ .hw_features = MTK_HW_FEATURES_MT7628, .required_clks = MT7628_CLKS_BITMAP, .required_pctl = false, @@ -491,7 +491,7 @@ Signed-off-by: Jakub Kicinski else val = MTK_FOE_IB2_MIB_CNT; @@ -965,7 +965,7 @@ void mtk_ppe_start(struct mtk_ppe *ppe) - MTK_PPE_SCAN_MODE_KEEPALIVE_AGE) | + MTK_PPE_SCAN_MODE_CHECK_AGE) | FIELD_PREP(MTK_PPE_TB_CFG_ENTRY_NUM, MTK_PPE_ENTRIES_SHIFT); - if (MTK_HAS_CAPS(ppe->eth->soc->caps, MTK_NETSYS_V2)) diff --git a/target/linux/generic/backport-6.1/750-v6.5-07-net-ethernet-mtk_eth_soc-rely-on-MTK_MAX_DEVS-and-re.patch b/target/linux/generic/backport-6.1/750-v6.5-07-net-ethernet-mtk_eth_soc-rely-on-MTK_MAX_DEVS-and-re.patch index 8071658313..3db23f7897 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-07-net-ethernet-mtk_eth_soc-rely-on-MTK_MAX_DEVS-and-re.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-07-net-ethernet-mtk_eth_soc-rely-on-MTK_MAX_DEVS-and-re.patch @@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -881,7 +881,7 @@ static void mtk_stats_update(struct mtk_ +@@ -880,7 +880,7 @@ static void mtk_stats_update(struct mtk_ { int i; @@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski if (!eth->mac[i] || !eth->mac[i]->hw_stats) continue; if (spin_trylock(ð->mac[i]->hw_stats->stats_lock)) { -@@ -1386,7 +1386,7 @@ static int mtk_queue_stopped(struct mtk_ +@@ -1385,7 +1385,7 @@ static int mtk_queue_stopped(struct mtk_ { int i; @@ -35,7 +35,7 @@ Signed-off-by: Jakub Kicinski if (!eth->netdev[i]) continue; if (netif_queue_stopped(eth->netdev[i])) -@@ -1400,7 +1400,7 @@ static void mtk_wake_queue(struct mtk_et +@@ -1399,7 +1399,7 @@ static void mtk_wake_queue(struct mtk_et { int i; @@ -44,7 +44,7 @@ Signed-off-by: Jakub Kicinski if (!eth->netdev[i]) continue; netif_tx_wake_all_queues(eth->netdev[i]); -@@ -1859,7 +1859,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -1858,7 +1858,7 @@ static int mtk_poll_rx(struct napi_struc !(trxd.rxd4 & RX_DMA_SPECIAL_TAG)) mac = RX_DMA_GET_SPORT(trxd.rxd4) - 1; @@ -53,7 +53,7 @@ Signed-off-by: Jakub Kicinski !eth->netdev[mac])) goto release_desc; -@@ -2899,7 +2899,7 @@ static void mtk_dma_free(struct mtk_eth +@@ -2898,7 +2898,7 @@ static void mtk_dma_free(struct mtk_eth const struct mtk_soc_data *soc = eth->soc; int i; @@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski if (eth->netdev[i]) netdev_reset_queue(eth->netdev[i]); if (eth->scratch_ring) { -@@ -3053,8 +3053,13 @@ static void mtk_gdm_config(struct mtk_et +@@ -3052,8 +3052,13 @@ static void mtk_gdm_config(struct mtk_et if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) return; @@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski /* default setup the forward port to send frame to PDMA */ val &= ~0xffff; -@@ -3064,7 +3069,7 @@ static void mtk_gdm_config(struct mtk_et +@@ -3063,7 +3068,7 @@ static void mtk_gdm_config(struct mtk_et val |= config; @@ -87,7 +87,7 @@ Signed-off-by: Jakub Kicinski val |= MTK_GDMA_SPECIAL_TAG; mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i)); -@@ -3661,15 +3666,15 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3660,15 +3665,15 @@ static int mtk_hw_init(struct mtk_eth *e * up with the more appropriate value when mtk_mac_config call is being * invoked. */ @@ -109,7 +109,7 @@ Signed-off-by: Jakub Kicinski } /* Indicates CDM to parse the MTK special tag from CPU -@@ -3849,7 +3854,7 @@ static void mtk_pending_work(struct work +@@ -3848,7 +3853,7 @@ static void mtk_pending_work(struct work mtk_prepare_for_reset(eth); /* stop all devices to make sure that dma is properly shut down */ @@ -118,7 +118,7 @@ Signed-off-by: Jakub Kicinski if (!eth->netdev[i] || !netif_running(eth->netdev[i])) continue; -@@ -3865,8 +3870,8 @@ static void mtk_pending_work(struct work +@@ -3864,8 +3869,8 @@ static void mtk_pending_work(struct work mtk_hw_init(eth, true); /* restart DMA and enable IRQs */ @@ -129,7 +129,7 @@ Signed-off-by: Jakub Kicinski continue; if (mtk_open(eth->netdev[i])) { -@@ -3893,7 +3898,7 @@ static int mtk_free_dev(struct mtk_eth * +@@ -3892,7 +3897,7 @@ static int mtk_free_dev(struct mtk_eth * { int i; @@ -138,7 +138,7 @@ Signed-off-by: Jakub Kicinski if (!eth->netdev[i]) continue; free_netdev(eth->netdev[i]); -@@ -3912,7 +3917,7 @@ static int mtk_unreg_dev(struct mtk_eth +@@ -3911,7 +3916,7 @@ static int mtk_unreg_dev(struct mtk_eth { int i; @@ -147,7 +147,7 @@ Signed-off-by: Jakub Kicinski struct mtk_mac *mac; if (!eth->netdev[i]) continue; -@@ -4213,7 +4218,7 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4212,7 +4217,7 @@ static int mtk_add_mac(struct mtk_eth *e } id = be32_to_cpup(_id); @@ -156,7 +156,7 @@ Signed-off-by: Jakub Kicinski dev_err(eth->dev, "%d is not a valid mac id\n", id); return -EINVAL; } -@@ -4358,7 +4363,7 @@ void mtk_eth_set_dma_device(struct mtk_e +@@ -4357,7 +4362,7 @@ void mtk_eth_set_dma_device(struct mtk_e rtnl_lock(); @@ -165,7 +165,7 @@ Signed-off-by: Jakub Kicinski dev = eth->netdev[i]; if (!dev || !(dev->flags & IFF_UP)) -@@ -4664,7 +4669,7 @@ static int mtk_remove(struct platform_de +@@ -4663,7 +4668,7 @@ static int mtk_remove(struct platform_de int i; /* stop all devices to make sure that dma is properly shut down */ diff --git a/target/linux/generic/backport-6.1/750-v6.5-08-net-ethernet-mtk_eth_soc-add-NETSYS_V3-version-suppo.patch b/target/linux/generic/backport-6.1/750-v6.5-08-net-ethernet-mtk_eth_soc-add-NETSYS_V3-version-suppo.patch index 1a9b31f526..e40dc3d0a9 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-08-net-ethernet-mtk_eth_soc-add-NETSYS_V3-version-suppo.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-08-net-ethernet-mtk_eth_soc-add-NETSYS_V3-version-suppo.patch @@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -861,17 +861,32 @@ void mtk_stats_update_mac(struct mtk_mac +@@ -860,17 +860,32 @@ void mtk_stats_update_mac(struct mtk_mac mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x20 + offs); hw_stats->rx_flow_control_packets += mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x24 + offs); @@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski } u64_stats_update_end(&hw_stats->syncp); -@@ -1175,7 +1190,10 @@ static void mtk_tx_set_dma_desc_v2(struc +@@ -1174,7 +1189,10 @@ static void mtk_tx_set_dma_desc_v2(struc data |= TX_DMA_LS0; WRITE_ONCE(desc->txd3, data); @@ -74,7 +74,7 @@ Signed-off-by: Jakub Kicinski data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid); WRITE_ONCE(desc->txd4, data); -@@ -1186,6 +1204,8 @@ static void mtk_tx_set_dma_desc_v2(struc +@@ -1185,6 +1203,8 @@ static void mtk_tx_set_dma_desc_v2(struc /* tx checksum offload */ if (info->csum) data |= TX_DMA_CHKSUM_V2; @@ -83,7 +83,7 @@ Signed-off-by: Jakub Kicinski } WRITE_ONCE(desc->txd5, data); -@@ -1251,8 +1271,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1250,8 +1270,7 @@ static int mtk_tx_map(struct sk_buff *sk mtk_tx_set_dma_desc(dev, itxd, &txd_info); itx_buf->flags |= MTK_TX_FLAGS_SINGLE0; @@ -93,7 +93,7 @@ Signed-off-by: Jakub Kicinski setup_tx_buf(eth, itx_buf, itxd_pdma, txd_info.addr, txd_info.size, k++); -@@ -1300,8 +1319,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1299,8 +1318,7 @@ static int mtk_tx_map(struct sk_buff *sk memset(tx_buf, 0, sizeof(*tx_buf)); tx_buf->data = (void *)MTK_DMA_DUMMY_DESC; tx_buf->flags |= MTK_TX_FLAGS_PAGE0; @@ -103,7 +103,7 @@ Signed-off-by: Jakub Kicinski setup_tx_buf(eth, tx_buf, txd_pdma, txd_info.addr, txd_info.size, k++); -@@ -1603,7 +1621,7 @@ static int mtk_xdp_frame_map(struct mtk_ +@@ -1602,7 +1620,7 @@ static int mtk_xdp_frame_map(struct mtk_ } mtk_tx_set_dma_desc(dev, txd, txd_info); @@ -112,7 +112,7 @@ Signed-off-by: Jakub Kicinski tx_buf->type = dma_map ? MTK_TYPE_XDP_NDO : MTK_TYPE_XDP_TX; tx_buf->data = (void *)MTK_DMA_DUMMY_DESC; -@@ -1853,11 +1871,24 @@ static int mtk_poll_rx(struct napi_struc +@@ -1852,11 +1870,24 @@ static int mtk_poll_rx(struct napi_struc break; /* find out which mac the packet come from. values start at 1 */ @@ -141,7 +141,7 @@ Signed-off-by: Jakub Kicinski if (unlikely(mac < 0 || mac >= MTK_MAX_DEVS || !eth->netdev[mac])) -@@ -2079,7 +2110,6 @@ static int mtk_poll_tx_qdma(struct mtk_e +@@ -2078,7 +2109,6 @@ static int mtk_poll_tx_qdma(struct mtk_e while ((cpu != dma) && budget) { u32 next_cpu = desc->txd2; @@ -149,7 +149,7 @@ Signed-off-by: Jakub Kicinski desc = mtk_qdma_phys_to_virt(ring, desc->txd2); if ((desc->txd3 & TX_DMA_OWNER_CPU) == 0) -@@ -2087,15 +2117,13 @@ static int mtk_poll_tx_qdma(struct mtk_e +@@ -2086,15 +2116,13 @@ static int mtk_poll_tx_qdma(struct mtk_e tx_buf = mtk_desc_to_tx_buf(ring, desc, eth->soc->txrx.txd_size); @@ -167,7 +167,7 @@ Signed-off-by: Jakub Kicinski budget--; } -@@ -3704,7 +3732,24 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3703,7 +3731,24 @@ static int mtk_hw_init(struct mtk_eth *e mtk_w32(eth, eth->soc->txrx.rx_irq_done_mask, reg_map->qdma.int_grp + 4); mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); @@ -193,7 +193,7 @@ Signed-off-by: Jakub Kicinski /* PSE should not drop port8 and port9 packets from WDMA Tx */ mtk_w32(eth, 0x00000300, PSE_DROP_CFG); -@@ -4266,7 +4311,11 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4265,7 +4310,11 @@ static int mtk_add_mac(struct mtk_eth *e } spin_lock_init(&mac->hw_stats->stats_lock); u64_stats_init(&mac->hw_stats->syncp); diff --git a/target/linux/generic/backport-6.1/750-v6.5-11-net-ethernet-mtk_eth_soc-add-basic-support-for-MT798.patch b/target/linux/generic/backport-6.1/750-v6.5-11-net-ethernet-mtk_eth_soc-add-basic-support-for-MT798.patch index 8c24321dd4..8b1493ce14 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-11-net-ethernet-mtk_eth_soc-add-basic-support-for-MT798.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-11-net-ethernet-mtk_eth_soc-add-basic-support-for-MT798.patch @@ -219,7 +219,7 @@ Signed-off-by: Jakub Kicinski return; err_phy: -@@ -725,11 +841,15 @@ static int mtk_mdio_init(struct mtk_eth +@@ -724,11 +840,15 @@ static int mtk_mdio_init(struct mtk_eth } divider = min_t(unsigned int, DIV_ROUND_UP(MDC_MAX_FREQ, max_clk), 63); @@ -239,7 +239,7 @@ Signed-off-by: Jakub Kicinski dev_dbg(eth->dev, "MDC is running on %d Hz\n", MDC_MAX_FREQ / divider); -@@ -1190,10 +1310,19 @@ static void mtk_tx_set_dma_desc_v2(struc +@@ -1189,10 +1309,19 @@ static void mtk_tx_set_dma_desc_v2(struc data |= TX_DMA_LS0; WRITE_ONCE(desc->txd3, data); @@ -263,7 +263,7 @@ Signed-off-by: Jakub Kicinski data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid); WRITE_ONCE(desc->txd4, data); -@@ -4360,6 +4489,17 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4359,6 +4488,17 @@ static int mtk_add_mac(struct mtk_eth *e mac->phylink_config.supported_interfaces); } @@ -281,7 +281,7 @@ Signed-off-by: Jakub Kicinski phylink = phylink_create(&mac->phylink_config, of_fwnode_handle(mac->of_node), phy_mode, &mtk_phylink_ops); -@@ -4880,6 +5020,24 @@ static const struct mtk_soc_data mt7986_ +@@ -4879,6 +5019,24 @@ static const struct mtk_soc_data mt7986_ }, }; @@ -306,7 +306,7 @@ Signed-off-by: Jakub Kicinski static const struct mtk_soc_data rt5350_data = { .reg_map = &mt7628_reg_map, .caps = MT7628_CAPS, -@@ -4898,14 +5056,15 @@ static const struct mtk_soc_data rt5350_ +@@ -4897,14 +5055,15 @@ static const struct mtk_soc_data rt5350_ }; const struct of_device_id of_mtk_match[] = { diff --git a/target/linux/generic/backport-6.1/750-v6.5-12-net-ethernet-mtk_eth_soc-enable-page_pool-support-fo.patch b/target/linux/generic/backport-6.1/750-v6.5-12-net-ethernet-mtk_eth_soc-enable-page_pool-support-fo.patch index 3dc4662d1a..bb48dadec0 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-12-net-ethernet-mtk_eth_soc-enable-page_pool-support-fo.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-12-net-ethernet-mtk_eth_soc-enable-page_pool-support-fo.patch @@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1658,7 +1658,7 @@ static void mtk_update_rx_cpu_idx(struct +@@ -1657,7 +1657,7 @@ static void mtk_update_rx_cpu_idx(struct static bool mtk_page_pool_enabled(struct mtk_eth *eth) { diff --git a/target/linux/generic/backport-6.1/750-v6.5-13-net-ethernet-mtk_eth_soc-enable-nft-hw-flowtable_off.patch b/target/linux/generic/backport-6.1/750-v6.5-13-net-ethernet-mtk_eth_soc-enable-nft-hw-flowtable_off.patch index 32f26d7d27..bb8deb9846 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-13-net-ethernet-mtk_eth_soc-enable-nft-hw-flowtable_off.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-13-net-ethernet-mtk_eth_soc-enable-nft-hw-flowtable_off.patch @@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -5028,6 +5028,9 @@ static const struct mtk_soc_data mt7988_ +@@ -5027,6 +5027,9 @@ static const struct mtk_soc_data mt7988_ .required_clks = MT7988_CLKS_BITMAP, .required_pctl = false, .version = 3, diff --git a/target/linux/generic/backport-6.1/750-v6.5-14-net-ethernet-mtk_eth_soc-support-per-flow-accounting.patch b/target/linux/generic/backport-6.1/750-v6.5-14-net-ethernet-mtk_eth_soc-support-per-flow-accounting.patch index 876bdd5dd3..c985b6a9c7 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-14-net-ethernet-mtk_eth_soc-support-per-flow-accounting.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-14-net-ethernet-mtk_eth_soc-support-per-flow-accounting.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -5030,6 +5030,7 @@ static const struct mtk_soc_data mt7988_ +@@ -5029,6 +5029,7 @@ static const struct mtk_soc_data mt7988_ .version = 3, .offload_version = 2, .hash_offset = 4, diff --git a/target/linux/generic/backport-6.1/750-v6.5-17-net-ethernet-mtk_eth_soc-add-reset-bits-for-MT7988.patch b/target/linux/generic/backport-6.1/750-v6.5-17-net-ethernet-mtk_eth_soc-add-reset-bits-for-MT7988.patch index 05a18364d6..e87e0f2522 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-17-net-ethernet-mtk_eth_soc-add-reset-bits-for-MT7988.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-17-net-ethernet-mtk_eth_soc-add-reset-bits-for-MT7988.patch @@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3594,19 +3594,34 @@ static void mtk_hw_reset(struct mtk_eth +@@ -3593,19 +3593,34 @@ static void mtk_hw_reset(struct mtk_eth { u32 val; @@ -56,7 +56,7 @@ Signed-off-by: Jakub Kicinski regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, 0x3ffffff); } -@@ -3632,13 +3647,21 @@ static void mtk_hw_warm_reset(struct mtk +@@ -3631,13 +3646,21 @@ static void mtk_hw_warm_reset(struct mtk return; } @@ -83,7 +83,7 @@ Signed-off-by: Jakub Kicinski regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL, rst_mask, rst_mask); -@@ -3990,11 +4013,17 @@ static void mtk_prepare_for_reset(struct +@@ -3989,11 +4012,17 @@ static void mtk_prepare_for_reset(struct u32 val; int i; @@ -106,7 +106,7 @@ Signed-off-by: Jakub Kicinski /* adjust PPE configurations to prepare for reset */ for (i = 0; i < ARRAY_SIZE(eth->ppe); i++) -@@ -4055,11 +4084,18 @@ static void mtk_pending_work(struct work +@@ -4054,11 +4083,18 @@ static void mtk_pending_work(struct work } } diff --git a/target/linux/generic/backport-6.1/750-v6.5-18-net-ethernet-mtk_eth_soc-add-support-for-in-SoC-SRAM.patch b/target/linux/generic/backport-6.1/750-v6.5-18-net-ethernet-mtk_eth_soc-add-support-for-in-SoC-SRAM.patch index 74ac8dc898..2d0951a9ec 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-18-net-ethernet-mtk_eth_soc-add-support-for-in-SoC-SRAM.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-18-net-ethernet-mtk_eth_soc-add-support-for-in-SoC-SRAM.patch @@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1118,10 +1118,13 @@ static int mtk_init_fq_dma(struct mtk_et +@@ -1117,10 +1117,13 @@ static int mtk_init_fq_dma(struct mtk_et dma_addr_t dma_addr; int i; @@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski if (unlikely(!eth->scratch_ring)) return -ENOMEM; -@@ -2429,8 +2432,14 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2428,8 +2431,14 @@ static int mtk_tx_alloc(struct mtk_eth * if (!ring->buf) goto no_tx_mem; @@ -55,7 +55,7 @@ Signed-off-by: Jakub Kicinski if (!ring->dma) goto no_tx_mem; -@@ -2529,8 +2538,7 @@ static void mtk_tx_clean(struct mtk_eth +@@ -2528,8 +2537,7 @@ static void mtk_tx_clean(struct mtk_eth kfree(ring->buf); ring->buf = NULL; } @@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski dma_free_coherent(eth->dma_dev, ring->dma_size * soc->txrx.txd_size, ring->dma, ring->phys); -@@ -2549,9 +2557,14 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2548,9 +2556,14 @@ static int mtk_rx_alloc(struct mtk_eth * { const struct mtk_reg_map *reg_map = eth->soc->reg_map; struct mtk_rx_ring *ring; @@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski if (rx_flag == MTK_RX_FLAGS_QDMA) { if (ring_no) return -EINVAL; -@@ -2586,9 +2599,20 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2585,9 +2598,20 @@ static int mtk_rx_alloc(struct mtk_eth * ring->page_pool = pp; } @@ -105,7 +105,7 @@ Signed-off-by: Jakub Kicinski if (!ring->dma) return -ENOMEM; -@@ -2673,7 +2697,7 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2672,7 +2696,7 @@ static int mtk_rx_alloc(struct mtk_eth * return 0; } @@ -114,7 +114,7 @@ Signed-off-by: Jakub Kicinski { int i; -@@ -2696,7 +2720,7 @@ static void mtk_rx_clean(struct mtk_eth +@@ -2695,7 +2719,7 @@ static void mtk_rx_clean(struct mtk_eth ring->data = NULL; } @@ -123,7 +123,7 @@ Signed-off-by: Jakub Kicinski dma_free_coherent(eth->dma_dev, ring->dma_size * eth->soc->txrx.rxd_size, ring->dma, ring->phys); -@@ -3059,7 +3083,7 @@ static void mtk_dma_free(struct mtk_eth +@@ -3058,7 +3082,7 @@ static void mtk_dma_free(struct mtk_eth for (i = 0; i < MTK_MAX_DEVS; i++) if (eth->netdev[i]) netdev_reset_queue(eth->netdev[i]); @@ -132,7 +132,7 @@ Signed-off-by: Jakub Kicinski dma_free_coherent(eth->dma_dev, MTK_QDMA_RING_SIZE * soc->txrx.txd_size, eth->scratch_ring, eth->phy_scratch_ring); -@@ -3067,13 +3091,13 @@ static void mtk_dma_free(struct mtk_eth +@@ -3066,13 +3090,13 @@ static void mtk_dma_free(struct mtk_eth eth->phy_scratch_ring = 0; } mtk_tx_clean(eth); @@ -149,7 +149,7 @@ Signed-off-by: Jakub Kicinski } kfree(eth->scratch_head); -@@ -4641,7 +4665,7 @@ static int mtk_sgmii_init(struct mtk_eth +@@ -4640,7 +4664,7 @@ static int mtk_sgmii_init(struct mtk_eth static int mtk_probe(struct platform_device *pdev) { @@ -158,7 +158,7 @@ Signed-off-by: Jakub Kicinski struct device_node *mac_np; struct mtk_eth *eth; int err, i; -@@ -4661,6 +4685,20 @@ static int mtk_probe(struct platform_dev +@@ -4660,6 +4684,20 @@ static int mtk_probe(struct platform_dev if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) eth->ip_align = NET_IP_ALIGN; @@ -179,7 +179,7 @@ Signed-off-by: Jakub Kicinski spin_lock_init(ð->page_lock); spin_lock_init(ð->tx_irq_lock); spin_lock_init(ð->rx_irq_lock); -@@ -4724,6 +4762,18 @@ static int mtk_probe(struct platform_dev +@@ -4723,6 +4761,18 @@ static int mtk_probe(struct platform_dev err = -EINVAL; goto err_destroy_sgmii; } diff --git a/target/linux/generic/backport-6.1/750-v6.5-19-net-ethernet-mtk_eth_soc-support-36-bit-DMA-addressi.patch b/target/linux/generic/backport-6.1/750-v6.5-19-net-ethernet-mtk_eth_soc-support-36-bit-DMA-addressi.patch index 1584dfd07c..416c4f48ef 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-19-net-ethernet-mtk_eth_soc-support-36-bit-DMA-addressi.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-19-net-ethernet-mtk_eth_soc-support-36-bit-DMA-addressi.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1311,6 +1311,10 @@ static void mtk_tx_set_dma_desc_v2(struc +@@ -1310,6 +1310,10 @@ static void mtk_tx_set_dma_desc_v2(struc data = TX_DMA_PLEN0(info->size); if (info->last) data |= TX_DMA_LS0; @@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski WRITE_ONCE(desc->txd3, data); /* set forward port */ -@@ -1980,6 +1984,7 @@ static int mtk_poll_rx(struct napi_struc +@@ -1979,6 +1983,7 @@ static int mtk_poll_rx(struct napi_struc bool xdp_flush = false; int idx; struct sk_buff *skb; @@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski u8 *data, *new_data; struct mtk_rx_dma_v2 *rxd, trxd; int done = 0, bytes = 0; -@@ -2095,7 +2100,10 @@ static int mtk_poll_rx(struct napi_struc +@@ -2094,7 +2099,10 @@ static int mtk_poll_rx(struct napi_struc goto release_desc; } @@ -50,7 +50,7 @@ Signed-off-by: Jakub Kicinski ring->buf_size, DMA_FROM_DEVICE); skb = build_skb(data, ring->frag_size); -@@ -2161,6 +2169,9 @@ release_desc: +@@ -2160,6 +2168,9 @@ release_desc: else rxd->rxd2 = RX_DMA_PREP_PLEN0(ring->buf_size); @@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski ring->calc_idx = idx; done++; } -@@ -2653,6 +2664,9 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2652,6 +2663,9 @@ static int mtk_rx_alloc(struct mtk_eth * else rxd->rxd2 = RX_DMA_PREP_PLEN0(ring->buf_size); @@ -70,7 +70,7 @@ Signed-off-by: Jakub Kicinski rxd->rxd3 = 0; rxd->rxd4 = 0; if (mtk_is_netsys_v2_or_greater(eth)) { -@@ -2699,6 +2713,7 @@ static int mtk_rx_alloc(struct mtk_eth * +@@ -2698,6 +2712,7 @@ static int mtk_rx_alloc(struct mtk_eth * static void mtk_rx_clean(struct mtk_eth *eth, struct mtk_rx_ring *ring, bool in_sram) { @@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski int i; if (ring->data && ring->dma) { -@@ -2712,7 +2727,10 @@ static void mtk_rx_clean(struct mtk_eth +@@ -2711,7 +2726,10 @@ static void mtk_rx_clean(struct mtk_eth if (!rxd->rxd1) continue; @@ -90,7 +90,7 @@ Signed-off-by: Jakub Kicinski ring->buf_size, DMA_FROM_DEVICE); mtk_rx_put_buff(ring, ring->data[i], false); } -@@ -4699,6 +4717,14 @@ static int mtk_probe(struct platform_dev +@@ -4698,6 +4716,14 @@ static int mtk_probe(struct platform_dev } } diff --git a/target/linux/generic/backport-6.1/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch b/target/linux/generic/backport-6.1/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch index 5b27458eb8..d761866d0d 100644 --- a/target/linux/generic/backport-6.1/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch +++ b/target/linux/generic/backport-6.1/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch @@ -19,7 +19,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1988,11 +1988,11 @@ static int mtk_poll_rx(struct napi_struc +@@ -1987,11 +1987,11 @@ static int mtk_poll_rx(struct napi_struc u8 *data, *new_data; struct mtk_rx_dma_v2 *rxd, trxd; int done = 0, bytes = 0; @@ -32,7 +32,7 @@ Signed-off-by: David S. Miller u32 hash, reason; int mac = 0; -@@ -2169,7 +2169,8 @@ release_desc: +@@ -2168,7 +2168,8 @@ release_desc: else rxd->rxd2 = RX_DMA_PREP_PLEN0(ring->buf_size); diff --git a/target/linux/generic/backport-6.1/789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch b/target/linux/generic/backport-6.1/789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch deleted file mode 100644 index 1b91663d39..0000000000 --- a/target/linux/generic/backport-6.1/789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch +++ /dev/null @@ -1,172 +0,0 @@ -From be4512b9ac6fc53e1ca8daccbda84f643215c547 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= -Date: Thu, 14 Mar 2024 12:28:35 +0300 -Subject: [PATCH 1/3] net: dsa: mt7530: prevent possible incorrect XTAL - frequency selection -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -[ Upstream commit f490c492e946d8ffbe65ad4efc66de3c5ede30a4 ] - -On MT7530, the HT_XTAL_FSEL field of the HWTRAP register stores a 2-bit -value that represents the frequency of the crystal oscillator connected to -the switch IC. The field is populated by the state of the ESW_P4_LED_0 and -ESW_P4_LED_0 pins, which is done right after reset is deasserted. - - ESW_P4_LED_0 ESW_P3_LED_0 Frequency - ----------------------------------------- - 0 0 Reserved - 0 1 20MHz - 1 0 40MHz - 1 1 25MHz - -On MT7531, the XTAL25 bit of the STRAP register stores this. The LAN0LED0 -pin is used to populate the bit. 25MHz when the pin is high, 40MHz when -it's low. - -These pins are also used with LEDs, therefore, their state can be set to -something other than the bootstrapping configuration. For example, a link -may be established on port 3 before the DSA subdriver takes control of the -switch which would set ESW_P3_LED_0 to high. - -Currently on mt7530_setup() and mt7531_setup(), 1000 - 1100 usec delay is -described between reset assertion and deassertion. Some switch ICs in real -life conditions cannot always have these pins set back to the bootstrapping -configuration before reset deassertion in this amount of delay. This causes -wrong crystal frequency to be selected which puts the switch in a -nonfunctional state after reset deassertion. - -The tests below are conducted on an MT7530 with a 40MHz crystal oscillator -by Justin Swartz. - -With a cable from an active peer connected to port 3 before reset, an -incorrect crystal frequency (0b11 = 25MHz) is selected: - - [1] [3] [5] - : : : - _____________________________ __________________ -ESW_P4_LED_0 |_______| - _____________________________ -ESW_P3_LED_0 |__________________________ - - : : : : - : : [4]...: - : : - [2]................: - -[1] Reset is asserted. -[2] Period of 1000 - 1100 usec. -[3] Reset is deasserted. -[4] Period of 315 usec. HWTRAP register is populated with incorrect - XTAL frequency. -[5] Signals reflect the bootstrapped configuration. - -Increase the delay between reset_control_assert() and -reset_control_deassert(), and gpiod_set_value_cansleep(priv->reset, 0) and -gpiod_set_value_cansleep(priv->reset, 1) to 5000 - 5100 usec. This amount -ensures a higher possibility that the switch IC will have these pins back -to the bootstrapping configuration before reset deassertion. - -With a cable from an active peer connected to port 3 before reset, the -correct crystal frequency (0b10 = 40MHz) is selected: - - [1] [2-1] [3] [5] - : : : : - _____________________________ __________________ -ESW_P4_LED_0 |_______| - ___________________ _______ -ESW_P3_LED_0 |_________| |__________________ - - : : : : : - : [2-2]...: [4]...: - [2]................: - -[1] Reset is asserted. -[2] Period of 5000 - 5100 usec. -[2-1] ESW_P3_LED_0 goes low. -[2-2] Remaining period of 5000 - 5100 usec. -[3] Reset is deasserted. -[4] Period of 310 usec. HWTRAP register is populated with bootstrapped - XTAL frequency. -[5] Signals reflect the bootstrapped configuration. - -ESW_P3_LED_0 low period before reset deassertion: - - 5000 usec - - 5100 usec - TEST RESET HOLD - # (usec) - --------------------- - 1 5410 - 2 5440 - 3 4375 - 4 5490 - 5 5475 - 6 4335 - 7 4370 - 8 5435 - 9 4205 - 10 4335 - 11 3750 - 12 3170 - 13 4395 - 14 4375 - 15 3515 - 16 4335 - 17 4220 - 18 4175 - 19 4175 - 20 4350 - - Min 3170 - Max 5490 - - Median 4342.500 - Avg 4466.500 - -Revert commit 2920dd92b980 ("net: dsa: mt7530: disable LEDs before reset"). -Changing the state of pins via reset assertion is simpler and more -efficient than doing so by setting the LED controller off. - -Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") -Fixes: c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch") -Co-developed-by: Justin Swartz -Signed-off-by: Justin Swartz -Signed-off-by: Arınç ÜNAL -Signed-off-by: David S. Miller -Signed-off-by: Sasha Levin ---- - drivers/net/dsa/mt7530.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - ---- a/drivers/net/dsa/mt7530.c -+++ b/drivers/net/dsa/mt7530.c -@@ -2187,11 +2187,11 @@ mt7530_setup(struct dsa_switch *ds) - */ - if (priv->mcm) { - reset_control_assert(priv->rstc); -- usleep_range(1000, 1100); -+ usleep_range(5000, 5100); - reset_control_deassert(priv->rstc); - } else { - gpiod_set_value_cansleep(priv->reset, 0); -- usleep_range(1000, 1100); -+ usleep_range(5000, 5100); - gpiod_set_value_cansleep(priv->reset, 1); - } - -@@ -2401,11 +2401,11 @@ mt7531_setup(struct dsa_switch *ds) - */ - if (priv->mcm) { - reset_control_assert(priv->rstc); -- usleep_range(1000, 1100); -+ usleep_range(5000, 5100); - reset_control_deassert(priv->rstc); - } else { - gpiod_set_value_cansleep(priv->reset, 0); -- usleep_range(1000, 1100); -+ usleep_range(5000, 5100); - gpiod_set_value_cansleep(priv->reset, 1); - } - diff --git a/target/linux/generic/backport-6.1/789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch b/target/linux/generic/backport-6.1/789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch deleted file mode 100644 index 0cc6bf7525..0000000000 --- a/target/linux/generic/backport-6.1/789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch +++ /dev/null @@ -1,173 +0,0 @@ -From f1fa919ea59655f73cb3972264e157b8831ba546 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= -Date: Thu, 14 Mar 2024 12:33:41 +0300 -Subject: [PATCH 2/3] net: dsa: mt7530: fix link-local frames that ingress vlan - filtering ports -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -[ Upstream commit e8bf353577f382c7066c661fed41b2adc0fc7c40 ] - -Whether VLAN-aware or not, on every VID VLAN table entry that has the CPU -port as a member of it, frames are set to egress the CPU port with the VLAN -tag stacked. This is so that VLAN tags can be appended after hardware -special tag (called DSA tag in the context of Linux drivers). - -For user ports on a VLAN-unaware bridge, frame ingressing the user port -egresses CPU port with only the special tag. - -For user ports on a VLAN-aware bridge, frame ingressing the user port -egresses CPU port with the special tag and the VLAN tag. - -This causes issues with link-local frames, specifically BPDUs, because the -software expects to receive them VLAN-untagged. - -There are two options to make link-local frames egress untagged. Setting -CONSISTENT or UNTAGGED on the EG_TAG bits on the relevant register. -CONSISTENT means frames egress exactly as they ingress. That means -egressing with the VLAN tag they had at ingress or egressing untagged if -they ingressed untagged. Although link-local frames are not supposed to be -transmitted VLAN-tagged, if they are done so, when egressing through a CPU -port, the special tag field will be broken. - -BPDU egresses CPU port with VLAN tag egressing stacked, received on -software: - -00:01:25.104821 AF Unknown (382365846), length 106: - | STAG | | VLAN | - 0x0000: 0000 6c27 614d 4143 0001 0000 8100 0001 ..l'aMAC........ - 0x0010: 0026 4242 0300 0000 0000 0000 6c27 614d .&BB........l'aM - 0x0020: 4143 0000 0000 0000 6c27 614d 4143 0000 AC......l'aMAC.. - 0x0030: 0000 1400 0200 0f00 0000 0000 0000 0000 ................ - -BPDU egresses CPU port with VLAN tag egressing untagged, received on -software: - -00:23:56.628708 AF Unknown (25215488), length 64: - | STAG | - 0x0000: 0000 6c27 614d 4143 0001 0000 0026 4242 ..l'aMAC.....&BB - 0x0010: 0300 0000 0000 0000 6c27 614d 4143 0000 ........l'aMAC.. - 0x0020: 0000 0000 6c27 614d 4143 0000 0000 1400 ....l'aMAC...... - 0x0030: 0200 0f00 0000 0000 0000 0000 ............ - -BPDU egresses CPU port with VLAN tag egressing tagged, received on -software: - -00:01:34.311963 AF Unknown (25215488), length 64: - | Mess | - 0x0000: 0000 6c27 614d 4143 0001 0001 0026 4242 ..l'aMAC.....&BB - 0x0010: 0300 0000 0000 0000 6c27 614d 4143 0000 ........l'aMAC.. - 0x0020: 0000 0000 6c27 614d 4143 0000 0000 1400 ....l'aMAC...... - 0x0030: 0200 0f00 0000 0000 0000 0000 ............ - -To prevent confusing the software, force the frame to egress UNTAGGED -instead of CONSISTENT. This way, frames can't possibly be received TAGGED -by software which would have the special tag field broken. - -VLAN Tag Egress Procedure - - For all frames, one of these options set the earliest in this order will - apply to the frame: - - - EG_TAG in certain registers for certain frames. - This will apply to frame with matching MAC DA or EtherType. - - - EG_TAG in the address table. - This will apply to frame at its incoming port. - - - EG_TAG in the PVC register. - This will apply to frame at its incoming port. - - - EG_CON and [EG_TAG per port] in the VLAN table. - This will apply to frame at its outgoing port. - - - EG_TAG in the PCR register. - This will apply to frame at its outgoing port. - - EG_TAG in certain registers for certain frames: - - PPPoE Discovery_ARP/RARP: PPP_EG_TAG and ARP_EG_TAG in the APC register. - IGMP_MLD: IGMP_EG_TAG and MLD_EG_TAG in the IMC register. - BPDU and PAE: BPDU_EG_TAG and PAE_EG_TAG in the BPC register. - REV_01 and REV_02: R01_EG_TAG and R02_EG_TAG in the RGAC1 register. - REV_03 and REV_0E: R03_EG_TAG and R0E_EG_TAG in the RGAC2 register. - REV_10 and REV_20: R10_EG_TAG and R20_EG_TAG in the RGAC3 register. - REV_21 and REV_UN: R21_EG_TAG and RUN_EG_TAG in the RGAC4 register. - -With this change, it can be observed that a bridge interface with stp_state -and vlan_filtering enabled will properly block ports now. - -Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") -Signed-off-by: Arınç ÜNAL -Signed-off-by: Paolo Abeni -Signed-off-by: Sasha Levin ---- - drivers/net/dsa/mt7530.c | 23 +++++++++++++++-------- - drivers/net/dsa/mt7530.h | 9 ++++++++- - 2 files changed, 23 insertions(+), 9 deletions(-) - ---- a/drivers/net/dsa/mt7530.c -+++ b/drivers/net/dsa/mt7530.c -@@ -1001,16 +1001,23 @@ unlock_exit: - static void - mt753x_trap_frames(struct mt7530_priv *priv) - { -- /* Trap BPDUs to the CPU port(s) */ -- mt7530_rmw(priv, MT753X_BPC, MT753X_BPDU_PORT_FW_MASK, -+ /* Trap 802.1X PAE frames and BPDUs to the CPU port(s) and egress them -+ * VLAN-untagged. -+ */ -+ mt7530_rmw(priv, MT753X_BPC, MT753X_PAE_EG_TAG_MASK | -+ MT753X_PAE_PORT_FW_MASK | MT753X_BPDU_EG_TAG_MASK | -+ MT753X_BPDU_PORT_FW_MASK, -+ MT753X_PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -+ MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY) | -+ MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | - MT753X_BPDU_CPU_ONLY); - -- /* Trap 802.1X PAE frames to the CPU port(s) */ -- mt7530_rmw(priv, MT753X_BPC, MT753X_PAE_PORT_FW_MASK, -- MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY)); -- -- /* Trap LLDP frames with :0E MAC DA to the CPU port(s) */ -- mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_PORT_FW_MASK, -+ /* Trap LLDP frames with :0E MAC DA to the CPU port(s) and egress them -+ * VLAN-untagged. -+ */ -+ mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_EG_TAG_MASK | -+ MT753X_R0E_PORT_FW_MASK, -+ MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | - MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY)); - } - ---- a/drivers/net/dsa/mt7530.h -+++ b/drivers/net/dsa/mt7530.h -@@ -63,12 +63,18 @@ enum mt753x_id { - - /* Registers for BPDU and PAE frame control*/ - #define MT753X_BPC 0x24 --#define MT753X_BPDU_PORT_FW_MASK GENMASK(2, 0) -+#define MT753X_PAE_EG_TAG_MASK GENMASK(24, 22) -+#define MT753X_PAE_EG_TAG(x) FIELD_PREP(MT753X_PAE_EG_TAG_MASK, x) - #define MT753X_PAE_PORT_FW_MASK GENMASK(18, 16) - #define MT753X_PAE_PORT_FW(x) FIELD_PREP(MT753X_PAE_PORT_FW_MASK, x) -+#define MT753X_BPDU_EG_TAG_MASK GENMASK(8, 6) -+#define MT753X_BPDU_EG_TAG(x) FIELD_PREP(MT753X_BPDU_EG_TAG_MASK, x) -+#define MT753X_BPDU_PORT_FW_MASK GENMASK(2, 0) - - /* Register for :03 and :0E MAC DA frame control */ - #define MT753X_RGAC2 0x2c -+#define MT753X_R0E_EG_TAG_MASK GENMASK(24, 22) -+#define MT753X_R0E_EG_TAG(x) FIELD_PREP(MT753X_R0E_EG_TAG_MASK, x) - #define MT753X_R0E_PORT_FW_MASK GENMASK(18, 16) - #define MT753X_R0E_PORT_FW(x) FIELD_PREP(MT753X_R0E_PORT_FW_MASK, x) - -@@ -251,6 +257,7 @@ enum mt7530_port_mode { - enum mt7530_vlan_port_eg_tag { - MT7530_VLAN_EG_DISABLED = 0, - MT7530_VLAN_EG_CONSISTENT = 1, -+ MT7530_VLAN_EG_UNTAGGED = 4, - }; - - enum mt7530_vlan_port_attr { diff --git a/target/linux/generic/backport-6.1/789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch b/target/linux/generic/backport-6.1/789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch deleted file mode 100644 index cf7a3c1283..0000000000 --- a/target/linux/generic/backport-6.1/789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch +++ /dev/null @@ -1,133 +0,0 @@ -From 86c0c154a759f2af9612a04bdf29110f02dce956 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= -Date: Thu, 14 Mar 2024 12:33:42 +0300 -Subject: [PATCH 3/3] net: dsa: mt7530: fix handling of all link-local frames -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -[ Upstream commit 69ddba9d170bdaee1dc0eb4ced38d7e4bb7b92af ] - -Currently, the MT753X switches treat frames with :01-0D and :0F MAC DAs as -regular multicast frames, therefore flooding them to user ports. - -On page 205, section "8.6.3 Frame filtering" of the active standard, IEEE -Std 802.1Q™-2022, it is stated that frames with 01:80:C2:00:00:00-0F as MAC -DA must only be propagated to C-VLAN and MAC Bridge components. That means -VLAN-aware and VLAN-unaware bridges. On the switch designs with CPU ports, -these frames are supposed to be processed by the CPU (software). So we make -the switch only forward them to the CPU port. And if received from a CPU -port, forward to a single port. The software is responsible of making the -switch conform to the latter by setting a single port as destination port -on the special tag. - -This switch intellectual property cannot conform to this part of the -standard fully. Whilst the REV_UN frame tag covers the remaining :04-0D and -:0F MAC DAs, it also includes :22-FF which the scope of propagation is not -supposed to be restricted for these MAC DAs. - -Set frames with :01-03 MAC DAs to be trapped to the CPU port(s). Add a -comment for the remaining MAC DAs. - -Note that the ingress port must have a PVID assigned to it for the switch -to forward untagged frames. A PVID is set by default on VLAN-aware and -VLAN-unaware ports. However, when the network interface that pertains to -the ingress port is attached to a vlan_filtering enabled bridge, the user -can remove the PVID assignment from it which would prevent the link-local -frames from being trapped to the CPU port. I am yet to see a way to forward -link-local frames while preventing other untagged frames from being -forwarded too. - -Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") -Signed-off-by: Arınç ÜNAL -Signed-off-by: Paolo Abeni -Signed-off-by: Sasha Levin ---- - drivers/net/dsa/mt7530.c | 37 +++++++++++++++++++++++++++++++++---- - drivers/net/dsa/mt7530.h | 13 +++++++++++++ - 2 files changed, 46 insertions(+), 4 deletions(-) - ---- a/drivers/net/dsa/mt7530.c -+++ b/drivers/net/dsa/mt7530.c -@@ -998,6 +998,21 @@ unlock_exit: - mutex_unlock(&priv->reg_mutex); - } - -+/* On page 205, section "8.6.3 Frame filtering" of the active standard, IEEE Std -+ * 802.1Q™-2022, it is stated that frames with 01:80:C2:00:00:00-0F as MAC DA -+ * must only be propagated to C-VLAN and MAC Bridge components. That means -+ * VLAN-aware and VLAN-unaware bridges. On the switch designs with CPU ports, -+ * these frames are supposed to be processed by the CPU (software). So we make -+ * the switch only forward them to the CPU port. And if received from a CPU -+ * port, forward to a single port. The software is responsible of making the -+ * switch conform to the latter by setting a single port as destination port on -+ * the special tag. -+ * -+ * This switch intellectual property cannot conform to this part of the standard -+ * fully. Whilst the REV_UN frame tag covers the remaining :04-0D and :0F MAC -+ * DAs, it also includes :22-FF which the scope of propagation is not supposed -+ * to be restricted for these MAC DAs. -+ */ - static void - mt753x_trap_frames(struct mt7530_priv *priv) - { -@@ -1012,13 +1027,27 @@ mt753x_trap_frames(struct mt7530_priv *p - MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | - MT753X_BPDU_CPU_ONLY); - -- /* Trap LLDP frames with :0E MAC DA to the CPU port(s) and egress them -- * VLAN-untagged. -+ /* Trap frames with :01 and :02 MAC DAs to the CPU port(s) and egress -+ * them VLAN-untagged. -+ */ -+ mt7530_rmw(priv, MT753X_RGAC1, MT753X_R02_EG_TAG_MASK | -+ MT753X_R02_PORT_FW_MASK | MT753X_R01_EG_TAG_MASK | -+ MT753X_R01_PORT_FW_MASK, -+ MT753X_R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -+ MT753X_R02_PORT_FW(MT753X_BPDU_CPU_ONLY) | -+ MT753X_R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -+ MT753X_BPDU_CPU_ONLY); -+ -+ /* Trap frames with :03 and :0E MAC DAs to the CPU port(s) and egress -+ * them VLAN-untagged. - */ - mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_EG_TAG_MASK | -- MT753X_R0E_PORT_FW_MASK, -+ MT753X_R0E_PORT_FW_MASK | MT753X_R03_EG_TAG_MASK | -+ MT753X_R03_PORT_FW_MASK, - MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -- MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY)); -+ MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY) | -+ MT753X_R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -+ MT753X_BPDU_CPU_ONLY); - } - - static int ---- a/drivers/net/dsa/mt7530.h -+++ b/drivers/net/dsa/mt7530.h -@@ -71,12 +71,25 @@ enum mt753x_id { - #define MT753X_BPDU_EG_TAG(x) FIELD_PREP(MT753X_BPDU_EG_TAG_MASK, x) - #define MT753X_BPDU_PORT_FW_MASK GENMASK(2, 0) - -+/* Register for :01 and :02 MAC DA frame control */ -+#define MT753X_RGAC1 0x28 -+#define MT753X_R02_EG_TAG_MASK GENMASK(24, 22) -+#define MT753X_R02_EG_TAG(x) FIELD_PREP(MT753X_R02_EG_TAG_MASK, x) -+#define MT753X_R02_PORT_FW_MASK GENMASK(18, 16) -+#define MT753X_R02_PORT_FW(x) FIELD_PREP(MT753X_R02_PORT_FW_MASK, x) -+#define MT753X_R01_EG_TAG_MASK GENMASK(8, 6) -+#define MT753X_R01_EG_TAG(x) FIELD_PREP(MT753X_R01_EG_TAG_MASK, x) -+#define MT753X_R01_PORT_FW_MASK GENMASK(2, 0) -+ - /* Register for :03 and :0E MAC DA frame control */ - #define MT753X_RGAC2 0x2c - #define MT753X_R0E_EG_TAG_MASK GENMASK(24, 22) - #define MT753X_R0E_EG_TAG(x) FIELD_PREP(MT753X_R0E_EG_TAG_MASK, x) - #define MT753X_R0E_PORT_FW_MASK GENMASK(18, 16) - #define MT753X_R0E_PORT_FW(x) FIELD_PREP(MT753X_R0E_PORT_FW_MASK, x) -+#define MT753X_R03_EG_TAG_MASK GENMASK(8, 6) -+#define MT753X_R03_EG_TAG(x) FIELD_PREP(MT753X_R03_EG_TAG_MASK, x) -+#define MT753X_R03_PORT_FW_MASK GENMASK(2, 0) - - enum mt753x_bpdu_port_fw { - MT753X_BPDU_FOLLOW_MFC, diff --git a/target/linux/generic/backport-6.1/830-04-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch b/target/linux/generic/backport-6.1/830-04-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch index 9560122ccd..e0f10f7642 100644 --- a/target/linux/generic/backport-6.1/830-04-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch +++ b/target/linux/generic/backport-6.1/830-04-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch @@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-4-robimarko@gmail.com --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c -@@ -31,12 +31,7 @@ +@@ -30,12 +30,7 @@ #define MSM_ID_SMEM 137 @@ -32,7 +32,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-4-robimarko@gmail.com enum _msm8996_version { MSM8996_V3, -@@ -154,12 +149,12 @@ static enum _msm8996_version qcom_cpufre +@@ -153,12 +148,12 @@ static enum _msm8996_version qcom_cpufre msm_id++; switch ((enum _msm_id)*msm_id) { diff --git a/target/linux/generic/backport-6.1/830-05-v6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch b/target/linux/generic/backport-6.1/830-05-v6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch index 4f37d672ba..93e776f62c 100644 --- a/target/linux/generic/backport-6.1/830-05-v6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch +++ b/target/linux/generic/backport-6.1/830-05-v6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch @@ -19,7 +19,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-5-robimarko@gmail.com --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c -@@ -29,16 +29,8 @@ +@@ -28,16 +28,8 @@ #include #include @@ -36,7 +36,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-5-robimarko@gmail.com struct qcom_cpufreq_drv; struct qcom_cpufreq_match_data { -@@ -135,60 +127,32 @@ static void get_krait_bin_format_b(struc +@@ -134,60 +126,32 @@ static void get_krait_bin_format_b(struc dev_dbg(cpu_dev, "PVS version: %d\n", *pvs_ver); } diff --git a/target/linux/generic/config-6.1 b/target/linux/generic/config-6.1 index bfa3faae83..7baa9b4a55 100644 --- a/target/linux/generic/config-6.1 +++ b/target/linux/generic/config-6.1 @@ -6735,6 +6735,8 @@ CONFIG_TCP_CONG_CUBIC=y # CONFIG_TCS3414 is not set # CONFIG_TCS3472 is not set # CONFIG_TEE is not set +# CONFIG_TEGRA210_ADMA is not set +# CONFIG_TEGRA_ACONNECT is not set # CONFIG_TEGRA_AHB is not set # CONFIG_TEGRA_HOST1X is not set # CONFIG_TEHUTI is not set diff --git a/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 11850c0418..a1b32c352b 100644 --- a/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -7625,6 +7625,48 @@ static void __netdev_adjacent_dev_unlink +@@ -7628,6 +7628,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -93,7 +93,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info, -@@ -7676,6 +7718,7 @@ static int __netdev_upper_dev_link(struc +@@ -7679,6 +7721,7 @@ static int __netdev_upper_dev_link(struc if (ret) return ret; @@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -7772,6 +7815,7 @@ static void __netdev_upper_dev_unlink(st +@@ -7775,6 +7818,7 @@ static void __netdev_upper_dev_unlink(st __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); @@ -109,7 +109,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); -@@ -8824,6 +8868,7 @@ int dev_set_mac_address(struct net_devic +@@ -8827,6 +8871,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch b/target/linux/generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch index 842fef3a9c..90b60def6b 100644 --- a/target/linux/generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch +++ b/target/linux/generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4941,6 +4941,8 @@ static int mtk_probe(struct platform_dev +@@ -4940,6 +4940,8 @@ static int mtk_probe(struct platform_dev * for NAPI to work */ init_dummy_netdev(ð->dummy_dev); diff --git a/target/linux/generic/pending-6.1/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch b/target/linux/generic/pending-6.1/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch index a1cc109050..600109a950 100644 --- a/target/linux/generic/pending-6.1/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch +++ b/target/linux/generic/pending-6.1/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch @@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1562,12 +1562,28 @@ static void mtk_wake_queue(struct mtk_et +@@ -1561,12 +1561,28 @@ static void mtk_wake_queue(struct mtk_et } } @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau bool gso = false; int tx_num; -@@ -1589,6 +1605,18 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1588,6 +1604,18 @@ static netdev_tx_t mtk_start_xmit(struct return NETDEV_TX_BUSY; } @@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau /* TSO: fill MSS info in tcp checksum field */ if (skb_is_gso(skb)) { if (skb_cow_head(skb, 0)) { -@@ -1604,8 +1632,14 @@ static netdev_tx_t mtk_start_xmit(struct +@@ -1603,8 +1631,14 @@ static netdev_tx_t mtk_start_xmit(struct } } diff --git a/target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch b/target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch index 0a49c75b00..aa86075417 100644 --- a/target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch +++ b/target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch @@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -767,6 +767,7 @@ static void mtk_mac_link_up(struct phyli +@@ -766,6 +766,7 @@ static void mtk_mac_link_up(struct phyli MAC_MCR_FORCE_RX_FC); /* Configure speed */ @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau switch (speed) { case SPEED_2500: case SPEED_1000: -@@ -3348,6 +3349,9 @@ found: +@@ -3347,6 +3348,9 @@ found: if (dp->index >= MTK_QDMA_NUM_QUEUES) return NOTIFY_DONE; diff --git a/target/linux/generic/pending-6.1/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch b/target/linux/generic/pending-6.1/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch deleted file mode 100644 index 2f7d29b84d..0000000000 --- a/target/linux/generic/pending-6.1/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch +++ /dev/null @@ -1,50 +0,0 @@ -From ef5976ae4e117fae9a61bb3c0f8319a917a425ea Mon Sep 17 00:00:00 2001 -From: Daniel Golle -Date: Mon, 11 Mar 2024 17:43:28 +0000 -Subject: [PATCH] net: mediatek: mtk_eth_soc: release MAC_MCR_FORCE_LINK only when MAC is up -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Clearing bit MAC_MCR_FORCE_LINK which forces the link down too early -can result in MAC ending up in a broken/blocked state. - -Fix this by handling this bit in the .mac_link_up and .mac_link_down -calls instead of in .mac_finish. - -Fixes: b8fc9f30821ec ("net: ethernet: mediatek: Add basic PHYLINK support") -Signed-off-by: Daniel Golle ---- - drivers/net/ethernet/mediatek/mtk_eth_soc.c | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - ---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c -+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -662,8 +662,7 @@ static int mtk_mac_finish(struct phylink - mcr_cur = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id)); - mcr_new = mcr_cur; - mcr_new |= MAC_MCR_IPG_CFG | MAC_MCR_FORCE_MODE | -- MAC_MCR_BACKOFF_EN | MAC_MCR_BACKPR_EN | MAC_MCR_FORCE_LINK | -- MAC_MCR_RX_FIFO_CLR_DIS; -+ MAC_MCR_BACKOFF_EN | MAC_MCR_BACKPR_EN | MAC_MCR_RX_FIFO_CLR_DIS; - - /* Only update control register when needed! */ - if (mcr_new != mcr_cur) -@@ -679,7 +678,7 @@ static void mtk_mac_link_down(struct phy - phylink_config); - u32 mcr = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id)); - -- mcr &= ~(MAC_MCR_TX_EN | MAC_MCR_RX_EN); -+ mcr &= ~(MAC_MCR_TX_EN | MAC_MCR_RX_EN | MAC_MCR_FORCE_LINK); - mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id)); - } - -@@ -788,7 +787,7 @@ static void mtk_mac_link_up(struct phyli - if (rx_pause) - mcr |= MAC_MCR_FORCE_RX_FC; - -- mcr |= MAC_MCR_TX_EN | MAC_MCR_RX_EN; -+ mcr |= MAC_MCR_TX_EN | MAC_MCR_RX_EN | MAC_MCR_FORCE_LINK; - mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id)); - } - diff --git a/target/linux/generic/pending-6.1/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch b/target/linux/generic/pending-6.1/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch deleted file mode 100644 index 3b190c1801..0000000000 --- a/target/linux/generic/pending-6.1/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch +++ /dev/null @@ -1,59 +0,0 @@ -From c8262ebbf7ca546dd5ead3c0383a89eb401627ff Mon Sep 17 00:00:00 2001 -From: Daniel Golle -Date: Wed, 13 Mar 2024 17:55:02 +0000 -Subject: [PATCH] net: ethernet: mtk_eth_soc: fix PPE hanging issue - -A patch to resolve an issue was found in MediaTek's GPL-licensed SDK: -In the mtk_ppe_stop() function, the PPE scan mode is not disabled before -disabling the PPE. This can potentially lead to a hang during the process -of disabling the PPE. - -Without this patch, the PPE may experience a hang during the reboot test. - -Reference: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/b40da332dfe763932a82f9f62a4709457a15dd6c - -Suggested-by: Bc-bocun Chen -Signed-off-by: Daniel Golle ---- - drivers/net/ethernet/mediatek/mtk_ppe.c | 18 +++++++++++------- - 1 file changed, 11 insertions(+), 7 deletions(-) - ---- a/drivers/net/ethernet/mediatek/mtk_ppe.c -+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c -@@ -1002,7 +1002,7 @@ void mtk_ppe_start(struct mtk_ppe *ppe) - MTK_PPE_KEEPALIVE_DISABLE) | - FIELD_PREP(MTK_PPE_TB_CFG_HASH_MODE, 1) | - FIELD_PREP(MTK_PPE_TB_CFG_SCAN_MODE, -- MTK_PPE_SCAN_MODE_KEEPALIVE_AGE) | -+ MTK_PPE_SCAN_MODE_CHECK_AGE) | - FIELD_PREP(MTK_PPE_TB_CFG_ENTRY_NUM, - MTK_PPE_ENTRIES_SHIFT); - if (mtk_is_netsys_v2_or_greater(ppe->eth)) -@@ -1098,17 +1098,21 @@ int mtk_ppe_stop(struct mtk_ppe *ppe) - - mtk_ppe_cache_enable(ppe, false); - -- /* disable offload engine */ -- ppe_clear(ppe, MTK_PPE_GLO_CFG, MTK_PPE_GLO_CFG_EN); -- ppe_w32(ppe, MTK_PPE_FLOW_CFG, 0); -- - /* disable aging */ - val = MTK_PPE_TB_CFG_AGE_NON_L4 | - MTK_PPE_TB_CFG_AGE_UNBIND | - MTK_PPE_TB_CFG_AGE_TCP | - MTK_PPE_TB_CFG_AGE_UDP | -- MTK_PPE_TB_CFG_AGE_TCP_FIN; -+ MTK_PPE_TB_CFG_AGE_TCP_FIN | -+ MTK_PPE_TB_CFG_SCAN_MODE; - ppe_clear(ppe, MTK_PPE_TB_CFG, val); - -- return mtk_ppe_wait_busy(ppe); -+ if (mtk_ppe_wait_busy(ppe)) -+ return -ETIMEDOUT; -+ -+ /* disable offload engine */ -+ ppe_clear(ppe, MTK_PPE_GLO_CFG, MTK_PPE_GLO_CFG_EN); -+ ppe_w32(ppe, MTK_PPE_FLOW_CFG, 0); -+ -+ return 0; - } diff --git a/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch b/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch index 42c8519c90..2df5e6b28c 100644 --- a/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch +++ b/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch @@ -157,7 +157,7 @@ Signed-off-by: Felix Fietkau void netif_napi_add_weight(struct net_device *dev, struct napi_struct *napi, int (*poll)(struct napi_struct *, int), int weight) { -@@ -11168,6 +11239,9 @@ static int dev_cpu_dead(unsigned int old +@@ -11171,6 +11242,9 @@ static int dev_cpu_dead(unsigned int old raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_enable(); @@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau #ifdef CONFIG_RPS remsd = oldsd->rps_ipi_list; oldsd->rps_ipi_list = NULL; -@@ -11480,6 +11554,7 @@ static int __init net_dev_init(void) +@@ -11483,6 +11557,7 @@ static int __init net_dev_init(void) INIT_CSD(&sd->defer_csd, trigger_rx_softirq, sd); spin_lock_init(&sd->defer_lock); diff --git a/target/linux/generic/pending-6.1/801-gpio-gpio-cascade-add-generic-GPIO-cascade.patch b/target/linux/generic/pending-6.1/801-gpio-gpio-cascade-add-generic-GPIO-cascade.patch index a13d405e64..815231973d 100644 --- a/target/linux/generic/pending-6.1/801-gpio-gpio-cascade-add-generic-GPIO-cascade.patch +++ b/target/linux/generic/pending-6.1/801-gpio-gpio-cascade-add-generic-GPIO-cascade.patch @@ -70,7 +70,7 @@ v1 -> v2: --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -1711,4 +1711,19 @@ config GPIO_SIM +@@ -1712,4 +1712,19 @@ config GPIO_SIM endmenu diff --git a/target/linux/generic/pending-6.1/920-mangle_bootargs.patch b/target/linux/generic/pending-6.1/920-mangle_bootargs.patch index 4552b4cd66..76e3f2544d 100644 --- a/target/linux/generic/pending-6.1/920-mangle_bootargs.patch +++ b/target/linux/generic/pending-6.1/920-mangle_bootargs.patch @@ -31,7 +31,7 @@ Signed-off-by: Imre Kaloz help --- a/init/main.c +++ b/init/main.c -@@ -611,6 +611,29 @@ static inline void setup_nr_cpu_ids(void +@@ -612,6 +612,29 @@ static inline void setup_nr_cpu_ids(void static inline void smp_prepare_cpus(unsigned int maxcpus) { } #endif @@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz /* * We need to store the untouched command line for future reference. * We also need to store the touched command line since the parameter -@@ -958,6 +981,7 @@ asmlinkage __visible void __init __no_sa +@@ -959,6 +982,7 @@ asmlinkage __visible void __init __no_sa pr_notice("%s", linux_banner); early_security_init(); setup_arch(&command_line); diff --git a/target/linux/ipq806x/patches-6.1/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch b/target/linux/ipq806x/patches-6.1/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch index 60b80fefe1..604ac731a8 100644 --- a/target/linux/ipq806x/patches-6.1/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch +++ b/target/linux/ipq806x/patches-6.1/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch @@ -177,7 +177,7 @@ Signed-off-by: Christian Marangi #include #include #include -@@ -995,6 +996,17 @@ asmlinkage __visible void __init __no_sa +@@ -996,6 +997,17 @@ asmlinkage __visible void __init __no_sa pr_notice("Kernel command line: %s\n", saved_command_line); /* parameters may set static keys */ jump_label_init(); diff --git a/target/linux/mediatek/patches-6.1/001-v6.2-arm64-dts-mediatek-mt7986-add-support-for-RX-Wireles.patch b/target/linux/mediatek/patches-6.1/001-v6.2-arm64-dts-mediatek-mt7986-add-support-for-RX-Wireles.patch index 970e0f92bb..e6c6eb6166 100644 --- a/target/linux/mediatek/patches-6.1/001-v6.2-arm64-dts-mediatek-mt7986-add-support-for-RX-Wireles.patch +++ b/target/linux/mediatek/patches-6.1/001-v6.2-arm64-dts-mediatek-mt7986-add-support-for-RX-Wireles.patch @@ -66,7 +66,7 @@ Signed-off-by: David S. Miller }; timer { -@@ -239,6 +280,11 @@ +@@ -240,6 +281,11 @@ reg = <0 0x15010000 0 0x1000>; interrupt-parent = <&gic>; interrupts = ; @@ -78,7 +78,7 @@ Signed-off-by: David S. Miller }; wed1: wed@15011000 { -@@ -247,6 +293,25 @@ +@@ -248,6 +294,25 @@ reg = <0 0x15011000 0 0x1000>; interrupt-parent = <&gic>; interrupts = ; diff --git a/target/linux/mediatek/patches-6.1/003-v6.2-arm64-dts-mt7986-add-crypto-related-device-nodes.patch b/target/linux/mediatek/patches-6.1/003-v6.2-arm64-dts-mt7986-add-crypto-related-device-nodes.patch index 5706531a46..fec048e68e 100644 --- a/target/linux/mediatek/patches-6.1/003-v6.2-arm64-dts-mt7986-add-crypto-related-device-nodes.patch +++ b/target/linux/mediatek/patches-6.1/003-v6.2-arm64-dts-mt7986-add-crypto-related-device-nodes.patch @@ -31,7 +31,7 @@ Signed-off-by: Matthias Brugger --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi -@@ -223,6 +223,21 @@ +@@ -224,6 +224,21 @@ status = "disabled"; }; diff --git a/target/linux/mediatek/patches-6.1/004-v6.2-arm64-dts-mt7986-add-i2c-node.patch b/target/linux/mediatek/patches-6.1/004-v6.2-arm64-dts-mt7986-add-i2c-node.patch index 0e5b77a11b..132940915b 100644 --- a/target/linux/mediatek/patches-6.1/004-v6.2-arm64-dts-mt7986-add-i2c-node.patch +++ b/target/linux/mediatek/patches-6.1/004-v6.2-arm64-dts-mt7986-add-i2c-node.patch @@ -14,7 +14,7 @@ Signed-off-by: Matthias Brugger --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi -@@ -279,6 +279,20 @@ +@@ -280,6 +280,20 @@ status = "disabled"; }; diff --git a/target/linux/mediatek/patches-6.1/006-v6.2-arm64-dts-mt7986-add-spi-related-device-nodes.patch b/target/linux/mediatek/patches-6.1/006-v6.2-arm64-dts-mt7986-add-spi-related-device-nodes.patch index 3e5e3d880a..c45f183dc7 100644 --- a/target/linux/mediatek/patches-6.1/006-v6.2-arm64-dts-mt7986-add-spi-related-device-nodes.patch +++ b/target/linux/mediatek/patches-6.1/006-v6.2-arm64-dts-mt7986-add-spi-related-device-nodes.patch @@ -69,7 +69,7 @@ Signed-off-by: Matthias Brugger #address-cells = <1>; --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi -@@ -294,6 +294,34 @@ +@@ -295,6 +295,34 @@ status = "disabled"; }; diff --git a/target/linux/mediatek/patches-6.1/007-v6.3-arm64-dts-mt7986-add-usb-related-device-nodes.patch b/target/linux/mediatek/patches-6.1/007-v6.3-arm64-dts-mt7986-add-usb-related-device-nodes.patch index 53567c66a0..603f33b150 100644 --- a/target/linux/mediatek/patches-6.1/007-v6.3-arm64-dts-mt7986-add-usb-related-device-nodes.patch +++ b/target/linux/mediatek/patches-6.1/007-v6.3-arm64-dts-mt7986-add-usb-related-device-nodes.patch @@ -42,7 +42,7 @@ Signed-off-by: Matthias Brugger pinctrl-names = "default", "dbdc"; --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi -@@ -322,6 +322,61 @@ +@@ -323,6 +323,61 @@ status = "disabled"; }; diff --git a/target/linux/mediatek/patches-6.1/008-v6.3-arm64-dts-mt7986-add-mmc-related-device-nodes.patch b/target/linux/mediatek/patches-6.1/008-v6.3-arm64-dts-mt7986-add-mmc-related-device-nodes.patch index 9c0a48149d..40e71cd429 100644 --- a/target/linux/mediatek/patches-6.1/008-v6.3-arm64-dts-mt7986-add-mmc-related-device-nodes.patch +++ b/target/linux/mediatek/patches-6.1/008-v6.3-arm64-dts-mt7986-add-mmc-related-device-nodes.patch @@ -136,7 +136,7 @@ Signed-off-by: Matthias Brugger function = "spi"; --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi -@@ -345,6 +345,21 @@ +@@ -346,6 +346,21 @@ status = "disabled"; }; diff --git a/target/linux/mediatek/patches-6.1/009-v6.3-arm64-dts-mt7986-add-pcie-related-device-nodes.patch b/target/linux/mediatek/patches-6.1/009-v6.3-arm64-dts-mt7986-add-pcie-related-device-nodes.patch index adc6394857..ab039c335a 100644 --- a/target/linux/mediatek/patches-6.1/009-v6.3-arm64-dts-mt7986-add-pcie-related-device-nodes.patch +++ b/target/linux/mediatek/patches-6.1/009-v6.3-arm64-dts-mt7986-add-pcie-related-device-nodes.patch @@ -58,7 +58,7 @@ Signed-off-by: Matthias Brugger / { compatible = "mediatek,mt7986a"; -@@ -360,6 +361,57 @@ +@@ -361,6 +362,57 @@ status = "disabled"; }; diff --git a/target/linux/mediatek/patches-6.1/012-v6.5-arm64-dts-mt7986-add-PWM.patch b/target/linux/mediatek/patches-6.1/012-v6.5-arm64-dts-mt7986-add-PWM.patch index e8c47945d6..915da7984e 100644 --- a/target/linux/mediatek/patches-6.1/012-v6.5-arm64-dts-mt7986-add-PWM.patch +++ b/target/linux/mediatek/patches-6.1/012-v6.5-arm64-dts-mt7986-add-PWM.patch @@ -15,7 +15,7 @@ Signed-off-by: Matthias Brugger --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi -@@ -240,6 +240,20 @@ +@@ -241,6 +241,20 @@ status = "disabled"; }; diff --git a/target/linux/mediatek/patches-6.1/016-v6.5-arm64-dts-mt7986-add-thermal-and-efuse.patch b/target/linux/mediatek/patches-6.1/016-v6.5-arm64-dts-mt7986-add-thermal-and-efuse.patch index 0d12079d7c..f1cb0eaf02 100644 --- a/target/linux/mediatek/patches-6.1/016-v6.5-arm64-dts-mt7986-add-thermal-and-efuse.patch +++ b/target/linux/mediatek/patches-6.1/016-v6.5-arm64-dts-mt7986-add-thermal-and-efuse.patch @@ -16,7 +16,7 @@ Signed-off-by: Matthias Brugger --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi -@@ -337,6 +337,15 @@ +@@ -338,6 +338,15 @@ status = "disabled"; }; @@ -32,7 +32,7 @@ Signed-off-by: Matthias Brugger ssusb: usb@11200000 { compatible = "mediatek,mt7986-xhci", "mediatek,mtk-xhci"; -@@ -375,6 +384,21 @@ +@@ -376,6 +385,21 @@ status = "disabled"; }; @@ -54,7 +54,7 @@ Signed-off-by: Matthias Brugger pcie: pcie@11280000 { compatible = "mediatek,mt7986-pcie", "mediatek,mt8192-pcie"; -@@ -426,6 +450,17 @@ +@@ -427,6 +451,17 @@ }; }; @@ -72,7 +72,7 @@ Signed-off-by: Matthias Brugger usb_phy: t-phy@11e10000 { compatible = "mediatek,mt7986-tphy", "mediatek,generic-tphy-v2"; -@@ -567,5 +602,4 @@ +@@ -568,5 +603,4 @@ memory-region = <&wmcpu_emi>; }; }; diff --git a/target/linux/mediatek/patches-6.1/017-v6.5-arm64-dts-mt7986-add-thermal-zones.patch b/target/linux/mediatek/patches-6.1/017-v6.5-arm64-dts-mt7986-add-thermal-zones.patch index 3fe3e885eb..ad21fb8c3c 100644 --- a/target/linux/mediatek/patches-6.1/017-v6.5-arm64-dts-mt7986-add-thermal-zones.patch +++ b/target/linux/mediatek/patches-6.1/017-v6.5-arm64-dts-mt7986-add-thermal-zones.patch @@ -16,7 +16,7 @@ Signed-off-by: Matthias Brugger --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi -@@ -602,4 +602,32 @@ +@@ -603,4 +603,32 @@ memory-region = <&wmcpu_emi>; }; }; diff --git a/target/linux/mediatek/patches-6.1/021-v6.7-arm64-dts-mt7986-change-cooling-trips.patch b/target/linux/mediatek/patches-6.1/021-v6.7-arm64-dts-mt7986-change-cooling-trips.patch index 20d4468cf0..318ca43e13 100644 --- a/target/linux/mediatek/patches-6.1/021-v6.7-arm64-dts-mt7986-change-cooling-trips.patch +++ b/target/linux/mediatek/patches-6.1/021-v6.7-arm64-dts-mt7986-change-cooling-trips.patch @@ -18,7 +18,7 @@ Signed-off-by: Frank Wunderlich --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi -@@ -610,22 +610,34 @@ +@@ -611,22 +611,34 @@ thermal-sensors = <&thermal 0>; trips { diff --git a/target/linux/mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch b/target/linux/mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch index d5bd9a316b..1eeed82c1b 100644 --- a/target/linux/mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch +++ b/target/linux/mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch @@ -38,10 +38,10 @@ memory@40000000 { - reg = <0 0x40000000 0 0x20000000>; + reg = <0 0x40000000 0 0x40000000>; + device_type = "memory"; }; - reg_1p8v: regulator-1p8v { -@@ -132,22 +131,22 @@ +@@ -133,22 +132,22 @@ port@0 { reg = <0>; @@ -68,7 +68,7 @@ }; port@4 { -@@ -240,7 +239,22 @@ +@@ -241,7 +240,22 @@ status = "okay"; }; @@ -91,7 +91,7 @@ /* eMMC is shared pin with parallel NAND */ emmc_pins_default: emmc-pins-default { mux { -@@ -517,11 +531,11 @@ +@@ -518,11 +532,11 @@ }; &sata { diff --git a/target/linux/mediatek/patches-6.1/106-dts-mt7622-disable_btif.patch b/target/linux/mediatek/patches-6.1/106-dts-mt7622-disable_btif.patch index fc6a8f35bc..ac8594b396 100644 --- a/target/linux/mediatek/patches-6.1/106-dts-mt7622-disable_btif.patch +++ b/target/linux/mediatek/patches-6.1/106-dts-mt7622-disable_btif.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts -@@ -108,10 +108,6 @@ +@@ -109,10 +109,6 @@ status = "disabled"; }; @@ -13,7 +13,7 @@ pinctrl-0 = <&irrx_pins>; --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts -@@ -89,10 +89,6 @@ +@@ -90,10 +90,6 @@ status = "disabled"; }; diff --git a/target/linux/mediatek/patches-6.1/112-dts-fix-bpi64-lan-names.patch b/target/linux/mediatek/patches-6.1/112-dts-fix-bpi64-lan-names.patch index b012a48d75..2cc0efdade 100644 --- a/target/linux/mediatek/patches-6.1/112-dts-fix-bpi64-lan-names.patch +++ b/target/linux/mediatek/patches-6.1/112-dts-fix-bpi64-lan-names.patch @@ -8,7 +8,7 @@ }; chosen { -@@ -160,22 +161,22 @@ +@@ -161,22 +162,22 @@ port@1 { reg = <1>; diff --git a/target/linux/mediatek/patches-6.1/114-dts-bpi64-disable-rtc.patch b/target/linux/mediatek/patches-6.1/114-dts-bpi64-disable-rtc.patch index 0d324084b1..119de1c457 100644 --- a/target/linux/mediatek/patches-6.1/114-dts-bpi64-disable-rtc.patch +++ b/target/linux/mediatek/patches-6.1/114-dts-bpi64-disable-rtc.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts -@@ -556,12 +556,16 @@ +@@ -557,12 +557,16 @@ status = "okay"; }; diff --git a/target/linux/mediatek/patches-6.1/115-v6.5-arm64-dts-mt7622-declare-SPI-NAND-present-on-BPI-R64.patch b/target/linux/mediatek/patches-6.1/115-v6.5-arm64-dts-mt7622-declare-SPI-NAND-present-on-BPI-R64.patch index 5fc55314ce..6eac51f825 100644 --- a/target/linux/mediatek/patches-6.1/115-v6.5-arm64-dts-mt7622-declare-SPI-NAND-present-on-BPI-R64.patch +++ b/target/linux/mediatek/patches-6.1/115-v6.5-arm64-dts-mt7622-declare-SPI-NAND-present-on-BPI-R64.patch @@ -20,7 +20,7 @@ Signed-off-by: Matthias Brugger --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts -@@ -253,14 +253,42 @@ +@@ -254,14 +254,42 @@ status = "disabled"; }; diff --git a/target/linux/mediatek/patches-6.1/131-dts-mt7622-add-snand-support.patch b/target/linux/mediatek/patches-6.1/131-dts-mt7622-add-snand-support.patch index d6e0ab1d41..1a0e3237c8 100644 --- a/target/linux/mediatek/patches-6.1/131-dts-mt7622-add-snand-support.patch +++ b/target/linux/mediatek/patches-6.1/131-dts-mt7622-add-snand-support.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts -@@ -534,6 +534,65 @@ +@@ -535,6 +535,65 @@ status = "disabled"; }; diff --git a/target/linux/mediatek/patches-6.1/140-dts-fix-wmac-support-for-mt7622-rfb1.patch b/target/linux/mediatek/patches-6.1/140-dts-fix-wmac-support-for-mt7622-rfb1.patch index 117d5abde6..208046ad16 100644 --- a/target/linux/mediatek/patches-6.1/140-dts-fix-wmac-support-for-mt7622-rfb1.patch +++ b/target/linux/mediatek/patches-6.1/140-dts-fix-wmac-support-for-mt7622-rfb1.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts -@@ -575,7 +575,7 @@ +@@ -576,7 +576,7 @@ reg = <0x140000 0x0080000>; }; @@ -9,7 +9,7 @@ label = "Factory"; reg = <0x1c0000 0x0100000>; }; -@@ -636,5 +636,6 @@ +@@ -637,5 +637,6 @@ &wmac { pinctrl-names = "default"; pinctrl-0 = <&wmac_pins>; diff --git a/target/linux/mediatek/patches-6.1/180-v6.5-arm64-dts-mt7622-handle-interrupts-from-MT7531-switc.patch b/target/linux/mediatek/patches-6.1/180-v6.5-arm64-dts-mt7622-handle-interrupts-from-MT7531-switc.patch index 0a971c1f45..d396d38f20 100644 --- a/target/linux/mediatek/patches-6.1/180-v6.5-arm64-dts-mt7622-handle-interrupts-from-MT7531-switc.patch +++ b/target/linux/mediatek/patches-6.1/180-v6.5-arm64-dts-mt7622-handle-interrupts-from-MT7531-switc.patch @@ -19,7 +19,7 @@ Signed-off-by: Matthias Brugger --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts -@@ -154,6 +154,10 @@ +@@ -155,6 +155,10 @@ switch@0 { compatible = "mediatek,mt7531"; reg = <0>; diff --git a/target/linux/mediatek/patches-6.1/331-mt7622-rfb1-enable-bmt.patch b/target/linux/mediatek/patches-6.1/331-mt7622-rfb1-enable-bmt.patch index 3e956701cd..a6f98fdf83 100644 --- a/target/linux/mediatek/patches-6.1/331-mt7622-rfb1-enable-bmt.patch +++ b/target/linux/mediatek/patches-6.1/331-mt7622-rfb1-enable-bmt.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts -@@ -548,6 +548,7 @@ +@@ -549,6 +549,7 @@ spi-tx-bus-width = <4>; spi-rx-bus-width = <4>; nand-ecc-engine = <&snfi>; diff --git a/target/linux/mediatek/patches-6.1/431-drivers-spi-mt65xx-Move-chip_config-to-driver-s-priv.patch b/target/linux/mediatek/patches-6.1/431-drivers-spi-mt65xx-Move-chip_config-to-driver-s-priv.patch index 8c2c80d6bf..95fc7f4668 100644 --- a/target/linux/mediatek/patches-6.1/431-drivers-spi-mt65xx-Move-chip_config-to-driver-s-priv.patch +++ b/target/linux/mediatek/patches-6.1/431-drivers-spi-mt65xx-Move-chip_config-to-driver-s-priv.patch @@ -97,7 +97,7 @@ Signed-off-by: SkyLake.Huang if (mdata->dev_comp->need_pad_sel && spi->cs_gpiod) /* CS de-asserted, gpiolib will handle inversion */ gpiod_direction_output(spi->cs_gpiod, 0); -@@ -1138,6 +1126,10 @@ static int mtk_spi_probe(struct platform +@@ -1140,6 +1128,10 @@ static int mtk_spi_probe(struct platform mdata = spi_master_get_devdata(master); mdata->dev_comp = device_get_match_data(dev); diff --git a/target/linux/mediatek/patches-6.1/434-drivers-spi-mt65xx-Add-controller-s-calibration-para.patch b/target/linux/mediatek/patches-6.1/434-drivers-spi-mt65xx-Add-controller-s-calibration-para.patch index ee3dc27860..dbdb1947aa 100644 --- a/target/linux/mediatek/patches-6.1/434-drivers-spi-mt65xx-Add-controller-s-calibration-para.patch +++ b/target/linux/mediatek/patches-6.1/434-drivers-spi-mt65xx-Add-controller-s-calibration-para.patch @@ -11,7 +11,7 @@ Signed-off-by: SkyLake.Huang --- a/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi-mt65xx.c -@@ -832,6 +832,21 @@ static irqreturn_t mtk_spi_interrupt(int +@@ -834,6 +834,21 @@ static irqreturn_t mtk_spi_interrupt(int return IRQ_HANDLED; } @@ -33,7 +33,7 @@ Signed-off-by: SkyLake.Huang static int mtk_spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op) { -@@ -1122,6 +1137,7 @@ static int mtk_spi_probe(struct platform +@@ -1124,6 +1139,7 @@ static int mtk_spi_probe(struct platform master->setup = mtk_spi_setup; master->set_cs_timing = mtk_spi_set_hw_cs_timing; master->use_gpio_descriptors = true; diff --git a/target/linux/mediatek/patches-6.1/862-arm64-dts-mt7986-add-afe.patch b/target/linux/mediatek/patches-6.1/862-arm64-dts-mt7986-add-afe.patch index b31710fe69..e40dca2a7d 100644 --- a/target/linux/mediatek/patches-6.1/862-arm64-dts-mt7986-add-afe.patch +++ b/target/linux/mediatek/patches-6.1/862-arm64-dts-mt7986-add-afe.patch @@ -9,7 +9,7 @@ Subject: [PATCH] arm64: dts: mt7986: add afe --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi -@@ -248,6 +248,28 @@ +@@ -249,6 +249,28 @@ status = "disabled"; }; diff --git a/target/linux/mediatek/patches-6.1/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch b/target/linux/mediatek/patches-6.1/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch index 6dede02003..87a937be05 100644 --- a/target/linux/mediatek/patches-6.1/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch +++ b/target/linux/mediatek/patches-6.1/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts -@@ -312,7 +312,7 @@ +@@ -313,7 +313,7 @@ /* Attention: GPIO 90 is used to switch between PCIe@1,0 and * SATA functions. i.e. output-high: PCIe, output-low: SATA */ diff --git a/target/linux/mediatek/patches-6.1/910-dts-mt7622-bpi-r64-wifi-eeprom.patch b/target/linux/mediatek/patches-6.1/910-dts-mt7622-bpi-r64-wifi-eeprom.patch index 09ce417c35..d1f6a96720 100644 --- a/target/linux/mediatek/patches-6.1/910-dts-mt7622-bpi-r64-wifi-eeprom.patch +++ b/target/linux/mediatek/patches-6.1/910-dts-mt7622-bpi-r64-wifi-eeprom.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts -@@ -639,5 +639,28 @@ +@@ -640,5 +640,28 @@ }; &wmac { diff --git a/target/linux/mediatek/patches-6.1/911-dts-mt7622-bpi-r64-add-rootdisk.patch b/target/linux/mediatek/patches-6.1/911-dts-mt7622-bpi-r64-add-rootdisk.patch index 5d3153ded4..014342aad5 100644 --- a/target/linux/mediatek/patches-6.1/911-dts-mt7622-bpi-r64-add-rootdisk.patch +++ b/target/linux/mediatek/patches-6.1/911-dts-mt7622-bpi-r64-add-rootdisk.patch @@ -10,7 +10,7 @@ }; cpus { -@@ -233,6 +236,26 @@ +@@ -234,6 +237,26 @@ assigned-clocks = <&topckgen CLK_TOP_MSDC30_0_SEL>; assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>; non-removable; @@ -37,7 +37,7 @@ }; &mmc1 { -@@ -249,6 +272,26 @@ +@@ -250,6 +273,26 @@ vqmmc-supply = <®_3p3v>; assigned-clocks = <&topckgen CLK_TOP_MSDC30_1_SEL>; assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>; @@ -64,7 +64,7 @@ }; &nandc { -@@ -283,14 +326,29 @@ +@@ -284,14 +327,29 @@ }; partition@80000 { diff --git a/target/linux/mediatek/patches-6.1/930-spi-mt65xx-enable-sel-clk.patch b/target/linux/mediatek/patches-6.1/930-spi-mt65xx-enable-sel-clk.patch index 6e6810b42a..3d05bf7679 100644 --- a/target/linux/mediatek/patches-6.1/930-spi-mt65xx-enable-sel-clk.patch +++ b/target/linux/mediatek/patches-6.1/930-spi-mt65xx-enable-sel-clk.patch @@ -1,6 +1,6 @@ --- a/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi-mt65xx.c -@@ -1225,8 +1225,15 @@ static int mtk_spi_probe(struct platform +@@ -1227,8 +1227,15 @@ static int mtk_spi_probe(struct platform if (ret < 0) return dev_err_probe(dev, ret, "failed to enable hclk\n"); diff --git a/target/linux/mediatek/patches-6.1/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch b/target/linux/mediatek/patches-6.1/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch index 3ba485346c..da61f1c050 100644 --- a/target/linux/mediatek/patches-6.1/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch +++ b/target/linux/mediatek/patches-6.1/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch @@ -24,7 +24,7 @@ Signed-off-by: Lorenzo Bianconi }; timer { -@@ -540,10 +534,11 @@ +@@ -541,10 +535,11 @@ interrupt-parent = <&gic>; interrupts = ; memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>, @@ -38,7 +38,7 @@ Signed-off-by: Lorenzo Bianconi }; wed1: wed@15011000 { -@@ -553,10 +548,11 @@ +@@ -554,10 +549,11 @@ interrupt-parent = <&gic>; interrupts = ; memory-region = <&wo_emi1>, <&wo_ilm1>, <&wo_dlm1>, @@ -52,7 +52,7 @@ Signed-off-by: Lorenzo Bianconi }; wo_ccif0: syscon@151a5000 { -@@ -573,6 +569,11 @@ +@@ -574,6 +570,11 @@ interrupts = ; }; diff --git a/target/linux/mediatek/patches-6.1/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch b/target/linux/mediatek/patches-6.1/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch index 0ba9bd7cf0..2f1becd1b8 100644 --- a/target/linux/mediatek/patches-6.1/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch +++ b/target/linux/mediatek/patches-6.1/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch @@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi wo_data: wo-data@4fd80000 { reg = <0 0x4fd80000 0 0x240000>; no-map; -@@ -533,11 +523,10 @@ +@@ -534,11 +524,10 @@ reg = <0 0x15010000 0 0x1000>; interrupt-parent = <&gic>; interrupts = ; @@ -49,7 +49,7 @@ Signed-off-by: Lorenzo Bianconi mediatek,wo-cpuboot = <&wo_cpuboot>; }; -@@ -547,11 +536,10 @@ +@@ -548,11 +537,10 @@ reg = <0 0x15011000 0 0x1000>; interrupt-parent = <&gic>; interrupts = ; @@ -64,7 +64,7 @@ Signed-off-by: Lorenzo Bianconi mediatek,wo-cpuboot = <&wo_cpuboot>; }; -@@ -569,6 +557,16 @@ +@@ -570,6 +558,16 @@ interrupts = ; }; diff --git a/target/linux/mediatek/patches-6.1/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch b/target/linux/mediatek/patches-6.1/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch index 90b2bb91a2..5b52a4934e 100644 --- a/target/linux/mediatek/patches-6.1/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch +++ b/target/linux/mediatek/patches-6.1/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch @@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi }; timer { -@@ -523,10 +513,11 @@ +@@ -524,10 +514,11 @@ reg = <0 0x15010000 0 0x1000>; interrupt-parent = <&gic>; interrupts = ; @@ -48,7 +48,7 @@ Signed-off-by: Lorenzo Bianconi mediatek,wo-cpuboot = <&wo_cpuboot>; }; -@@ -536,10 +527,11 @@ +@@ -537,10 +528,11 @@ reg = <0 0x15011000 0 0x1000>; interrupt-parent = <&gic>; interrupts = ; @@ -62,7 +62,7 @@ Signed-off-by: Lorenzo Bianconi mediatek,wo-cpuboot = <&wo_cpuboot>; }; -@@ -567,6 +559,16 @@ +@@ -568,6 +560,16 @@ reg = <0 0x151f0000 0 0x8000>; }; diff --git a/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch index f3881a0d25..7ab735af4c 100644 --- a/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch @@ -247,7 +247,7 @@ Signed-off-by: Michael Gray } --- a/init/main.c +++ b/init/main.c -@@ -112,6 +112,10 @@ +@@ -113,6 +113,10 @@ #include @@ -258,7 +258,7 @@ Signed-off-by: Michael Gray static int kernel_init(void *); extern void init_IRQ(void); -@@ -993,6 +997,18 @@ asmlinkage __visible void __init __no_sa +@@ -994,6 +998,18 @@ asmlinkage __visible void __init __no_sa page_alloc_init(); pr_notice("Kernel command line: %s\n", saved_command_line); diff --git a/target/linux/x86/64/config-6.1 b/target/linux/x86/64/config-6.1 index 66ae3e35f0..3767fd4b9b 100644 --- a/target/linux/x86/64/config-6.1 +++ b/target/linux/x86/64/config-6.1 @@ -282,6 +282,7 @@ CONFIG_INTEL_IDLE=y CONFIG_INTEL_IOMMU=y # CONFIG_INTEL_IOMMU_DEFAULT_ON is not set CONFIG_INTEL_IOMMU_FLOPPY_WA=y +CONFIG_INTEL_IOMMU_PERF_EVENTS=y # CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON is not set # CONFIG_INTEL_IOMMU_SVM is not set # CONFIG_INTEL_IPS is not set From 1a44a260fe2ed2f74f134c4bbc34883c2b1efdda Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 13 Apr 2024 13:49:12 +0200 Subject: [PATCH 25/41] kernel: bump 6.1 to 6.1.84 Removed upstreamed: pistachio/patches-6.1/110-pwm-img-fix-clock-lookup.patch [1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.84&id=44b6fb6cdedb2c391a2da355521d4610b2645fcc Signed-off-by: Hauke Mehrtens --- include/kernel-6.1 | 4 +- ...d-initialise-an-orientation-field-to.patch | 2 +- .../950-0106-Add-dwc_otg-driver.patch | 2 +- ...111-MMC-added-alternative-MMC-driver.patch | 6 +-- ...chiq-Avoid-use-of-bool-in-structures.patch | 2 +- ...chiq-Add-support-for-event-callbacks.patch | 16 ++++---- ...iq-Free-the-event-context-for-contro.patch | 2 +- ...-vchiq-Fix-memory-leak-in-error-path.patch | 8 ++-- ...hci_fixup_endpoint-for-interval-adju.patch | 4 +- ...iq-Use-vc-sm-cma-to-support-zero-cop.patch | 6 +-- ...iq-Add-module-parameter-to-enable-lo.patch | 22 +++++------ ...iq-Reset-buffers_with_vpu-on-port_en.patch | 2 +- ...do-single-sector-reads-during-recove.patch | 2 +- ...d-add-the-endpoint-context-in-xhci_f.patch | 2 +- ...al-8250-Add-NOMSI-bug-for-bcm2835aux.patch | 6 +-- ...d-NULL-pointer-dereference-in-f2fs_i.patch | 4 +- ...-usb-phy-generic-Get-the-vbus-supply.patch | 6 +-- ...i-gen-LRU-per-node-lru_gen_folio-lis.patch | 2 +- ...ount-to-list.h-as-list_count_nodes-f.patch | 4 +- ...it-config-option-to-read-old-syntax-.patch | 2 +- .../780-usb-net-MeigLink_modem_support.patch | 4 +- ...e_mem_map-with-ARCH_PFN_OFFSET-calcu.patch | 2 +- ...mmc-block-set-fwnode-of-disk-devices.patch | 4 +- .../450-15-mmc-block-set-GENHD_FL_NVMEM.patch | 2 +- ...les-ignore-EOPNOTSUPP-on-flowtable-d.patch | 2 +- .../pending-6.1/834-ledtrig-libata.patch | 2 +- .../patches-6.1/410-bt-mtk-serial-fix.patch | 2 +- .../110-pwm-img-fix-clock-lookup.patch | 39 ------------------- 28 files changed, 61 insertions(+), 100 deletions(-) delete mode 100644 target/linux/pistachio/patches-6.1/110-pwm-img-fix-clock-lookup.patch diff --git a/include/kernel-6.1 b/include/kernel-6.1 index 101dbf34fa..7ea1f9e02d 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .83 -LINUX_KERNEL_HASH-6.1.83 = 88b69611093613ce4494527685f833af0c31b986dcbeda7086f69f18f9e0b190 +LINUX_VERSION-6.1 = .84 +LINUX_KERNEL_HASH-6.1.84 = af97d2ebe14765d0db3af6560309daf08535da25bfad36e5fb3e436f22a1707a diff --git a/target/linux/bcm27xx/patches-6.1/950-0025-drm-panel-Add-and-initialise-an-orientation-field-to.patch b/target/linux/bcm27xx/patches-6.1/950-0025-drm-panel-Add-and-initialise-an-orientation-field-to.patch index 9cdbe6d7c8..67c1e18266 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0025-drm-panel-Add-and-initialise-an-orientation-field-to.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0025-drm-panel-Add-and-initialise-an-orientation-field-to.patch @@ -46,7 +46,7 @@ Signed-off-by: Dave Stevenson } EXPORT_SYMBOL(drm_panel_init); -@@ -289,16 +292,18 @@ int of_drm_get_panel_orientation(const s +@@ -294,16 +297,18 @@ int of_drm_get_panel_orientation(const s if (ret < 0) return ret; diff --git a/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch index f8ab3b04a1..ab145eb66f 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch @@ -1185,7 +1185,7 @@ Signed-off-by: Jonathan Bell } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5677,7 +5677,7 @@ static void port_event(struct usb_hub *h +@@ -5686,7 +5686,7 @@ static void port_event(struct usb_hub *h port_dev->over_current_count++; port_over_current_notify(port_dev); diff --git a/target/linux/bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch b/target/linux/bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch index a89940dacb..6ca3493e4c 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch @@ -266,7 +266,7 @@ Signed-off-by: Phil Elwell static inline int mmc_blk_part_switch(struct mmc_card *card, unsigned int part_type); static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, -@@ -3050,6 +3057,8 @@ static int mmc_blk_probe(struct mmc_card +@@ -3052,6 +3059,8 @@ static int mmc_blk_probe(struct mmc_card { struct mmc_blk_data *md; int ret = 0; @@ -275,7 +275,7 @@ Signed-off-by: Phil Elwell /* * Check that the card supports the command class(es) we need. -@@ -3057,7 +3066,16 @@ static int mmc_blk_probe(struct mmc_card +@@ -3059,7 +3068,16 @@ static int mmc_blk_probe(struct mmc_card if (!(card->csd.cmdclass & CCC_BLOCK_READ)) return -ENODEV; @@ -293,7 +293,7 @@ Signed-off-by: Phil Elwell card->complete_wq = alloc_workqueue("mmc_complete", WQ_MEM_RECLAIM | WQ_HIGHPRI, 0); -@@ -3072,6 +3090,17 @@ static int mmc_blk_probe(struct mmc_card +@@ -3074,6 +3092,17 @@ static int mmc_blk_probe(struct mmc_card goto out_free; } diff --git a/target/linux/bcm27xx/patches-6.1/950-0165-staging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch b/target/linux/bcm27xx/patches-6.1/950-0165-staging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch index ec5a217c7c..ba8d2beed1 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0165-staging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0165-staging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch @@ -13,7 +13,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c -@@ -1773,7 +1773,7 @@ int vchiq_mmal_component_enable(struct v +@@ -1774,7 +1774,7 @@ int vchiq_mmal_component_enable(struct v ret = enable_component(instance, component); if (ret == 0) diff --git a/target/linux/bcm27xx/patches-6.1/950-0166-staging-mmal-vchiq-Add-support-for-event-callbacks.patch b/target/linux/bcm27xx/patches-6.1/950-0166-staging-mmal-vchiq-Add-support-for-event-callbacks.patch index 743c757dd5..01a4d49fae 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0166-staging-mmal-vchiq-Add-support-for-event-callbacks.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0166-staging-mmal-vchiq-Add-support-for-event-callbacks.patch @@ -234,7 +234,7 @@ Signed-off-by: Dave Stevenson /* deals with receipt of buffer to host message */ static void buffer_to_host_cb(struct vchiq_mmal_instance *instance, struct mmal_msg *msg, u32 msg_len) -@@ -1330,6 +1423,7 @@ static int port_disable(struct vchiq_mma +@@ -1331,6 +1424,7 @@ static int port_disable(struct vchiq_mma mmalbuf->mmal_flags = 0; mmalbuf->dts = MMAL_TIME_UNKNOWN; mmalbuf->pts = MMAL_TIME_UNKNOWN; @@ -242,7 +242,7 @@ Signed-off-by: Dave Stevenson port->buffer_cb(instance, port, 0, mmalbuf); } -@@ -1631,6 +1725,43 @@ int mmal_vchi_buffer_cleanup(struct mmal +@@ -1632,6 +1726,43 @@ int mmal_vchi_buffer_cleanup(struct mmal } EXPORT_SYMBOL_GPL(mmal_vchi_buffer_cleanup); @@ -286,7 +286,7 @@ Signed-off-by: Dave Stevenson /* Initialise a mmal component and its ports * */ -@@ -1680,6 +1811,7 @@ int vchiq_mmal_component_init(struct vch +@@ -1681,6 +1812,7 @@ int vchiq_mmal_component_init(struct vch ret = port_info_get(instance, &component->control); if (ret < 0) goto release_component; @@ -294,7 +294,7 @@ Signed-off-by: Dave Stevenson for (idx = 0; idx < component->inputs; idx++) { component->input[idx].type = MMAL_PORT_TYPE_INPUT; -@@ -1690,6 +1822,7 @@ int vchiq_mmal_component_init(struct vch +@@ -1691,6 +1823,7 @@ int vchiq_mmal_component_init(struct vch ret = port_info_get(instance, &component->input[idx]); if (ret < 0) goto release_component; @@ -302,7 +302,7 @@ Signed-off-by: Dave Stevenson } for (idx = 0; idx < component->outputs; idx++) { -@@ -1701,6 +1834,7 @@ int vchiq_mmal_component_init(struct vch +@@ -1702,6 +1835,7 @@ int vchiq_mmal_component_init(struct vch ret = port_info_get(instance, &component->output[idx]); if (ret < 0) goto release_component; @@ -310,7 +310,7 @@ Signed-off-by: Dave Stevenson } for (idx = 0; idx < component->clocks; idx++) { -@@ -1712,6 +1846,7 @@ int vchiq_mmal_component_init(struct vch +@@ -1713,6 +1847,7 @@ int vchiq_mmal_component_init(struct vch ret = port_info_get(instance, &component->clock[idx]); if (ret < 0) goto release_component; @@ -318,7 +318,7 @@ Signed-off-by: Dave Stevenson } *component_out = component; -@@ -1737,7 +1872,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_i +@@ -1738,7 +1873,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_i int vchiq_mmal_component_finalise(struct vchiq_mmal_instance *instance, struct vchiq_mmal_component *component) { @@ -327,7 +327,7 @@ Signed-off-by: Dave Stevenson if (mutex_lock_interruptible(&instance->vchiq_mutex)) return -EINTR; -@@ -1749,6 +1884,13 @@ int vchiq_mmal_component_finalise(struct +@@ -1750,6 +1885,13 @@ int vchiq_mmal_component_finalise(struct component->in_use = 0; diff --git a/target/linux/bcm27xx/patches-6.1/950-0172-staging-mmal-vchiq-Free-the-event-context-for-contro.patch b/target/linux/bcm27xx/patches-6.1/950-0172-staging-mmal-vchiq-Free-the-event-context-for-contro.patch index 02b8ed9411..8625928562 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0172-staging-mmal-vchiq-Free-the-event-context-for-contro.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0172-staging-mmal-vchiq-Free-the-event-context-for-contro.patch @@ -17,7 +17,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c -@@ -1899,6 +1899,8 @@ int vchiq_mmal_component_finalise(struct +@@ -1900,6 +1900,8 @@ int vchiq_mmal_component_finalise(struct for (idx = 0; idx < component->clocks; idx++) free_event_context(&component->clock[idx]); diff --git a/target/linux/bcm27xx/patches-6.1/950-0173-staging-mmal-vchiq-Fix-memory-leak-in-error-path.patch b/target/linux/bcm27xx/patches-6.1/950-0173-staging-mmal-vchiq-Fix-memory-leak-in-error-path.patch index 6582bcceba..c14f6c0801 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0173-staging-mmal-vchiq-Fix-memory-leak-in-error-path.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0173-staging-mmal-vchiq-Fix-memory-leak-in-error-path.patch @@ -14,7 +14,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c -@@ -1765,9 +1765,26 @@ static void free_event_context(struct vc +@@ -1766,9 +1766,26 @@ static void free_event_context(struct vc { struct mmal_msg_context *ctx = port->event_context; @@ -41,7 +41,7 @@ Signed-off-by: Dave Stevenson } /* Initialise a mmal component and its ports -@@ -1865,6 +1882,7 @@ int vchiq_mmal_component_init(struct vch +@@ -1866,6 +1883,7 @@ int vchiq_mmal_component_init(struct vch release_component: destroy_component(instance, component); @@ -49,7 +49,7 @@ Signed-off-by: Dave Stevenson unlock: if (component) component->in_use = 0; -@@ -1880,7 +1898,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_i +@@ -1881,7 +1899,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_i int vchiq_mmal_component_finalise(struct vchiq_mmal_instance *instance, struct vchiq_mmal_component *component) { @@ -58,7 +58,7 @@ Signed-off-by: Dave Stevenson if (mutex_lock_interruptible(&instance->vchiq_mutex)) return -EINTR; -@@ -1892,14 +1910,7 @@ int vchiq_mmal_component_finalise(struct +@@ -1893,14 +1911,7 @@ int vchiq_mmal_component_finalise(struct component->in_use = 0; diff --git a/target/linux/bcm27xx/patches-6.1/950-0182-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-6.1/950-0182-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch index 4809951129..3c1e41ba0a 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0182-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0182-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch @@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -1641,6 +1641,109 @@ command_cleanup: +@@ -1643,6 +1643,109 @@ command_cleanup: } /* @@ -125,7 +125,7 @@ Signed-off-by: Jonathan Bell * non-error returns are a promise to giveback() the urb later * we drop ownership so next owner (or urb unlink) can get it */ -@@ -5469,6 +5572,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5471,6 +5574,7 @@ static const struct hc_driver xhci_hc_dr .endpoint_reset = xhci_endpoint_reset, .check_bandwidth = xhci_check_bandwidth, .reset_bandwidth = xhci_reset_bandwidth, diff --git a/target/linux/bcm27xx/patches-6.1/950-0276-staging-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch b/target/linux/bcm27xx/patches-6.1/950-0276-staging-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch index bcb322d55a..59ce232639 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0276-staging-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0276-staging-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch @@ -91,7 +91,7 @@ Signed-off-by: Dave Stevenson } else if (msg->u.buffer_from_host.buffer_header.length == 0) { /* empty buffer */ if (msg->u.buffer_from_host.buffer_header.flags & -@@ -1528,6 +1551,9 @@ int vchiq_mmal_port_parameter_set(struct +@@ -1529,6 +1552,9 @@ int vchiq_mmal_port_parameter_set(struct mutex_unlock(&instance->vchiq_mutex); @@ -101,7 +101,7 @@ Signed-off-by: Dave Stevenson return ret; } EXPORT_SYMBOL_GPL(vchiq_mmal_port_parameter_set); -@@ -1696,6 +1722,31 @@ int vchiq_mmal_submit_buffer(struct vchi +@@ -1697,6 +1723,31 @@ int vchiq_mmal_submit_buffer(struct vchi unsigned long flags = 0; int ret; @@ -133,7 +133,7 @@ Signed-off-by: Dave Stevenson ret = buffer_from_host(instance, port, buffer); if (ret == -EINVAL) { /* Port is disabled. Queue for when it is enabled. */ -@@ -1729,6 +1780,16 @@ int mmal_vchi_buffer_cleanup(struct mmal +@@ -1730,6 +1781,16 @@ int mmal_vchi_buffer_cleanup(struct mmal release_msg_context(msg_context); buf->msg_context = NULL; diff --git a/target/linux/bcm27xx/patches-6.1/950-0339-staging-mmal-vchiq-Add-module-parameter-to-enable-lo.patch b/target/linux/bcm27xx/patches-6.1/950-0339-staging-mmal-vchiq-Add-module-parameter-to-enable-lo.patch index 31162b3ce4..9fef146bfb 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0339-staging-mmal-vchiq-Add-module-parameter-to-enable-lo.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0339-staging-mmal-vchiq-Add-module-parameter-to-enable-lo.patch @@ -172,7 +172,7 @@ Signed-off-by: Dave Stevenson vchiq_release_message(instance->vchiq_instance, instance->service_handle, rmsg_handle); -@@ -1086,9 +1101,9 @@ static int create_component(struct vchiq +@@ -1087,9 +1102,9 @@ static int create_component(struct vchiq component->outputs = rmsg->u.component_create_reply.output_num; component->clocks = rmsg->u.component_create_reply.clock_num; @@ -185,7 +185,7 @@ Signed-off-by: Dave Stevenson release_msg: vchiq_release_message(instance->vchiq_instance, instance->service_handle, rmsg_handle); -@@ -1257,10 +1272,9 @@ static int port_action_port(struct vchiq +@@ -1258,10 +1273,9 @@ static int port_action_port(struct vchiq ret = -rmsg->u.port_action_reply.status; @@ -199,7 +199,7 @@ Signed-off-by: Dave Stevenson release_msg: vchiq_release_message(instance->vchiq_instance, instance->service_handle, rmsg_handle); -@@ -1304,11 +1318,11 @@ static int port_action_handle(struct vch +@@ -1305,11 +1319,11 @@ static int port_action_handle(struct vch ret = -rmsg->u.port_action_reply.status; @@ -216,7 +216,7 @@ Signed-off-by: Dave Stevenson release_msg: vchiq_release_message(instance->vchiq_instance, instance->service_handle, rmsg_handle); -@@ -1347,9 +1361,9 @@ static int port_parameter_set(struct vch +@@ -1348,9 +1362,9 @@ static int port_parameter_set(struct vch ret = -rmsg->u.port_parameter_set_reply.status; @@ -229,7 +229,7 @@ Signed-off-by: Dave Stevenson release_msg: vchiq_release_message(instance->vchiq_instance, instance->service_handle, rmsg_handle); -@@ -1407,8 +1421,9 @@ static int port_parameter_get(struct vch +@@ -1408,8 +1422,9 @@ static int port_parameter_get(struct vch /* Always report the size of the returned parameter to the caller */ *value_size = rmsg->u.port_parameter_get_reply.size; @@ -241,7 +241,7 @@ Signed-off-by: Dave Stevenson release_msg: vchiq_release_message(instance->vchiq_instance, instance->service_handle, rmsg_handle); -@@ -1665,7 +1680,7 @@ int vchiq_mmal_port_connect_tunnel(struc +@@ -1666,7 +1681,7 @@ int vchiq_mmal_port_connect_tunnel(struc if (!dst) { /* do not make new connection */ ret = 0; @@ -250,7 +250,7 @@ Signed-off-by: Dave Stevenson goto release_unlock; } -@@ -1683,14 +1698,14 @@ int vchiq_mmal_port_connect_tunnel(struc +@@ -1684,14 +1699,14 @@ int vchiq_mmal_port_connect_tunnel(struc /* set new format */ ret = port_info_set(instance, dst); if (ret) { @@ -267,7 +267,7 @@ Signed-off-by: Dave Stevenson goto release_unlock; } -@@ -1699,9 +1714,9 @@ int vchiq_mmal_port_connect_tunnel(struc +@@ -1700,9 +1715,9 @@ int vchiq_mmal_port_connect_tunnel(struc MMAL_MSG_PORT_ACTION_TYPE_CONNECT, dst->component->handle, dst->handle); if (ret < 0) { @@ -280,7 +280,7 @@ Signed-off-by: Dave Stevenson goto release_unlock; } src->connected = dst; -@@ -1726,7 +1741,8 @@ int vchiq_mmal_submit_buffer(struct vchi +@@ -1727,7 +1742,8 @@ int vchiq_mmal_submit_buffer(struct vchi * videobuf2 won't let us have the dmabuf there. */ if (port->zero_copy && buffer->dma_buf && !buffer->vcsm_handle) { @@ -290,7 +290,7 @@ Signed-off-by: Dave Stevenson ret = vc_sm_cma_import_dmabuf(buffer->dma_buf, &buffer->vcsm_handle); if (ret) { -@@ -1742,8 +1758,8 @@ int vchiq_mmal_submit_buffer(struct vchi +@@ -1743,8 +1759,8 @@ int vchiq_mmal_submit_buffer(struct vchi vc_sm_cma_free(buffer->vcsm_handle); return ret; } @@ -301,7 +301,7 @@ Signed-off-by: Dave Stevenson } ret = buffer_from_host(instance, port, buffer); -@@ -1782,8 +1798,8 @@ int mmal_vchi_buffer_cleanup(struct mmal +@@ -1783,8 +1799,8 @@ int mmal_vchi_buffer_cleanup(struct mmal if (buf->vcsm_handle) { int ret; diff --git a/target/linux/bcm27xx/patches-6.1/950-0340-staging-mmal-vchiq-Reset-buffers_with_vpu-on-port_en.patch b/target/linux/bcm27xx/patches-6.1/950-0340-staging-mmal-vchiq-Reset-buffers_with_vpu-on-port_en.patch index 46414dc749..8b7eb58b73 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0340-staging-mmal-vchiq-Reset-buffers_with_vpu-on-port_en.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0340-staging-mmal-vchiq-Reset-buffers_with_vpu-on-port_en.patch @@ -20,7 +20,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c -@@ -1500,6 +1500,8 @@ static int port_enable(struct vchiq_mmal +@@ -1501,6 +1501,8 @@ static int port_enable(struct vchiq_mmal port->enabled = 1; diff --git a/target/linux/bcm27xx/patches-6.1/950-0418-mmc-block-Don-t-do-single-sector-reads-during-recove.patch b/target/linux/bcm27xx/patches-6.1/950-0418-mmc-block-Don-t-do-single-sector-reads-during-recove.patch index 8fa58f8327..44dfc2ba56 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0418-mmc-block-Don-t-do-single-sector-reads-during-recove.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0418-mmc-block-Don-t-do-single-sector-reads-during-recove.patch @@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c -@@ -1970,7 +1970,7 @@ static void mmc_blk_mq_rw_recovery(struc +@@ -1972,7 +1972,7 @@ static void mmc_blk_mq_rw_recovery(struc return; } diff --git a/target/linux/bcm27xx/patches-6.1/950-0671-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch b/target/linux/bcm27xx/patches-6.1/950-0671-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch index 0146bbd616..b852bad904 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0671-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0671-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch @@ -19,7 +19,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -1730,7 +1730,7 @@ static void xhci_fixup_endpoint(struct u +@@ -1732,7 +1732,7 @@ static void xhci_fixup_endpoint(struct u return; } ctrl_ctx->add_flags = xhci_get_endpoint_flag_from_index(ep_index); diff --git a/target/linux/bcm27xx/patches-6.1/950-0698-serial-8250-Add-NOMSI-bug-for-bcm2835aux.patch b/target/linux/bcm27xx/patches-6.1/950-0698-serial-8250-Add-NOMSI-bug-for-bcm2835aux.patch index 6f62736b08..728e433fb8 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0698-serial-8250-Add-NOMSI-bug-for-bcm2835aux.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0698-serial-8250-Add-NOMSI-bug-for-bcm2835aux.patch @@ -71,7 +71,7 @@ Signed-off-by: Phil Elwell * hardware interrupt, we use a timer-based system. The original --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c -@@ -1559,6 +1559,9 @@ static void serial8250_stop_tx(struct ua +@@ -1553,6 +1553,9 @@ static void serial8250_stop_tx(struct ua serial_icr_write(up, UART_ACR, up->acr); } serial8250_rpm_put(up); @@ -81,7 +81,7 @@ Signed-off-by: Phil Elwell } static inline void __start_tx(struct uart_port *port) -@@ -1669,6 +1672,9 @@ static void serial8250_start_tx(struct u +@@ -1663,6 +1666,9 @@ static void serial8250_start_tx(struct u struct uart_8250_port *up = up_to_u8250p(port); struct uart_8250_em485 *em485 = up->em485; @@ -91,7 +91,7 @@ Signed-off-by: Phil Elwell if (!port->x_char && uart_circ_empty(&port->state->xmit)) return; -@@ -1889,6 +1895,9 @@ unsigned int serial8250_modem_status(str +@@ -1883,6 +1889,9 @@ unsigned int serial8250_modem_status(str uart_handle_cts_change(port, status & UART_MSR_CTS); wake_up_interruptible(&port->state->port.delta_msr_wait); diff --git a/target/linux/bcm27xx/patches-6.1/950-0842-f2fs-fix-to-avoid-NULL-pointer-dereference-in-f2fs_i.patch b/target/linux/bcm27xx/patches-6.1/950-0842-f2fs-fix-to-avoid-NULL-pointer-dereference-in-f2fs_i.patch index 33150551b3..1e2119c88c 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0842-f2fs-fix-to-avoid-NULL-pointer-dereference-in-f2fs_i.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0842-f2fs-fix-to-avoid-NULL-pointer-dereference-in-f2fs_i.patch @@ -35,7 +35,7 @@ Signed-off-by: Jaegeuk Kim --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c -@@ -663,9 +663,7 @@ init_thread: +@@ -665,9 +665,7 @@ init_thread: "f2fs_flush-%u:%u", MAJOR(dev), MINOR(dev)); if (IS_ERR(fcc->f2fs_issue_flush)) { err = PTR_ERR(fcc->f2fs_issue_flush); @@ -46,7 +46,7 @@ Signed-off-by: Jaegeuk Kim } return err; -@@ -5062,11 +5060,9 @@ int f2fs_build_segment_manager(struct f2 +@@ -5064,11 +5062,9 @@ int f2fs_build_segment_manager(struct f2 init_f2fs_rwsem(&sm_info->curseg_lock); diff --git a/target/linux/bcm27xx/patches-6.1/950-0851-Revert-usb-phy-generic-Get-the-vbus-supply.patch b/target/linux/bcm27xx/patches-6.1/950-0851-Revert-usb-phy-generic-Get-the-vbus-supply.patch index 5d271fe4da..aaf49e6a7c 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0851-Revert-usb-phy-generic-Get-the-vbus-supply.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0851-Revert-usb-phy-generic-Get-the-vbus-supply.patch @@ -10,9 +10,9 @@ This reverts commit c0ea202fbc855d60bc4a0603ca52a9e80654b327. --- a/drivers/usb/phy/phy-generic.c +++ b/drivers/usb/phy/phy-generic.c -@@ -272,13 +272,6 @@ int usb_phy_gen_create_phy(struct device - return dev_err_probe(dev, PTR_ERR(nop->vbus_draw), - "could not get vbus regulator\n"); +@@ -265,13 +265,6 @@ int usb_phy_gen_create_phy(struct device + return -EPROBE_DEFER; + } - nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus"); - if (PTR_ERR(nop->vbus_draw) == -ENODEV) diff --git a/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch b/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch index 99ec42fe48..69f52fa403 100644 --- a/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch +++ b/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch @@ -361,7 +361,7 @@ Signed-off-by: T.J. Mercier static void mem_cgroup_css_free(struct cgroup_subsys_state *css) --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -7943,6 +7943,7 @@ static void __init free_area_init_node(i +@@ -7945,6 +7945,7 @@ static void __init free_area_init_node(i pgdat_set_deferred_range(pgdat); free_area_init_core(pgdat); diff --git a/target/linux/generic/backport-6.1/810-v6.3-i915-Move-list_count-to-list.h-as-list_count_nodes-f.patch b/target/linux/generic/backport-6.1/810-v6.3-i915-Move-list_count-to-list.h-as-list_count_nodes-f.patch index 60a90136c9..5c4206da14 100644 --- a/target/linux/generic/backport-6.1/810-v6.3-i915-Move-list_count-to-list.h-as-list_count_nodes-f.patch +++ b/target/linux/generic/backport-6.1/810-v6.3-i915-Move-list_count-to-list.h-as-list_count_nodes-f.patch @@ -20,7 +20,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c -@@ -4154,17 +4154,6 @@ void intel_execlists_show_requests(struc +@@ -4157,17 +4157,6 @@ void intel_execlists_show_requests(struc spin_unlock_irqrestore(&sched_engine->lock, flags); } @@ -38,7 +38,7 @@ Signed-off-by: Greg Kroah-Hartman void intel_execlists_dump_active_requests(struct intel_engine_cs *engine, struct i915_request *hung_rq, struct drm_printer *m) -@@ -4175,8 +4164,8 @@ void intel_execlists_dump_active_request +@@ -4178,8 +4167,8 @@ void intel_execlists_dump_active_request intel_engine_dump_active_requests(&engine->sched_engine->requests, hung_rq, m); diff --git a/target/linux/generic/backport-6.1/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch b/target/linux/generic/backport-6.1/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch index 35b15776fb..be293e6f2a 100644 --- a/target/linux/generic/backport-6.1/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch +++ b/target/linux/generic/backport-6.1/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch @@ -132,7 +132,7 @@ Signed-off-by: Greg Kroah-Hartman imx_ocotp_nvmem_config.priv = priv; --- a/drivers/nvmem/meson-efuse.c +++ b/drivers/nvmem/meson-efuse.c -@@ -93,6 +93,7 @@ static int meson_efuse_probe(struct plat +@@ -74,6 +74,7 @@ static int meson_efuse_probe(struct plat econfig->dev = dev; econfig->name = dev_name(dev); diff --git a/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch index 51f939356f..dfbe88e8e6 100644 --- a/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch +++ b/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch @@ -43,7 +43,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support #define QUECTEL_VENDOR_ID 0x2c7c /* These Quectel products use Quectel's vendor ID */ -@@ -1147,6 +1152,11 @@ static const struct usb_device_id option +@@ -1152,6 +1157,11 @@ static const struct usb_device_id option { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */ .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) }, @@ -55,7 +55,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support /* Quectel products using Qualcomm vendor ID */ { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)}, { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20), -@@ -1188,6 +1198,11 @@ static const struct usb_device_id option +@@ -1193,6 +1203,11 @@ static const struct usb_device_id option .driver_info = ZLP }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), .driver_info = RSVD(4) }, diff --git a/target/linux/generic/pending-6.1/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-6.1/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch index 4bf473f9a7..a3d66c54b3 100644 --- a/target/linux/generic/pending-6.1/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch +++ b/target/linux/generic/pending-6.1/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch @@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -7897,7 +7897,7 @@ static void __init alloc_node_mem_map(st +@@ -7899,7 +7899,7 @@ static void __init alloc_node_mem_map(st if (pgdat == NODE_DATA(0)) { mem_map = NODE_DATA(0)->node_mem_map; if (page_to_pfn(mem_map) != pgdat->node_start_pfn) diff --git a/target/linux/generic/pending-6.1/450-14-mmc-block-set-fwnode-of-disk-devices.patch b/target/linux/generic/pending-6.1/450-14-mmc-block-set-fwnode-of-disk-devices.patch index a9e53f1155..386282459b 100644 --- a/target/linux/generic/pending-6.1/450-14-mmc-block-set-fwnode-of-disk-devices.patch +++ b/target/linux/generic/pending-6.1/450-14-mmc-block-set-fwnode-of-disk-devices.patch @@ -14,7 +14,7 @@ Signed-off-by: Daniel Golle --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c -@@ -2484,6 +2484,8 @@ static struct mmc_blk_data *mmc_blk_allo +@@ -2486,6 +2486,8 @@ static struct mmc_blk_data *mmc_blk_allo int area_type, unsigned int part_type) { @@ -23,7 +23,7 @@ Signed-off-by: Daniel Golle struct mmc_blk_data *md; int devidx, ret; char cap_str[10]; -@@ -2580,6 +2582,13 @@ static struct mmc_blk_data *mmc_blk_allo +@@ -2582,6 +2584,13 @@ static struct mmc_blk_data *mmc_blk_allo blk_queue_write_cache(md->queue.queue, cache_enabled, fua_enabled); diff --git a/target/linux/generic/pending-6.1/450-15-mmc-block-set-GENHD_FL_NVMEM.patch b/target/linux/generic/pending-6.1/450-15-mmc-block-set-GENHD_FL_NVMEM.patch index d76e7b2fe5..41c257cdeb 100644 --- a/target/linux/generic/pending-6.1/450-15-mmc-block-set-GENHD_FL_NVMEM.patch +++ b/target/linux/generic/pending-6.1/450-15-mmc-block-set-GENHD_FL_NVMEM.patch @@ -12,7 +12,7 @@ Signed-off-by: Daniel Golle --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c -@@ -2538,6 +2538,7 @@ static struct mmc_blk_data *mmc_blk_allo +@@ -2540,6 +2540,7 @@ static struct mmc_blk_data *mmc_blk_allo md->disk->major = MMC_BLOCK_MAJOR; md->disk->minors = perdev_minors; md->disk->first_minor = devidx * perdev_minors; diff --git a/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch index 4c3ac8ee07..3133e4e5da 100644 --- a/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch +++ b/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c -@@ -7918,7 +7918,7 @@ static int nft_register_flowtable_net_ho +@@ -7925,7 +7925,7 @@ static int nft_register_flowtable_net_ho err = flowtable->data.type->setup(&flowtable->data, hook->ops.dev, FLOW_BLOCK_BIND); diff --git a/target/linux/generic/pending-6.1/834-ledtrig-libata.patch b/target/linux/generic/pending-6.1/834-ledtrig-libata.patch index 050c3515f6..39960bc090 100644 --- a/target/linux/generic/pending-6.1/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-6.1/834-ledtrig-libata.patch @@ -134,7 +134,7 @@ Signed-off-by: Daniel Golle /* * Define if arch has non-standard setup. This is a _PCI_ standard -@@ -864,6 +867,12 @@ struct ata_port { +@@ -865,6 +868,12 @@ struct ata_port { #ifdef CONFIG_ATA_ACPI struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ #endif diff --git a/target/linux/mediatek/patches-6.1/410-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-6.1/410-bt-mtk-serial-fix.patch index 5b94c9216d..fa232b5d4e 100644 --- a/target/linux/mediatek/patches-6.1/410-bt-mtk-serial-fix.patch +++ b/target/linux/mediatek/patches-6.1/410-bt-mtk-serial-fix.patch @@ -19,7 +19,7 @@ }, [PORT_NPCM] = { .name = "Nuvoton 16550", -@@ -2773,6 +2773,11 @@ serial8250_do_set_termios(struct uart_po +@@ -2767,6 +2767,11 @@ serial8250_do_set_termios(struct uart_po unsigned long flags; unsigned int baud, quot, frac = 0; diff --git a/target/linux/pistachio/patches-6.1/110-pwm-img-fix-clock-lookup.patch b/target/linux/pistachio/patches-6.1/110-pwm-img-fix-clock-lookup.patch deleted file mode 100644 index d77a2f4259..0000000000 --- a/target/linux/pistachio/patches-6.1/110-pwm-img-fix-clock-lookup.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 58d03770ac5f78ff2d819caabea9371a041bf7be Mon Sep 17 00:00:00 2001 -From: Zoltan HERPAI -Date: Wed, 20 Mar 2024 09:36:02 +0100 -Subject: pwm: img: fix pwm clock lookup -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -22e8e19 has introduced a regression in the imgchip->pwm_clk lookup, whereas -the clock name has also been renamed to "imgchip". This causes the driver -failing to load: - -[ 0.546905] img-pwm 18101300.pwm: failed to get imgchip clock -[ 0.553418] img-pwm: probe of 18101300.pwm failed with error -2 - -Fix this lookup by reverting the clock name back to "pwm". - -Signed-off-by: Zoltan HERPAI -Link: https://lore.kernel.org/r/20240320083602.81592-1-wigyori@uid0.hu -Fixes: 22e8e19a46f7 ("pwm: img: Rename variable pointing to driver private data") -Signed-off-by: Uwe Kleine-König ---- - drivers/pwm/pwm-img.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/pwm/pwm-img.c -+++ b/drivers/pwm/pwm-img.c -@@ -289,9 +289,9 @@ static int img_pwm_probe(struct platform - return PTR_ERR(imgchip->sys_clk); - } - -- imgchip->pwm_clk = devm_clk_get(&pdev->dev, "imgchip"); -+ imgchip->pwm_clk = devm_clk_get(&pdev->dev, "pwm"); - if (IS_ERR(imgchip->pwm_clk)) { -- dev_err(&pdev->dev, "failed to get imgchip clock\n"); -+ dev_err(&pdev->dev, "failed to get pwm clock\n"); - return PTR_ERR(imgchip->pwm_clk); - } - From 2909cce1b279df641d435d3cbbcc478f8330d2df Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 13 Apr 2024 17:48:42 +0200 Subject: [PATCH 26/41] kernel: bump 6.1 to 6.1.86 Removed upstreamed: bcm27xx/patches-6.1/950-1235-drm-vc4-don-t-check-if-plane-state-fb-state-fb.patch [1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.86&id=48bfb4b03c5ff6e1fa1dc73fb915e150b0968c40 Signed-off-by: Hauke Mehrtens --- include/kernel-6.1 | 4 +- ...8-drm-vc4-Support-zpos-on-all-planes.patch | 4 +- ...-Make-use-of-chroma-siting-parameter.patch | 2 +- ...-2-and-4-4-4-4-RGB-RGBX-RGBA-formats.patch | 2 +- ...all-the-downstream-rpi-sound-card-dr.patch | 2 +- ...vc4-Introduce-generation-number-enum.patch | 4 +- ...0963-drm-vc4-hvs-Support-BCM2712-HVS.patch | 4 +- ...n-t-check-if-plane-state-fb-state-fb.patch | 93 ------------------- ...-a-separate-timeout-parameter-for-wa.patch | 16 ++-- .../721-net-add-packet-mangeling.patch | 4 +- ...vert-driver-core-Set-fw_devlink-on-b.patch | 2 +- ...etfilter_match_bypass_default_checks.patch | 2 +- .../pending-6.1/655-increase_skb_pad.patch | 2 +- ...T-skip-GRO-for-foreign-MAC-addresses.patch | 4 +- ...les-ignore-EOPNOTSUPP-on-flowtable-d.patch | 2 +- ...dsa-add-out-of-band-tagging-protocol.patch | 2 +- target/linux/x86/config-6.1 | 3 + 17 files changed, 31 insertions(+), 121 deletions(-) delete mode 100644 target/linux/bcm27xx/patches-6.1/950-1235-drm-vc4-don-t-check-if-plane-state-fb-state-fb.patch diff --git a/include/kernel-6.1 b/include/kernel-6.1 index 7ea1f9e02d..7760c440af 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .84 -LINUX_KERNEL_HASH-6.1.84 = af97d2ebe14765d0db3af6560309daf08535da25bfad36e5fb3e436f22a1707a +LINUX_VERSION-6.1 = .86 +LINUX_KERNEL_HASH-6.1.86 = d3d3c8c44f0f0a870a95bd2823f9d91979d1aa6f266da5d8cccd0c4b15e3115b diff --git a/target/linux/bcm27xx/patches-6.1/950-0038-drm-vc4-Support-zpos-on-all-planes.patch b/target/linux/bcm27xx/patches-6.1/950-0038-drm-vc4-Support-zpos-on-all-planes.patch index 068862766f..cc8310bf67 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0038-drm-vc4-Support-zpos-on-all-planes.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0038-drm-vc4-Support-zpos-on-all-planes.patch @@ -88,7 +88,7 @@ Signed-off-by: Dave Stevenson if (ret) --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c -@@ -1600,9 +1600,14 @@ struct drm_plane *vc4_plane_init(struct +@@ -1597,9 +1597,14 @@ struct drm_plane *vc4_plane_init(struct DRM_COLOR_YCBCR_BT709, DRM_COLOR_YCBCR_LIMITED_RANGE); @@ -103,7 +103,7 @@ Signed-off-by: Dave Stevenson int vc4_plane_create_additional_planes(struct drm_device *drm) { struct drm_plane *cursor_plane; -@@ -1618,24 +1623,35 @@ int vc4_plane_create_additional_planes(s +@@ -1615,24 +1620,35 @@ int vc4_plane_create_additional_planes(s * modest number of planes to expose, that should hopefully * still cover any sane usecase. */ diff --git a/target/linux/bcm27xx/patches-6.1/950-0043-vc4-drm-plane-Make-use-of-chroma-siting-parameter.patch b/target/linux/bcm27xx/patches-6.1/950-0043-vc4-drm-plane-Make-use-of-chroma-siting-parameter.patch index b5ebb28bbf..fb648b1fc9 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0043-vc4-drm-plane-Make-use-of-chroma-siting-parameter.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0043-vc4-drm-plane-Make-use-of-chroma-siting-parameter.patch @@ -49,7 +49,7 @@ Signed-off-by: Dom Cobley vc4_dlist_write(vc4_state, 0xc0c0c0c0); } -@@ -1649,6 +1652,8 @@ struct drm_plane *vc4_plane_init(struct +@@ -1646,6 +1649,8 @@ struct drm_plane *vc4_plane_init(struct DRM_COLOR_YCBCR_BT709, DRM_COLOR_YCBCR_LIMITED_RANGE); diff --git a/target/linux/bcm27xx/patches-6.1/950-0051-drm-vc4-Add-3-3-2-and-4-4-4-4-RGB-RGBX-RGBA-formats.patch b/target/linux/bcm27xx/patches-6.1/950-0051-drm-vc4-Add-3-3-2-and-4-4-4-4-RGB-RGBX-RGBA-formats.patch index c4e0050589..2cd79eac1d 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0051-drm-vc4-Add-3-3-2-and-4-4-4-4-RGB-RGBX-RGBA-formats.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0051-drm-vc4-Add-3-3-2-and-4-4-4-4-RGB-RGBX-RGBA-formats.patch @@ -85,7 +85,7 @@ Signed-off-by: Dave Stevenson }; static const struct hvs_format *vc4_get_hvs_format(u32 drm_format) -@@ -1575,6 +1635,16 @@ static bool vc4_format_mod_supported(str +@@ -1572,6 +1632,16 @@ static bool vc4_format_mod_supported(str case DRM_FORMAT_BGRX1010102: case DRM_FORMAT_RGBA1010102: case DRM_FORMAT_BGRA1010102: diff --git a/target/linux/bcm27xx/patches-6.1/950-0124-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch b/target/linux/bcm27xx/patches-6.1/950-0124-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch index 3b5bfaa7e2..e384710da1 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0124-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0124-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch @@ -17578,7 +17578,7 @@ Signed-off-by: Ashish Vara +#endif /* _TAS5713_H */ --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c -@@ -1220,7 +1220,15 @@ int snd_soc_runtime_set_dai_fmt(struct s +@@ -1223,7 +1223,15 @@ int snd_soc_runtime_set_dai_fmt(struct s return 0; for_each_rtd_codec_dais(rtd, i, codec_dai) { diff --git a/target/linux/bcm27xx/patches-6.1/950-0938-drm-vc4-Introduce-generation-number-enum.patch b/target/linux/bcm27xx/patches-6.1/950-0938-drm-vc4-Introduce-generation-number-enum.patch index 9314c797a0..d904c3d78d 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0938-drm-vc4-Introduce-generation-number-enum.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0938-drm-vc4-Introduce-generation-number-enum.patch @@ -902,7 +902,7 @@ Signed-off-by: Maxime Ripard /* Control word */ vc4_dlist_write(vc4_state, SCALER_CTL0_VALID | -@@ -1717,7 +1717,7 @@ struct drm_plane *vc4_plane_init(struct +@@ -1714,7 +1714,7 @@ struct drm_plane *vc4_plane_init(struct }; for (i = 0; i < ARRAY_SIZE(hvs_formats); i++) { @@ -911,7 +911,7 @@ Signed-off-by: Maxime Ripard formats[num_formats] = hvs_formats[i].drm; num_formats++; } -@@ -1732,7 +1732,7 @@ struct drm_plane *vc4_plane_init(struct +@@ -1729,7 +1729,7 @@ struct drm_plane *vc4_plane_init(struct return ERR_CAST(vc4_plane); plane = &vc4_plane->base; diff --git a/target/linux/bcm27xx/patches-6.1/950-0963-drm-vc4-hvs-Support-BCM2712-HVS.patch b/target/linux/bcm27xx/patches-6.1/950-0963-drm-vc4-hvs-Support-BCM2712-HVS.patch index 9659432294..5cbc304615 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0963-drm-vc4-hvs-Support-BCM2712-HVS.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0963-drm-vc4-hvs-Support-BCM2712-HVS.patch @@ -1924,7 +1924,7 @@ Signed-off-by: Maxime Ripard return 0; } -@@ -1716,7 +2345,7 @@ struct drm_plane *vc4_plane_init(struct +@@ -1713,7 +2342,7 @@ struct drm_plane *vc4_plane_init(struct }; for (i = 0; i < ARRAY_SIZE(hvs_formats); i++) { @@ -1933,7 +1933,7 @@ Signed-off-by: Maxime Ripard formats[num_formats] = hvs_formats[i].drm; num_formats++; } -@@ -1731,7 +2360,7 @@ struct drm_plane *vc4_plane_init(struct +@@ -1728,7 +2357,7 @@ struct drm_plane *vc4_plane_init(struct return ERR_CAST(vc4_plane); plane = &vc4_plane->base; diff --git a/target/linux/bcm27xx/patches-6.1/950-1235-drm-vc4-don-t-check-if-plane-state-fb-state-fb.patch b/target/linux/bcm27xx/patches-6.1/950-1235-drm-vc4-don-t-check-if-plane-state-fb-state-fb.patch deleted file mode 100644 index 7c7c05c5ef..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-1235-drm-vc4-don-t-check-if-plane-state-fb-state-fb.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 146bbf9627f6c37816939de29538ec8ee9a7be1a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ma=C3=ADra=20Canal?= -Date: Fri, 5 Jan 2024 15:07:34 -0300 -Subject: [PATCH] drm/vc4: don't check if plane->state->fb == state->fb -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Currently, when using non-blocking commits, we can see the following -kernel warning: - -[ 110.908514] ------------[ cut here ]------------ -[ 110.908529] refcount_t: underflow; use-after-free. -[ 110.908620] WARNING: CPU: 0 PID: 1866 at lib/refcount.c:87 refcount_dec_not_one+0xb8/0xc0 -[ 110.908664] Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cmac algif_hash aes_arm64 aes_generic algif_skcipher af_alg bnep hid_logitech_hidpp vc4 brcmfmac hci_uart btbcm brcmutil bluetooth snd_soc_hdmi_codec cfg80211 cec drm_display_helper drm_dma_helper drm_kms_helper snd_soc_core snd_compress snd_pcm_dmaengine fb_sys_fops sysimgblt syscopyarea sysfillrect raspberrypi_hwmon ecdh_generic ecc rfkill libaes i2c_bcm2835 binfmt_misc joydev snd_bcm2835(C) bcm2835_codec(C) bcm2835_isp(C) v4l2_mem2mem videobuf2_dma_contig snd_pcm bcm2835_v4l2(C) raspberrypi_gpiomem bcm2835_mmal_vchiq(C) videobuf2_v4l2 snd_timer videobuf2_vmalloc videobuf2_memops videobuf2_common snd videodev vc_sm_cma(C) mc hid_logitech_dj uio_pdrv_genirq uio i2c_dev drm fuse dm_mod drm_panel_orientation_quirks backlight ip_tables x_tables ipv6 -[ 110.909086] CPU: 0 PID: 1866 Comm: kodi.bin Tainted: G C 6.1.66-v8+ #32 -[ 110.909104] Hardware name: Raspberry Pi 3 Model B Rev 1.2 (DT) -[ 110.909114] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) -[ 110.909132] pc : refcount_dec_not_one+0xb8/0xc0 -[ 110.909152] lr : refcount_dec_not_one+0xb4/0xc0 -[ 110.909170] sp : ffffffc00913b9c0 -[ 110.909177] x29: ffffffc00913b9c0 x28: 000000556969bbb0 x27: 000000556990df60 -[ 110.909205] x26: 0000000000000002 x25: 0000000000000004 x24: ffffff8004448480 -[ 110.909230] x23: ffffff800570b500 x22: ffffff802e03a7bc x21: ffffffecfca68c78 -[ 110.909257] x20: ffffff8002b42000 x19: ffffff802e03a600 x18: 0000000000000000 -[ 110.909283] x17: 0000000000000011 x16: ffffffffffffffff x15: 0000000000000004 -[ 110.909308] x14: 0000000000000fff x13: ffffffed577e47e0 x12: 0000000000000003 -[ 110.909333] x11: 0000000000000000 x10: 0000000000000027 x9 : c912d0d083728c00 -[ 110.909359] x8 : c912d0d083728c00 x7 : 65646e75203a745f x6 : 746e756f63666572 -[ 110.909384] x5 : ffffffed579f62ee x4 : ffffffed579eb01e x3 : 0000000000000000 -[ 110.909409] x2 : 0000000000000000 x1 : ffffffc00913b750 x0 : 0000000000000001 -[ 110.909434] Call trace: -[ 110.909441] refcount_dec_not_one+0xb8/0xc0 -[ 110.909461] vc4_bo_dec_usecnt+0x4c/0x1b0 [vc4] -[ 110.909903] vc4_cleanup_fb+0x44/0x50 [vc4] -[ 110.910315] drm_atomic_helper_cleanup_planes+0x88/0xa4 [drm_kms_helper] -[ 110.910669] vc4_atomic_commit_tail+0x390/0x9dc [vc4] -[ 110.911079] commit_tail+0xb0/0x164 [drm_kms_helper] -[ 110.911397] drm_atomic_helper_commit+0x1d0/0x1f0 [drm_kms_helper] -[ 110.911716] drm_atomic_commit+0xb0/0xdc [drm] -[ 110.912569] drm_mode_atomic_ioctl+0x348/0x4b8 [drm] -[ 110.913330] drm_ioctl_kernel+0xec/0x15c [drm] -[ 110.914091] drm_ioctl+0x24c/0x3b0 [drm] -[ 110.914850] __arm64_sys_ioctl+0x9c/0xd4 -[ 110.914873] invoke_syscall+0x4c/0x114 -[ 110.914897] el0_svc_common+0xd0/0x118 -[ 110.914917] do_el0_svc+0x38/0xd0 -[ 110.914936] el0_svc+0x30/0x8c -[ 110.914958] el0t_64_sync_handler+0x84/0xf0 -[ 110.914979] el0t_64_sync+0x18c/0x190 -[ 110.914996] ---[ end trace 0000000000000000 ]--- - -This happens because, although `prepare_fb` and `cleanup_fb` are -perfectly balanced, we cannot guarantee consistency in the check -plane->state->fb == state->fb. This means that sometimes we can increase -the refcount in `prepare_fb` and don't decrease it in `cleanup_fb`. The -opposite can also be true. - -In fact, the struct drm_plane .state shouldn't be accessed directly -but instead, the `drm_atomic_get_new_plane_state()` helper function should -be used. So, we could stick to this check, but using -`drm_atomic_get_new_plane_state()`. But actually, this check is not really -needed. We can increase and decrease the refcount symmetrically without -problems. - -This is going to make the code more simple and consistent. - -Signed-off-by: Maíra Canal ---- - drivers/gpu/drm/vc4/vc4_plane.c | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - ---- a/drivers/gpu/drm/vc4/vc4_plane.c -+++ b/drivers/gpu/drm/vc4/vc4_plane.c -@@ -2225,9 +2225,6 @@ static int vc4_prepare_fb(struct drm_pla - - drm_gem_plane_helper_prepare_fb(plane, state); - -- if (plane->state->fb == state->fb) -- return 0; -- - return vc4_bo_inc_usecnt(bo); - } - -@@ -2236,7 +2233,7 @@ static void vc4_cleanup_fb(struct drm_pl - { - struct vc4_bo *bo; - -- if (plane->state->fb == state->fb || !state->fb) -+ if (!state->fb) - return; - - bo = to_vc4_bo(&drm_fb_dma_get_gem_obj(state->fb, 0)->base); diff --git a/target/linux/generic/backport-6.1/861-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch b/target/linux/generic/backport-6.1/861-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch index 2b83d0396a..30d833adff 100644 --- a/target/linux/generic/backport-6.1/861-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch +++ b/target/linux/generic/backport-6.1/861-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch @@ -23,7 +23,7 @@ Signed-off-by: Manivannan Sadhasivam --- a/drivers/bus/mhi/host/init.c +++ b/drivers/bus/mhi/host/init.c -@@ -881,6 +881,7 @@ static int parse_config(struct mhi_contr +@@ -882,6 +882,7 @@ static int parse_config(struct mhi_contr if (!mhi_cntrl->timeout_ms) mhi_cntrl->timeout_ms = MHI_TIMEOUT_MS; @@ -33,7 +33,7 @@ Signed-off-by: Manivannan Sadhasivam if (!mhi_cntrl->buffer_len) --- a/drivers/bus/mhi/host/internal.h +++ b/drivers/bus/mhi/host/internal.h -@@ -321,7 +321,7 @@ int __must_check mhi_read_reg_field(stru +@@ -324,7 +324,7 @@ int __must_check mhi_read_reg_field(stru u32 *out); int __must_check mhi_poll_reg_field(struct mhi_controller *mhi_cntrl, void __iomem *base, u32 offset, u32 mask, @@ -60,7 +60,7 @@ Signed-off-by: Manivannan Sadhasivam ret = mhi_read_reg_field(mhi_cntrl, base, offset, mask, &out); --- a/drivers/bus/mhi/host/pm.c +++ b/drivers/bus/mhi/host/pm.c -@@ -163,6 +163,7 @@ int mhi_ready_state_transition(struct mh +@@ -171,6 +171,7 @@ int mhi_ready_state_transition(struct mh enum mhi_pm_state cur_state; struct device *dev = &mhi_cntrl->mhi_dev->dev; u32 interval_us = 25000; /* poll register field every 25 milliseconds */ @@ -68,7 +68,7 @@ Signed-off-by: Manivannan Sadhasivam int ret, i; /* Check if device entered error state */ -@@ -173,14 +174,18 @@ int mhi_ready_state_transition(struct mh +@@ -181,14 +182,18 @@ int mhi_ready_state_transition(struct mh /* Wait for RESET to be cleared and READY bit to be set by the device */ ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL, @@ -89,7 +89,7 @@ Signed-off-by: Manivannan Sadhasivam if (ret) { dev_err(dev, "Device failed to enter MHI Ready\n"); return ret; -@@ -479,7 +484,7 @@ static void mhi_pm_disable_transition(st +@@ -487,7 +492,7 @@ static void mhi_pm_disable_transition(st /* Wait for the reset bit to be cleared by the device */ ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL, @@ -98,7 +98,7 @@ Signed-off-by: Manivannan Sadhasivam if (ret) dev_err(dev, "Device failed to clear MHI Reset\n"); -@@ -492,8 +497,8 @@ static void mhi_pm_disable_transition(st +@@ -500,8 +505,8 @@ static void mhi_pm_disable_transition(st if (!MHI_IN_PBL(mhi_get_exec_env(mhi_cntrl))) { /* wait for ready to be set */ ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs, @@ -109,7 +109,7 @@ Signed-off-by: Manivannan Sadhasivam if (ret) dev_err(dev, "Device failed to enter READY state\n"); } -@@ -1111,7 +1116,8 @@ int mhi_async_power_up(struct mhi_contro +@@ -1125,7 +1130,8 @@ int mhi_async_power_up(struct mhi_contro if (state == MHI_STATE_SYS_ERR) { mhi_set_mhi_state(mhi_cntrl, MHI_STATE_RESET); ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL, @@ -119,7 +119,7 @@ Signed-off-by: Manivannan Sadhasivam if (ret) { dev_info(dev, "Failed to reset MHI due to syserr state\n"); goto error_exit; -@@ -1202,14 +1208,18 @@ EXPORT_SYMBOL_GPL(mhi_power_down); +@@ -1216,14 +1222,18 @@ EXPORT_SYMBOL_GPL(mhi_power_down); int mhi_sync_power_up(struct mhi_controller *mhi_cntrl) { int ret = mhi_async_power_up(mhi_cntrl); diff --git a/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch index b0be9dfdcb..8652e090e1 100644 --- a/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch +++ b/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch @@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau */ --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -3040,6 +3040,10 @@ static inline int pskb_trim(struct sk_bu +@@ -3046,6 +3046,10 @@ static inline int pskb_trim(struct sk_bu return (len < skb->len) ? __pskb_trim(skb, len) : 0; } @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau /** * pskb_trim_unique - remove end from a paged unique (not cloned) buffer * @skb: buffer to alter -@@ -3189,16 +3193,6 @@ static inline struct sk_buff *dev_alloc_ +@@ -3195,16 +3199,6 @@ static inline struct sk_buff *dev_alloc_ } diff --git a/target/linux/generic/hack-6.1/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch b/target/linux/generic/hack-6.1/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch index 04aaab7adf..f2ae028aa1 100644 --- a/target/linux/generic/hack-6.1/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch +++ b/target/linux/generic/hack-6.1/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch @@ -19,7 +19,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/base/core.c +++ b/drivers/base/core.c -@@ -1702,7 +1702,7 @@ static void device_links_purge(struct de +@@ -1717,7 +1717,7 @@ static void device_links_purge(struct de #define FW_DEVLINK_FLAGS_RPM (FW_DEVLINK_FLAGS_ON | \ DL_FLAG_PM_RUNTIME) diff --git a/target/linux/generic/pending-6.1/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-6.1/610-netfilter_match_bypass_default_checks.patch index 7e34ef3713..56d62ab8e2 100644 --- a/target/linux/generic/pending-6.1/610-netfilter_match_bypass_default_checks.patch +++ b/target/linux/generic/pending-6.1/610-netfilter_match_bypass_default_checks.patch @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau for (i = sizeof(struct ipt_entry); i < e->target_offset; i += m->u.match_size) { -@@ -1223,12 +1260,15 @@ compat_copy_entry_to_user(struct ipt_ent +@@ -1225,12 +1262,15 @@ compat_copy_entry_to_user(struct ipt_ent compat_uint_t origsize; const struct xt_entry_match *ematch; int ret = 0; diff --git a/target/linux/generic/pending-6.1/655-increase_skb_pad.patch b/target/linux/generic/pending-6.1/655-increase_skb_pad.patch index 0c47bc9d2c..8af331cb23 100644 --- a/target/linux/generic/pending-6.1/655-increase_skb_pad.patch +++ b/target/linux/generic/pending-6.1/655-increase_skb_pad.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -3006,7 +3006,7 @@ static inline int pskb_network_may_pull( +@@ -3012,7 +3012,7 @@ static inline int pskb_network_may_pull( * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) */ #ifndef NET_SKB_PAD diff --git a/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index a1b32c352b..a589fca7a8 100644 --- a/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau #endif --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -972,6 +972,7 @@ struct sk_buff { +@@ -967,6 +967,7 @@ struct sk_buff { #ifdef CONFIG_IPV6_NDISC_NODETYPE __u8 ndisc_nodetype:2; #endif @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau __u8 inner_protocol_type:1; --- a/net/core/gro.c +++ b/net/core/gro.c -@@ -491,6 +491,9 @@ static enum gro_result dev_gro_receive(s +@@ -492,6 +492,9 @@ static enum gro_result dev_gro_receive(s int same_flow; int grow; diff --git a/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch index 3133e4e5da..fb6eb73232 100644 --- a/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch +++ b/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c -@@ -7925,7 +7925,7 @@ static int nft_register_flowtable_net_ho +@@ -7951,7 +7951,7 @@ static int nft_register_flowtable_net_ho err = flowtable->data.type->setup(&flowtable->data, hook->ops.dev, FLOW_BLOCK_BIND); diff --git a/target/linux/ipq40xx/patches-6.1/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.1/701-net-dsa-add-out-of-band-tagging-protocol.patch index 68d1a2e23b..1723f2c749 100644 --- a/target/linux/ipq40xx/patches-6.1/701-net-dsa-add-out-of-band-tagging-protocol.patch +++ b/target/linux/ipq40xx/patches-6.1/701-net-dsa-add-out-of-band-tagging-protocol.patch @@ -93,7 +93,7 @@ Signed-off-by: Maxime Chevallier +#endif --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -4588,6 +4588,9 @@ enum skb_ext_id { +@@ -4594,6 +4594,9 @@ enum skb_ext_id { #if IS_ENABLED(CONFIG_MCTP_FLOWS) SKB_EXT_MCTP, #endif diff --git a/target/linux/x86/config-6.1 b/target/linux/x86/config-6.1 index ab693448ad..20feecafd0 100644 --- a/target/linux/x86/config-6.1 +++ b/target/linux/x86/config-6.1 @@ -351,6 +351,9 @@ CONFIG_SG_POOL=y CONFIG_SOFTIRQ_ON_OWN_STACK=y CONFIG_SPARSEMEM_STATIC=y CONFIG_SPARSE_IRQ=y +# CONFIG_SPECTRE_BHI_AUTO is not set +# CONFIG_SPECTRE_BHI_OFF is not set +CONFIG_SPECTRE_BHI_ON=y CONFIG_SPECULATION_MITIGATIONS=y CONFIG_SRCU=y # CONFIG_STATIC_CALL_SELFTEST is not set From d2d064e06e6909056a7388ee1a1e915d06a50439 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 10 Apr 2024 14:35:38 +0800 Subject: [PATCH 27/41] rkbin: bump to latest git HEAD Fixed bugs for memory initialization/training, improved memory compatibility/stability. Signed-off-by: Tianling Shen --- package/boot/rkbin/Makefile | 16 ++++++++-------- package/boot/uboot-rockchip/Makefile | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package/boot/rkbin/Makefile b/package/boot/rkbin/Makefile index 3b6cc0d42c..4eacff042c 100644 --- a/package/boot/rkbin/Makefile +++ b/package/boot/rkbin/Makefile @@ -8,10 +8,10 @@ PKG_NAME:=rkbin PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL=https://github.com/rockchip-linux/rkbin.git -PKG_SOURCE_DATE:=2023-07-26 -PKG_SOURCE_VERSION:=b4558da0860ca48bf1a571dd33ccba580b9abe23 -PKG_MIRROR_HASH:=7cd2cb8357fa850eb4eef94db49a2c46cf910bfe4e673eff9071413bb002afc9 +PKG_SOURCE_URL:=https://github.com/rockchip-linux/rkbin.git +PKG_SOURCE_DATE:=2024-02-22 +PKG_SOURCE_VERSION:=a2a0b89b6c8c612dca5ed9ed8a68db8a07f68bc0 +PKG_MIRROR_HASH:=39f15e5f8fac02026065b6747b355b93f4e06202783ae448c43607763211597c PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Tianling Shen @@ -27,14 +27,14 @@ endef define Trusted-Firmware-A/rk3566 BUILD_SUBTARGET:=armv8 - ATF:=rk35/rk3568_bl31_v1.43.elf - TPL:=rk35/rk3566_ddr_1056MHz_v1.18.bin + ATF:=rk35/rk3568_bl31_v1.44.elf + TPL:=rk35/rk3566_ddr_1056MHz_v1.21.bin endef define Trusted-Firmware-A/rk3568 BUILD_SUBTARGET:=armv8 - ATF:=rk35/rk3568_bl31_v1.43.elf - TPL:=rk35/rk3568_ddr_1560MHz_v1.18.bin + ATF:=rk35/rk3568_bl31_v1.44.elf + TPL:=rk35/rk3568_ddr_1560MHz_v1.21.bin endef TFA_TARGETS:= \ diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile index 89a7ccdd4b..a2dd2cffd9 100644 --- a/package/boot/uboot-rockchip/Makefile +++ b/package/boot/uboot-rockchip/Makefile @@ -131,8 +131,8 @@ endef define U-Boot/rk3566/Default BUILD_SUBTARGET:=armv8 DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3566 - ATF:=rk3568_bl31_v1.43.elf - TPL:=rk3566_ddr_1056MHz_v1.18.bin + ATF:=rk3568_bl31_v1.44.elf + TPL:=rk3566_ddr_1056MHz_v1.21.bin endef define U-Boot/radxa-cm3-io-rk3566 @@ -147,8 +147,8 @@ endef define U-Boot/rk3568/Default BUILD_SUBTARGET:=armv8 DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3568 - ATF:=rk3568_bl31_v1.43.elf - TPL:=rk3568_ddr_1560MHz_v1.18.bin + ATF:=rk3568_bl31_v1.44.elf + TPL:=rk3568_ddr_1560MHz_v1.21.bin endef define U-Boot/nanopi-r5c-rk3568 From a65fceb078a7c5fd8133f7c8c4c2326dda517899 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 10 Apr 2024 14:39:43 +0800 Subject: [PATCH 28/41] uboot-rockchip: Update to 2024.04 Removed upstreamed patch. Signed-off-by: Tianling Shen --- package/boot/uboot-rockchip/Makefile | 4 +- ...pport-for-FriendlyARM-NanoPi-R2C-Plu.patch | 213 ------------------ 2 files changed, 2 insertions(+), 215 deletions(-) delete mode 100644 package/boot/uboot-rockchip/patches/001-board-rockchip-Add-support-for-FriendlyARM-NanoPi-R2C-Plu.patch diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile index a2dd2cffd9..863d0157f4 100644 --- a/package/boot/uboot-rockchip/Makefile +++ b/package/boot/uboot-rockchip/Makefile @@ -5,9 +5,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2024.01 +PKG_VERSION:=2024.04 PKG_RELEASE:=1 -PKG_HASH:=b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3 +PKG_HASH:=18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a PKG_MAINTAINER:=Tobias Maedel diff --git a/package/boot/uboot-rockchip/patches/001-board-rockchip-Add-support-for-FriendlyARM-NanoPi-R2C-Plu.patch b/package/boot/uboot-rockchip/patches/001-board-rockchip-Add-support-for-FriendlyARM-NanoPi-R2C-Plu.patch deleted file mode 100644 index 25e063bfa9..0000000000 --- a/package/boot/uboot-rockchip/patches/001-board-rockchip-Add-support-for-FriendlyARM-NanoPi-R2C-Plu.patch +++ /dev/null @@ -1,213 +0,0 @@ -From 0bc16c6a8744a1c0293a31253020205b312895d3 Mon Sep 17 00:00:00 2001 -From: Tianling Shen -Date: Sat, 23 Dec 2023 12:00:07 +0800 -Subject: [PATCH] board: rockchip: Add support for FriendlyARM NanoPi R2C Plus - -The NanoPi R2C Plus is a small variant of NanoPi R2C with a on-board -eMMC flash (8G) included. - -The device tree is taken from the kernel v6.5. - -Signed-off-by: Tianling Shen -Reviewed-by: Kever Yang ---- - arch/arm/dts/Makefile | 1 + - .../dts/rk3328-nanopi-r2c-plus-u-boot.dtsi | 9 ++ - arch/arm/dts/rk3328-nanopi-r2c-plus.dts | 33 +++++ - board/rockchip/evb_rk3328/MAINTAINERS | 6 + - configs/nanopi-r2c-plus-rk3328_defconfig | 114 ++++++++++++++++++ - 5 files changed, 163 insertions(+) - create mode 100644 arch/arm/dts/rk3328-nanopi-r2c-plus-u-boot.dtsi - create mode 100644 arch/arm/dts/rk3328-nanopi-r2c-plus.dts - create mode 100644 configs/nanopi-r2c-plus-rk3328_defconfig - ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -126,6 +126,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3308) += \ - dtb-$(CONFIG_ROCKCHIP_RK3328) += \ - rk3328-evb.dtb \ - rk3328-nanopi-r2c.dtb \ -+ rk3328-nanopi-r2c-plus.dtb \ - rk3328-nanopi-r2s.dtb \ - rk3328-orangepi-r1-plus.dtb \ - rk3328-orangepi-r1-plus-lts.dtb \ ---- /dev/null -+++ b/arch/arm/dts/rk3328-nanopi-r2c-plus-u-boot.dtsi -@@ -0,0 +1,9 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later -+ -+#include "rk3328-nanopi-r2c-u-boot.dtsi" -+ -+/ { -+ chosen { -+ u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc; -+ }; -+}; ---- /dev/null -+++ b/arch/arm/dts/rk3328-nanopi-r2c-plus.dts -@@ -0,0 +1,33 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -+/* -+ * Copyright (c) 2021 FriendlyElec Computer Tech. Co., Ltd. -+ * (http://www.friendlyarm.com) -+ * -+ * Copyright (c) 2023 Tianling Shen -+ */ -+ -+/dts-v1/; -+#include "rk3328-nanopi-r2c.dts" -+ -+/ { -+ model = "FriendlyElec NanoPi R2C Plus"; -+ compatible = "friendlyarm,nanopi-r2c-plus", "rockchip,rk3328"; -+ -+ aliases { -+ mmc1 = &emmc; -+ }; -+}; -+ -+&emmc { -+ bus-width = <8>; -+ cap-mmc-highspeed; -+ max-frequency = <150000000>; -+ mmc-ddr-1_8v; -+ mmc-hs200-1_8v; -+ non-removable; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; -+ vmmc-supply = <&vcc_io_33>; -+ vqmmc-supply = <&vcc18_emmc>; -+ status = "okay"; -+}; ---- a/board/rockchip/evb_rk3328/MAINTAINERS -+++ b/board/rockchip/evb_rk3328/MAINTAINERS -@@ -11,6 +11,12 @@ S: Maintained - F: configs/nanopi-r2c-rk3328_defconfig - F: arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi - -+NANOPI-R2C-PLUS-RK3328 -+M: Tianling Shen -+S: Maintained -+F: configs/nanopi-r2c-plus-rk3328_defconfig -+F: arch/arm/dts/rk3328-nanopi-r2c-plus-u-boot.dtsi -+ - NANOPI-R2S-RK3328 - M: David Bauer - S: Maintained ---- /dev/null -+++ b/configs/nanopi-r2c-plus-rk3328_defconfig -@@ -0,0 +1,114 @@ -+CONFIG_ARM=y -+CONFIG_SKIP_LOWLEVEL_INIT=y -+CONFIG_COUNTER_FREQUENCY=24000000 -+CONFIG_ARCH_ROCKCHIP=y -+CONFIG_TEXT_BASE=0x00200000 -+CONFIG_SPL_GPIO=y -+CONFIG_NR_DRAM_BANKS=1 -+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000 -+CONFIG_SF_DEFAULT_SPEED=20000000 -+CONFIG_ENV_OFFSET=0x3F8000 -+CONFIG_DEFAULT_DEVICE_TREE="rk3328-nanopi-r2c-plus" -+CONFIG_DM_RESET=y -+CONFIG_ROCKCHIP_RK3328=y -+CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y -+CONFIG_TPL_LIBCOMMON_SUPPORT=y -+CONFIG_TPL_LIBGENERIC_SUPPORT=y -+CONFIG_SPL_DRIVERS_MISC=y -+CONFIG_SPL_STACK_R_ADDR=0x600000 -+CONFIG_SPL_STACK=0x400000 -+CONFIG_TPL_SYS_MALLOC_F_LEN=0x800 -+CONFIG_DEBUG_UART_BASE=0xFF130000 -+CONFIG_DEBUG_UART_CLOCK=24000000 -+CONFIG_SYS_LOAD_ADDR=0x800800 -+CONFIG_DEBUG_UART=y -+# CONFIG_ANDROID_BOOT_IMAGE is not set -+CONFIG_FIT=y -+CONFIG_FIT_VERBOSE=y -+CONFIG_SPL_LOAD_FIT=y -+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-nanopi-r2c-plus.dtb" -+# CONFIG_DISPLAY_CPUINFO is not set -+CONFIG_DISPLAY_BOARDINFO_LATE=y -+CONFIG_MISC_INIT_R=y -+CONFIG_SPL_MAX_SIZE=0x40000 -+CONFIG_SPL_PAD_TO=0x7f8000 -+CONFIG_SPL_HAS_BSS_LINKER_SECTION=y -+CONFIG_SPL_BSS_START_ADDR=0x2000000 -+CONFIG_SPL_BSS_MAX_SIZE=0x2000 -+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set -+# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set -+CONFIG_SPL_STACK_R=y -+CONFIG_SPL_I2C=y -+CONFIG_SPL_POWER=y -+CONFIG_SPL_ATF=y -+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y -+CONFIG_TPL_SYS_MALLOC_SIMPLE=y -+CONFIG_CMD_BOOTZ=y -+CONFIG_CMD_GPT=y -+CONFIG_CMD_MMC=y -+CONFIG_CMD_USB=y -+# CONFIG_CMD_SETEXPR is not set -+CONFIG_CMD_TIME=y -+CONFIG_SPL_OF_CONTROL=y -+CONFIG_TPL_OF_CONTROL=y -+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" -+CONFIG_TPL_OF_PLATDATA=y -+CONFIG_ENV_IS_IN_MMC=y -+CONFIG_SYS_RELOC_GD_ENV_ADDR=y -+CONFIG_SYS_MMC_ENV_DEV=1 -+CONFIG_NET_RANDOM_ETHADDR=y -+CONFIG_TPL_DM=y -+CONFIG_REGMAP=y -+CONFIG_SPL_REGMAP=y -+CONFIG_TPL_REGMAP=y -+CONFIG_SYSCON=y -+CONFIG_SPL_SYSCON=y -+CONFIG_TPL_SYSCON=y -+CONFIG_CLK=y -+CONFIG_SPL_CLK=y -+CONFIG_FASTBOOT_BUF_ADDR=0x800800 -+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y -+CONFIG_ROCKCHIP_GPIO=y -+CONFIG_SYS_I2C_ROCKCHIP=y -+CONFIG_MISC=y -+CONFIG_MMC_DW=y -+CONFIG_MMC_DW_ROCKCHIP=y -+CONFIG_ETH_DESIGNWARE=y -+CONFIG_GMAC_ROCKCHIP=y -+CONFIG_PHY_ROCKCHIP_INNO_USB2=y -+CONFIG_PINCTRL=y -+CONFIG_SPL_PINCTRL=y -+CONFIG_DM_PMIC=y -+CONFIG_PMIC_RK8XX=y -+CONFIG_SPL_PMIC_RK8XX=y -+CONFIG_SPL_DM_REGULATOR=y -+CONFIG_REGULATOR_PWM=y -+CONFIG_DM_REGULATOR_FIXED=y -+CONFIG_SPL_DM_REGULATOR_FIXED=y -+CONFIG_REGULATOR_RK8XX=y -+CONFIG_PWM_ROCKCHIP=y -+CONFIG_RAM=y -+CONFIG_SPL_RAM=y -+CONFIG_TPL_RAM=y -+CONFIG_BAUDRATE=1500000 -+CONFIG_DEBUG_UART_SHIFT=2 -+CONFIG_SYS_NS16550_MEM32=y -+CONFIG_SYSINFO=y -+CONFIG_SYSRESET=y -+# CONFIG_TPL_SYSRESET is not set -+CONFIG_USB=y -+CONFIG_USB_XHCI_HCD=y -+CONFIG_USB_EHCI_HCD=y -+CONFIG_USB_EHCI_GENERIC=y -+CONFIG_USB_OHCI_HCD=y -+CONFIG_USB_OHCI_GENERIC=y -+CONFIG_USB_DWC2=y -+CONFIG_USB_DWC3=y -+# CONFIG_USB_DWC3_GADGET is not set -+CONFIG_USB_DWC3_GENERIC=y -+CONFIG_USB_GADGET=y -+CONFIG_USB_GADGET_DWC2_OTG=y -+CONFIG_SPL_TINY_MEMSET=y -+CONFIG_TPL_TINY_MEMSET=y -+CONFIG_ERRNO_STR=y From ee3a6adc6c22b2388eb3901bda335fd145c7355e Mon Sep 17 00:00:00 2001 From: Felix Golatofski Date: Wed, 10 Jan 2024 00:44:35 +0100 Subject: [PATCH 29/41] ath79: add support for Comfast CF-EW71 v2 Specifications: Qualcomm/Atheros QCA9531 2x 10/100 Mbps Ethernet, with 48v PoE 2T2R 2.4 GHz, 802.11b/g/n 128MB RAM 16MB SPI Flash 4x LED (Always On Power, LAN, WAN, WLAN) Flashing instructions: The original firmware is based on OpenWrt, so flashing the sysupgrade image over the factory firmware is sufficient. The bootloader has a built-in recovery web-ui. This is the method I used to flash OpenWrt. You can get to the recovery web-ui by holding down the reset button for a few seconds (~5s) while pluggin in the router. The LEDs should start blinking fast and the router should be available on 192.168.1.1 for the recovery. Tested: Reset button, WAN LED, LAN LED, Power LED (always on, not much to test), WLAN LED, MAC addresses (same as factory firmware). Signed-off-by: Felix Golatofski --- .../ath79/dts/qca9531_comfast_cf-ew71-v2.dts | 143 ++++++++++++++++++ .../generic/base-files/etc/board.d/01_leds | 1 + target/linux/ath79/image/generic.mk | 10 ++ 3 files changed, 154 insertions(+) create mode 100644 target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts b/target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts new file mode 100644 index 0000000000..05873f173d --- /dev/null +++ b/target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts @@ -0,0 +1,143 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca953x.dtsi" + +#include +#include +#include + +/ { + compatible = "comfast,cf-ew71-v2", "qca,qca9531"; + model = "COMFAST CF-EW71 v2"; + + aliases { + serial0 = &uart; + led-boot = &led_wan; + led-failsafe = &led_wan; + led-upgrade = &led_wan; + }; + + leds { + compatible = "gpio-leds"; + + pinctrl-names = "default"; + pinctrl-0 = <&jtag_disable_pins>; + + lan { + function = LED_FUNCTION_LAN; + color = ; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + }; + + led_wan: wan { + function = LED_FUNCTION_WAN; + color = ; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + + wlan { + function = LED_FUNCTION_WLAN; + color = ; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + watchdog { + compatible = "linux,wdt-gpio"; + + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + hw_algo = "toggle"; + hw_margin_ms = <1200>; + always-running; + }; +}; + +&pcie0 { + status = "okay"; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "winbond,w25q128", "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x010000>; + read-only; + }; + + art: partition@10000 { + label = "art"; + reg = <0x010000 0x010000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + compatible = "mac-base"; + reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; + }; + }; + }; + + partition@20000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x020000 0xfd0000>; + }; + + partition@ff0000 { + label = "nvram"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + phy-handle = <&swphy4>; + + nvmem-cells = <&macaddr_art_0 1>; + nvmem-cell-names = "mac-address"; +}; + +ð1 { + nvmem-cells = <&macaddr_art_0 0>; + nvmem-cell-names = "mac-address"; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; + nvmem-cells = <&macaddr_art_0 3>; + nvmem-cell-names = "mac-address"; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index 2974855870..18fe436dbc 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -199,6 +199,7 @@ comfast,cf-e560ac) ucidef_set_led_switch "lan3" "LAN3" "blue:lan3" "switch0" "0x08" ucidef_set_led_switch "lan4" "LAN4" "blue:lan4" "switch0" "0x10" ;; +comfast,cf-ew71-v2|\ comfast,cf-ew72|\ openmesh,om2p-v2|\ openmesh,om2p-hs-v1|\ diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 502fdc2ed4..bf300dd18d 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -828,6 +828,16 @@ define Device/comfast_cf-e560ac endef TARGET_DEVICES += comfast_cf-e560ac +define Device/comfast_cf-ew71-v2 + SOC := qca9531 + DEVICE_VENDOR := COMFAST + DEVICE_MODEL := CF-EW71 + DEVICE_VARIANT := v2 + DEVICE_PACKAGES := kmod-usb2 -uboot-envtools -swconfig + IMAGE_SIZE := 16192k +endef +TARGET_DEVICES += comfast_cf-ew71-v2 + define Device/comfast_cf-ew72 SOC := qca9531 DEVICE_VENDOR := COMFAST From 3bdc68279a18a1e15d309c3c49e37697bca20247 Mon Sep 17 00:00:00 2001 From: INAGAKI Hiroshi Date: Wed, 20 Mar 2024 20:14:36 +0900 Subject: [PATCH 30/41] kernel: add pending patches for new LED_FUNCTION_* definitions Add pending patches to add LED_FUNCTION_MOBILE and LED_FUNCTION_SPEED_* definitions for Fortinet FortiGate devices and IIJ SA-W2. Signed-off-by: INAGAKI Hiroshi --- ...-add-LED_FUNCTION_MOBILE-for-mobile-.patch | 37 +++++++++++++++++++ ...-add-LED_FUNCTION_SPEED_-for-link-sp.patch | 37 +++++++++++++++++++ ...-add-LED_FUNCTION_MOBILE-for-mobile-.patch | 37 +++++++++++++++++++ ...-add-LED_FUNCTION_SPEED_-for-link-sp.patch | 37 +++++++++++++++++++ ...-add-LED_FUNCTION_MOBILE-for-mobile-.patch | 37 +++++++++++++++++++ ...-add-LED_FUNCTION_SPEED_-for-link-sp.patch | 37 +++++++++++++++++++ 6 files changed, 222 insertions(+) create mode 100644 target/linux/generic/pending-5.15/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch create mode 100644 target/linux/generic/pending-5.15/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch create mode 100644 target/linux/generic/pending-6.1/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch create mode 100644 target/linux/generic/pending-6.1/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch create mode 100644 target/linux/generic/pending-6.6/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch create mode 100644 target/linux/generic/pending-6.6/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch diff --git a/target/linux/generic/pending-5.15/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch b/target/linux/generic/pending-5.15/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch new file mode 100644 index 0000000000..04c6efe3e8 --- /dev/null +++ b/target/linux/generic/pending-5.15/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch @@ -0,0 +1,37 @@ +From 38eb5b3370c29515d2ce92adac2d6eba96f276f5 Mon Sep 17 00:00:00 2001 +From: INAGAKI Hiroshi +Date: Wed, 20 Mar 2024 15:32:18 +0900 +Subject: [PATCH v2 1/2] dt-bindings: leds: add LED_FUNCTION_MOBILE for mobile + network + +Add LED_FUNCTION_MOBILE for LEDs that indicate status of mobile network +connection. This is useful to distinguish those LEDs from LEDs that +indicates status of wired "wan" connection. + +example (on stock fw): + +IIJ SA-W2 has "Mobile" LEDs that indicate status (no signal, too low, +low, good) of mobile network connection via dongle connected to USB +port. + +- no signal: (none, turned off) +- too low: green:mobile & red:mobile (amber, blink) +- low: green:mobile & red:mobile (amber, turned on) +- good: green:mobile (turned on) + +Suggested-by: Hauke Mehrtens +Signed-off-by: INAGAKI Hiroshi +--- + include/dt-bindings/leds/common.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/include/dt-bindings/leds/common.h ++++ b/include/dt-bindings/leds/common.h +@@ -83,6 +83,7 @@ + #define LED_FUNCTION_INDICATOR "indicator" + #define LED_FUNCTION_LAN "lan" + #define LED_FUNCTION_MAIL "mail" ++#define LED_FUNCTION_MOBILE "mobile" + #define LED_FUNCTION_MTD "mtd" + #define LED_FUNCTION_PANIC "panic" + #define LED_FUNCTION_PROGRAMMING "programming" diff --git a/target/linux/generic/pending-5.15/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch b/target/linux/generic/pending-5.15/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch new file mode 100644 index 0000000000..e601481446 --- /dev/null +++ b/target/linux/generic/pending-5.15/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch @@ -0,0 +1,37 @@ +From e22afe910afcfb51b6ba6a0ae776939959727f54 Mon Sep 17 00:00:00 2001 +From: INAGAKI Hiroshi +Date: Wed, 20 Mar 2024 15:59:06 +0900 +Subject: [PATCH v2 2/2] dt-bindings: leds: add LED_FUNCTION_SPEED_* for link + speed on LAN/WAN + +Add LED_FUNCTION_SPEED_LAN and LED_FUNCTION_SPEED_WAN for LEDs that +indicate link speed of ethernet ports on LAN/WAN. This is useful to +distinguish those LEDs from LEDs that indicate link status (up/down). + +example: + +Fortinet FortiGate 30E/50E have LEDs that indicate link speed on each +of the ethernet ports in addition to LEDs that indicate link status +(up/down). + +- 1000 Mbps: green:speed-(lan|wan)-N +- 100 Mbps: amber:speed-(lan|wan)-N +- 10 Mbps: (none, turned off) + +Reviewed-by: Rob Herring +Signed-off-by: INAGAKI Hiroshi +--- + include/dt-bindings/leds/common.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/include/dt-bindings/leds/common.h ++++ b/include/dt-bindings/leds/common.h +@@ -89,6 +89,8 @@ + #define LED_FUNCTION_PROGRAMMING "programming" + #define LED_FUNCTION_RX "rx" + #define LED_FUNCTION_SD "sd" ++#define LED_FUNCTION_SPEED_LAN "speed-lan" ++#define LED_FUNCTION_SPEED_WAN "speed-wan" + #define LED_FUNCTION_STANDBY "standby" + #define LED_FUNCTION_TORCH "torch" + #define LED_FUNCTION_TX "tx" diff --git a/target/linux/generic/pending-6.1/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch b/target/linux/generic/pending-6.1/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch new file mode 100644 index 0000000000..3321b03f28 --- /dev/null +++ b/target/linux/generic/pending-6.1/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch @@ -0,0 +1,37 @@ +From 38eb5b3370c29515d2ce92adac2d6eba96f276f5 Mon Sep 17 00:00:00 2001 +From: INAGAKI Hiroshi +Date: Wed, 20 Mar 2024 15:32:18 +0900 +Subject: [PATCH v2 1/2] dt-bindings: leds: add LED_FUNCTION_MOBILE for mobile + network + +Add LED_FUNCTION_MOBILE for LEDs that indicate status of mobile network +connection. This is useful to distinguish those LEDs from LEDs that +indicates status of wired "wan" connection. + +example (on stock fw): + +IIJ SA-W2 has "Mobile" LEDs that indicate status (no signal, too low, +low, good) of mobile network connection via dongle connected to USB +port. + +- no signal: (none, turned off) +- too low: green:mobile & red:mobile (amber, blink) +- low: green:mobile & red:mobile (amber, turned on) +- good: green:mobile (turned on) + +Suggested-by: Hauke Mehrtens +Signed-off-by: INAGAKI Hiroshi +--- + include/dt-bindings/leds/common.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/include/dt-bindings/leds/common.h ++++ b/include/dt-bindings/leds/common.h +@@ -90,6 +90,7 @@ + #define LED_FUNCTION_INDICATOR "indicator" + #define LED_FUNCTION_LAN "lan" + #define LED_FUNCTION_MAIL "mail" ++#define LED_FUNCTION_MOBILE "mobile" + #define LED_FUNCTION_MTD "mtd" + #define LED_FUNCTION_PANIC "panic" + #define LED_FUNCTION_PROGRAMMING "programming" diff --git a/target/linux/generic/pending-6.1/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch b/target/linux/generic/pending-6.1/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch new file mode 100644 index 0000000000..ab27cd3399 --- /dev/null +++ b/target/linux/generic/pending-6.1/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch @@ -0,0 +1,37 @@ +From e22afe910afcfb51b6ba6a0ae776939959727f54 Mon Sep 17 00:00:00 2001 +From: INAGAKI Hiroshi +Date: Wed, 20 Mar 2024 15:59:06 +0900 +Subject: [PATCH v2 2/2] dt-bindings: leds: add LED_FUNCTION_SPEED_* for link + speed on LAN/WAN + +Add LED_FUNCTION_SPEED_LAN and LED_FUNCTION_SPEED_WAN for LEDs that +indicate link speed of ethernet ports on LAN/WAN. This is useful to +distinguish those LEDs from LEDs that indicate link status (up/down). + +example: + +Fortinet FortiGate 30E/50E have LEDs that indicate link speed on each +of the ethernet ports in addition to LEDs that indicate link status +(up/down). + +- 1000 Mbps: green:speed-(lan|wan)-N +- 100 Mbps: amber:speed-(lan|wan)-N +- 10 Mbps: (none, turned off) + +Reviewed-by: Rob Herring +Signed-off-by: INAGAKI Hiroshi +--- + include/dt-bindings/leds/common.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/include/dt-bindings/leds/common.h ++++ b/include/dt-bindings/leds/common.h +@@ -96,6 +96,8 @@ + #define LED_FUNCTION_PROGRAMMING "programming" + #define LED_FUNCTION_RX "rx" + #define LED_FUNCTION_SD "sd" ++#define LED_FUNCTION_SPEED_LAN "speed-lan" ++#define LED_FUNCTION_SPEED_WAN "speed-wan" + #define LED_FUNCTION_STANDBY "standby" + #define LED_FUNCTION_TORCH "torch" + #define LED_FUNCTION_TX "tx" diff --git a/target/linux/generic/pending-6.6/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch b/target/linux/generic/pending-6.6/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch new file mode 100644 index 0000000000..3321b03f28 --- /dev/null +++ b/target/linux/generic/pending-6.6/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch @@ -0,0 +1,37 @@ +From 38eb5b3370c29515d2ce92adac2d6eba96f276f5 Mon Sep 17 00:00:00 2001 +From: INAGAKI Hiroshi +Date: Wed, 20 Mar 2024 15:32:18 +0900 +Subject: [PATCH v2 1/2] dt-bindings: leds: add LED_FUNCTION_MOBILE for mobile + network + +Add LED_FUNCTION_MOBILE for LEDs that indicate status of mobile network +connection. This is useful to distinguish those LEDs from LEDs that +indicates status of wired "wan" connection. + +example (on stock fw): + +IIJ SA-W2 has "Mobile" LEDs that indicate status (no signal, too low, +low, good) of mobile network connection via dongle connected to USB +port. + +- no signal: (none, turned off) +- too low: green:mobile & red:mobile (amber, blink) +- low: green:mobile & red:mobile (amber, turned on) +- good: green:mobile (turned on) + +Suggested-by: Hauke Mehrtens +Signed-off-by: INAGAKI Hiroshi +--- + include/dt-bindings/leds/common.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/include/dt-bindings/leds/common.h ++++ b/include/dt-bindings/leds/common.h +@@ -90,6 +90,7 @@ + #define LED_FUNCTION_INDICATOR "indicator" + #define LED_FUNCTION_LAN "lan" + #define LED_FUNCTION_MAIL "mail" ++#define LED_FUNCTION_MOBILE "mobile" + #define LED_FUNCTION_MTD "mtd" + #define LED_FUNCTION_PANIC "panic" + #define LED_FUNCTION_PROGRAMMING "programming" diff --git a/target/linux/generic/pending-6.6/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch b/target/linux/generic/pending-6.6/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch new file mode 100644 index 0000000000..ab27cd3399 --- /dev/null +++ b/target/linux/generic/pending-6.6/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch @@ -0,0 +1,37 @@ +From e22afe910afcfb51b6ba6a0ae776939959727f54 Mon Sep 17 00:00:00 2001 +From: INAGAKI Hiroshi +Date: Wed, 20 Mar 2024 15:59:06 +0900 +Subject: [PATCH v2 2/2] dt-bindings: leds: add LED_FUNCTION_SPEED_* for link + speed on LAN/WAN + +Add LED_FUNCTION_SPEED_LAN and LED_FUNCTION_SPEED_WAN for LEDs that +indicate link speed of ethernet ports on LAN/WAN. This is useful to +distinguish those LEDs from LEDs that indicate link status (up/down). + +example: + +Fortinet FortiGate 30E/50E have LEDs that indicate link speed on each +of the ethernet ports in addition to LEDs that indicate link status +(up/down). + +- 1000 Mbps: green:speed-(lan|wan)-N +- 100 Mbps: amber:speed-(lan|wan)-N +- 10 Mbps: (none, turned off) + +Reviewed-by: Rob Herring +Signed-off-by: INAGAKI Hiroshi +--- + include/dt-bindings/leds/common.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/include/dt-bindings/leds/common.h ++++ b/include/dt-bindings/leds/common.h +@@ -96,6 +96,8 @@ + #define LED_FUNCTION_PROGRAMMING "programming" + #define LED_FUNCTION_RX "rx" + #define LED_FUNCTION_SD "sd" ++#define LED_FUNCTION_SPEED_LAN "speed-lan" ++#define LED_FUNCTION_SPEED_WAN "speed-wan" + #define LED_FUNCTION_STANDBY "standby" + #define LED_FUNCTION_TORCH "torch" + #define LED_FUNCTION_TX "tx" From 5038ec5bba5ccdaf9a78d8fa4dc8ef910d554bc1 Mon Sep 17 00:00:00 2001 From: INAGAKI Hiroshi Date: Sat, 17 Feb 2024 19:27:42 +0900 Subject: [PATCH 31/41] mvebu: fix LEDs on Fortinet FortiGate devices On Fortinet FortiGate 30E/50E, some multiple LEDs have no "function" property and only "color" property is available for the new binding of LED on Linux Kernel. 9d93b6d091 ("mvebu: drop redundant label with new LED color/function format") removes "label" property from LEDs, then, multiple ":" (ex.: "green:"/"red:"/"amber:") will be appeared as LED names and renamed to ":_" (ex.: "green:_1", "green:_2", ...) by kernel. log: [ 12.425170] leds-gpio gpio-leds: Led green: renamed to green:_1 due to name collision [ 12.520390] leds-gpio gpio-leds: Led amber: renamed to amber:_1 due to name collision [ 12.614931] leds-gpio gpio-leds: Led green: renamed to green:_2 due to name collision [ 12.709895] leds-gpio gpio-leds: Led green: renamed to green:_3 due to name collision [ 12.804439] leds-gpio gpio-leds: Led amber: renamed to amber:_2 due to name collision [ 12.898969] leds-gpio gpio-leds: Led green: renamed to green:_4 due to name collision [ 12.993504] leds-gpio gpio-leds: Led amber: renamed to amber:_3 due to name collision [ 13.088033] leds-gpio gpio-leds: Led green: renamed to green:_5 due to name collision [ 13.182570] leds-gpio gpio-leds: Led green: renamed to green:_6 due to name collision [ 13.277103] leds-gpio gpio-leds: Led amber: renamed to amber:_4 due to name collision [ 13.371636] leds-gpio gpio-leds: Led green: renamed to green:_7 due to name collision /sys/class/leds: root@OpenWrt:/# ls /sys/class/leds/ amber: amber:_4 green:_2 green:_6 red:alarm amber:_1 amber:alarm green:_3 green:_7 red:status amber:_2 green: green:_4 green:status amber:_3 green:_1 green:_5 red: Fix this issue by adding missing "function" (and "function-enumerator") property those to LEDs on Fortinet FortiGate devices. Note: there is no appropriate function for "ha" LEDs in dt-bindings/leds/common.h, so use the hardcoded string for them instead. Fixes: 9d93b6d091 ("mvebu: drop redundant label with new LED color/function format") Signed-off-by: INAGAKI Hiroshi --- .../boot/dts/armada-385-fortinet-fg-30e.dts | 2 ++ .../boot/dts/armada-385-fortinet-fg-50e.dts | 8 ++++++++ .../boot/dts/armada-385-fortinet-fg-x0e.dtsi | 18 ++++++++++++++++++ .../dts/marvell/armada-385-fortinet-fg-30e.dts | 2 ++ .../dts/marvell/armada-385-fortinet-fg-50e.dts | 8 ++++++++ .../marvell/armada-385-fortinet-fg-x0e.dtsi | 18 ++++++++++++++++++ 6 files changed, 56 insertions(+) diff --git a/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-30e.dts b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-30e.dts index c0900d7126..dca6fbacf0 100644 --- a/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-30e.dts +++ b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-30e.dts @@ -16,12 +16,14 @@ led-14 { gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_SPEED_WAN; linux,default-trigger = "mv88e6xxx-1:00:100Mbps"; }; led-15 { gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_SPEED_WAN; linux,default-trigger = "mv88e6xxx-1:00:1Gbps"; }; }; diff --git a/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts index d202d71c7f..cf13bb5fda 100644 --- a/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts +++ b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts @@ -16,24 +16,32 @@ led-14 { gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_SPEED_WAN; + function-enumerator = <1>; linux,default-trigger = "f1072004.mdio-mii:00:1Gbps"; }; led-15 { gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_SPEED_WAN; + function-enumerator = <2>; linux,default-trigger = "f1072004.mdio-mii:01:1Gbps"; }; led-16 { gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <5>; linux,default-trigger = "mv88e6xxx-1:00:100Mbps"; }; led-17 { gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <5>; linux,default-trigger = "mv88e6xxx-1:00:1Gbps"; }; }; diff --git a/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-x0e.dtsi b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-x0e.dtsi index 8cc2d6bc4a..6a5e016d30 100644 --- a/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-x0e.dtsi +++ b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-x0e.dtsi @@ -54,6 +54,7 @@ led-1 { gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; color = ; + function = "ha"; }; led_status_green: led-2 { @@ -65,6 +66,7 @@ led-3 { gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; color = ; + function = "ha"; }; led-4 { @@ -82,48 +84,64 @@ led-6 { gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <4>; linux,default-trigger = "mv88e6xxx-1:01:1Gbps"; }; led-7 { gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <4>; linux,default-trigger = "mv88e6xxx-1:01:100Mbps"; }; led-8 { gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <3>; linux,default-trigger = "mv88e6xxx-1:02:100Mbps"; }; led-9 { gpios = <&gpio2 7 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <3>; linux,default-trigger = "mv88e6xxx-1:02:1Gbps"; }; led-10 { gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <1>; linux,default-trigger = "mv88e6xxx-1:04:1Gbps"; }; led-11 { gpios = <&gpio2 13 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <1>; linux,default-trigger = "mv88e6xxx-1:04:100Mbps"; }; led-12 { gpios = <&gpio2 14 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <2>; linux,default-trigger = "mv88e6xxx-1:03:1Gbps"; }; led-13 { gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <2>; linux,default-trigger = "mv88e6xxx-1:03:100Mbps"; }; }; diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts index c0900d7126..dca6fbacf0 100644 --- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts +++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts @@ -16,12 +16,14 @@ led-14 { gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_SPEED_WAN; linux,default-trigger = "mv88e6xxx-1:00:100Mbps"; }; led-15 { gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_SPEED_WAN; linux,default-trigger = "mv88e6xxx-1:00:1Gbps"; }; }; diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts index d202d71c7f..cf13bb5fda 100644 --- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts +++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts @@ -16,24 +16,32 @@ led-14 { gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_SPEED_WAN; + function-enumerator = <1>; linux,default-trigger = "f1072004.mdio-mii:00:1Gbps"; }; led-15 { gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_SPEED_WAN; + function-enumerator = <2>; linux,default-trigger = "f1072004.mdio-mii:01:1Gbps"; }; led-16 { gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <5>; linux,default-trigger = "mv88e6xxx-1:00:100Mbps"; }; led-17 { gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <5>; linux,default-trigger = "mv88e6xxx-1:00:1Gbps"; }; }; diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-x0e.dtsi b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-x0e.dtsi index 8cc2d6bc4a..6a5e016d30 100644 --- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-x0e.dtsi +++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-x0e.dtsi @@ -54,6 +54,7 @@ led-1 { gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; color = ; + function = "ha"; }; led_status_green: led-2 { @@ -65,6 +66,7 @@ led-3 { gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; color = ; + function = "ha"; }; led-4 { @@ -82,48 +84,64 @@ led-6 { gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <4>; linux,default-trigger = "mv88e6xxx-1:01:1Gbps"; }; led-7 { gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <4>; linux,default-trigger = "mv88e6xxx-1:01:100Mbps"; }; led-8 { gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <3>; linux,default-trigger = "mv88e6xxx-1:02:100Mbps"; }; led-9 { gpios = <&gpio2 7 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <3>; linux,default-trigger = "mv88e6xxx-1:02:1Gbps"; }; led-10 { gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <1>; linux,default-trigger = "mv88e6xxx-1:04:1Gbps"; }; led-11 { gpios = <&gpio2 13 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <1>; linux,default-trigger = "mv88e6xxx-1:04:100Mbps"; }; led-12 { gpios = <&gpio2 14 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <2>; linux,default-trigger = "mv88e6xxx-1:03:1Gbps"; }; led-13 { gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <2>; linux,default-trigger = "mv88e6xxx-1:03:100Mbps"; }; }; From e0cc69bef4b87cabaa2e065a81e1a2c2749ce53e Mon Sep 17 00:00:00 2001 From: INAGAKI Hiroshi Date: Sun, 18 Feb 2024 15:01:51 +0900 Subject: [PATCH 32/41] mvebu: fix LEDs on IIJ SA-W2 On IIJ SA-W2, some multiple LEDs have no "function" property and only "color" property is available for the newer binding of LED on Linux Kernel. 9d93b6d091 ("mvebu: drop redundant label with new LED color/function format") removes "label" property from LEDs, then, multiple ":" (ex.: "green:"/"red:") will be appeared and renamed to ":_" (ex.: "green:_1", "green:_2", ...) by kernel. log: [ 1.911118] leds-gpio leds: Led green: renamed to green:_1 due to name collision [ 1.918600] leds-gpio leds: Led red: renamed to red:_1 due to name collision [ 1.925727] leds-gpio leds: Led green: renamed to green:_2 due to name collision [ 1.933202] leds-gpio leds: Led red: renamed to red:_2 due to name collision [ 1.940321] leds-gpio leds: Led green: renamed to green:_3 due to name collision [ 1.947797] leds-gpio leds: Led red: renamed to red:_3 due to name collision [ 1.954939] leds-gpio leds: Led green: renamed to green:_4 due to name collision [ 1.962456] leds-gpio leds: Led green: renamed to green:_5 due to name collision /sys/class/leds: root@OpenWrt:/# ls /sys/class/leds/ green: green:_3 green:status red:_2 green:_1 green:_4 red: red:_3 green:_2 green:_5 red:_1 red:status Fix this issue by adding missing "function" (and "function-enumerator") property to those LEDs on IIJ SA-W2. Fixes: 9d93b6d091 ("mvebu: drop redundant label with new LED color/function format") Signed-off-by: INAGAKI Hiroshi --- .../arch/arm/boot/dts/armada-380-iij-sa-w2.dts | 12 ++++++++++++ .../arm/boot/dts/marvell/armada-380-iij-sa-w2.dts | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-380-iij-sa-w2.dts b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-380-iij-sa-w2.dts index 335a2ecf96..01c1ef675b 100644 --- a/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-380-iij-sa-w2.dts +++ b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-380-iij-sa-w2.dts @@ -68,12 +68,14 @@ led-0 { gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_WLAN_5GHZ; linux,default-trigger = "phy0tpt"; }; led-1 { gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_WLAN_5GHZ; }; led-2 { @@ -91,37 +93,45 @@ led-4 { gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_MOBILE; }; led-5 { gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_MOBILE; }; led-6 { gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_WLAN_2GHZ; linux,default-trigger = "phy1tpt"; }; led-7 { gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_WLAN_2GHZ; }; led_power_green: led-8 { gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_POWER; }; led_power_red: led-9 { gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_POWER; }; led-10 { gpios = <&gpio1 22 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_USB; + function-enumerator = <1>; linux,default-trigger = "usbport"; trigger-sources = <&hub_port2>; }; @@ -129,6 +139,8 @@ led-11 { gpios = <&gpio1 23 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_USB; + function-enumerator = <0>; linux,default-trigger = "usbport"; trigger-sources = <&hub_port1>; }; diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-380-iij-sa-w2.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-380-iij-sa-w2.dts index 335a2ecf96..01c1ef675b 100644 --- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-380-iij-sa-w2.dts +++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-380-iij-sa-w2.dts @@ -68,12 +68,14 @@ led-0 { gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_WLAN_5GHZ; linux,default-trigger = "phy0tpt"; }; led-1 { gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_WLAN_5GHZ; }; led-2 { @@ -91,37 +93,45 @@ led-4 { gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_MOBILE; }; led-5 { gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_MOBILE; }; led-6 { gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_WLAN_2GHZ; linux,default-trigger = "phy1tpt"; }; led-7 { gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_WLAN_2GHZ; }; led_power_green: led-8 { gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_POWER; }; led_power_red: led-9 { gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_POWER; }; led-10 { gpios = <&gpio1 22 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_USB; + function-enumerator = <1>; linux,default-trigger = "usbport"; trigger-sources = <&hub_port2>; }; @@ -129,6 +139,8 @@ led-11 { gpios = <&gpio1 23 GPIO_ACTIVE_LOW>; color = ; + function = LED_FUNCTION_USB; + function-enumerator = <0>; linux,default-trigger = "usbport"; trigger-sources = <&hub_port1>; }; From 338b463e1e9788f9e569cfa26b76a2a9746c93c1 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sat, 13 Apr 2024 20:15:45 +0200 Subject: [PATCH 33/41] tools: libdeflate: update to 1.20 Changes: * Improved CRC-32 performance on recent x86 CPUs by adding VPCLMULQDQ-accelerated implementations using 256-bit and 512-bit vectors. * Improved Adler-32 performance on recent x86 CPUs by adding VNNI-accelerated implementations using 256-bit and 512-bit vectors. * Improved CRC-32 and Adler-32 performance on short inputs. * Optimized the portable implementation of Adler-32. * Added some basic optimizations for RISC-V. * Dropped support for gcc versions older than v4.9 (released in 2014) and clang versions older than v3.9 (released in 2016). * Dropped support for CRC-32 acceleration on 32-bit ARM using the ARMv8 pmull or crc32 instructions. This code only worked on CPUs that also have a 64-bit mode, and it was already disabled on many compiler versions due to compiler limitations. CRC-32 acceleration remains fully supported on 64-bit ARM. Signed-off-by: Robert Marko --- tools/libdeflate/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libdeflate/Makefile b/tools/libdeflate/Makefile index fbf8bde984..68f7fb1372 100644 --- a/tools/libdeflate/Makefile +++ b/tools/libdeflate/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libdeflate -PKG_VERSION:=1.19 +PKG_VERSION:=1.20 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/ebiggers/libdeflate/releases/download/v$(PKG_VERSION) -PKG_HASH:=d9bb9bdd8cc5a8c1f7f6226fa0053dd72861e15f366e7ff7d0d191eac16d66f3 +PKG_HASH:=c52cf0239fd644d71c9e88613dd7431a5306ebee1280c5791c71ca264869250a include $(INCLUDE_DIR)/host-build.mk From cab2e1de0d94ab35b5d032194fc5b4ab2e0d609a Mon Sep 17 00:00:00 2001 From: Vince McKinsey Date: Sun, 31 Mar 2024 14:29:05 -0400 Subject: [PATCH 34/41] ramips: Add support for D-Link DIR-3040 A1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds support for the A1 hardware revision of the DIR-3040. It is an exact copy of the DIR-3060 save for some cosmetic changes to the housing. Even going so far as having the same FCC ID. Hardware specification: SoC: MediaTek MT7621AT Flash: Winbond W29N01HVSINA 128MB RAM: Micron MT41K128M16JT-125 256MB Ethernet: 5x 10/100/1000 Mbps WiFi1: MT7615DN 2.4GHz N 2x2:2 WiFi2: MT7615DN 5GHz AC 2x2:2 WiFi3: MT7615N 5GHz AC 4x4:4 Button: WPS, Reset Flash instructions: OpenWrt can be installed via D-Link Recovery GUI: NOTE: Seems to only work in Firefox on Windows. Tried with Chrome on Windows, Firefox in Linux, and Chromium in Linux. None of these other browsers worked. 1. Push and hold reset button (on the bottom of the device) until power led starts flashing (about 10 secs or so) while plugging in the power cable. 2. Give it ~30 seconds, to boot the recovery mode GUI 3. Connect your client computer to LAN1 of the device 4. Set your client IP address manually to 192.168.0.2 / 255.255.255.0. 5. Call the recovery page for the device at http://192.168.0.1/ 6. Use the provided emergency web GUI to upload and flash a new firmware to the device Thanks to @Lucky1openwrt and @iivailo for creating the DIR-3060 DTS file and related changes, so it was possible for me to adapt them to the DIR-3040, build images, test and fix minor issues. MAC Addresses: | use | address | example | | --- | --- | --- | | LAN | label | f4:*:61 | | WAN | label + 4 | f4:*:65 | | WI1/2g | label + 2 | f4:*:63 | | WI1/5g | label + 1 | f4:*:62 | | WI2/5g | label + 3 | f4:*:64 | The label MAC address was found in Factory, 0xe000 Checklist: ✓ nand ✓ ethernet ✓ button ✓ wifi2g ✓ wifi5g ✓ wifi5g ✓ mac ✓ led Signed-off-by: Vince McKinsey --- .../ramips/dts/mt7621_dlink_dir-3040-a1.dts | 67 +++++++++++++++++++ .../ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi | 2 +- target/linux/ramips/image/mt7621.mk | 7 ++ .../mt7621/base-files/etc/board.d/01_leds | 1 + .../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 5 ++ .../mt7621/base-files/lib/upgrade/platform.sh | 1 + 6 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts new file mode 100644 index 0000000000..4bb35a948d --- /dev/null +++ b/target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_dlink_dir-xx60-a1.dtsi" + +/ { + compatible = "dlink,dir-3040-a1", "mediatek,mt7621-soc"; + model = "D-Link DIR-3040 A1"; +}; + +&wps { + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; +}; + +&leds { + usb2_white { + function = LED_FUNCTION_USB; + color = ; + function-enumerator = <0>; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + trigger-sources = <&ehci_port2>; + linux,default-trigger = "usbport"; + }; + + usb3_white { + function = LED_FUNCTION_USB; + color = ; + function-enumerator = <1>; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + trigger-sources = <&xhci_ehci_port1>; + linux,default-trigger = "usbport"; + }; + + wlan2g { + function = LED_FUNCTION_WLAN_2GHZ; + color = ; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0radio"; + }; + + wlan5glb { + function = LED_FUNCTION_WLAN_5GHZ; + color = ; + function-enumerator = <0>; + gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy1radio"; + }; + + wlan5ghb { + function = LED_FUNCTION_WLAN_5GHZ; + color = ; + function-enumerator = <1>; + gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy2radio"; + }; +}; + +&wifi0 { + nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000 1>; + nvmem-cell-names = "eeprom", "mac-address"; + ieee80211-freq-limit; + /delete-property/ ieee80211-freq-limit; +}; + +&wifi1 { + nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000 3>; + nvmem-cell-names = "eeprom", "mac-address"; +}; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi index 7b7228b8c3..57652fb278 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi @@ -24,7 +24,7 @@ linux,code = ; }; - wps { + wps: wps { label = "wps"; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; linux,code = ; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index fb8cfce589..10e7857614 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -783,6 +783,13 @@ define Device/dlink_dir-2660-a1 endef TARGET_DEVICES += dlink_dir-2660-a1 +define Device/dlink_dir-3040-a1 + $(Device/dlink_dir-xx60-a1) + DEVICE_MODEL := DIR-3040 + DEVICE_VARIANT := A1 +endef +TARGET_DEVICES += dlink_dir-3040-a1 + define Device/dlink_dir-3060-a1 $(Device/dlink_dir-xx60-a1) DEVICE_MODEL := DIR-3060 diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index 3eba20bb79..6848bebd00 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -96,6 +96,7 @@ dlink,dir-2640-a1|\ dlink,dir-2660-a1) ucidef_set_led_netdev "wan" "wan" "white:net" "wan" ;; +dlink,dir-3040-a1|\ dlink,dir-3060-a1) ucidef_set_led_netdev "net_white" "WAN Link" "white:net" "wan" "link" ucidef_set_led_netdev "net_orange" "WAN Activity" "orange:net" "wan" "tx rx" diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index 962e1f7019..0ec46bb0ea 100644 --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -60,6 +60,11 @@ case "$board" in [ "$PHYNBR" = "1" ] && \ macaddr_add $hw_mac_addr 4 > /sys${DEVPATH}/macaddress ;; + dlink,dir-3040-a1) + lan_mac_addr="$(mtd_get_mac_binary factory 0xe000)" + [ "$PHYNBR" = "0" ] && \ + macaddr_add $lan_mac_addr 2 > /sys${DEVPATH}/macaddress + ;; dlink,dir-853-a3) [ "$PHYNBR" = "0" ] && \ macaddr_setbit_la "$(mtd_get_mac_binary factory 0xe000)" \ diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index eba02e6599..93fbc470ad 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -73,6 +73,7 @@ platform_do_upgrade() { dlink,dir-1960-a1|\ dlink,dir-2640-a1|\ dlink,dir-2660-a1|\ + dlink,dir-3040-a1|\ dlink,dir-3060-a1|\ dlink,dir-853-a3|\ etisalat,s3|\ From 93d75f8401c9aec2fcfb15775243d295e230b2a8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 15 Apr 2024 11:19:44 +0200 Subject: [PATCH 35/41] bridger: update to Git HEAD (2024-04-15) 3159bbe0a2eb improve isolation when selecting a fixed output port c77a7a1ff74d nl: fix getting flow offload stats a08e51e679dd add support for disabling bridge-local flows via config Signed-off-by: Felix Fietkau --- package/network/services/bridger/Makefile | 6 +++--- .../network/services/bridger/files/bridger.conf | 3 +++ .../network/services/bridger/files/bridger.init | 14 ++++++++------ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/package/network/services/bridger/Makefile b/package/network/services/bridger/Makefile index fa98220f68..b38c2ddbc5 100644 --- a/package/network/services/bridger/Makefile +++ b/package/network/services/bridger/Makefile @@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bridger PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/nbd168/bridger -PKG_SOURCE_DATE:=2023-05-12 -PKG_SOURCE_VERSION:=d0f79a16c749ad310d79e1c31f593860619f99eb -PKG_MIRROR_HASH:=dde6613662ad53ba6622e669400560a534426edfa4f42c91d156fbd7ccafd15c +PKG_SOURCE_DATE:=2024-04-15 +PKG_SOURCE_VERSION:=a08e51e679dd7e1eaf70ea7fd6b6433e167d4c2d +PKG_MIRROR_HASH:=e80ac0cc3c5b27afb233c03fed3fbcef34a1b3fdbe0d48532ad1d5c3aac4088d PKG_LICENSE:=GPL-2.0 PKG_MAINTAINER:=Felix Fietkau diff --git a/package/network/services/bridger/files/bridger.conf b/package/network/services/bridger/files/bridger.conf index cb43deff79..2ff6b5b787 100644 --- a/package/network/services/bridger/files/bridger.conf +++ b/package/network/services/bridger/files/bridger.conf @@ -1,3 +1,6 @@ config defaults + # handle bridge local rx/tx + option bridge_local 0 + # example for blacklisting individual devices or bridges # list blacklist eth0 diff --git a/package/network/services/bridger/files/bridger.init b/package/network/services/bridger/files/bridger.init index 2ba9f06b65..c9983ae9cc 100644 --- a/package/network/services/bridger/files/bridger.init +++ b/package/network/services/bridger/files/bridger.init @@ -6,25 +6,27 @@ START=19 USE_PROCD=1 PROG=/usr/sbin/bridger -add_blacklist() { +get_defaults() { cfg="$1" config_get blacklist "$cfg" blacklist + json_add_array blacklist for i in $blacklist; do json_add_string "" "$i" done + json_close_array + + config_get_bool bridge_local "$cfg" bridge_local 0 + json_add_boolean bridge_local "$bridge_local" } reload_service() { config_load bridger json_init - json_add_string name "config" - json_add_array devices - config_foreach add_blacklist defaults - json_close_array + config_foreach get_defaults defaults - ubus call bridger set_blacklist "$(json_dump)" + ubus call bridger set_config "$(json_dump)" } service_triggers() { From 20c0dfb8e19cd1259f8704b8b7ab5d86bda36568 Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Tue, 5 Mar 2024 00:28:48 -0800 Subject: [PATCH 36/41] tools/dwarves: add myself as PKG_MAINTAINER Missed setting this when first adding package. Signed-off-by: Tony Ambardar --- tools/dwarves/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/dwarves/Makefile b/tools/dwarves/Makefile index 8d72536b42..16dc765f58 100644 --- a/tools/dwarves/Makefile +++ b/tools/dwarves/Makefile @@ -10,6 +10,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://fedorapeople.org/~acme/dwarves/ PKG_HASH:=1d8c9a1c2d42e06cc121a70a39c4f621fd28f15c476ed1b7c7b226f41fdd32df +PKG_MAINTAINER:=Tony Ambardar PKG_LICENSE:=GPL-2.0-only PKG_LICENSE_FILES:=COPYING From a9e22ffa5028e303dc32d15f1ce5e1be4c20e125 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 15 Apr 2024 12:55:37 +0200 Subject: [PATCH 37/41] elfutils: fix a missing typedef in the last update Fixes perf Signed-off-by: Felix Fietkau --- .../patches/007-fix-missing-typedef.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 package/libs/elfutils/patches/007-fix-missing-typedef.patch diff --git a/package/libs/elfutils/patches/007-fix-missing-typedef.patch b/package/libs/elfutils/patches/007-fix-missing-typedef.patch new file mode 100644 index 0000000000..cfac17ad3f --- /dev/null +++ b/package/libs/elfutils/patches/007-fix-missing-typedef.patch @@ -0,0 +1,22 @@ +--- a/libelf/libelf.h ++++ b/libelf/libelf.h +@@ -73,15 +73,15 @@ + /* So RELR defines/typedefs can be used even with an old system elf.h. */ + #define SHT_RELR 19 /* RELR relative relocations */ + +- /* RELR relocation table entry */ +- typedef Elf32_Word Elf32_Relr; +- typedef Elf64_Xword Elf64_Relr; +- + #define DT_RELRSZ 35 /* Total size of RELR relative relocations */ + #define DT_RELR 36 /* Address of RELR relative relocations */ + #define DT_RELRENT 37 /* Size of one RELR relative relocaction */ + #endif + ++/* RELR relocation table entry */ ++typedef Elf32_Word Elf32_Relr; ++typedef Elf64_Xword Elf64_Relr; ++ + #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) + # define __nonnull_attribute__(...) __attribute__ ((__nonnull__ (__VA_ARGS__))) + # define __deprecated_attribute__ __attribute__ ((__deprecated__)) From 123282d9f9edf361729c2e8bb410957a6844d845 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 15 Apr 2024 12:32:35 +0200 Subject: [PATCH 38/41] netifd: add missing error checks to packet steering script Signed-off-by: Felix Fietkau --- .../netifd/files/usr/libexec/network/packet-steering.uc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc b/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc index f146a96e41..72f96024d8 100755 --- a/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc +++ b/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc @@ -27,6 +27,8 @@ for (let arg in ARGV) { function task_name(pid) { let stat = open(`/proc/${pid}/status`, "r"); + if (!stat) + return; let line = stat.read("line"); stat.close(); return trim(split(line, "\t", 2)[1]); @@ -35,8 +37,11 @@ function task_name(pid) function set_task_cpu(pid, cpu) { if (disable) cpu = join(",", map(cpus, (cpu) => cpu.id)); + let name = task_name(pid); + if (!name) + return; if (debug || do_nothing) - warn(`taskset -p -c ${cpu} ${task_name(pid)}\n`); + warn(`taskset -p -c ${cpu} ${name}\n`); if (!do_nothing) system(`taskset -p -c ${cpu} ${pid}`); } From 2116073f981ead48f5fe0af213cbdfe013288fb9 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 15 Apr 2024 11:03:08 +0200 Subject: [PATCH 39/41] tools: libdeflate: backport fix for AVX-VNNI Trying to compile with new new enough GCC but older binutils that dont support AVX-VNNI will error out on the assembler, so backport an upstream fix for it. Fixes: 338b463e1e97 ("tools: libdeflate: update to 1.20") Signed-off-by: Robert Marko --- tools/libdeflate/Makefile | 2 +- ...se-AVX-VNNI-gcc-prerequisite-to-12.1.patch | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 tools/libdeflate/patches/0001-lib-x86-increase-AVX-VNNI-gcc-prerequisite-to-12.1.patch diff --git a/tools/libdeflate/Makefile b/tools/libdeflate/Makefile index 68f7fb1372..6bf25d134d 100644 --- a/tools/libdeflate/Makefile +++ b/tools/libdeflate/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libdeflate PKG_VERSION:=1.20 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/ebiggers/libdeflate/releases/download/v$(PKG_VERSION) diff --git a/tools/libdeflate/patches/0001-lib-x86-increase-AVX-VNNI-gcc-prerequisite-to-12.1.patch b/tools/libdeflate/patches/0001-lib-x86-increase-AVX-VNNI-gcc-prerequisite-to-12.1.patch new file mode 100644 index 0000000000..ea4f4dc4c1 --- /dev/null +++ b/tools/libdeflate/patches/0001-lib-x86-increase-AVX-VNNI-gcc-prerequisite-to-12.1.patch @@ -0,0 +1,32 @@ +From e522b1d09d3536ddc15459b4259150f4a53ee65a Mon Sep 17 00:00:00 2001 +From: Eric Biggers +Date: Thu, 4 Apr 2024 20:16:33 -0400 +Subject: [PATCH] lib/x86: increase AVX-VNNI gcc prerequisite to 12.1 + +Although gcc 11.1 supports AVX-VNNI, a popular distro pairs it with a +binutils version that does not. Require gcc 12 instead. + +Resolves https://github.com/ebiggers/libdeflate/issues/365 +--- + lib/x86/adler32_impl.h | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/lib/x86/adler32_impl.h ++++ b/lib/x86/adler32_impl.h +@@ -52,8 +52,15 @@ + /* + * AVX-VNNI implementation. This is used on CPUs that have AVX2 and AVX-VNNI + * but don't have AVX-512, for example Intel Alder Lake. ++ * ++ * Unusually for a new CPU feature, gcc added support for the AVX-VNNI ++ * intrinsics (in gcc 11.1) slightly before binutils added support for ++ * assembling AVX-VNNI instructions (in binutils 2.36). Distros can reasonably ++ * have gcc 11 with binutils 2.35. Because of this issue, we check for gcc 12 ++ * instead of gcc 11. (libdeflate supports direct compilation without a ++ * configure step, so checking the binutils version is not always an option.) + */ +-#if GCC_PREREQ(11, 1) || CLANG_PREREQ(12, 0, 13000000) || MSVC_PREREQ(1930) ++#if GCC_PREREQ(12, 1) || CLANG_PREREQ(12, 0, 13000000) || MSVC_PREREQ(1930) + # define adler32_x86_avx2_vnni adler32_x86_avx2_vnni + # define SUFFIX _avx2_vnni + # define ATTRIBUTES _target_attribute("avx2,avxvnni") From d4742de1d702478e288721c4104aec735eaca72b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 15 Apr 2024 22:05:06 +0200 Subject: [PATCH 40/41] Revert "elfutils: fix a missing typedef in the last update" This reverts commit a9e22ffa5028e303dc32d15f1ce5e1be4c20e125. After doing a clean rebuild, it turns out that this change is not necessary Signed-off-by: Felix Fietkau --- .../patches/007-fix-missing-typedef.patch | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 package/libs/elfutils/patches/007-fix-missing-typedef.patch diff --git a/package/libs/elfutils/patches/007-fix-missing-typedef.patch b/package/libs/elfutils/patches/007-fix-missing-typedef.patch deleted file mode 100644 index cfac17ad3f..0000000000 --- a/package/libs/elfutils/patches/007-fix-missing-typedef.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/libelf/libelf.h -+++ b/libelf/libelf.h -@@ -73,15 +73,15 @@ - /* So RELR defines/typedefs can be used even with an old system elf.h. */ - #define SHT_RELR 19 /* RELR relative relocations */ - -- /* RELR relocation table entry */ -- typedef Elf32_Word Elf32_Relr; -- typedef Elf64_Xword Elf64_Relr; -- - #define DT_RELRSZ 35 /* Total size of RELR relative relocations */ - #define DT_RELR 36 /* Address of RELR relative relocations */ - #define DT_RELRENT 37 /* Size of one RELR relative relocaction */ - #endif - -+/* RELR relocation table entry */ -+typedef Elf32_Word Elf32_Relr; -+typedef Elf64_Xword Elf64_Relr; -+ - #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) - # define __nonnull_attribute__(...) __attribute__ ((__nonnull__ (__VA_ARGS__))) - # define __deprecated_attribute__ __attribute__ ((__deprecated__)) From 8c3dfdc46be7e61afe5f6aaca9860d4258d24e8a Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 15 Apr 2024 22:50:34 +0200 Subject: [PATCH 41/41] kernel: Add missing config option Kernel 6.1.83 allows to select CONFIG_GPIO_VF610, deactivate it by default. This fixes compilation of the armsr/armv8 target. Fixes: 2ad898e091cb ("kernel: bump 6.1 to 6.1.83") Signed-off-by: Hauke Mehrtens --- target/linux/generic/config-6.1 | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/generic/config-6.1 b/target/linux/generic/config-6.1 index 7baa9b4a55..70e87665b7 100644 --- a/target/linux/generic/config-6.1 +++ b/target/linux/generic/config-6.1 @@ -2347,6 +2347,7 @@ CONFIG_GPIO_SYSFS=y # CONFIG_GPIO_TPIC2810 is not set # CONFIG_GPIO_TS4900 is not set # CONFIG_GPIO_TS5500 is not set +# CONFIG_GPIO_VF610 is not set # CONFIG_GPIO_VIRTIO is not set # CONFIG_GPIO_VX855 is not set # CONFIG_GPIO_WATCHDOG is not set