From cea6631cdf09c577ae87a21bc3b03273a233c17e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Thu, 20 May 2021 12:22:12 +0200 Subject: [PATCH 01/45] netifd: update to the latest master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit config: fix ifname->ports compat rename Fixes: 829b5c2ba32f ("netifd: update to the latest version") Signed-off-by: Rafał Miłecki --- package/network/config/netifd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index 7a05abb651..aba1970d35 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git -PKG_SOURCE_DATE:=2021-05-18 -PKG_SOURCE_VERSION:=7277764bf8173d6961acbacfe31757c9195329e1 -PKG_MIRROR_HASH:=bf3549594dccda31bb9da831823b931ba7cb85e1a60ec6432ed6c09f3ea54510 +PKG_SOURCE_DATE:=2021-05-20 +PKG_SOURCE_VERSION:=42c19303bff5853866292671df30e9cae0fd60d1 +PKG_MIRROR_HASH:=534cd7e700589b0ab042a74368e48ea907234caa795a66944694463f23d69af3 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 From 80be798d4a4fa4a3b3413a0a0ff42dd8ac88574d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Thu, 20 May 2021 12:23:55 +0200 Subject: [PATCH 02/45] Revert "base-files: migrate old UCI network bridge ports syntax" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit f716c30241d5fd9d821560f58d0af0c3ffe78600. Migrating everyone to the new syntax could break downgrades. We may reintroduce it way later if needed. Signed-off-by: Rafał Miłecki --- .../uci-defaults/11_network-migrate-bridges | 23 ------------------- 1 file changed, 23 deletions(-) delete mode 100644 package/base-files/files/etc/uci-defaults/11_network-migrate-bridges diff --git a/package/base-files/files/etc/uci-defaults/11_network-migrate-bridges b/package/base-files/files/etc/uci-defaults/11_network-migrate-bridges deleted file mode 100644 index 745648531f..0000000000 --- a/package/base-files/files/etc/uci-defaults/11_network-migrate-bridges +++ /dev/null @@ -1,23 +0,0 @@ -. /lib/functions.sh - -migrate_ports() { - local config="$1" - local type ports ifname - - config_get type "$config" type - [ "$type" != "bridge" ] && return - - config_get ports "$config" ports - [ -n "$ports" ] && return - - config_get ifname "$config" ifname - [ -z "$ifname" ] && return - - for port in $ifname; do uci add_list network.$config.ports="$port"; done - uci delete network.$config.ifname -} - -config_load network -config_foreach migrate_ports device - -exit 1 From baf2a50ef3cf34574e12d2ab1b23578310f0d527 Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Sun, 16 May 2021 11:46:32 +0100 Subject: [PATCH 03/45] firmware-utils: fix coverity zytrx.c resource leak fix coverity resource leak warning: *len = stat.st_size; mapped = mmap(NULL, stat.st_size, PROT_READ, MAP_SHARED, fd, 0); if (close(fd) < 0) CID 1484880: Resource leaks (RESOURCE_LEAK) Variable "mapped" going out of scope leaks the storage it points to. return NULL; return mapped; } Signed-off-by: Kevin Darbyshire-Bryant --- tools/firmware-utils/src/zytrx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/firmware-utils/src/zytrx.c b/tools/firmware-utils/src/zytrx.c index 302efc6010..7167679206 100644 --- a/tools/firmware-utils/src/zytrx.c +++ b/tools/firmware-utils/src/zytrx.c @@ -150,8 +150,10 @@ static void *map_input(const char *name, size_t *len) } *len = stat.st_size; mapped = mmap(NULL, stat.st_size, PROT_READ, MAP_SHARED, fd, 0); - if (close(fd) < 0) + if (close(fd) < 0) { + (void) munmap(mapped, stat.st_size); return NULL; + } return mapped; } From 368c20f06b53d867c6fd780715014b20dc5ab39e Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Tue, 9 Mar 2021 13:41:27 +0100 Subject: [PATCH 04/45] imx6: rename Freescale to NXP in BOARDNAME and profiles Freescale no longer exists, it was acquired by NXP in 2015. Signed-off-by: Piotr Dymacz --- target/linux/imx6/Makefile | 2 +- target/linux/imx6/profiles/100-default.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/imx6/Makefile b/target/linux/imx6/Makefile index 6582c83869..e735d1d885 100644 --- a/target/linux/imx6/Makefile +++ b/target/linux/imx6/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=imx6 -BOARDNAME:=Freescale i.MX 6 +BOARDNAME:=NXP i.MX 6 FEATURES:=audio display fpu gpio pcie rtc usb usbgadget squashfs targz nand ubifs boot-part rootfs-part CPU_TYPE:=cortex-a9 CPU_SUBTYPE:=neon diff --git a/target/linux/imx6/profiles/100-default.mk b/target/linux/imx6/profiles/100-default.mk index 28b0f4662c..a025b88888 100644 --- a/target/linux/imx6/profiles/100-default.mk +++ b/target/linux/imx6/profiles/100-default.mk @@ -8,7 +8,7 @@ define Profile/Default endef define Profile/Default/Description - Package set compatible with most Freescale i.MX 6 based boards. + Package set compatible with most NXP i.MX 6 based boards. endef $(eval $(call Profile,Default)) From 7e7cef633408b9605518279787b9fd16d79d7043 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Fri, 8 Jan 2021 12:18:32 +0100 Subject: [PATCH 05/45] imx6: image: cleanup image recipes - drop unused 'UBOOT' variable from 'Device/apalis' recipe - fix 'KERNEL_SUFFIX' for 'Device/cubox-i' (should be '-zImage') - drop redundant 'DEVICE_{VENDOR,MODEL}' from 'Device/ventana-large' - other, minor fixes Signed-off-by: Piotr Dymacz --- target/linux/imx6/image/Makefile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile index 9ce620655a..7608bd6d8c 100644 --- a/target/linux/imx6/image/Makefile +++ b/target/linux/imx6/image/Makefile @@ -177,8 +177,6 @@ TARGET_DEVICES += ventana define Device/ventana-large $(Device/ventana) - DEVICE_VENDOR := Gateworks - DEVICE_MODEL := Ventana family DEVICE_VARIANT := large NAND flash DEVICE_NAME := ventana IMAGES := nand.ubi @@ -199,8 +197,9 @@ define Device/cubox-i DEVICE_VENDOR := SolidRun DEVICE_MODEL := CuBox-i KERNEL := kernel-bin + KERNEL_SUFFIX := -zImage UBOOT := mx6cuboxi - BOOT_SCRIPT = bootscript-cubox + BOOT_SCRIPT := bootscript-cubox DEVICE_NAME := cubox DEVICE_PACKAGES := kmod-drm-imx kmod-drm-imx-hdmi kmod-usb-hid DEVICE_DTS := imx6q-cubox-i imx6dl-cubox-i imx6q-hummingboard imx6dl-hummingboard @@ -216,15 +215,14 @@ define Device/apalis DEVICE_MODEL := Apalis family SUPPORTED_DEVICES := apalis,ixora apalis,eval DEVICE_DTS := \ - imx6q-apalis-eval \ - imx6q-apalis-ixora \ - imx6q-apalis-ixora-v1.1 + imx6q-apalis-eval \ + imx6q-apalis-ixora \ + imx6q-apalis-ixora-v1.1 DEVICE_PACKAGES := \ kmod-can kmod-can-flexcan kmod-can-raw \ kmod-leds-gpio kmod-gpio-button-hotplug \ kmod-pps-gpio kmod-rtc-ds1307 BOOT_SCRIPT := bootscript-apalis - UBOOT := apalis_imx6 FILESYSTEMS := squashfs IMAGES := combined.bin sysupgrade.bin DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1).$$(2) From cbc8bcfbaa71fe0928bf07d29ec0fe6217fd51ad Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Sat, 9 Jan 2021 16:47:41 +0100 Subject: [PATCH 06/45] imx6: image: use vendor_model scheme This switches device names to the common 'vendor_model' approach as in most of other targets in OpenWrt. Signed-off-by: Piotr Dymacz --- target/linux/imx6/image/Makefile | 30 +++++++++---------- ...t-ventana => bootscript-gateworks_ventana} | 0 ...script-cubox => bootscript-solidrun_cubox} | 0 ...cript-apalis => bootscript-toradex_apalis} | 0 ...ecovery-apalis => recovery-toradex_apalis} | 0 5 files changed, 15 insertions(+), 15 deletions(-) rename target/linux/imx6/image/{bootscript-ventana => bootscript-gateworks_ventana} (100%) rename target/linux/imx6/image/{bootscript-cubox => bootscript-solidrun_cubox} (100%) rename target/linux/imx6/image/{bootscript-apalis => bootscript-toradex_apalis} (100%) rename target/linux/imx6/image/{recovery-apalis => recovery-toradex_apalis} (100%) diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile index 7608bd6d8c..efd553efb9 100644 --- a/target/linux/imx6/image/Makefile +++ b/target/linux/imx6/image/Makefile @@ -127,10 +127,11 @@ define Device/Default IMAGES := endef -define Device/ventana +define Device/gateworks_ventana DEVICE_VENDOR := Gateworks DEVICE_MODEL := Ventana family DEVICE_VARIANT := normal NAND flash + DEVICE_NAME := ventana DEVICE_DTS:= \ imx6dl-gw51xx \ imx6dl-gw52xx \ @@ -165,7 +166,7 @@ define Device/ventana KERNEL += | boot-overlay IMAGES := nand.ubi bootfs.tar.gz dtb UBINIZE_PARTS = boot=$$(KDIR_KERNEL_IMAGE).boot.ubifs=15 - BOOT_SCRIPT := bootscript-ventana + BOOT_SCRIPT := bootscript-gateworks_ventana IMAGE/nand.ubi := append-ubi IMAGE/bootfs.tar.gz := bootfs.tar.gz IMAGE/dtb := install-dtb @@ -173,33 +174,32 @@ define Device/ventana BLOCKSIZE := 128k MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB endef -TARGET_DEVICES += ventana +TARGET_DEVICES += gateworks_ventana -define Device/ventana-large - $(Device/ventana) +define Device/gateworks_ventana-large + $(Device/gateworks_ventana) DEVICE_VARIANT := large NAND flash - DEVICE_NAME := ventana IMAGES := nand.ubi PAGESIZE := 4096 BLOCKSIZE := 256k MKUBIFS_OPTS := -m $$(PAGESIZE) -e 248KiB endef -TARGET_DEVICES += ventana-large +TARGET_DEVICES += gateworks_ventana-large -define Device/wandboard +define Device/wandboard_dual DEVICE_VENDOR := Wandboard DEVICE_MODEL := Dual DEVICE_DTS := imx6dl-wandboard endef -TARGET_DEVICES += wandboard +TARGET_DEVICES += wandboard_dual -define Device/cubox-i +define Device/solidrun_cubox-i DEVICE_VENDOR := SolidRun DEVICE_MODEL := CuBox-i KERNEL := kernel-bin KERNEL_SUFFIX := -zImage UBOOT := mx6cuboxi - BOOT_SCRIPT := bootscript-cubox + BOOT_SCRIPT := bootscript-solidrun_cubox DEVICE_NAME := cubox DEVICE_PACKAGES := kmod-drm-imx kmod-drm-imx-hdmi kmod-usb-hid DEVICE_DTS := imx6q-cubox-i imx6dl-cubox-i imx6q-hummingboard imx6dl-hummingboard @@ -208,9 +208,9 @@ define Device/cubox-i IMAGE/combined.bin := append-rootfs | pad-extra 128k | imx6-sdcard IMAGE/dtb := install-dtb endef -TARGET_DEVICES += cubox-i +TARGET_DEVICES += solidrun_cubox-i -define Device/apalis +define Device/toradex_apalis DEVICE_VENDOR := Toradex DEVICE_MODEL := Apalis family SUPPORTED_DEVICES := apalis,ixora apalis,eval @@ -222,7 +222,7 @@ define Device/apalis kmod-can kmod-can-flexcan kmod-can-raw \ kmod-leds-gpio kmod-gpio-button-hotplug \ kmod-pps-gpio kmod-rtc-ds1307 - BOOT_SCRIPT := bootscript-apalis + BOOT_SCRIPT := bootscript-toradex_apalis FILESYSTEMS := squashfs IMAGES := combined.bin sysupgrade.bin DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1).$$(2) @@ -231,6 +231,6 @@ define Device/apalis ARTIFACTS := recovery.scr ARTIFACT/recovery.scr := recovery-scr endef -TARGET_DEVICES += apalis +TARGET_DEVICES += toradex_apalis $(eval $(call BuildImage)) diff --git a/target/linux/imx6/image/bootscript-ventana b/target/linux/imx6/image/bootscript-gateworks_ventana similarity index 100% rename from target/linux/imx6/image/bootscript-ventana rename to target/linux/imx6/image/bootscript-gateworks_ventana diff --git a/target/linux/imx6/image/bootscript-cubox b/target/linux/imx6/image/bootscript-solidrun_cubox similarity index 100% rename from target/linux/imx6/image/bootscript-cubox rename to target/linux/imx6/image/bootscript-solidrun_cubox diff --git a/target/linux/imx6/image/bootscript-apalis b/target/linux/imx6/image/bootscript-toradex_apalis similarity index 100% rename from target/linux/imx6/image/bootscript-apalis rename to target/linux/imx6/image/bootscript-toradex_apalis diff --git a/target/linux/imx6/image/recovery-apalis b/target/linux/imx6/image/recovery-toradex_apalis similarity index 100% rename from target/linux/imx6/image/recovery-apalis rename to target/linux/imx6/image/recovery-toradex_apalis From 959eabf172ccf9bc5113ee6d6dc60913c423613b Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Mon, 29 Mar 2021 01:02:05 +0200 Subject: [PATCH 07/45] uboot-imx6: drop 'HIDDEN' flag from 'mx6cuboxi' define Signed-off-by: Piotr Dymacz --- package/boot/uboot-imx6/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/package/boot/uboot-imx6/Makefile b/package/boot/uboot-imx6/Makefile index d87b599eb8..ffe2f6d6fd 100644 --- a/package/boot/uboot-imx6/Makefile +++ b/package/boot/uboot-imx6/Makefile @@ -32,7 +32,6 @@ define U-Boot/mx6cuboxi UBOOT_IMAGE:=SPL u-boot.img UBOOT_MAKE_FLAGS:=SPL u-boot.img BUILD_DEVICES:=cubox-i - HIDDEN:=1 endef define U-Boot/wandboard From fab114f6f3fc0ede75297723fa20cbdef33328f5 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Mon, 29 Mar 2021 01:02:52 +0200 Subject: [PATCH 08/45] uboot-imx6: update BUILD_DEVICES values Signed-off-by: Piotr Dymacz --- package/boot/uboot-imx6/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/boot/uboot-imx6/Makefile b/package/boot/uboot-imx6/Makefile index ffe2f6d6fd..ed6074053a 100644 --- a/package/boot/uboot-imx6/Makefile +++ b/package/boot/uboot-imx6/Makefile @@ -24,19 +24,19 @@ define U-Boot/apalis_imx6 NAME:=Toradex Apalis UBOOT_IMAGE:=SPL u-boot.img u-boot-with-spl.imx UBOOT_MAKE_FLAGS:=SPL u-boot.img u-boot-with-spl.imx - BUILD_DEVICES:=apalis + BUILD_DEVICES:=toradex_apalis endef define U-Boot/mx6cuboxi NAME:=SolidRun Cubox-i boards UBOOT_IMAGE:=SPL u-boot.img UBOOT_MAKE_FLAGS:=SPL u-boot.img - BUILD_DEVICES:=cubox-i + BUILD_DEVICES:=solidrun_cubox-i endef define U-Boot/wandboard NAME:=Wandboard Dual Lite/Quad/Solo - BUILD_DEVICES:=wandboard + BUILD_DEVICES:=wandboard_dual endef UBOOT_TARGETS := \ From f13c0bffc2cc3d4e4fdec0a7d016c8cacfcf5489 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Sun, 28 Mar 2021 15:23:47 +0200 Subject: [PATCH 09/45] imx6: image: keep devices in alphabetical order Signed-off-by: Piotr Dymacz --- target/linux/imx6/image/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile index efd553efb9..b1e272ae2f 100644 --- a/target/linux/imx6/image/Makefile +++ b/target/linux/imx6/image/Makefile @@ -186,13 +186,6 @@ define Device/gateworks_ventana-large endef TARGET_DEVICES += gateworks_ventana-large -define Device/wandboard_dual - DEVICE_VENDOR := Wandboard - DEVICE_MODEL := Dual - DEVICE_DTS := imx6dl-wandboard -endef -TARGET_DEVICES += wandboard_dual - define Device/solidrun_cubox-i DEVICE_VENDOR := SolidRun DEVICE_MODEL := CuBox-i @@ -233,4 +226,11 @@ define Device/toradex_apalis endef TARGET_DEVICES += toradex_apalis +define Device/wandboard_dual + DEVICE_VENDOR := Wandboard + DEVICE_MODEL := Dual + DEVICE_DTS := imx6dl-wandboard +endef +TARGET_DEVICES += wandboard_dual + $(eval $(call BuildImage)) From 9a9990300547272338d265cfb9fed0c4d923fa8a Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Sun, 28 Mar 2021 15:31:12 +0200 Subject: [PATCH 10/45] imx6: image: cleanup variables order within device's defines Signed-off-by: Piotr Dymacz --- target/linux/imx6/image/Makefile | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile index b1e272ae2f..96d6a1caf9 100644 --- a/target/linux/imx6/image/Makefile +++ b/target/linux/imx6/image/Makefile @@ -158,18 +158,16 @@ define Device/gateworks_ventana imx6q-gw5910 \ imx6q-gw5912 \ imx6q-gw5913 - DEVICE_PACKAGES := kmod-sky2 kmod-sound-core kmod-sound-soc-imx kmod-sound-soc-imx-sgtl5000 \ - kmod-can kmod-can-flexcan kmod-can-raw \ - kmod-hwmon-gsc \ - kmod-leds-gpio kmod-pps-gpio \ - kobs-ng + DEVICE_PACKAGES := kmod-sky2 kmod-sound-core kmod-sound-soc-imx \ + kmod-sound-soc-imx-sgtl5000 kmod-can kmod-can-flexcan kmod-can-raw \ + kmod-hwmon-gsc kmod-leds-gpio kmod-pps-gpio kobs-ng + BOOT_SCRIPT := bootscript-gateworks_ventana KERNEL += | boot-overlay IMAGES := nand.ubi bootfs.tar.gz dtb - UBINIZE_PARTS = boot=$$(KDIR_KERNEL_IMAGE).boot.ubifs=15 - BOOT_SCRIPT := bootscript-gateworks_ventana IMAGE/nand.ubi := append-ubi IMAGE/bootfs.tar.gz := bootfs.tar.gz IMAGE/dtb := install-dtb + UBINIZE_PARTS = boot=$$(KDIR_KERNEL_IMAGE).boot.ubifs=15 PAGESIZE := 2048 BLOCKSIZE := 128k MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB @@ -189,15 +187,19 @@ TARGET_DEVICES += gateworks_ventana-large define Device/solidrun_cubox-i DEVICE_VENDOR := SolidRun DEVICE_MODEL := CuBox-i + DEVICE_NAME := cubox + DEVICE_DTS := \ + imx6q-cubox-i \ + imx6dl-cubox-i \ + imx6q-hummingboard \ + imx6dl-hummingboard + DEVICE_PACKAGES := kmod-drm-imx kmod-drm-imx-hdmi kmod-usb-hid + BOOT_SCRIPT := bootscript-solidrun_cubox + UBOOT := mx6cuboxi KERNEL := kernel-bin KERNEL_SUFFIX := -zImage - UBOOT := mx6cuboxi - BOOT_SCRIPT := bootscript-solidrun_cubox - DEVICE_NAME := cubox - DEVICE_PACKAGES := kmod-drm-imx kmod-drm-imx-hdmi kmod-usb-hid - DEVICE_DTS := imx6q-cubox-i imx6dl-cubox-i imx6q-hummingboard imx6dl-hummingboard - IMAGES := combined.bin dtb FILESYSTEMS := squashfs + IMAGES := combined.bin dtb IMAGE/combined.bin := append-rootfs | pad-extra 128k | imx6-sdcard IMAGE/dtb := install-dtb endef From 6f3a05ebb07570a15d0f8d3d7532272e71786781 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Fri, 2 Apr 2021 00:52:56 +0200 Subject: [PATCH 11/45] uboot-envtools: support uci-default config also per subtargets The current version of 'uboot-envtools' package generates dedicated uci-default file only per target. This change makes it possible to use subtarget-specific files, with name pattern: 'target_subtarget' (example: 'ath79_nand'). The subtarget-specific files will take precedence over target-specific one. Signed-off-by: Piotr Dymacz --- package/boot/uboot-envtools/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index 02bca9cea3..1ace390c40 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -73,9 +73,13 @@ define Package/uboot-envtools/install $(INSTALL_DIR) $(1)/lib $(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib $(INSTALL_DIR) $(1)/etc/uci-defaults - $(if $(wildcard ./files/$(BOARD)), \ - $(INSTALL_DATA) ./files/$(BOARD) \ - $(1)/etc/uci-defaults/30_uboot-envtools \ + $(if $(wildcard ./files/$(BOARD)_$(SUBTARGET)), \ + $(INSTALL_DATA) ./files/$(BOARD)_$(SUBTARGET) \ + $(1)/etc/uci-defaults/30_uboot-envtools, \ + $(if $(wildcard ./files/$(BOARD)), \ + $(INSTALL_DATA) ./files/$(BOARD) \ + $(1)/etc/uci-defaults/30_uboot-envtools \ + ) \ ) endef From 622f8ef577095f711e8f6561fe24d18b86133e7e Mon Sep 17 00:00:00 2001 From: Dirk Neukirchen Date: Thu, 20 May 2021 10:39:35 +0200 Subject: [PATCH 12/45] grub2: disable liblzma dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Florian Ekert reported: "I have build a fresh master branch recently, Since your last change [1] on grub2, I have now a new dependency on liblzma for the install package grub2-editenv. root@st-dev-07 /usr/lib # ldd /root/grub-editenv /lib/ld-musl-x86_64.so.1 (0x7f684b088000) liblzma.so.5 => /usr/lib/liblzma.so.5 (0x7f684b06d000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x7f684b059000) libc.so => /lib/ld-musl-x86_64.so.1 (0x7f684b088000) This was not the case before your update. root@st-dev-07 /usr/sbin # ldd /usr/sbin/grub-editenv /lib/ld-musl-x86_64.so.1 (0x7fd970176000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x7fd970162000) libc.so => /lib/ld-musl-x86_64.so.1 (0x7fd970176000) My build complains that it cannot satisfy the runtime package dependency for grub2-editenv. install -d -m0755 /home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/build_dir/target-x86_64_musl/linux-x86_64/grub-pc/grub-2.06~rc1/ipkg-x86_64/grub2-editenv/usr/sbin install -m0755 /home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/build_dir/target-x86_64_musl/linux-x86_64/grub-pc/grub-2.06~rc1/grub-editenv /home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/build_dir/target-x86_64_musl/linux-x86_64/grub-pc/grub-2.06~rc1/ipkg-x86_64/grub2-editenv/usr/sbin/ find /home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/build_dir/target-x86_64_musl/linux-x86_64/grub-pc/grub-2.06~rc1/ipkg-x86_64/grub2-editenv -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf Package grub2-editenv is missing dependencies for the following libraries: liblzma.so.5 make[2]: *** [Makefile:166: /home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/bin/APOS/feckert/master/master-Maggie-455-ga5edc0e8e/x86_64/targets/x86/64/packages/grub2-editenv_2.06~rc1-1_x86_64.ipk] Error 1 make[2]: Leaving directory '/home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/package/boot/grub2' time: package/boot/grub2/pc/compile#78.64#9.79#83.88 ERROR: package/boot/grub2 failed to build (build variant: pc). make[1]: *** [package/Makefile:116: package/boot/grub2/compile] Error 1 make[1]: Leaving directory '/home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt' make: *** [/home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/include/toplevel.mk:230: package/boot/grub2/compile] Error 2 If I add the following changes to the package all works as expected. - DEPENDS:=@TARGET_x86 + DEPENDS:=@TARGET_x86 +liblzma VARIANT:=pc endef This is a hotfix but I dont´t think this is the final solution, because lzma is provided by the package xz. And This is maintained in the package feed [not the core]" Dirk stated & offered his patch to disable liblzma and thus resolve the 'out of core dependency' problem: "LZMA is used in mkimage.c disabling it prints Without liblzma (no support for XZ-compressed mips images) (explicitly disabled) (see configure.ac) liblzma is autodetected so this issue was present but hidden somehow [unsure: grep/image generation does not use grub with that option] OpenWrt does not use that feature currently [!] some scripts and examples use --compression=xz or -C xz and those will break grub has an internal xzlib for different "lzma" functionality (ext. LIBLZMA from XZ (GRUB_COMPRESSION_XZ) vs. GRUB_COMPRESSION_LZMA)" Hopefully fixes e74d81ece2e2932a4f370d8e6d180061a6a2c229 and doesn't break anything else. Signed-off-by: Dirk Neukirchen [include Florian's description of how problem 1st encountered] [bump package release] Signed-off-by: Kevin Darbyshire-Bryant --- package/boot/grub2/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile index b3cb5e076f..a57486b91d 100644 --- a/package/boot/grub2/Makefile +++ b/package/boot/grub2/Makefile @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=grub PKG_CPE_ID:=cpe:/a:gnu:grub2 PKG_VERSION:=2.06~rc1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://alpha.gnu.org/gnu/grub @@ -65,6 +65,7 @@ CONFIGURE_ARGS += \ --disable-nls \ --disable-device-mapper \ --disable-libzfs \ + --disable-liblzma \ --disable-grub-mkfont \ --with-platform=$(BUILD_VARIANT) From a9ebd3a0ea968c7f28f9c0763089b67610ce1c1b Mon Sep 17 00:00:00 2001 From: Chen Minqiang Date: Thu, 20 May 2021 16:34:28 +0800 Subject: [PATCH 13/45] busybox: nslookup applet link with resolv if use glibc This fixed b36b8b6929c6d6b17edddfb4597cf6a26a991ed0 ("busybox: remove nslookup_lede/openwrt.patch") It is likely dropped by mistake, This add back the changes Signed-off-by: Chen Minqiang --- package/utils/busybox/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile index 1e7d9dd333..32f0d2c755 100644 --- a/package/utils/busybox/Makefile +++ b/package/utils/busybox/Makefile @@ -98,6 +98,10 @@ endif LDLIBS += $(call BUSYBOX_IF_ENABLED,PAM,pam pam_misc pthread) +ifeq ($(CONFIG_USE_GLIBC),y) + LDLIBS += $(call BUSYBOX_IF_ENABLED,NSLOOKUP,resolv) +endif + ifeq ($(BUILD_VARIANT),selinux) LDLIBS += selinux sepol endif From ef9b103107aebd1a54f4360af3d9cf28d0544f13 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Thu, 6 May 2021 01:48:04 +0200 Subject: [PATCH 14/45] wolfssl: always export wc_ecc_set_rng Since commit 6467de5a8840 ("Randomize z ordinates in scalar mult when timing resistant") wolfssl requires a RNG for an EC key when the hardened built option is selected. wc_ecc_set_rng is only available when built hardened, so there is no safe way to install the RNG to the key regardless whether or not wolfssl is compiled hardened. Always export wc_ecc_set_rng so tools such as hostapd can install RNG regardless of the built settings for wolfssl. Signed-off-by: David Bauer --- package/libs/wolfssl/Makefile | 2 +- .../libs/wolfssl/patches/200-ecc-rng.patch | 50 +++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 package/libs/wolfssl/patches/200-ecc-rng.patch diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index 53cd932d1f..030a0224f5 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wolfssl PKG_VERSION:=4.7.0-stable -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION) diff --git a/package/libs/wolfssl/patches/200-ecc-rng.patch b/package/libs/wolfssl/patches/200-ecc-rng.patch new file mode 100644 index 0000000000..2d33c06209 --- /dev/null +++ b/package/libs/wolfssl/patches/200-ecc-rng.patch @@ -0,0 +1,50 @@ +Since commit 6467de5a8840 ("Randomize z ordinates in scalar +mult when timing resistant") wolfssl requires a RNG for an EC +key when the hardened built option is selected. + +wc_ecc_set_rng is only available when built hardened, so there +is no safe way to install the RNG to the key regardless whether +or not wolfssl is compiled hardened. + +Always export wc_ecc_set_rng so tools such as hostapd can install +RNG regardless of the built settings for wolfssl. + +--- a/wolfcrypt/src/ecc.c ++++ b/wolfcrypt/src/ecc.c +@@ -10293,21 +10293,21 @@ void wc_ecc_fp_free(void) + + #endif /* FP_ECC */ + +-#ifdef ECC_TIMING_RESISTANT + int wc_ecc_set_rng(ecc_key* key, WC_RNG* rng) + { + int err = 0; + ++#ifdef ECC_TIMING_RESISTANT + if (key == NULL) { + err = BAD_FUNC_ARG; + } + else { + key->rng = rng; + } ++#endif + + return err; + } +-#endif + + #ifdef HAVE_ECC_ENCRYPT + +--- a/wolfssl/wolfcrypt/ecc.h ++++ b/wolfssl/wolfcrypt/ecc.h +@@ -584,10 +584,8 @@ WOLFSSL_API + void wc_ecc_fp_free(void); + WOLFSSL_LOCAL + void wc_ecc_fp_init(void); +-#ifdef ECC_TIMING_RESISTANT + WOLFSSL_API + int wc_ecc_set_rng(ecc_key* key, WC_RNG* rng); +-#endif + + WOLFSSL_API + int wc_ecc_set_curve(ecc_key* key, int keysize, int curve_id); From ddcb970274c011d3db611ec39350ee4704ff0e02 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Thu, 6 May 2021 01:53:49 +0200 Subject: [PATCH 15/45] hostapd: wolfssl: add RNG to EC key Since upstream commit 6467de5a8840 ("Randomize z ordinates in scalar mult when timing resistant") WolfSSL requires a RNG for the EC key when built hardened which is the default. Set the RNG for the EC key to fix connections for OWE clients. Signed-off-by: David Bauer --- package/network/services/hostapd/Makefile | 2 +- .../0001-wolfssl-init-RNG-with-ECC-key.patch | 48 +++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 package/network/services/hostapd/patches/0001-wolfssl-init-RNG-with-ECC-key.patch diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index bd2a7c96ad..0779421b8d 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_RELEASE:=32 +PKG_RELEASE:=33 PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git diff --git a/package/network/services/hostapd/patches/0001-wolfssl-init-RNG-with-ECC-key.patch b/package/network/services/hostapd/patches/0001-wolfssl-init-RNG-with-ECC-key.patch new file mode 100644 index 0000000000..89d111e991 --- /dev/null +++ b/package/network/services/hostapd/patches/0001-wolfssl-init-RNG-with-ECC-key.patch @@ -0,0 +1,48 @@ +From 21ce83b4ae2b9563175fdb4fc4312096cc399cf8 Mon Sep 17 00:00:00 2001 +From: David Bauer +Date: Wed, 5 May 2021 00:44:34 +0200 +Subject: [PATCH] wolfssl: add RNG to EC key + +Since upstream commit 6467de5a8840 ("Randomize z ordinates in +scalar mult when timing resistant") WolfSSL requires a RNG for +the EC key when built hardened which is the default. + +Set the RNG for the EC key to fix connections for OWE clients. + +Signed-off-by: David Bauer +--- + src/crypto/crypto_wolfssl.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/crypto/crypto_wolfssl.c b/src/crypto/crypto_wolfssl.c +index 2e4bf8962..ed2528159 100644 +--- a/src/crypto/crypto_wolfssl.c ++++ b/src/crypto/crypto_wolfssl.c +@@ -1303,6 +1303,7 @@ int ecc_projective_add_point(ecc_point *P, ecc_point *Q, ecc_point *R, + + struct crypto_ec { + ecc_key key; ++ WC_RNG rng; + mp_int a; + mp_int prime; + mp_int order; +@@ -1357,6 +1358,8 @@ struct crypto_ec * crypto_ec_init(int group) + return NULL; + + if (wc_ecc_init(&e->key) != 0 || ++ wc_InitRng(&e->rng) != 0 || ++ wc_ecc_set_rng(&e->key, &e->rng) != 0 || + wc_ecc_set_curve(&e->key, 0, curve_id) != 0 || + mp_init(&e->a) != MP_OKAY || + mp_init(&e->prime) != MP_OKAY || +@@ -1388,6 +1391,7 @@ void crypto_ec_deinit(struct crypto_ec* e) + mp_clear(&e->order); + mp_clear(&e->prime); + mp_clear(&e->a); ++ wc_FreeRng(&e->rng); + wc_ecc_free(&e->key); + os_free(e); + } +-- +2.31.1 + From 8615573ac1d9bcb95cf30ff0ff7704ea6a4d20a8 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Wed, 19 May 2021 12:14:40 +0100 Subject: [PATCH 16/45] kernel: bump 5.10 to 5.10.38 Automatically refreshed: apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch generic/backport-5.10/610-v5.13-31-net-ethernet-mtk_eth_soc-fix-parsing-packets-in-GDM.patch generic/backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch generic/backport-5.10/610-v5.13-33-net-ethernet-mtk_eth_soc-add-flow-offloading-support.patch generic/hack-5.10/204-module_strip.patch generic/hack-5.10/911-kobject_add_broadcast_uevent.patch ipq806x/patches-5.10/104-1-drivers-thermal-tsens-Add-VER_0-tsens-version.patch ipq806x/patches-5.10/104-8-drivers-thermal-tsens-Add-support-for-ipq8064-tsens.patch Deleted (reverse-appliable): generic/backport-5.10/610-v5.13-37-net-ethernet-mtk_eth_soc-fix-RX-VLAN-offload.patch ipq806x/patches-5.10/106-5.13-net-stmmac-Set-FIFO-sizes-for-ipq806x.patch Signed-off-by: Rui Salvaterra --- include/kernel-version.mk | 4 +- .../802-usb-xhci-force-msi-renesas-xhci.patch | 2 +- ...k_eth_soc-fix-parsing-packets-in-GDM.patch | 2 +- ..._eth_soc-add-support-for-initializin.patch | 6 +- ..._eth_soc-add-flow-offloading-support.patch | 4 +- ...rnet-mtk_eth_soc-fix-RX-VLAN-offload.patch | 38 ------- .../generic/hack-5.10/204-module_strip.patch | 2 +- .../911-kobject_add_broadcast_uevent.patch | 2 +- ...hermal-tsens-Add-VER_0-tsens-version.patch | 12 +-- ...-tsens-Add-support-for-ipq8064-tsens.patch | 2 +- ...et-stmmac-Set-FIFO-sizes-for-ipq806x.patch | 99 ------------------- 11 files changed, 18 insertions(+), 155 deletions(-) delete mode 100644 target/linux/generic/backport-5.10/610-v5.13-37-net-ethernet-mtk_eth_soc-fix-RX-VLAN-offload.patch delete mode 100644 target/linux/ipq806x/patches-5.10/106-5.13-net-stmmac-Set-FIFO-sizes-for-ipq806x.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 494d76d4b8..c254acf62d 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL endif LINUX_VERSION-5.4 = .117 -LINUX_VERSION-5.10 = .37 +LINUX_VERSION-5.10 = .38 LINUX_KERNEL_HASH-5.4.117 = 4e989b5775830092e5c76b5cca65ebff862ad0c87d0b58c3a20d415c3d4ec770 -LINUX_KERNEL_HASH-5.10.37 = a8d5e3309dafc484eb70f94747a6efffa29a79bae651ae126333e913c00be077 +LINUX_KERNEL_HASH-5.10.38 = 32f25ab128f9e819fd5de28ac4a7c6c2dac96340cff4b03338bcb4edecbbf12f remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch index 6d217e160f..038213bd00 100644 --- a/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch @@ -13,7 +13,7 @@ produce a noisy warning. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -261,6 +261,7 @@ static void xhci_pci_quirks(struct devic +@@ -265,6 +265,7 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x0015) { xhci->quirks |= XHCI_RESET_ON_RESUME; xhci->quirks |= XHCI_ZERO_64B_REGS; diff --git a/target/linux/generic/backport-5.10/610-v5.13-31-net-ethernet-mtk_eth_soc-fix-parsing-packets-in-GDM.patch b/target/linux/generic/backport-5.10/610-v5.13-31-net-ethernet-mtk_eth_soc-fix-parsing-packets-in-GDM.patch index 75a4128b7f..8361c992ae 100644 --- a/target/linux/generic/backport-5.10/610-v5.13-31-net-ethernet-mtk_eth_soc-fix-parsing-packets-in-GDM.patch +++ b/target/linux/generic/backport-5.10/610-v5.13-31-net-ethernet-mtk_eth_soc-fix-parsing-packets-in-GDM.patch @@ -58,7 +58,7 @@ Signed-off-by: Pablo Neira Ayuso #define MTK_GDMA_ICS_EN BIT(22) #define MTK_GDMA_TCS_EN BIT(21) #define MTK_GDMA_UCS_EN BIT(20) -@@ -304,6 +305,7 @@ +@@ -305,6 +306,7 @@ #define RX_DMA_L4_VALID_PDMA BIT(30) /* when PDMA is used */ #define RX_DMA_FPORT_SHIFT 19 #define RX_DMA_FPORT_MASK 0x7 diff --git a/target/linux/generic/backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch b/target/linux/generic/backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch index e52e96ade7..73697615c3 100644 --- a/target/linux/generic/backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch +++ b/target/linux/generic/backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch @@ -105,7 +105,7 @@ Signed-off-by: Pablo Neira Ayuso #define MTK_GDMA_DROP_ALL 0x7777 /* Unicast Filter MAC Address Register - Low */ -@@ -301,6 +303,12 @@ +@@ -302,6 +304,12 @@ #define RX_DMA_VID(_x) ((_x) & 0xfff) /* QDMA descriptor rxd4 */ @@ -118,7 +118,7 @@ Signed-off-by: Pablo Neira Ayuso #define RX_DMA_L4_VALID BIT(24) #define RX_DMA_L4_VALID_PDMA BIT(30) /* when PDMA is used */ #define RX_DMA_FPORT_SHIFT 19 -@@ -798,6 +806,7 @@ struct mtk_soc_data { +@@ -799,6 +807,7 @@ struct mtk_soc_data { u32 caps; u32 required_clks; bool required_pctl; @@ -126,7 +126,7 @@ Signed-off-by: Pablo Neira Ayuso netdev_features_t hw_features; }; -@@ -897,6 +906,8 @@ struct mtk_eth { +@@ -898,6 +907,8 @@ struct mtk_eth { u32 tx_int_status_reg; u32 rx_dma_l4_valid; int ip_align; diff --git a/target/linux/generic/backport-5.10/610-v5.13-33-net-ethernet-mtk_eth_soc-add-flow-offloading-support.patch b/target/linux/generic/backport-5.10/610-v5.13-33-net-ethernet-mtk_eth_soc-add-flow-offloading-support.patch index 82e3ddec3f..030c3fda9c 100644 --- a/target/linux/generic/backport-5.10/610-v5.13-33-net-ethernet-mtk_eth_soc-add-flow-offloading-support.patch +++ b/target/linux/generic/backport-5.10/610-v5.13-33-net-ethernet-mtk_eth_soc-add-flow-offloading-support.patch @@ -60,7 +60,7 @@ Signed-off-by: Pablo Neira Ayuso #define MTK_HW_FEATURES_MT7628 (NETIF_F_SG | NETIF_F_RXCSUM) #define NEXT_DESP_IDX(X, Y) (((X) + 1) & ((Y) - 1)) -@@ -908,6 +910,7 @@ struct mtk_eth { +@@ -909,6 +911,7 @@ struct mtk_eth { int ip_align; struct mtk_ppe ppe; @@ -68,7 +68,7 @@ Signed-off-by: Pablo Neira Ayuso }; /* struct mtk_mac - the structure that holds the info about the MACs of the -@@ -952,4 +955,9 @@ int mtk_gmac_sgmii_path_setup(struct mtk +@@ -953,4 +956,9 @@ int mtk_gmac_sgmii_path_setup(struct mtk int mtk_gmac_gephy_path_setup(struct mtk_eth *eth, int mac_id); int mtk_gmac_rgmii_path_setup(struct mtk_eth *eth, int mac_id); diff --git a/target/linux/generic/backport-5.10/610-v5.13-37-net-ethernet-mtk_eth_soc-fix-RX-VLAN-offload.patch b/target/linux/generic/backport-5.10/610-v5.13-37-net-ethernet-mtk_eth_soc-fix-RX-VLAN-offload.patch deleted file mode 100644 index 7020fd7143..0000000000 --- a/target/linux/generic/backport-5.10/610-v5.13-37-net-ethernet-mtk_eth_soc-fix-RX-VLAN-offload.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 3f57d8c40fea9b20543cab4da12f4680d2ef182c Mon Sep 17 00:00:00 2001 -From: Felix Fietkau -Date: Thu, 22 Apr 2021 22:20:54 -0700 -Subject: [PATCH] net: ethernet: mtk_eth_soc: fix RX VLAN offload - -The VLAN ID in the rx descriptor is only valid if the RX_DMA_VTAG bit is -set. Fixes frames wrongly marked with VLAN tags. - -Signed-off-by: Felix Fietkau -[Ilya: fix commit message] -Signed-off-by: Ilya Lipnitskiy -Signed-off-by: David S. Miller ---- - drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- - drivers/net/ethernet/mediatek/mtk_eth_soc.h | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - ---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c -+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1319,7 +1319,7 @@ static int mtk_poll_rx(struct napi_struc - skb->protocol = eth_type_trans(skb, netdev); - - if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX && -- RX_DMA_VID(trxd.rxd3)) -+ (trxd.rxd2 & RX_DMA_VTAG)) - __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), - RX_DMA_VID(trxd.rxd3)); - skb_record_rx_queue(skb, 0); ---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h -+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -300,6 +300,7 @@ - #define RX_DMA_LSO BIT(30) - #define RX_DMA_PLEN0(_x) (((_x) & 0x3fff) << 16) - #define RX_DMA_GET_PLEN0(_x) (((_x) >> 16) & 0x3fff) -+#define RX_DMA_VTAG BIT(15) - - /* QDMA descriptor rxd3 */ - #define RX_DMA_VID(_x) ((_x) & 0xfff) diff --git a/target/linux/generic/hack-5.10/204-module_strip.patch b/target/linux/generic/hack-5.10/204-module_strip.patch index 491c21d5e0..3379c5f3d6 100644 --- a/target/linux/generic/hack-5.10/204-module_strip.patch +++ b/target/linux/generic/hack-5.10/204-module_strip.patch @@ -184,7 +184,7 @@ Signed-off-by: Felix Fietkau } static void write_buf(struct buffer *b, const char *fname) -@@ -2643,7 +2653,9 @@ int main(int argc, char **argv) +@@ -2630,7 +2640,9 @@ int main(int argc, char **argv) add_staging_flag(&buf, mod->name); err |= add_versions(&buf, mod); add_depends(&buf, mod); diff --git a/target/linux/generic/hack-5.10/911-kobject_add_broadcast_uevent.patch b/target/linux/generic/hack-5.10/911-kobject_add_broadcast_uevent.patch index 1f3002da4c..a487d55193 100644 --- a/target/linux/generic/hack-5.10/911-kobject_add_broadcast_uevent.patch +++ b/target/linux/generic/hack-5.10/911-kobject_add_broadcast_uevent.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau #endif /* _KOBJECT_H_ */ --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c -@@ -690,6 +690,43 @@ int add_uevent_var(struct kobj_uevent_en +@@ -691,6 +691,43 @@ int add_uevent_var(struct kobj_uevent_en EXPORT_SYMBOL_GPL(add_uevent_var); #if defined(CONFIG_NET) diff --git a/target/linux/ipq806x/patches-5.10/104-1-drivers-thermal-tsens-Add-VER_0-tsens-version.patch b/target/linux/ipq806x/patches-5.10/104-1-drivers-thermal-tsens-Add-VER_0-tsens-version.patch index cf8fd7cf61..8627244c59 100644 --- a/target/linux/ipq806x/patches-5.10/104-1-drivers-thermal-tsens-Add-VER_0-tsens-version.patch +++ b/target/linux/ipq806x/patches-5.10/104-1-drivers-thermal-tsens-Add-VER_0-tsens-version.patch @@ -166,7 +166,7 @@ Reported-by: Dan Carpenter if (tsens_version(priv) > VER_0_1) { for (i = VER_MAJOR; i <= VER_STEP; i++) { priv->rf[i] = devm_regmap_field_alloc(dev, priv->srot_map, -@@ -769,6 +818,10 @@ int __init init_common(struct tsens_priv +@@ -771,6 +820,10 @@ int __init init_common(struct tsens_priv ret = PTR_ERR(priv->rf[TSENS_EN]); goto err_put_device; } @@ -177,7 +177,7 @@ Reported-by: Dan Carpenter ret = regmap_field_read(priv->rf[TSENS_EN], &enabled); if (ret) goto err_put_device; -@@ -791,6 +844,19 @@ int __init init_common(struct tsens_priv +@@ -793,6 +846,19 @@ int __init init_common(struct tsens_priv goto err_put_device; } @@ -197,7 +197,7 @@ Reported-by: Dan Carpenter /* This loop might need changes if enum regfield_ids is reordered */ for (j = LAST_TEMP_0; j <= UP_THRESH_15; j += 16) { for (i = 0; i < priv->feat->max_sensors; i++) { -@@ -806,7 +872,7 @@ int __init init_common(struct tsens_priv +@@ -808,7 +874,7 @@ int __init init_common(struct tsens_priv } } @@ -206,7 +206,7 @@ Reported-by: Dan Carpenter /* Loop might need changes if enum regfield_ids is reordered */ for (j = CRITICAL_STATUS_0; j <= CRIT_THRESH_15; j += 16) { for (i = 0; i < priv->feat->max_sensors; i++) { -@@ -844,7 +910,11 @@ int __init init_common(struct tsens_priv +@@ -846,7 +912,11 @@ int __init init_common(struct tsens_priv } spin_lock_init(&priv->ul_lock); @@ -219,7 +219,7 @@ Reported-by: Dan Carpenter tsens_debug_init(op); err_put_device: -@@ -943,10 +1013,19 @@ static int tsens_register_irq(struct tse +@@ -945,10 +1015,19 @@ static int tsens_register_irq(struct tse if (irq == -ENXIO) ret = 0; } else { @@ -243,7 +243,7 @@ Reported-by: Dan Carpenter if (ret) dev_err(&pdev->dev, "%s: failed to get irq\n", __func__); -@@ -975,6 +1054,19 @@ static int tsens_register(struct tsens_p +@@ -977,6 +1056,19 @@ static int tsens_register(struct tsens_p priv->ops->enable(priv, i); } diff --git a/target/linux/ipq806x/patches-5.10/104-8-drivers-thermal-tsens-Add-support-for-ipq8064-tsens.patch b/target/linux/ipq806x/patches-5.10/104-8-drivers-thermal-tsens-Add-support-for-ipq8064-tsens.patch index a6ecac1cae..127abaefc3 100644 --- a/target/linux/ipq806x/patches-5.10/104-8-drivers-thermal-tsens-Add-support-for-ipq8064-tsens.patch +++ b/target/linux/ipq806x/patches-5.10/104-8-drivers-thermal-tsens-Add-support-for-ipq8064-tsens.patch @@ -14,7 +14,7 @@ Reviewed-by: Thara Gopinath --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c -@@ -966,6 +966,9 @@ static SIMPLE_DEV_PM_OPS(tsens_pm_ops, t +@@ -968,6 +968,9 @@ static SIMPLE_DEV_PM_OPS(tsens_pm_ops, t static const struct of_device_id tsens_table[] = { { diff --git a/target/linux/ipq806x/patches-5.10/106-5.13-net-stmmac-Set-FIFO-sizes-for-ipq806x.patch b/target/linux/ipq806x/patches-5.10/106-5.13-net-stmmac-Set-FIFO-sizes-for-ipq806x.patch deleted file mode 100644 index 894edaccf9..0000000000 --- a/target/linux/ipq806x/patches-5.10/106-5.13-net-stmmac-Set-FIFO-sizes-for-ipq806x.patch +++ /dev/null @@ -1,99 +0,0 @@ -From patchwork Sat Mar 13 13:18:26 2021 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Jonathan McDowell -X-Patchwork-Id: 12136795 -X-Patchwork-Delegate: kuba@kernel.org -Return-Path: -X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on - aws-us-west-2-korg-lkml-1.web.codeaurora.org -X-Spam-Level: -X-Spam-Status: No, score=-15.1 required=3.0 tests=BAYES_00,DKIM_INVALID, - DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, - MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 - autolearn=unavailable autolearn_force=no version=3.4.0 -Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) - by smtp.lore.kernel.org (Postfix) with ESMTP id 90AB7C433DB - for ; Sat, 13 Mar 2021 14:03:56 +0000 (UTC) -Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) - by mail.kernel.org (Postfix) with ESMTP id 58E0464F18 - for ; Sat, 13 Mar 2021 14:03:56 +0000 (UTC) -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S233791AbhCMODW (ORCPT ); - Sat, 13 Mar 2021 09:03:22 -0500 -Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52042 "EHLO - lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S233478AbhCMOCx (ORCPT - ); Sat, 13 Mar 2021 09:02:53 -0500 -X-Greylist: delayed 2658 seconds by postgrey-1.37 at - lindbergh.monkeyblade.net; Sat, 13 Mar 2021 06:02:53 PST -Received: from the.earth.li (the.earth.li - [IPv6:2a00:1098:86:4d:c0ff:ee:15:900d]) - by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FE3FC061574; - Sat, 13 Mar 2021 06:02:53 -0800 (PST) -DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=earth.li; - s=the; - h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date:Sender: - Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: - Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: - In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: - List-Post:List-Owner:List-Archive; - bh=QOTdjy1PdYeDQ1fUENDrh0RtMG0coACWNQ4YsZbgl5w=; - b=DeTr+9knNkPOvtIi2OlW73HS3t - slxWRqQmC/Qd+tyDE8Lnj4oD+NFf5isDoaYYYhiPQ8iT/IOWEUz6DODzLTEBHd1WG9KYfSqzwFT70 - 7pdoIUdBZOPtb0r/1WZqZHRog4L3uDDlSBHRkO6SaLFE0zu6nunAVePrw4XLLmC9bJGsxaEmVvJ4N - zAgW5ejJ2lWOVgTIKSiBHTnLvkLbkSUT3inboIq/iEhEMGyBD8Zio1md1EU+8pQugFxwTmI5hqZ8M - RBYRHIUBaaivkhOJptSZm3vns90mjlM/uDY69gA+jRAsvt2mhWRHSwLv8PJUZ5sB0SenvC1WcPH1S - zAB6oEag==; -Received: from noodles by the.earth.li with local (Exim 4.92) - (envelope-from ) - id 1lL49y-0004kB-SB; Sat, 13 Mar 2021 13:18:26 +0000 -Date: Sat, 13 Mar 2021 13:18:26 +0000 -From: Jonathan McDowell -To: Giuseppe Cavallaro , - Alexandre Torgue , - Jose Abreu , - David Miller , - Jakub Kicinski , - Maxime Coquelin , - netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, - linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org -Subject: [PATCH net-next] net: stmmac: Set FIFO sizes for ipq806x -Message-ID: <20210313131826.GA17553@earth.li> -MIME-Version: 1.0 -Content-Disposition: inline -User-Agent: Mutt/1.10.1 (2018-07-13) -Precedence: bulk -List-ID: -X-Mailing-List: netdev@vger.kernel.org -X-Patchwork-Delegate: kuba@kernel.org - -Commit eaf4fac47807 ("net: stmmac: Do not accept invalid MTU values") -started using the TX FIFO size to verify what counts as a valid MTU -request for the stmmac driver. This is unset for the ipq806x variant. -Looking at older patches for this it seems the RX + TXs buffers can be -up to 8k, so set appropriately. - -(I sent this as an RFC patch in June last year, but received no replies. -I've been running with this on my hardware (a MikroTik RB3011) since -then with larger MTUs to support both the internal qca8k switch and -VLANs with no problems. Without the patch it's impossible to set the -larger MTU required to support this.) - -Signed-off-by: Jonathan McDowell ---- - drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c -+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c -@@ -405,6 +405,8 @@ static int ipq806x_gmac_probe(struct pla - plat_dat->bsp_priv = gmac; - plat_dat->fix_mac_speed = ipq806x_gmac_fix_mac_speed; - plat_dat->multicast_filter_bins = 0; -+ plat_dat->tx_fifo_size = 8192; -+ plat_dat->rx_fifo_size = 8192; - - err = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); - if (err) From f726b37b681866145701bd1324c9c654312fa779 Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Sat, 22 May 2021 13:10:57 +0100 Subject: [PATCH 17/45] kernel: bump 5.10 to 5.10.39 Automatically refreshed: generic/pending-5.10/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch Signed-off-by: Kevin Darbyshire-Bryant --- include/kernel-version.mk | 4 +-- ...Add-support-for-MAP-E-FMRs-mesh-mode.patch | 30 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index c254acf62d..1fc005f895 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL endif LINUX_VERSION-5.4 = .117 -LINUX_VERSION-5.10 = .38 +LINUX_VERSION-5.10 = .39 LINUX_KERNEL_HASH-5.4.117 = 4e989b5775830092e5c76b5cca65ebff862ad0c87d0b58c3a20d415c3d4ec770 -LINUX_KERNEL_HASH-5.10.38 = 32f25ab128f9e819fd5de28ac4a7c6c2dac96340cff4b03338bcb4edecbbf12f +LINUX_KERNEL_HASH-5.10.39 = 5738a515ca97853481767360c568eae46c8d777d98a69e018a3299baa6b3f614 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/generic/pending-5.10/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/pending-5.10/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index 924baa0607..ddb94fbe55 100644 --- a/target/linux/generic/pending-5.10/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/pending-5.10/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -154,7 +154,7 @@ Signed-off-by: Steven Barth } return &ip6n->tnls[prio][h]; } -@@ -406,6 +425,12 @@ ip6_tnl_dev_uninit(struct net_device *de +@@ -405,6 +424,12 @@ ip6_tnl_dev_uninit(struct net_device *de struct net *net = t->net; struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id); @@ -167,7 +167,7 @@ Signed-off-by: Steven Barth if (dev == ip6n->fb_tnl_dev) RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL); else -@@ -822,6 +847,107 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t, +@@ -821,6 +846,107 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t, } EXPORT_SYMBOL_GPL(ip6_tnl_rcv_ctl); @@ -275,7 +275,7 @@ Signed-off-by: Steven Barth static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb, const struct tnl_ptk_info *tpi, struct metadata_dst *tun_dst, -@@ -874,6 +1000,27 @@ static int __ip6_tnl_rcv(struct ip6_tnl +@@ -873,6 +999,27 @@ static int __ip6_tnl_rcv(struct ip6_tnl skb_reset_network_header(skb); memset(skb->cb, 0, sizeof(struct inet6_skb_parm)); @@ -303,7 +303,7 @@ Signed-off-by: Steven Barth __skb_tunnel_rx(skb, tunnel->dev, tunnel->net); err = dscp_ecn_decapsulate(tunnel, ipv6h, skb); -@@ -1025,6 +1172,7 @@ static void init_tel_txopt(struct ipv6_t +@@ -1024,6 +1171,7 @@ static void init_tel_txopt(struct ipv6_t opt->ops.opt_nflen = 8; } @@ -311,7 +311,7 @@ Signed-off-by: Steven Barth /** * ip6_tnl_addr_conflict - compare packet addresses to tunnel's own * @t: the outgoing tunnel device -@@ -1307,6 +1455,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str +@@ -1306,6 +1454,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str u8 protocol) { struct ip6_tnl *t = netdev_priv(dev); @@ -319,7 +319,7 @@ Signed-off-by: Steven Barth struct ipv6hdr *ipv6h; const struct iphdr *iph; int encap_limit = -1; -@@ -1406,6 +1555,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str +@@ -1405,6 +1554,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str fl6.flowi6_uid = sock_net_uid(dev_net(dev), NULL); dsfield = INET_ECN_encapsulate(dsfield, orig_dsfield); @@ -338,7 +338,7 @@ Signed-off-by: Steven Barth if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6)) return -1; -@@ -1556,6 +1717,14 @@ ip6_tnl_change(struct ip6_tnl *t, const +@@ -1555,6 +1716,14 @@ ip6_tnl_change(struct ip6_tnl *t, const t->parms.link = p->link; t->parms.proto = p->proto; t->parms.fwmark = p->fwmark; @@ -353,7 +353,7 @@ Signed-off-by: Steven Barth dst_cache_reset(&t->dst_cache); ip6_tnl_link_config(t); return 0; -@@ -1594,6 +1763,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ +@@ -1593,6 +1762,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ p->flowinfo = u->flowinfo; p->link = u->link; p->proto = u->proto; @@ -361,7 +361,7 @@ Signed-off-by: Steven Barth memcpy(p->name, u->name, sizeof(u->name)); } -@@ -1979,6 +2149,15 @@ static int ip6_tnl_validate(struct nlatt +@@ -1978,6 +2148,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) { -@@ -2016,6 +2195,46 @@ static void ip6_tnl_netlink_parms(struct +@@ -2015,6 +2194,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 bool ip6_tnl_netlink_encap_parms(struct nlattr *data[], -@@ -2131,6 +2350,12 @@ static void ip6_tnl_dellink(struct net_d +@@ -2130,6 +2349,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) + -@@ -2160,6 +2385,24 @@ static size_t ip6_tnl_get_size(const str +@@ -2159,6 +2384,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; } -@@ -2167,6 +2410,9 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2166,6 +2409,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) || -@@ -2176,9 +2422,27 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2175,9 +2421,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) || -@@ -2218,6 +2482,7 @@ static const struct nla_policy ip6_tnl_p +@@ -2217,6 +2481,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 }, From 3e1c92f9e1be108df2042ab211cc8d68938e6af9 Mon Sep 17 00:00:00 2001 From: John Audia Date: Tue, 11 May 2021 11:50:27 -0400 Subject: [PATCH 18/45] kernel: bump 5.4 to 5.4.118 Manually rebased: ath79/patches-5.4/0033-spi-ath79-drop-pdata-support.patch Removed uneeded patch: ath79/patches-5.4/0050-spi-ath79-remove-spi-master-setup-and-cleanup-assign.patch All other patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800 Run-tested: ipq806x/R7800 No dmesg regressions, everything functional Signed-off-by: John Audia --- include/kernel-version.mk | 4 +-- .../802-usb-xhci-force-msi-renesas-xhci.patch | 2 +- .../0033-spi-ath79-drop-pdata-support.patch | 5 ++-- ...-spi-master-setup-and-cleanup-assign.patch | 28 ------------------- ...th79-Implement-the-spi_mem-interface.patch | 2 +- ...043-MMC-added-alternative-MMC-driver.patch | 8 +++--- ...hci_fixup_endpoint-for-interval-adju.patch | 4 +-- ...ore-event-ring-segment-table-entries.patch | 4 +-- ...-0504-mmc-sdhci-Silence-MMC-warnings.patch | 4 +-- ...support-for-performing-fake-doorbell.patch | 4 +-- ...25519-support-assemblers-with-no-adx.patch | 2 +- .../generic/hack-5.4/204-module_strip.patch | 4 +-- ...5-usb-dwc3-add-otg-properties-update.patch | 2 +- ...host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch | 2 +- ...-host-xhci-add-.bus_suspend-override.patch | 2 +- ...l-armada-37xx-Set-pcie_reset_pin-to-.patch | 2 +- ...l-armada-37xx-Move-PCIe-comphy-handl.patch | 2 +- ...l-armada-37xx-Move-PCIe-max-link-spe.patch | 2 +- 18 files changed, 27 insertions(+), 56 deletions(-) delete mode 100644 target/linux/ath79/patches-5.4/0050-spi-ath79-remove-spi-master-setup-and-cleanup-assign.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 1fc005f895..dcf884af24 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-5.4 = .117 +LINUX_VERSION-5.4 = .118 LINUX_VERSION-5.10 = .39 -LINUX_KERNEL_HASH-5.4.117 = 4e989b5775830092e5c76b5cca65ebff862ad0c87d0b58c3a20d415c3d4ec770 +LINUX_KERNEL_HASH-5.4.118 = d970509c274fd2f5a9257a63c56f7a8b3e50ec12015bd6864dc4b76b38dc821b LINUX_KERNEL_HASH-5.10.39 = 5738a515ca97853481767360c568eae46c8d777d98a69e018a3299baa6b3f614 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) diff --git a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch index 9d474f2d62..f248407fdb 100644 --- a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch @@ -23,7 +23,7 @@ produce a noisy warning. xhci->quirks |= XHCI_RESET_ON_RESUME; --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -423,10 +423,14 @@ static int xhci_try_enable_msi(struct us +@@ -427,10 +427,14 @@ static int xhci_try_enable_msi(struct us free_irq(hcd->irq, hcd); hcd->irq = 0; diff --git a/target/linux/ath79/patches-5.4/0033-spi-ath79-drop-pdata-support.patch b/target/linux/ath79/patches-5.4/0033-spi-ath79-drop-pdata-support.patch index 8fd99bd333..162a82bda3 100644 --- a/target/linux/ath79/patches-5.4/0033-spi-ath79-drop-pdata-support.patch +++ b/target/linux/ath79/patches-5.4/0033-spi-ath79-drop-pdata-support.patch @@ -52,7 +52,7 @@ Signed-off-by: John Crispin unsigned long rate; int ret; -@@ -152,16 +150,10 @@ static int ath79_spi_probe(struct platfo +@@ -152,15 +150,9 @@ static int ath79_spi_probe(struct platfo master->dev.of_node = pdev->dev.of_node; platform_set_drvdata(pdev, sp); @@ -60,8 +60,7 @@ Signed-off-by: John Crispin - master->use_gpio_descriptors = true; master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32); - master->setup = spi_bitbang_setup; - master->cleanup = spi_bitbang_cleanup; + master->flags = SPI_MASTER_GPIO_SS; - if (pdata) { - master->bus_num = pdata->bus_num; - master->num_chipselect = pdata->num_chipselect; diff --git a/target/linux/ath79/patches-5.4/0050-spi-ath79-remove-spi-master-setup-and-cleanup-assign.patch b/target/linux/ath79/patches-5.4/0050-spi-ath79-remove-spi-master-setup-and-cleanup-assign.patch deleted file mode 100644 index a57ac24f29..0000000000 --- a/target/linux/ath79/patches-5.4/0050-spi-ath79-remove-spi-master-setup-and-cleanup-assign.patch +++ /dev/null @@ -1,28 +0,0 @@ -From b142b1beb199f62d47370c98a3dd8e13f792e9c0 Mon Sep 17 00:00:00 2001 -From: David Bauer -Date: Thu, 27 Feb 2020 23:03:20 +0100 -Subject: [PATCH] spi: ath79: remove spi-master setup and cleanup assignment - -This removes the assignment of setup and cleanup functions for the ath79 -target. Assigning the setup-method will lead to 'setup_transfer' not -being assigned in spi_bitbang_init. - -Also drop the redundant cleanup assignment, as this also happens in -spi_bitbang_init. - -Signed-off-by: David Bauer ---- - drivers/spi/spi-ath79.c | 2 -- - 1 file changed, 2 deletions(-) - ---- a/drivers/spi/spi-ath79.c -+++ b/drivers/spi/spi-ath79.c -@@ -152,8 +152,6 @@ static int ath79_spi_probe(struct platfo - - master->use_gpio_descriptors = true; - master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32); -- master->setup = spi_bitbang_setup; -- master->cleanup = spi_bitbang_cleanup; - - sp->bitbang.master = master; - sp->bitbang.chipselect = ath79_spi_chipselect; diff --git a/target/linux/ath79/patches-5.4/410-spi-ath79-Implement-the-spi_mem-interface.patch b/target/linux/ath79/patches-5.4/410-spi-ath79-Implement-the-spi_mem-interface.patch index 2a6b9857fb..51a71c6ef2 100644 --- a/target/linux/ath79/patches-5.4/410-spi-ath79-Implement-the-spi_mem-interface.patch +++ b/target/linux/ath79/patches-5.4/410-spi-ath79-Implement-the-spi_mem-interface.patch @@ -58,7 +58,7 @@ Signed-off-by: Luiz Angelo Daros de Luca static int ath79_spi_probe(struct platform_device *pdev) { struct spi_master *master; -@@ -163,6 +197,7 @@ static int ath79_spi_probe(struct platfo +@@ -164,6 +198,7 @@ static int ath79_spi_probe(struct platfo ret = PTR_ERR(sp->base); goto err_put_master; } diff --git a/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch b/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch index 4f5e392d78..a9f99add60 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch @@ -222,7 +222,7 @@ Signed-off-by: Yaroslav Rosomakho static inline int mmc_blk_part_switch(struct mmc_card *card, unsigned int part_type); -@@ -2868,6 +2875,7 @@ static int mmc_blk_probe(struct mmc_card +@@ -2884,6 +2891,7 @@ static int mmc_blk_probe(struct mmc_card { struct mmc_blk_data *md, *part_md; char cap_str[10]; @@ -230,7 +230,7 @@ Signed-off-by: Yaroslav Rosomakho /* * Check that the card supports the command class(es) we need. -@@ -2875,7 +2883,16 @@ static int mmc_blk_probe(struct mmc_card +@@ -2891,7 +2899,16 @@ static int mmc_blk_probe(struct mmc_card if (!(card->csd.cmdclass & CCC_BLOCK_READ)) return -ENODEV; @@ -248,7 +248,7 @@ Signed-off-by: Yaroslav Rosomakho card->complete_wq = alloc_workqueue("mmc_complete", WQ_MEM_RECLAIM | WQ_HIGHPRI, 0); -@@ -2890,9 +2907,14 @@ static int mmc_blk_probe(struct mmc_card +@@ -2906,9 +2923,14 @@ static int mmc_blk_probe(struct mmc_card string_get_size((u64)get_capacity(md->disk), 512, STRING_UNITS_2, cap_str, sizeof(cap_str)); @@ -279,7 +279,7 @@ Signed-off-by: Yaroslav Rosomakho } --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c -@@ -397,15 +397,30 @@ struct mmc_host *mmc_alloc_host(int extr +@@ -434,15 +434,30 @@ struct mmc_host *mmc_alloc_host(int extr { int err; struct mmc_host *host; diff --git a/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch index f6eac15a53..49f714991c 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0219-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 -@@ -1464,6 +1464,103 @@ command_cleanup: +@@ -1468,6 +1468,103 @@ command_cleanup: } /* @@ -119,7 +119,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 */ -@@ -5345,6 +5442,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5357,6 +5454,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-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch b/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch index 4b4766f739..20bab47514 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch @@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c -@@ -2503,9 +2503,11 @@ int xhci_mem_init(struct xhci_hcd *xhci, +@@ -2512,9 +2512,11 @@ int xhci_mem_init(struct xhci_hcd *xhci, * Event ring setup: Allocate a normal ring, but also setup * the event ring segment table (ERST). Section 4.9.3. */ @@ -36,7 +36,7 @@ Signed-off-by: Jonathan Bell if (!xhci->event_ring) goto fail; if (xhci_check_trb_in_td_math(xhci) < 0) -@@ -2518,7 +2520,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, +@@ -2527,7 +2529,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, /* set ERST count with the number of entries in the segment table */ val = readl(&xhci->ir_set->erst_size); val &= ERST_SIZE_MASK; diff --git a/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch b/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch index 38349280bb..8acdba434e 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch @@ -22,7 +22,7 @@ Signed-off-by: Maxime Ripard #define MAX_TUNING_LOOP 40 -@@ -2756,7 +2756,7 @@ static void sdhci_timeout_timer(struct t +@@ -2758,7 +2758,7 @@ static void sdhci_timeout_timer(struct t spin_lock_irqsave(&host->lock, flags); if (host->cmd && !sdhci_data_line_cmd(host->cmd)) { @@ -31,7 +31,7 @@ Signed-off-by: Maxime Ripard mmc_hostname(host->mmc)); sdhci_dumpregs(host); -@@ -2778,7 +2778,7 @@ static void sdhci_timeout_data_timer(str +@@ -2780,7 +2780,7 @@ static void sdhci_timeout_data_timer(str if (host->data || host->data_cmd || (host->cmd && sdhci_data_line_cmd(host->cmd))) { diff --git a/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index 483a9c0c75..5427d7368e 100644 --- a/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -90,7 +90,7 @@ it on BCM4708 family. /* * Reset a halted HC. * -@@ -604,10 +647,20 @@ static int xhci_init(struct usb_hcd *hcd +@@ -608,10 +651,20 @@ static int xhci_init(struct usb_hcd *hcd static int xhci_run_finished(struct xhci_hcd *xhci) { @@ -114,7 +114,7 @@ it on BCM4708 family. xhci->shared_hcd->state = HC_STATE_RUNNING; xhci->cmd_ring_state = CMD_RING_STATE_RUNNING; -@@ -617,6 +670,10 @@ static int xhci_run_finished(struct xhci +@@ -621,6 +674,10 @@ static int xhci_run_finished(struct xhci xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Finished xhci_run for USB3 roothub"); return 0; diff --git a/target/linux/generic/backport-5.4/080-wireguard-0052-crypto-x86-curve25519-support-assemblers-with-no-adx.patch b/target/linux/generic/backport-5.4/080-wireguard-0052-crypto-x86-curve25519-support-assemblers-with-no-adx.patch index 513025552d..cd507b1e44 100644 --- a/target/linux/generic/backport-5.4/080-wireguard-0052-crypto-x86-curve25519-support-assemblers-with-no-adx.patch +++ b/target/linux/generic/backport-5.4/080-wireguard-0052-crypto-x86-curve25519-support-assemblers-with-no-adx.patch @@ -24,7 +24,7 @@ Signed-off-by: Jason A. Donenfeld --- a/arch/x86/Makefile +++ b/arch/x86/Makefile -@@ -197,9 +197,10 @@ avx2_instr :=$(call as-instr,vpbroadcast +@@ -198,9 +198,10 @@ avx2_instr :=$(call as-instr,vpbroadcast avx512_instr :=$(call as-instr,vpmovm2b %k1$(comma)%zmm5,-DCONFIG_AS_AVX512=1) sha1_ni_instr :=$(call as-instr,sha1msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA1_NI=1) sha256_ni_instr :=$(call as-instr,sha256msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA256_NI=1) diff --git a/target/linux/generic/hack-5.4/204-module_strip.patch b/target/linux/generic/hack-5.4/204-module_strip.patch index a207a11ee5..22bb1ac33a 100644 --- a/target/linux/generic/hack-5.4/204-module_strip.patch +++ b/target/linux/generic/hack-5.4/204-module_strip.patch @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau config MODULES_TREE_LOOKUP --- a/kernel/module.c +++ b/kernel/module.c -@@ -3224,9 +3224,11 @@ static int setup_load_info(struct load_i +@@ -3252,9 +3252,11 @@ static int setup_load_info(struct load_i static int check_modinfo(struct module *mod, struct load_info *info, int flags) { @@ -125,7 +125,7 @@ Signed-off-by: Felix Fietkau if (flags & MODULE_INIT_IGNORE_VERMAGIC) modmagic = NULL; -@@ -3247,6 +3249,7 @@ static int check_modinfo(struct module * +@@ -3275,6 +3277,7 @@ static int check_modinfo(struct module * mod->name); add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); } diff --git a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch index 848be9b5fe..ab96306774 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch @@ -54,7 +54,7 @@ Signed-off-by: Peter Chen * All 3.1 IP version constants are greater than the 3.0 IP --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c -@@ -3558,6 +3558,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) +@@ -3568,6 +3568,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) dwc->gadget.sg_supported = true; dwc->gadget.name = "dwc3-gadget"; dwc->gadget.lpm_capable = true; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch index 0334e72d9e..58cccfff5e 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch @@ -174,7 +174,7 @@ Signed-off-by: Peter Chen * bursts that are required to move all packets in this TD. Only SuperSpeed --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -5372,6 +5372,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5384,6 +5384,7 @@ static const struct hc_driver xhci_hc_dr .disable_usb3_lpm_timeout = xhci_disable_usb3_lpm_timeout, .find_raw_port_number = xhci_find_raw_port_number, .clear_tt_buffer_complete = xhci_clear_tt_buffer_complete, diff --git a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch index 2f1d183853..3f805756fa 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch @@ -24,7 +24,7 @@ Signed-off-by: Peter Chen --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -5393,6 +5393,8 @@ void xhci_init_driver(struct hc_driver * +@@ -5405,6 +5405,8 @@ void xhci_init_driver(struct hc_driver * drv->check_bandwidth = over->check_bandwidth; if (over->reset_bandwidth) drv->reset_bandwidth = over->reset_bandwidth; diff --git a/target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch b/target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch index 87247b63ad..9eeddaeba1 100644 --- a/target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch +++ b/target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch @@ -82,7 +82,7 @@ Signed-off-by: Gregory CLEMENT pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>; --- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi -@@ -317,7 +317,7 @@ +@@ -318,7 +318,7 @@ pcie_reset_pins: pcie-reset-pins { groups = "pcie1"; diff --git a/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch b/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch index e92393ff6f..0c7830cb47 100644 --- a/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch +++ b/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch @@ -47,7 +47,7 @@ Signed-off-by: Gregory CLEMENT status = "disabled"; --- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi -@@ -493,6 +493,7 @@ +@@ -494,6 +494,7 @@ <0 0 0 2 &pcie_intc 1>, <0 0 0 3 &pcie_intc 2>, <0 0 0 4 &pcie_intc 3>; diff --git a/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch b/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch index ad918bef88..04002480cc 100644 --- a/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch +++ b/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch @@ -34,7 +34,7 @@ Signed-off-by: Gregory CLEMENT /* enabled by U-Boot if PCIe module is present */ --- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi -@@ -493,6 +493,7 @@ +@@ -494,6 +494,7 @@ <0 0 0 2 &pcie_intc 1>, <0 0 0 3 &pcie_intc 2>, <0 0 0 4 &pcie_intc 3>; From 08593db128c4472225a7ffd58e21f06390d9c3f0 Mon Sep 17 00:00:00 2001 From: John Audia Date: Fri, 14 May 2021 05:05:17 -0400 Subject: [PATCH 19/45] kernel: bump 5.4 to 5.4.119 Removed upstreamed: generic/backport-5.4/050-gro-fix-napi_gro_frags-Fast-GRO-breakage-due-to-IP-a.patch bcm63xx/patches-5.4/434-nand-brcmnand-fix-OOB-R-W-with-Hamming-ECC.patch* Removed/code was included upstream and therefore redundant: ramips/patches-5.4/999-fix-pci-init-mt7620.patch All other patches automatically rebased. * update_kernel.sh did not flag this yet it was included in 5.4.119[1], as a result of the rebase, I removed my testing lines since I did not go back to test built or to run test 5.4.119 with the removed patch present. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.4.119&id=e5b3e69eb36ac1178a7a2392616fd29afd288c4e Signed-off-by: John Audia --- include/kernel-version.mk | 4 +- ...ce-quirks-for-Freeway-Airmouse-T3-an.patch | 2 +- ...-use-default-DMA-address-translation.patch | 2 +- ...add-V4L2_CTRL_TYPE_AREA-control-type.patch | 4 +- ...finitions-for-HEVC-stateless-decodin.patch | 2 +- ...uapi-hevc-Add-scaling-matrix-control.patch | 2 +- ...CS_HIGH-if-GPIO-descriptors-are-used.patch | 4 +- ...te-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch | 2 +- ...ls-Add-helper-to-register-properties.patch | 2 +- ...cmnand-support-v2.1-v2.2-controllers.patch | 2 +- ...rcmnand-fix-OOB-R-W-with-Hamming-ECC.patch | 34 --------- ..._frags-Fast-GRO-breakage-due-to-IP-a.patch | 75 ------------------- .../generic/hack-5.4/902-debloat_proc.patch | 2 +- ...-mtd-core-add-get_mtd_device_by_node.patch | 2 +- .../0001-MIPS-lantiq-add-pcie-driver.patch | 2 +- ...T-PHY-add-led-support-for-intel-xway.patch | 4 +- .../patches-5.4/999-fix-pci-init-mt7620.patch | 21 ------ 17 files changed, 18 insertions(+), 148 deletions(-) delete mode 100644 target/linux/bcm63xx/patches-5.4/434-nand-brcmnand-fix-OOB-R-W-with-Hamming-ECC.patch delete mode 100644 target/linux/generic/backport-5.4/050-gro-fix-napi_gro_frags-Fast-GRO-breakage-due-to-IP-a.patch delete mode 100644 target/linux/ramips/patches-5.4/999-fix-pci-init-mt7620.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index dcf884af24..14b0f27ad5 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-5.4 = .118 +LINUX_VERSION-5.4 = .119 LINUX_VERSION-5.10 = .39 -LINUX_KERNEL_HASH-5.4.118 = d970509c274fd2f5a9257a63c56f7a8b3e50ec12015bd6864dc4b76b38dc821b +LINUX_KERNEL_HASH-5.4.119 = 71e7decf1e8149a8aed88d30df4f2a62a6c6b168111de6b261685ac7c0ecb2a0 LINUX_KERNEL_HASH-5.10.39 = 5738a515ca97853481767360c568eae46c8d777d98a69e018a3299baa6b3f614 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) diff --git a/target/linux/bcm27xx/patches-5.4/950-0280-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-5.4/950-0280-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index 8cf51706b2..e486942ffd 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0280-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0280-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1258,6 +1261,9 @@ +@@ -1259,6 +1262,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 diff --git a/target/linux/bcm27xx/patches-5.4/950-0440-x86-PCI-sta2x11-use-default-DMA-address-translation.patch b/target/linux/bcm27xx/patches-5.4/950-0440-x86-PCI-sta2x11-use-default-DMA-address-translation.patch index 51fd4be35e..539f5e1c0b 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0440-x86-PCI-sta2x11-use-default-DMA-address-translation.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0440-x86-PCI-sta2x11-use-default-DMA-address-translation.patch @@ -31,7 +31,7 @@ Signed-off-by: Christoph Hellwig --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -708,7 +708,6 @@ config X86_SUPPORTS_MEMORY_FAILURE +@@ -709,7 +709,6 @@ config X86_SUPPORTS_MEMORY_FAILURE config STA2X11 bool "STA2X11 Companion Chip Support" depends on X86_32_NON_STANDARD && PCI diff --git a/target/linux/bcm27xx/patches-5.4/950-0482-media-add-V4L2_CTRL_TYPE_AREA-control-type.patch b/target/linux/bcm27xx/patches-5.4/950-0482-media-add-V4L2_CTRL_TYPE_AREA-control-type.patch index 4d7440b999..2accf3d3b7 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0482-media-add-V4L2_CTRL_TYPE_AREA-control-type.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0482-media-add-V4L2_CTRL_TYPE_AREA-control-type.patch @@ -39,7 +39,7 @@ Signed-off-by: Mauro Carvalho Chehab default: return -EINVAL; } -@@ -2423,6 +2429,9 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s +@@ -2431,6 +2437,9 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s case V4L2_CTRL_TYPE_VP8_FRAME_HEADER: elem_size = sizeof(struct v4l2_ctrl_vp8_frame_header); break; @@ -49,7 +49,7 @@ Signed-off-by: Mauro Carvalho Chehab default: if (type < V4L2_CTRL_COMPOUND_TYPES) elem_size = sizeof(s32); -@@ -4087,6 +4096,18 @@ int __v4l2_ctrl_s_ctrl_string(struct v4l +@@ -4098,6 +4107,18 @@ int __v4l2_ctrl_s_ctrl_string(struct v4l } EXPORT_SYMBOL(__v4l2_ctrl_s_ctrl_string); diff --git a/target/linux/bcm27xx/patches-5.4/950-0492-media-v4l-Add-definitions-for-HEVC-stateless-decodin.patch b/target/linux/bcm27xx/patches-5.4/950-0492-media-v4l-Add-definitions-for-HEVC-stateless-decodin.patch index e08d2481ed..effff9b748 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0492-media-v4l-Add-definitions-for-HEVC-stateless-decodin.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0492-media-v4l-Add-definitions-for-HEVC-stateless-decodin.patch @@ -820,7 +820,7 @@ Signed-off-by: Mauro Carvalho Chehab default: return -EINVAL; } -@@ -2434,6 +2532,15 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s +@@ -2442,6 +2540,15 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s case V4L2_CTRL_TYPE_VP8_FRAME_HEADER: elem_size = sizeof(struct v4l2_ctrl_vp8_frame_header); break; diff --git a/target/linux/bcm27xx/patches-5.4/950-0495-media-uapi-hevc-Add-scaling-matrix-control.patch b/target/linux/bcm27xx/patches-5.4/950-0495-media-uapi-hevc-Add-scaling-matrix-control.patch index c63a0a8bbc..403bf61c12 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0495-media-uapi-hevc-Add-scaling-matrix-control.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0495-media-uapi-hevc-Add-scaling-matrix-control.patch @@ -106,7 +106,7 @@ Signed-off-by: Jernej Skrabec case V4L2_CTRL_TYPE_AREA: area = p; if (!area->width || !area->height) -@@ -2541,6 +2548,9 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s +@@ -2549,6 +2556,9 @@ static struct v4l2_ctrl *v4l2_ctrl_new(s case V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS: elem_size = sizeof(struct v4l2_ctrl_hevc_slice_params); break; diff --git a/target/linux/bcm27xx/patches-5.4/950-0646-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch b/target/linux/bcm27xx/patches-5.4/950-0646-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch index 42d22c3003..6ee6a275c3 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0646-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0646-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch @@ -23,7 +23,7 @@ Signed-off-by: Phil Elwell --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -3115,6 +3115,7 @@ static int __spi_validate_bits_per_word( +@@ -3110,6 +3110,7 @@ static int __spi_validate_bits_per_word( */ int spi_setup(struct spi_device *spi) { @@ -31,7 +31,7 @@ Signed-off-by: Phil Elwell unsigned bad_bits, ugly_bits; int status; -@@ -3132,6 +3133,14 @@ int spi_setup(struct spi_device *spi) +@@ -3127,6 +3128,14 @@ int spi_setup(struct spi_device *spi) (SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL | SPI_RX_DUAL | SPI_RX_QUAD | SPI_RX_OCTAL))) return -EINVAL; diff --git a/target/linux/bcm27xx/patches-5.4/950-0690-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch b/target/linux/bcm27xx/patches-5.4/950-0690-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch index e4b2e7ed2a..fee107876a 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0690-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0690-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -3127,8 +3127,8 @@ int spi_setup(struct spi_device *spi) +@@ -3122,8 +3122,8 @@ int spi_setup(struct spi_device *spi) if (ctlr->use_gpio_descriptors && ctlr->cs_gpiods && ctlr->cs_gpiods[spi->chip_select] && !(spi->mode & SPI_CS_HIGH)) { diff --git a/target/linux/bcm27xx/patches-5.4/950-0908-media-v4l2-ctrls-Add-helper-to-register-properties.patch b/target/linux/bcm27xx/patches-5.4/950-0908-media-v4l2-ctrls-Add-helper-to-register-properties.patch index cf637cea04..a61aa5335f 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0908-media-v4l2-ctrls-Add-helper-to-register-properties.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0908-media-v4l2-ctrls-Add-helper-to-register-properties.patch @@ -29,7 +29,7 @@ Signed-off-by: Laurent Pinchart #define dprintk(vdev, fmt, arg...) do { \ if (!WARN_ON(!(vdev)) && ((vdev)->dev_debug & V4L2_DEV_DEBUG_CTRL)) \ -@@ -4578,3 +4579,42 @@ __poll_t v4l2_ctrl_poll(struct file *fil +@@ -4589,3 +4590,42 @@ __poll_t v4l2_ctrl_poll(struct file *fil return 0; } EXPORT_SYMBOL(v4l2_ctrl_poll); diff --git a/target/linux/bcm63xx/patches-5.4/026-v5.8-mtd-rawnand-brcmnand-support-v2.1-v2.2-controllers.patch b/target/linux/bcm63xx/patches-5.4/026-v5.8-mtd-rawnand-brcmnand-support-v2.1-v2.2-controllers.patch index b48f4b9b2a..fe86584d0d 100644 --- a/target/linux/bcm63xx/patches-5.4/026-v5.8-mtd-rawnand-brcmnand-support-v2.1-v2.2-controllers.patch +++ b/target/linux/bcm63xx/patches-5.4/026-v5.8-mtd-rawnand-brcmnand-support-v2.1-v2.2-controllers.patch @@ -183,7 +183,7 @@ Link: https://lore.kernel.org/linux-mtd/20200522121524.4161539-6-noltari@gmail.c nand_writereg(ctrl, acc_control_offs, tmp); brcmnand_set_sector_size_1k(host, cfg->sector_size_1k); -@@ -2524,6 +2589,8 @@ const struct dev_pm_ops brcmnand_pm_ops +@@ -2530,6 +2595,8 @@ const struct dev_pm_ops brcmnand_pm_ops EXPORT_SYMBOL_GPL(brcmnand_pm_ops); static const struct of_device_id brcmnand_of_match[] = { diff --git a/target/linux/bcm63xx/patches-5.4/434-nand-brcmnand-fix-OOB-R-W-with-Hamming-ECC.patch b/target/linux/bcm63xx/patches-5.4/434-nand-brcmnand-fix-OOB-R-W-with-Hamming-ECC.patch deleted file mode 100644 index c3bb1ae1e8..0000000000 --- a/target/linux/bcm63xx/patches-5.4/434-nand-brcmnand-fix-OOB-R-W-with-Hamming-ECC.patch +++ /dev/null @@ -1,34 +0,0 @@ -From cf0d2fbaae9e962d91a321de75e0d4f9f9ccbdfe Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= -Date: Thu, 21 Jan 2021 18:17:37 +0100 -Subject: [PATCH] nand: brcmnand: fix OOB R/W with Hamming ECC -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Hamming ECC doesn't cover the OOB data, so reading or writing OOB shall -always be done without ECC enabled. -This is a problem when adding JFFS2 cleanmarkers to erased blocks. When JFFS2 -clenmarkers are added to the OOB with ECC enabled, OOB bytes will be changed -from ff ff ff to 00 00 00, reporting incorrect ECC errors. - -Signed-off-by: Álvaro Fernández Rojas ---- - drivers/mtd/nand/raw/brcmnand/brcmnand.c | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c -+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c -@@ -2426,6 +2426,12 @@ static int brcmnand_attach_chip(struct n - - ret = brcmstb_choose_ecc_layout(host); - -+ /* If OOB is written with ECC enabled it will cause ECC errors */ -+ if (is_hamming_ecc(host->ctrl, &host->hwcfg)) { -+ chip->ecc.write_oob = brcmnand_write_oob_raw; -+ chip->ecc.read_oob = brcmnand_read_oob_raw; -+ } -+ - return ret; - } - diff --git a/target/linux/generic/backport-5.4/050-gro-fix-napi_gro_frags-Fast-GRO-breakage-due-to-IP-a.patch b/target/linux/generic/backport-5.4/050-gro-fix-napi_gro_frags-Fast-GRO-breakage-due-to-IP-a.patch deleted file mode 100644 index 17e9e34589..0000000000 --- a/target/linux/generic/backport-5.4/050-gro-fix-napi_gro_frags-Fast-GRO-breakage-due-to-IP-a.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 3007b05df4301aad179acc6ca1c3645785576df6 Mon Sep 17 00:00:00 2001 -From: Alexander Lobakin -Date: Mon, 19 Apr 2021 12:53:06 +0000 -Subject: gro: fix napi_gro_frags() Fast GRO breakage due to IP - alignment check - -Commit 7ad18ff6449cbd6beb26b53128ddf56d2685aa93 upstream. - -Commit 38ec4944b593 ("gro: ensure frag0 meets IP header alignment") -did the right thing, but missed the fact that napi_gro_frags() logics -calls for skb_gro_reset_offset() *before* pulling Ethernet header -to the skb linear space. -That said, the introduced check for frag0 address being aligned to 4 -always fails for it as Ethernet header is obviously 14 bytes long, -and in case with NET_IP_ALIGN its start is not aligned to 4. - -Fix this by adding @nhoff argument to skb_gro_reset_offset() which -tells if an IP header is placed right at the start of frag0 or not. -This restores Fast GRO for napi_gro_frags() that became very slow -after the mentioned commit, and preserves the introduced check to -avoid silent unaligned accesses. - -From v1 [0]: - - inline tiny skb_gro_reset_offset() to let the code be optimized - more efficively (esp. for the !NET_IP_ALIGN case) (Eric); - - pull in Reviewed-by from Eric. - -[0] https://lore.kernel.org/netdev/20210418114200.5839-1-alobakin@pm.me - -Fixes: 38ec4944b593 ("gro: ensure frag0 meets IP header alignment") -Reviewed-by: Eric Dumazet -Signed-off-by: Alexander Lobakin -Signed-off-by: David S. Miller ---- - net/core/dev.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - ---- a/net/core/dev.c -+++ b/net/core/dev.c -@@ -5395,7 +5395,7 @@ static struct list_head *gro_list_prepar - return head; - } - --static void skb_gro_reset_offset(struct sk_buff *skb) -+static inline void skb_gro_reset_offset(struct sk_buff *skb, u32 nhoff) - { - const struct skb_shared_info *pinfo = skb_shinfo(skb); - const skb_frag_t *frag0 = &pinfo->frags[0]; -@@ -5407,7 +5407,7 @@ static void skb_gro_reset_offset(struct - if (skb_mac_header(skb) == skb_tail_pointer(skb) && - pinfo->nr_frags && - !PageHighMem(skb_frag_page(frag0)) && -- (!NET_IP_ALIGN || !(skb_frag_off(frag0) & 3))) { -+ (!NET_IP_ALIGN || !((skb_frag_off(frag0) + nhoff) & 3))) { - NAPI_GRO_CB(skb)->frag0 = skb_frag_address(frag0); - NAPI_GRO_CB(skb)->frag0_len = min_t(unsigned int, - skb_frag_size(frag0), -@@ -5640,7 +5640,7 @@ gro_result_t napi_gro_receive(struct nap - skb_mark_napi_id(skb, napi); - trace_napi_gro_receive_entry(skb); - -- skb_gro_reset_offset(skb); -+ skb_gro_reset_offset(skb, 0); - - ret = napi_skb_finish(napi, skb, dev_gro_receive(napi, skb)); - trace_napi_gro_receive_exit(ret); -@@ -5733,7 +5733,7 @@ static struct sk_buff *napi_frags_skb(st - napi->skb = NULL; - - skb_reset_mac_header(skb); -- skb_gro_reset_offset(skb); -+ skb_gro_reset_offset(skb, hlen); - - if (unlikely(skb_gro_header_hard(skb, hlen))) { - eth = skb_gro_header_slow(skb, hlen, 0); diff --git a/target/linux/generic/hack-5.4/902-debloat_proc.patch b/target/linux/generic/hack-5.4/902-debloat_proc.patch index 7d6c2b2d6e..f8ee3f083b 100644 --- a/target/linux/generic/hack-5.4/902-debloat_proc.patch +++ b/target/linux/generic/hack-5.4/902-debloat_proc.patch @@ -396,7 +396,7 @@ Signed-off-by: Felix Fietkau } --- a/net/ipv4/route.c +++ b/net/ipv4/route.c -@@ -409,6 +409,9 @@ static struct pernet_operations ip_rt_pr +@@ -410,6 +410,9 @@ static struct pernet_operations ip_rt_pr static int __init ip_rt_proc_init(void) { diff --git a/target/linux/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch b/target/linux/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch index b6e36410e7..a173381820 100644 --- a/target/linux/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch +++ b/target/linux/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch @@ -17,7 +17,7 @@ Reviewed-by: Miquel Raynal --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c -@@ -1050,6 +1050,44 @@ out_unlock: +@@ -1053,6 +1053,44 @@ out_unlock: } EXPORT_SYMBOL_GPL(get_mtd_device_nm); diff --git a/target/linux/lantiq/patches-5.4/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-5.4/0001-MIPS-lantiq-add-pcie-driver.patch index cb482bc522..702424ec45 100644 --- a/target/linux/lantiq/patches-5.4/0001-MIPS-lantiq-add-pcie-driver.patch +++ b/target/linux/lantiq/patches-5.4/0001-MIPS-lantiq-add-pcie-driver.patch @@ -4133,7 +4133,7 @@ Signed-off-by: John Crispin + --- a/arch/mips/pci/pci-legacy.c +++ b/arch/mips/pci/pci-legacy.c -@@ -308,3 +308,30 @@ char *__init pcibios_setup(char *str) +@@ -313,3 +313,30 @@ char *__init pcibios_setup(char *str) return pcibios_plat_setup(str); return str; } diff --git a/target/linux/lantiq/patches-5.4/0023-NET-PHY-add-led-support-for-intel-xway.patch b/target/linux/lantiq/patches-5.4/0023-NET-PHY-add-led-support-for-intel-xway.patch index 5a668b6f56..fb8d975110 100644 --- a/target/linux/lantiq/patches-5.4/0023-NET-PHY-add-led-support-for-intel-xway.patch +++ b/target/linux/lantiq/patches-5.4/0023-NET-PHY-add-led-support-for-intel-xway.patch @@ -13,7 +13,7 @@ Signed-off-by: John Crispin --- a/drivers/net/phy/intel-xway.c +++ b/drivers/net/phy/intel-xway.c -@@ -145,6 +145,51 @@ +@@ -157,6 +157,51 @@ #define PHY_ID_PHY11G_VR9_1_2 0xD565A409 #define PHY_ID_PHY22F_VR9_1_2 0xD565A419 @@ -65,7 +65,7 @@ Signed-off-by: John Crispin static int xway_gphy_config_init(struct phy_device *phydev) { int err; -@@ -183,6 +228,7 @@ static int xway_gphy_config_init(struct +@@ -204,6 +249,7 @@ static int xway_gphy_config_init(struct phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LED2H, ledxh); phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LED2L, ledxl); diff --git a/target/linux/ramips/patches-5.4/999-fix-pci-init-mt7620.patch b/target/linux/ramips/patches-5.4/999-fix-pci-init-mt7620.patch deleted file mode 100644 index 7c00d4c9ae..0000000000 --- a/target/linux/ramips/patches-5.4/999-fix-pci-init-mt7620.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/arch/mips/pci/pci-mt7620.c -+++ b/arch/mips/pci/pci-mt7620.c -@@ -32,6 +32,7 @@ - #define PPLL_CFG1 0x9c - - #define PPLL_DRV 0xa0 -+#define PPLL_LD BIT(23) - #define PDRV_SW_SET BIT(31) - #define LC_CKDRVPD BIT(19) - #define LC_CKDRVOHZ BIT(18) -@@ -239,8 +240,8 @@ static int mt7620_pci_hw_init(struct pla - rt_sysc_m32(0, RALINK_PCIE0_CLK_EN, RALINK_CLKCFG1); - mdelay(100); - -- if (!(rt_sysc_r32(PPLL_CFG1) & PDRV_SW_SET)) { -- dev_err(&pdev->dev, "MT7620 PPLL unlock\n"); -+ if (!(rt_sysc_r32(PPLL_CFG1) & PPLL_LD)) { -+ dev_err(&pdev->dev, "MT7620 PPLL is unlocked, aborting init\n"); - reset_control_assert(rstpcie0); - rt_sysc_m32(RALINK_PCIE0_CLK_EN, 0, RALINK_CLKCFG1); - return -1; From fec92f1ec3d200b0e6ffa299f331a979c7a30a44 Mon Sep 17 00:00:00 2001 From: John Audia Date: Fri, 21 May 2021 06:29:01 -0400 Subject: [PATCH 20/45] kernel: bump 5.4 to 5.4.120 Removed upstreamed: generic/pending-5.4/770-02-net-ethernet-mtk_eth_soc-fix-rx-vlan-offload.patch All other patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800 Note that since I rebased the previous commit, I removed my Run-tested line although I confirm building the image successfully. Signed-off-by: John Audia --- include/kernel-version.mk | 4 +-- ...mware-loader-for-uPD720201-and-uPD72.patch | 8 ++--- .../802-usb-xhci-force-msi-renesas-xhci.patch | 2 +- ...Show-that-the-VIA-VL805-supports-LPM.patch | 2 +- ...or-host-controllers-that-don-t-updat.patch | 2 +- ...arch-arm-Add-model-string-to-cpuinfo.patch | 4 +-- ...-quirks-add-link-TRB-quirk-for-VL805.patch | 2 +- .../911-kobject_add_broadcast_uevent.patch | 2 +- ...rnet-mtk_eth_soc-fix-rx-vlan-offload.patch | 31 ------------------- ...sens-support-configurable-interrupts.patch | 2 +- ...08-arm-add-new-non-shareable-ioremap.patch | 6 ++-- ...5-usb-dwc3-add-otg-properties-update.patch | 2 +- 12 files changed, 18 insertions(+), 49 deletions(-) delete mode 100644 target/linux/generic/pending-5.4/770-02-net-ethernet-mtk_eth_soc-fix-rx-vlan-offload.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 14b0f27ad5..80b2567ed6 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-5.4 = .119 +LINUX_VERSION-5.4 = .120 LINUX_VERSION-5.10 = .39 -LINUX_KERNEL_HASH-5.4.119 = 71e7decf1e8149a8aed88d30df4f2a62a6c6b168111de6b261685ac7c0ecb2a0 +LINUX_KERNEL_HASH-5.4.120 = 38d0373c69d001a66c4b8c1b8df453d193eb38b46b6fa0d02560262ab0c10860 LINUX_KERNEL_HASH-5.10.39 = 5738a515ca97853481767360c568eae46c8d777d98a69e018a3299baa6b3f614 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) diff --git a/target/linux/apm821xx/patches-5.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch b/target/linux/apm821xx/patches-5.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch index dbed597973..980a0407db 100644 --- a/target/linux/apm821xx/patches-5.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch +++ b/target/linux/apm821xx/patches-5.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch @@ -93,7 +93,7 @@ Signed-off-by: Vinod Koul static const char hcd_name[] = "xhci_hcd"; static struct hc_driver __read_mostly xhci_pci_hc_driver; -@@ -307,6 +347,873 @@ static void xhci_pme_acpi_rtd3_enable(st +@@ -309,6 +349,873 @@ static void xhci_pme_acpi_rtd3_enable(st static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { } #endif /* CONFIG_ACPI */ @@ -967,7 +967,7 @@ Signed-off-by: Vinod Koul /* called during probe() after chip reset completes */ static int xhci_pci_setup(struct usb_hcd *hcd) { -@@ -348,6 +1255,27 @@ static int xhci_pci_probe(struct pci_dev +@@ -350,6 +1257,27 @@ static int xhci_pci_probe(struct pci_dev struct hc_driver *driver; struct usb_hcd *hcd; @@ -995,7 +995,7 @@ Signed-off-by: Vinod Koul driver = (struct hc_driver *)id->driver_data; /* Prevent runtime suspending between USB-2 and USB-3 initialization */ -@@ -409,6 +1337,16 @@ static void xhci_pci_remove(struct pci_d +@@ -411,6 +1339,16 @@ static void xhci_pci_remove(struct pci_d { struct xhci_hcd *xhci; @@ -1012,7 +1012,7 @@ Signed-off-by: Vinod Koul xhci = hcd_to_xhci(pci_get_drvdata(dev)); xhci->xhc_state |= XHCI_STATE_REMOVING; -@@ -548,6 +1486,11 @@ static int xhci_pci_resume(struct usb_hc +@@ -550,6 +1488,11 @@ static int xhci_pci_resume(struct usb_hc if (pdev->vendor == PCI_VENDOR_ID_INTEL) usb_enable_intel_xhci_ports(pdev); diff --git a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch index f248407fdb..9a0bab5c4b 100644 --- a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch @@ -13,7 +13,7 @@ produce a noisy warning. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -286,6 +286,7 @@ static void xhci_pci_quirks(struct devic +@@ -288,6 +288,7 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x0015) { xhci->quirks |= XHCI_RESET_ON_RESUME; xhci->quirks |= XHCI_ZERO_64B_REGS; diff --git a/target/linux/bcm27xx/patches-5.4/950-0211-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch b/target/linux/bcm27xx/patches-5.4/950-0211-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch index 83a2341e1b..5679126103 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0211-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0211-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch @@ -10,7 +10,7 @@ Signed-off-by: Phil Elwell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -255,6 +255,10 @@ static void xhci_pci_quirks(struct devic +@@ -257,6 +257,10 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x3432) xhci->quirks |= XHCI_BROKEN_STREAMS; diff --git a/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch b/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch index db69423d33..e60468c848 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch @@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -256,8 +256,10 @@ static void xhci_pci_quirks(struct devic +@@ -258,8 +258,10 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_BROKEN_STREAMS; if (pdev->vendor == PCI_VENDOR_ID_VIA && diff --git a/target/linux/bcm27xx/patches-5.4/950-0297-arch-arm-Add-model-string-to-cpuinfo.patch b/target/linux/bcm27xx/patches-5.4/950-0297-arch-arm-Add-model-string-to-cpuinfo.patch index 83c1592df9..4e9598a54e 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0297-arch-arm-Add-model-string-to-cpuinfo.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0297-arch-arm-Add-model-string-to-cpuinfo.patch @@ -10,7 +10,7 @@ Signed-off-by: Phil Elwell --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c -@@ -1240,6 +1240,8 @@ static int c_show(struct seq_file *m, vo +@@ -1249,6 +1249,8 @@ static int c_show(struct seq_file *m, vo { int i, j; u32 cpuid; @@ -19,7 +19,7 @@ Signed-off-by: Phil Elwell for_each_online_cpu(i) { /* -@@ -1299,6 +1301,14 @@ static int c_show(struct seq_file *m, vo +@@ -1308,6 +1310,14 @@ static int c_show(struct seq_file *m, vo seq_printf(m, "Revision\t: %04x\n", system_rev); seq_printf(m, "Serial\t\t: %s\n", system_serial); diff --git a/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch index 12804bae75..355421ee26 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch @@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -259,6 +259,7 @@ static void xhci_pci_quirks(struct devic +@@ -261,6 +261,7 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x3483) { xhci->quirks |= XHCI_LPM_SUPPORT; xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; diff --git a/target/linux/generic/hack-5.4/911-kobject_add_broadcast_uevent.patch b/target/linux/generic/hack-5.4/911-kobject_add_broadcast_uevent.patch index 52453e5ce3..6f5e50d091 100644 --- a/target/linux/generic/hack-5.4/911-kobject_add_broadcast_uevent.patch +++ b/target/linux/generic/hack-5.4/911-kobject_add_broadcast_uevent.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau #endif /* _KOBJECT_H_ */ --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c -@@ -690,6 +690,43 @@ int add_uevent_var(struct kobj_uevent_en +@@ -691,6 +691,43 @@ int add_uevent_var(struct kobj_uevent_en EXPORT_SYMBOL_GPL(add_uevent_var); #if defined(CONFIG_NET) diff --git a/target/linux/generic/pending-5.4/770-02-net-ethernet-mtk_eth_soc-fix-rx-vlan-offload.patch b/target/linux/generic/pending-5.4/770-02-net-ethernet-mtk_eth_soc-fix-rx-vlan-offload.patch deleted file mode 100644 index e17877028f..0000000000 --- a/target/linux/generic/pending-5.4/770-02-net-ethernet-mtk_eth_soc-fix-rx-vlan-offload.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Felix Fietkau -Date: Wed, 26 Aug 2020 16:52:12 +0200 -Subject: [PATCH] net: ethernet: mtk_eth_soc: fix rx vlan offload - -The VLAN ID in the rx descriptor is only valid if the RX_DMA_VID bit is set -Fixes frames wrongly marked with VLAN tags - -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c -+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1320,7 +1320,7 @@ static int mtk_poll_rx(struct napi_struc - skb->protocol = eth_type_trans(skb, netdev); - - if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX && -- RX_DMA_VID(trxd.rxd3)) -+ (trxd.rxd2 & RX_DMA_VTAG)) - __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), - RX_DMA_VID(trxd.rxd3)); - skb_record_rx_queue(skb, 0); ---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h -+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -295,6 +295,7 @@ - #define RX_DMA_LSO BIT(30) - #define RX_DMA_PLEN0(_x) (((_x) & 0x3fff) << 16) - #define RX_DMA_GET_PLEN0(_x) (((_x) >> 16) & 0x3fff) -+#define RX_DMA_VTAG BIT(15) - - /* QDMA descriptor rxd3 */ - #define RX_DMA_VID(_x) ((_x) & 0xfff) diff --git a/target/linux/ipq806x/patches-5.4/0063-2-tsens-support-configurable-interrupts.patch b/target/linux/ipq806x/patches-5.4/0063-2-tsens-support-configurable-interrupts.patch index 585bd62a58..54488f25a8 100644 --- a/target/linux/ipq806x/patches-5.4/0063-2-tsens-support-configurable-interrupts.patch +++ b/target/linux/ipq806x/patches-5.4/0063-2-tsens-support-configurable-interrupts.patch @@ -163,7 +163,7 @@ Signed-off-by: Rajith Cherian mutex_unlock(&tzd->lock); return tzd; -@@ -762,7 +802,10 @@ static const char * const trip_types[] = +@@ -765,7 +805,10 @@ static const char * const trip_types[] = [THERMAL_TRIP_ACTIVE] = "active", [THERMAL_TRIP_PASSIVE] = "passive", [THERMAL_TRIP_HOT] = "hot", diff --git a/target/linux/layerscape/patches-5.4/301-arch-0008-arm-add-new-non-shareable-ioremap.patch b/target/linux/layerscape/patches-5.4/301-arch-0008-arm-add-new-non-shareable-ioremap.patch index a20909f317..85a4478cd8 100644 --- a/target/linux/layerscape/patches-5.4/301-arch-0008-arm-add-new-non-shareable-ioremap.patch +++ b/target/linux/layerscape/patches-5.4/301-arch-0008-arm-add-new-non-shareable-ioremap.patch @@ -63,7 +63,7 @@ Signed-off-by: Roy Pledge * address space as memory. Needed when the kernel wants to execute --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c -@@ -312,6 +312,13 @@ static struct mem_type mem_types[] __ro_ +@@ -314,6 +314,13 @@ static struct mem_type mem_types[] __ro_ .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, .domain = DOMAIN_KERNEL, }, @@ -77,7 +77,7 @@ Signed-off-by: Roy Pledge [MT_ROM] = { .prot_sect = PMD_TYPE_SECT, .domain = DOMAIN_KERNEL, -@@ -648,6 +655,7 @@ static void __init build_mem_type_table( +@@ -650,6 +657,7 @@ static void __init build_mem_type_table( } kern_pgprot |= PTE_EXT_AF; vecs_pgprot |= PTE_EXT_AF; @@ -85,7 +85,7 @@ Signed-off-by: Roy Pledge /* * Set PXN for user mappings -@@ -676,6 +684,7 @@ static void __init build_mem_type_table( +@@ -678,6 +686,7 @@ static void __init build_mem_type_table( mem_types[MT_MEMORY_RWX].prot_pte |= kern_pgprot; mem_types[MT_MEMORY_RW].prot_sect |= ecc_mask | cp->pmd; mem_types[MT_MEMORY_RW].prot_pte |= kern_pgprot; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch index ab96306774..5c567ccbf8 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch @@ -54,7 +54,7 @@ Signed-off-by: Peter Chen * All 3.1 IP version constants are greater than the 3.0 IP --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c -@@ -3568,6 +3568,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) +@@ -3570,6 +3570,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) dwc->gadget.sg_supported = true; dwc->gadget.name = "dwc3-gadget"; dwc->gadget.lpm_capable = true; From cb919f2220cc00bf1733876e63d56369d576c843 Mon Sep 17 00:00:00 2001 From: John Audia Date: Sat, 22 May 2021 06:50:01 -0400 Subject: [PATCH 21/45] kernel: bump 5.4 to 5.4.121 All patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800 Run-tested: ipq806x/R7800 No dmesg regressions, everything functional Signed-off-by: John Audia --- include/kernel-version.mk | 4 +-- ...-inbound-resource-parsing-to-helpers.patch | 2 +- ...Add-support-for-MAP-E-FMRs-mesh-mode.patch | 30 +++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 80b2567ed6..0007a4574d 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-5.4 = .120 +LINUX_VERSION-5.4 = .121 LINUX_VERSION-5.10 = .39 -LINUX_KERNEL_HASH-5.4.120 = 38d0373c69d001a66c4b8c1b8df453d193eb38b46b6fa0d02560262ab0c10860 +LINUX_KERNEL_HASH-5.4.121 = 9d9327fca397e114bcc59d69fa5ae1ac8bac76b170ed811d1b1645df7456375f LINUX_KERNEL_HASH-5.10.39 = 5738a515ca97853481767360c568eae46c8d777d98a69e018a3299baa6b3f614 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) diff --git a/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch b/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch index 493ea63825..422dea1b31 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch @@ -382,7 +382,7 @@ Cc: linux-rockchip@lists.infradead.org --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h -@@ -637,11 +637,15 @@ static inline void pci_release_bus_of_no +@@ -643,11 +643,15 @@ static inline void pci_release_bus_of_no #if defined(CONFIG_OF_ADDRESS) int devm_of_pci_get_host_bridge_resources(struct device *dev, unsigned char busno, unsigned char bus_max, diff --git a/target/linux/generic/pending-5.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/pending-5.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index 8bcca1c4d1..39f7af29d9 100644 --- a/target/linux/generic/pending-5.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/pending-5.4/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -144,7 +144,7 @@ Signed-off-by: Steven Barth } return &ip6n->tnls[prio][h]; } -@@ -378,6 +390,12 @@ ip6_tnl_dev_uninit(struct net_device *de +@@ -377,6 +389,12 @@ ip6_tnl_dev_uninit(struct net_device *de struct net *net = t->net; struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id); @@ -157,7 +157,7 @@ Signed-off-by: Steven Barth if (dev == ip6n->fb_tnl_dev) RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL); else -@@ -767,6 +785,107 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t, +@@ -766,6 +784,107 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t, } EXPORT_SYMBOL_GPL(ip6_tnl_rcv_ctl); @@ -265,7 +265,7 @@ Signed-off-by: Steven Barth static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb, const struct tnl_ptk_info *tpi, struct metadata_dst *tun_dst, -@@ -819,6 +938,27 @@ static int __ip6_tnl_rcv(struct ip6_tnl +@@ -818,6 +937,27 @@ static int __ip6_tnl_rcv(struct ip6_tnl skb_reset_network_header(skb); memset(skb->cb, 0, sizeof(struct inet6_skb_parm)); @@ -293,7 +293,7 @@ Signed-off-by: Steven Barth __skb_tunnel_rx(skb, tunnel->dev, tunnel->net); err = dscp_ecn_decapsulate(tunnel, ipv6h, skb); -@@ -959,6 +1099,7 @@ static void init_tel_txopt(struct ipv6_t +@@ -958,6 +1098,7 @@ static void init_tel_txopt(struct ipv6_t opt->ops.opt_nflen = 8; } @@ -301,7 +301,7 @@ Signed-off-by: Steven Barth /** * ip6_tnl_addr_conflict - compare packet addresses to tunnel's own * @t: the outgoing tunnel device -@@ -1311,6 +1452,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str +@@ -1310,6 +1451,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str { struct ip6_tnl *t = netdev_priv(dev); struct ipv6hdr *ipv6h; @@ -309,7 +309,7 @@ Signed-off-by: Steven Barth int encap_limit = -1; __u16 offset; struct flowi6 fl6; -@@ -1376,6 +1518,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str +@@ -1375,6 +1517,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str fl6.flowi6_uid = sock_net_uid(dev_net(dev), NULL); dsfield = INET_ECN_encapsulate(dsfield, ipv6_get_dsfield(ipv6h)); @@ -328,7 +328,7 @@ Signed-off-by: Steven Barth if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6)) return -1; -@@ -1505,6 +1659,14 @@ ip6_tnl_change(struct ip6_tnl *t, const +@@ -1504,6 +1658,14 @@ ip6_tnl_change(struct ip6_tnl *t, const t->parms.link = p->link; t->parms.proto = p->proto; t->parms.fwmark = p->fwmark; @@ -343,7 +343,7 @@ Signed-off-by: Steven Barth dst_cache_reset(&t->dst_cache); ip6_tnl_link_config(t); return 0; -@@ -1543,6 +1705,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ +@@ -1542,6 +1704,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ p->flowinfo = u->flowinfo; p->link = u->link; p->proto = u->proto; @@ -351,7 +351,7 @@ Signed-off-by: Steven Barth memcpy(p->name, u->name, sizeof(u->name)); } -@@ -1927,6 +2090,15 @@ static int ip6_tnl_validate(struct nlatt +@@ -1926,6 +2089,15 @@ static int ip6_tnl_validate(struct nlatt return 0; } @@ -367,7 +367,7 @@ Signed-off-by: Steven Barth static void ip6_tnl_netlink_parms(struct nlattr *data[], struct __ip6_tnl_parm *parms) { -@@ -1964,6 +2136,46 @@ static void ip6_tnl_netlink_parms(struct +@@ -1963,6 +2135,46 @@ static void ip6_tnl_netlink_parms(struct if (data[IFLA_IPTUN_FWMARK]) parms->fwmark = nla_get_u32(data[IFLA_IPTUN_FWMARK]); @@ -414,7 +414,7 @@ Signed-off-by: Steven Barth } static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[], -@@ -2079,6 +2291,12 @@ static void ip6_tnl_dellink(struct net_d +@@ -2078,6 +2290,12 @@ static void ip6_tnl_dellink(struct net_d static size_t ip6_tnl_get_size(const struct net_device *dev) { @@ -427,7 +427,7 @@ Signed-off-by: Steven Barth return /* IFLA_IPTUN_LINK */ nla_total_size(4) + -@@ -2108,6 +2326,24 @@ static size_t ip6_tnl_get_size(const str +@@ -2107,6 +2325,24 @@ static size_t ip6_tnl_get_size(const str nla_total_size(0) + /* IFLA_IPTUN_FWMARK */ nla_total_size(4) + @@ -452,7 +452,7 @@ Signed-off-by: Steven Barth 0; } -@@ -2115,6 +2351,9 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2114,6 +2350,9 @@ static int ip6_tnl_fill_info(struct sk_b { struct ip6_tnl *tunnel = netdev_priv(dev); struct __ip6_tnl_parm *parm = &tunnel->parms; @@ -462,7 +462,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) || -@@ -2124,9 +2363,27 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2123,9 +2362,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) || @@ -491,7 +491,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) || -@@ -2166,6 +2423,7 @@ static const struct nla_policy ip6_tnl_p +@@ -2165,6 +2422,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 }, From e5d50f69e81a95193aa09285f9edb99bc69c249f Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Wed, 12 May 2021 00:13:04 +0200 Subject: [PATCH 22/45] ipq806x: reduce pci IO space to 64k With some talk with the ARM maintainer, it was notice that enlarging the limit to the current value is VERY wrong and clash with other memory. A better solution would be to reduce the IO space from 1MB to 64K as probably it's a long lasting typo and even x86 arch doesn't have a IO space that big. Signed-off-by: Ansuel Smith --- ...M-dts-qcom-reduce-pci-IO-size-to-64K.patch | 46 +++++++++++++++++++ ...e-IO_SPACE_LIMIT-needed-for-some-SoC.patch | 25 ---------- 2 files changed, 46 insertions(+), 25 deletions(-) create mode 100644 target/linux/ipq806x/patches-5.10/103-ARM-dts-qcom-reduce-pci-IO-size-to-64K.patch delete mode 100644 target/linux/ipq806x/patches-5.10/103-arm-Enlarge-IO_SPACE_LIMIT-needed-for-some-SoC.patch diff --git a/target/linux/ipq806x/patches-5.10/103-ARM-dts-qcom-reduce-pci-IO-size-to-64K.patch b/target/linux/ipq806x/patches-5.10/103-ARM-dts-qcom-reduce-pci-IO-size-to-64K.patch new file mode 100644 index 0000000000..050360ad21 --- /dev/null +++ b/target/linux/ipq806x/patches-5.10/103-ARM-dts-qcom-reduce-pci-IO-size-to-64K.patch @@ -0,0 +1,46 @@ +From 84909e85881d67244240c9f40974ce12a51e3886 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Tue, 11 May 2021 23:09:45 +0200 +Subject: [PATCH] ARM: dts: qcom: reduce pci IO size to 64K + +The current value is probably a typo and is actually uncommon to find +1MB IO space even on a x86 arch. Also with recent changes to the pci +driver, pci1 and pci2 now fails to function as any connected device +fails any reg read/write. Reduce this to 64K as it should be more than +enough and 3 * 64K of total IO space doesn't exceed the IO_SPACE_LIMIT +hardcoded for the ARM arch. + +Signed-off-by: Ansuel Smith +--- + arch/arm/boot/dts/qcom-ipq8064.dtsi | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi ++++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi +@@ -1085,7 +1085,7 @@ + #address-cells = <3>; + #size-cells = <2>; + +- ranges = <0x81000000 0 0x0fe00000 0x0fe00000 0 0x00100000 /* downstream I/O */ ++ ranges = <0x81000000 0 0x0fe00000 0x0fe00000 0 0x00010000 /* downstream I/O */ + 0x82000000 0 0x08000000 0x08000000 0 0x07e00000>; /* non-prefetchable memory */ + + interrupts = ; +@@ -1136,7 +1136,7 @@ + #address-cells = <3>; + #size-cells = <2>; + +- ranges = <0x81000000 0 0x31e00000 0x31e00000 0 0x00100000 /* downstream I/O */ ++ ranges = <0x81000000 0 0x31e00000 0x31e00000 0 0x00010000 /* downstream I/O */ + 0x82000000 0 0x2e000000 0x2e000000 0 0x03e00000>; /* non-prefetchable memory */ + + interrupts = ; +@@ -1187,7 +1187,7 @@ + #address-cells = <3>; + #size-cells = <2>; + +- ranges = <0x81000000 0 0x35e00000 0x35e00000 0 0x00100000 /* downstream I/O */ ++ ranges = <0x81000000 0 0x35e00000 0x35e00000 0 0x00010000 /* downstream I/O */ + 0x82000000 0 0x32000000 0x32000000 0 0x03e00000>; /* non-prefetchable memory */ + + interrupts = ; diff --git a/target/linux/ipq806x/patches-5.10/103-arm-Enlarge-IO_SPACE_LIMIT-needed-for-some-SoC.patch b/target/linux/ipq806x/patches-5.10/103-arm-Enlarge-IO_SPACE_LIMIT-needed-for-some-SoC.patch deleted file mode 100644 index 64a0eaf8ed..0000000000 --- a/target/linux/ipq806x/patches-5.10/103-arm-Enlarge-IO_SPACE_LIMIT-needed-for-some-SoC.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9a894b0e5d3e6ed3c435b89fe96794ec9ddf5925 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Sun, 28 Feb 2021 15:22:24 +0100 -Subject: [PATCH] arm: Enlarge IO_SPACE_LIMIT needed for some SoC - -Ipq8064 SoC requires larger IO_SPACE_LIMIT or second and third pci port -fails to register the IO addresses and connected device doesn't work. - -Cc: # 4.9+ -Signed-off-by: Ansuel Smith ---- - arch/arm/include/asm/io.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/arm/include/asm/io.h -+++ b/arch/arm/include/asm/io.h -@@ -197,7 +197,7 @@ void __iomem *pci_remap_cfgspace(resourc - #ifdef CONFIG_NEED_MACH_IO_H - #include - #elif defined(CONFIG_PCI) --#define IO_SPACE_LIMIT ((resource_size_t)0xfffff) -+#define IO_SPACE_LIMIT ((resource_size_t)0xffffff) - #define __io(a) __typesafe_io(PCI_IO_VIRT_BASE + ((a) & IO_SPACE_LIMIT)) - #else - #define __io(a) __typesafe_io((a) & IO_SPACE_LIMIT) From 21d4b228d17cded207fde6fa84c8bef6854ce818 Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Wed, 12 May 2021 00:20:49 +0200 Subject: [PATCH 23/45] ipq806x: fix warning about tsens debugfs already registered Backport a pending patch already reviewed that fix some warning about tsens debugs already registered. Signed-off-by: Ansuel Smith --- ...ns-init-debugfs-only-with-successful.patch | 41 ++++++++++++++ ...tsens-simplify-debugfs-init-function.patch | 54 +++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 target/linux/ipq806x/patches-5.10/107-1-thermal-qcom-tsens-init-debugfs-only-with-successful.patch create mode 100644 target/linux/ipq806x/patches-5.10/107-2-thermal-qcom-tsens-simplify-debugfs-init-function.patch diff --git a/target/linux/ipq806x/patches-5.10/107-1-thermal-qcom-tsens-init-debugfs-only-with-successful.patch b/target/linux/ipq806x/patches-5.10/107-1-thermal-qcom-tsens-init-debugfs-only-with-successful.patch new file mode 100644 index 0000000000..1dc2d2e55e --- /dev/null +++ b/target/linux/ipq806x/patches-5.10/107-1-thermal-qcom-tsens-init-debugfs-only-with-successful.patch @@ -0,0 +1,41 @@ +From 8f32d48a309246a80bdca505968085a484d54408 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Mon, 19 Apr 2021 03:01:53 +0200 +Subject: [thermal-next PATCH v2 1/2] thermal: qcom: tsens: init debugfs only with + successful probe + +calibrate and tsens_register can fail or PROBE_DEFER. This will cause a +double or a wrong init of the debugfs information. Init debugfs only +with successful probe fixing warning about directory already present. + +Signed-off-by: Ansuel Smith +Acked-by: Thara Gopinath +--- + drivers/thermal/qcom/tsens.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +--- a/drivers/thermal/qcom/tsens.c ++++ b/drivers/thermal/qcom/tsens.c +@@ -918,8 +918,6 @@ int __init init_common(struct tsens_priv + if (tsens_version(priv) >= VER_0_1) + tsens_enable_irq(priv); + +- tsens_debug_init(op); +- + err_put_device: + put_device(&op->dev); + return ret; +@@ -1155,7 +1153,12 @@ static int tsens_probe(struct platform_d + } + } + +- return tsens_register(priv); ++ ret = tsens_register(priv); ++ ++ if (!ret) ++ tsens_debug_init(pdev); ++ ++ return ret; + } + + static int tsens_remove(struct platform_device *pdev) diff --git a/target/linux/ipq806x/patches-5.10/107-2-thermal-qcom-tsens-simplify-debugfs-init-function.patch b/target/linux/ipq806x/patches-5.10/107-2-thermal-qcom-tsens-simplify-debugfs-init-function.patch new file mode 100644 index 0000000000..0fbc4bd8ca --- /dev/null +++ b/target/linux/ipq806x/patches-5.10/107-2-thermal-qcom-tsens-simplify-debugfs-init-function.patch @@ -0,0 +1,54 @@ +From 4204f22060f7a5d42c6ccb4d4c25a6a875571099 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Mon, 19 Apr 2021 03:08:37 +0200 +Subject: [thermal-next PATCH v2 2/2] thermal: qcom: tsens: simplify debugfs init + function + +Simplify debugfs init function. +- Add check for existing dev directory. +- Fix wrong version in dbg_version_show (with version 0.0.0, 0.1.0 was + incorrectly reported) + +Signed-off-by: Ansuel Smith +Reviewed-by: Thara Gopinath +--- + drivers/thermal/qcom/tsens.c | 16 +++++++--------- + 1 file changed, 7 insertions(+), 9 deletions(-) + +--- a/drivers/thermal/qcom/tsens.c ++++ b/drivers/thermal/qcom/tsens.c +@@ -692,7 +692,7 @@ static int dbg_version_show(struct seq_f + return ret; + seq_printf(s, "%d.%d.%d\n", maj_ver, min_ver, step_ver); + } else { +- seq_puts(s, "0.1.0\n"); ++ seq_printf(s, "0.%d.0\n", priv->feat->ver_major); + } + + return 0; +@@ -704,21 +704,17 @@ DEFINE_SHOW_ATTRIBUTE(dbg_sensors); + static void tsens_debug_init(struct platform_device *pdev) + { + struct tsens_priv *priv = platform_get_drvdata(pdev); +- struct dentry *root, *file; + +- root = debugfs_lookup("tsens", NULL); +- if (!root) ++ priv->debug_root = debugfs_lookup("tsens", NULL); ++ if (!priv->debug_root) + priv->debug_root = debugfs_create_dir("tsens", NULL); +- else +- priv->debug_root = root; + +- file = debugfs_lookup("version", priv->debug_root); +- if (!file) ++ if (!debugfs_lookup("version", priv->debug_root)) + debugfs_create_file("version", 0444, priv->debug_root, + pdev, &dbg_version_fops); + + /* A directory for each instance of the TSENS IP */ +- priv->debug = debugfs_create_dir(dev_name(&pdev->dev), priv->debug_root); ++ priv->debug = debugfs_lookup(dev_name(&pdev->dev), priv->debug_root); + debugfs_create_file("sensors", 0444, priv->debug, pdev, &dbg_sensors_fops); + } + #else From 0eca9699b1f9339077fd4454b78a7f342b6c1dd7 Mon Sep 17 00:00:00 2001 From: Anderson McKinley Date: Wed, 19 May 2021 23:38:21 +0000 Subject: [PATCH 24/45] kernel: add kmod-input-leds Adds support for LEDs on input devices. Useful for example on x86 laptops- allows re-purposing num/caps/scroll lock LEDs. Signed-off-by: Anderson McKinley --- package/kernel/linux/modules/leds.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/package/kernel/linux/modules/leds.mk b/package/kernel/linux/modules/leds.mk index fdd5280fe4..301d314b1d 100644 --- a/package/kernel/linux/modules/leds.mk +++ b/package/kernel/linux/modules/leds.mk @@ -159,3 +159,20 @@ define KernelPackage/leds-uleds/description endef $(eval $(call KernelPackage,leds-uleds)) + + +define KernelPackage/input-leds + SUBMENU:=$(LEDS_MENU) + TITLE:=Input device LED support + DEPENDS:=+kmod-input-core + KCONFIG:=CONFIG_INPUT_LEDS + FILES:=$(LINUX_DIR)/drivers/input/input-leds.ko + AUTOLOAD:=$(call AutoLoad,50,input-leds,1) +endef + +define KernelPackage/input-leds/description + Provides support for LEDs on input devices- for example, + keyboard num/caps/scroll lock. +endef + +$(eval $(call KernelPackage,input-leds)) From 7efc0d4d062e2b890b7daa6b30aa3a5e1754aaf5 Mon Sep 17 00:00:00 2001 From: Tan Zien Date: Sat, 15 May 2021 00:34:11 +0800 Subject: [PATCH 25/45] apm821xx: MR24: Change default config of WLAN LED The previous config will only show 2.4G radio activity status This change mr24:green:wifi4 and mr24:green:wifi2 to show 2.4G and 5G radio on and off status change mr24:green:wifi3 and mr24:green:wifi1 to show 2.4G and 5G radio activity status Signed-off-by: Tan Zien --- target/linux/apm821xx/base-files/etc/board.d/01_leds | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/linux/apm821xx/base-files/etc/board.d/01_leds b/target/linux/apm821xx/base-files/etc/board.d/01_leds index 3dc41d90d8..c6f855cd2d 100644 --- a/target/linux/apm821xx/base-files/etc/board.d/01_leds +++ b/target/linux/apm821xx/base-files/etc/board.d/01_leds @@ -8,10 +8,10 @@ board=$(board_name) case "$board" in meraki,mr24) ucidef_set_led_netdev "wan" "WAN" "mr24:green:wan" "eth0" - ucidef_set_led_wlan "wlan1" "WLAN1" "mr24:green:wifi1" "phy0assoc" - ucidef_set_led_wlan "wlan2" "WLAN2" "mr24:green:wifi2" "phy0assoc" - ucidef_set_led_wlan "wlan3" "WLAN3" "mr24:green:wifi3" "phy0assoc" - ucidef_set_led_wlan "wlan4" "WLAN4" "mr24:green:wifi4" "phy0tpt" + ucidef_set_led_wlan "wlan5g_1" "WIFI 5GHz-1" "mr24:green:wifi1" "phy1tpt" + ucidef_set_led_wlan "wlan5g_0" "WIFI 5GHz-0" "mr24:green:wifi2" "phy1radio" + ucidef_set_led_wlan "wlan2g_1" "WIFI 2.4GHz-1" "mr24:green:wifi3" "phy0tpt" + ucidef_set_led_wlan "wlan2g_0" "WIFI 2.4GHz-0" "mr24:green:wifi4" "phy0radio" ;; meraki,mx60) From 7a70f78fb7da4dc3e8c58e7662f4dc623274a78b Mon Sep 17 00:00:00 2001 From: Ruslan Isaev Date: Mon, 10 May 2021 14:56:59 +0000 Subject: [PATCH 26/45] fakeroot: Alpine linux libc.musl build error fix Prevent build error on Alpine Linux host: libfakeroot.c error: conflicting types for 'id_t' Error relocating openwrt/staging_dir/host/lib/libfakeroot.so: SEND_GET_XATTR: symbol not found Signed-off-by: Ruslan Isaev --- .../patches/400-alpine-libc.musl-fix.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tools/fakeroot/patches/400-alpine-libc.musl-fix.patch diff --git a/tools/fakeroot/patches/400-alpine-libc.musl-fix.patch b/tools/fakeroot/patches/400-alpine-libc.musl-fix.patch new file mode 100644 index 0000000000..619b092ca9 --- /dev/null +++ b/tools/fakeroot/patches/400-alpine-libc.musl-fix.patch @@ -0,0 +1,34 @@ +Alpine linux libc.musl build error fix + +Prevent build error on Alpine Linux host: +libfakeroot.c error: conflicting types for 'id_t' +Error relocating openwrt/staging_dir/host/lib/libfakeroot.so: SEND_GET_XATTR: symbol not found + +--- a/libfakeroot.c ++++ b/libfakeroot.c +@@ -81,12 +81,14 @@ + #define SEND_STAT64(a,b,c) send_stat64(a,b,c) + #define SEND_GET_STAT(a,b) send_get_stat(a,b) + #define SEND_GET_STAT64(a,b) send_get_stat64(a,b) ++#define SEND_GET_XATTR(a,b,c) send_get_xattr(a,b,c) + #define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b,c) + #else + #define SEND_STAT(a,b,c) send_stat(a,b) + #define SEND_STAT64(a,b,c) send_stat64(a,b) + #define SEND_GET_STAT(a,b) send_get_stat(a) + #define SEND_GET_STAT64(a,b) send_get_stat64(a) ++#define SEND_GET_XATTR(a,b,c) send_get_xattr(a,b) + #define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b) + #endif + +@@ -125,8 +127,9 @@ + + /* 10.10 uses id_t in getpriority/setpriority calls, so pretend + id_t is used everywhere, just happens to be int on some OSes */ +-#ifndef _ID_T ++#if !defined(_ID_T) && !defined(__DEFINED_id_t) + #define _ID_T ++#define __DEFINED_id_t + typedef int id_t; + #endif + #endif From b1baa01f1463c7b2cf5d10f7a35ed5dff47f2ac6 Mon Sep 17 00:00:00 2001 From: Ivan Pavlov Date: Wed, 5 May 2021 18:23:19 +0300 Subject: [PATCH 27/45] wolfssl: add support for OpenVPN Support for wolfSSL has been upstreamed to the master OpenVPN branch in f6dca235ae560597a0763f0c98fcc9130b80ccf4, so we can use wolfSSL directly in OpenVPN. So no more needed differnt SSL engine for OpenVPN in systems based on wolfSSL library Compiled && tested on ramips/mt7620, ramips/mt7621 Signed-off-by: Ivan Pavlov --- package/libs/wolfssl/Config.in | 4 ++++ package/libs/wolfssl/Makefile | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package/libs/wolfssl/Config.in b/package/libs/wolfssl/Config.in index 5d1f119ac4..81496c15d6 100644 --- a/package/libs/wolfssl/Config.in +++ b/package/libs/wolfssl/Config.in @@ -51,6 +51,10 @@ config WOLFSSL_HAS_ECC25519 bool "Include ECC Curve 25519 support" default n +config WOLFSSL_HAS_OPENVPN + bool "Include OpenVPN support" + default n + config WOLFSSL_HAS_DEVCRYPTO bool diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index 030a0224f5..0c95288a2a 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -31,7 +31,8 @@ PKG_CONFIG_DEPENDS:=\ CONFIG_WOLFSSL_HAS_DH CONFIG_WOLFSSL_HAS_DTLS \ CONFIG_WOLFSSL_HAS_ECC25519 CONFIG_WOLFSSL_HAS_OCSP \ CONFIG_WOLFSSL_HAS_SESSION_TICKET CONFIG_WOLFSSL_HAS_TLSV10 \ - CONFIG_WOLFSSL_HAS_TLSV13 CONFIG_WOLFSSL_HAS_WPAS CONFIG_WOLFSSL_HAS_CERTGEN + CONFIG_WOLFSSL_HAS_TLSV13 CONFIG_WOLFSSL_HAS_WPAS CONFIG_WOLFSSL_HAS_CERTGEN \ + CONFIG_WOLFSSL_HAS_OPENVPN PKG_ABI_VERSION=$(patsubst %-stable,%,$(PKG_VERSION)).$(call version_abbrev,$(call confvar,$(PKG_CONFIG_DEPENDS))) @@ -84,6 +85,7 @@ CONFIGURE_ARGS += \ --$(if $(CONFIG_WOLFSSL_HAS_DTLS),enable,disable)-dtls \ --$(if $(CONFIG_WOLFSSL_HAS_ECC25519),enable,disable)-curve25519 \ --$(if $(CONFIG_WOLFSSL_HAS_AFALG),enable,disable)-afalg \ + --$(if $(CONFIG_WOLFSSL_HAS_OPENVPN),enable,disable)-openvpn \ --enable-devcrypto=$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_CBC),cbc\ ,$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES),aes\ ,$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL),yes,no))) From f298d5b810118c02b340c5bb5c85e1ac11579677 Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Sun, 2 May 2021 11:25:46 +0200 Subject: [PATCH 28/45] kernel: crypto: drop kmod-crypto-wq CONFIG_CRYPTO_WORKQUEUE was removed in upstream commit[1]. This symbol doesn't exist since kernel 5.3 and this package is empty. 1. [ crypto: cryptd - move kcrypto_wq into cryptd ] (https://github.com/torvalds/linux/commit/3e56e168638b3e7147902c3b7257a57ea573a30e) Signed-off-by: Aleksander Jan Bajkowski --- package/kernel/linux/modules/crypto.mk | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index 2775239e52..edce712c56 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -986,16 +986,6 @@ endef $(eval $(call KernelPackage,crypto-user)) -define KernelPackage/crypto-wq - TITLE:=CryptoAPI work queue handling - KCONFIG:=CONFIG_CRYPTO_WORKQUEUE - FILES:=$(LINUX_DIR)/crypto/crypto_wq.ko - AUTOLOAD:=$(call AutoLoad,09,crypto_wq) - $(call AddDepends/crypto) -endef -$(eval $(call KernelPackage,crypto-wq)) - - define KernelPackage/crypto-xts TITLE:=XTS cipher CryptoAPI module DEPENDS:=+kmod-crypto-gf128 +kmod-crypto-manager From 577ba5a3a952d3b278fda11cefba641ba778f06d Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Sun, 2 May 2021 11:27:23 +0200 Subject: [PATCH 29/45] kernel: crypto: drop kmod-crypto-pcompress CONFIG_CRYPTO_PCOMP and CONFIG_CRYPTO_PCOMP2 have been removed in upstream commit[1]. This symbol doesn't exist since kernel 4.6 and this package is empty. 1. [ crypto: compress - remove unused pcomp interface ] (https://github.com/torvalds/linux/commit/110492183c4b8f572b16fce096b9d78e2da30baf) Signed-off-by: Aleksander Jan Bajkowski --- package/kernel/linux/modules/crypto.mk | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index edce712c56..f07676d6b7 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -600,7 +600,7 @@ $(eval $(call KernelPackage,crypto-lib-poly1305)) define KernelPackage/crypto-manager TITLE:=CryptoAPI algorithm manager - DEPENDS:=+kmod-crypto-aead +kmod-crypto-hash +kmod-crypto-pcompress + DEPENDS:=+kmod-crypto-aead +kmod-crypto-hash KCONFIG:= \ CONFIG_CRYPTO_MANAGER \ CONFIG_CRYPTO_MANAGER2 @@ -770,19 +770,6 @@ endef $(eval $(call KernelPackage,crypto-pcbc)) -define KernelPackage/crypto-pcompress - TITLE:=CryptoAPI Partial (de)compression operations - KCONFIG:= \ - CONFIG_CRYPTO_PCOMP=y \ - CONFIG_CRYPTO_PCOMP2 - FILES:=$(LINUX_DIR)/crypto/pcompress.ko - AUTOLOAD:=$(call AutoLoad,09,pcompress) - $(call AddDepends/crypto) -endef - -$(eval $(call KernelPackage,crypto-pcompress)) - - define KernelPackage/crypto-rsa TITLE:=RSA algorithm DEPENDS:=+kmod-crypto-manager +kmod-asn1-decoder From 8f80b9b8f63ba8a3d3dd2a799b1301657a1eb7c8 Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Thu, 29 Apr 2021 22:55:47 +0200 Subject: [PATCH 30/45] kernel: limit crypto-hw-geode to the x86/geode CONFIG_CRYPTO_DEV_GEODE depends on X86_32. This driver only makes sense on X86\geode. Signed-off-by: Aleksander Jan Bajkowski --- package/kernel/linux/modules/crypto.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index f07676d6b7..aa578e1da0 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -346,7 +346,7 @@ $(eval $(call KernelPackage,crypto-hw-ccp)) define KernelPackage/crypto-hw-geode TITLE:=AMD Geode hardware crypto module - DEPENDS:=+kmod-crypto-manager + DEPENDS:=@TARGET_x86_geode +kmod-crypto-manager KCONFIG:= \ CONFIG_CRYPTO_HW=y \ CONFIG_CRYPTO_DEV_GEODE From 08664f9bf353b73da87e995f40f06ad537072061 Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Thu, 29 Apr 2021 23:02:53 +0200 Subject: [PATCH 31/45] kernel: limit crypto-hw-talitos to the mpc85xx and layerscape CONFIG_CRYPTO_DEV_TALITOS depends on FSL_SOC. This driver only makes sense on Freescale(NXP) SoCs. Signed-off-by: Aleksander Jan Bajkowski --- package/kernel/linux/modules/crypto.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index aa578e1da0..35d840b229 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -420,7 +420,8 @@ $(eval $(call KernelPackage,crypto-hw-safexcel)) define KernelPackage/crypto-hw-talitos TITLE:=Freescale integrated security engine (SEC) driver - DEPENDS:=+kmod-crypto-manager +kmod-crypto-hash +kmod-random-core +kmod-crypto-authenc +kmod-crypto-des + DEPENDS:=@(TARGET_mpc85xx||TARGET_layerscape) +kmod-crypto-manager \ + +kmod-crypto-hash +kmod-random-core +kmod-crypto-authenc +kmod-crypto-des KCONFIG:= \ CONFIG_CRYPTO_HW=y \ CONFIG_CRYPTO_DEV_TALITOS \ From 0097899da79f1140c66fa820be31005c89933a0e Mon Sep 17 00:00:00 2001 From: Konstantin Demin Date: Fri, 23 Apr 2021 09:49:55 +0300 Subject: [PATCH 32/45] binutils: update to 2.35.2 Signed-off-by: Konstantin Demin --- package/devel/binutils/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/devel/binutils/Makefile b/package/devel/binutils/Makefile index 790fb1e91a..ca1099349c 100644 --- a/package/devel/binutils/Makefile +++ b/package/devel/binutils/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=binutils -PKG_VERSION:=2.35.1 -PKG_RELEASE:=2 +PKG_VERSION:=2.35.2 +PKG_RELEASE:=1 PKG_SOURCE_URL:=@GNU/binutils PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_VERSION:=$(PKG_VERSION) -PKG_HASH:=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607 +PKG_HASH:=dcd5b0416e7b0a9b24bed76cd8c6c132526805761863150a26d016415b8bdc7b PKG_FIXUP:=autoreconf PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld libiberty gold intl From 42cd06f7fe49668399a010db8f5d2100e45465a9 Mon Sep 17 00:00:00 2001 From: Alexander Egorenkov Date: Sat, 17 Apr 2021 09:50:39 +0200 Subject: [PATCH 33/45] kexec-tools: add patch to fix issue with appended DTB and zImage on ARM This patch fixes a recently found problem when a zImage passed to kexec-tools contains an appended DTB. In that case kexec boot fails because the decompressor wrongly tries to use the non-existing appended DTB instaed of the one passed in the register r2. - http://lists.infradead.org/pipermail/kexec/2021-April/022353.html Signed-off-by: Alexander Egorenkov --- package/boot/kexec-tools/Makefile | 2 +- ...magic-4-bytes-of-appended-DTB-in-zIm.patch | 52 +++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 package/boot/kexec-tools/patches/001-arm-do-not-copy-magic-4-bytes-of-appended-DTB-in-zIm.patch diff --git a/package/boot/kexec-tools/Makefile b/package/boot/kexec-tools/Makefile index 36fe53671a..0fbbefdc3b 100644 --- a/package/boot/kexec-tools/Makefile +++ b/package/boot/kexec-tools/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kexec-tools PKG_VERSION:=2.0.21 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kexec diff --git a/package/boot/kexec-tools/patches/001-arm-do-not-copy-magic-4-bytes-of-appended-DTB-in-zIm.patch b/package/boot/kexec-tools/patches/001-arm-do-not-copy-magic-4-bytes-of-appended-DTB-in-zIm.patch new file mode 100644 index 0000000000..82bdd4e7ed --- /dev/null +++ b/package/boot/kexec-tools/patches/001-arm-do-not-copy-magic-4-bytes-of-appended-DTB-in-zIm.patch @@ -0,0 +1,52 @@ +From 9817ec81968a5eec7863902833fb77680544eae4 Mon Sep 17 00:00:00 2001 +From: Alexander Egorenkov +Date: Mon, 12 Apr 2021 13:18:05 +0200 +Subject: [PATCH 1/1] arm: do not copy magic 4 bytes of appended DTB in zImage + +If the passed zImage happens to have a DTB appended, then the magic 4 bytes +of the DTB are copied together with the kernel image. This leads to +failed kexec boots because the decompressor finds the aforementioned +DTB magic and falsely tries to replace the DTB passed in the register r2 +with the non-existent appended one. + +Signed-off-by: Alexander Egorenkov +Signed-off-by: Simon Horman +--- + kexec/arch/arm/kexec-zImage-arm.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +--- a/kexec/arch/arm/kexec-zImage-arm.c ++++ b/kexec/arch/arm/kexec-zImage-arm.c +@@ -382,6 +382,7 @@ int zImage_arm_load(int argc, char **arg + unsigned int atag_offset = 0x1000; /* 4k offset from memory start */ + unsigned int extra_size = 0x8000; /* TEXT_OFFSET */ + const struct zimage_tag *tag; ++ size_t kernel_buf_size; + size_t kernel_mem_size; + const char *command_line; + char *modified_cmdline = NULL; +@@ -538,6 +539,15 @@ int zImage_arm_load(int argc, char **arg + } + + /* ++ * Save the length of the compressed kernel image w/o the appended DTB. ++ * This will be required later on when the kernel image contained ++ * in the zImage will be loaded into a kernel memory segment. ++ * And we want to load ONLY the compressed kernel image from the zImage ++ * and discard the appended DTB. ++ */ ++ kernel_buf_size = len; ++ ++ /* + * Always extend the zImage by four bytes to ensure that an appended + * DTB image always sees an initialised value after _edata. + */ +@@ -759,7 +769,7 @@ int zImage_arm_load(int argc, char **arg + add_segment(info, dtb_buf, dtb_length, dtb_offset, dtb_length); + } + +- add_segment(info, buf, len, kernel_base, kernel_mem_size); ++ add_segment(info, buf, kernel_buf_size, kernel_base, kernel_mem_size); + + info->entry = (void*)kernel_base; + From cc76e34c10e57cb1a4f7971268a77aad2f24c8ca Mon Sep 17 00:00:00 2001 From: Matt Merhar Date: Thu, 25 Feb 2021 23:28:53 -0500 Subject: [PATCH 34/45] kernel-defaults: fix external kernel build when user_headers is missing Use an 'if' so the absence of $(LINUX_DIR)/user_headers doesn't make the line evaluate to false and cause the build to fail. Signed-off-by: Matt Merhar --- include/kernel-defaults.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index 82bc32256d..e71746f651 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -43,7 +43,9 @@ else rmdir $(LINUX_DIR); \ fi ln -s $(CONFIG_EXTERNAL_KERNEL_TREE) $(LINUX_DIR) - $(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] && rm -rf $(LINUX_DIR)/user_headers + if [ -d $(LINUX_DIR)/user_headers ]; then \ + rm -rf $(LINUX_DIR)/user_headers; \ + fi endef endif From 080a0b74e39d159eecf69c468debec42f28bf4d8 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Wed, 19 May 2021 13:02:31 +0200 Subject: [PATCH 35/45] mvebu: 5.10 fix DVFS caused random boot crashes 5.10.37 and 5.4.119 introduced a lot of DVFS changes for Armada 37xx from 5.13 kernel. Unfortunately commit: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/cpufreq/armada-37xx-cpufreq.c?h=v5.10.37&id=a13b110e7c9e0dc2edcc7a19d4255fc88abd83cc This patch actually corrects the things so that 1 or 1.2GHz models would actually get scaled to their native frequency. However, due to a AVS setting voltages too low this will cause random crashes on 1.2GHz models. So, until a new safe for everybody voltage is agreed on lets revert the patch. Fixes: d337731 ("kernel: bump 5.10 to 5.10.37") Signed-off-by: Robert Marko --- ...rmada-37xx-Fix-setting-TBG-parent-fo.patch | 107 ++++++++++++++++++ ...rmada-37xx-Fix-setting-TBG-parent-fo.patch | 107 ++++++++++++++++++ 2 files changed, 214 insertions(+) create mode 100644 target/linux/mvebu/patches-5.10/803-Revert-cpufreq-armada-37xx-Fix-setting-TBG-parent-fo.patch create mode 100644 target/linux/mvebu/patches-5.4/803-Revert-cpufreq-armada-37xx-Fix-setting-TBG-parent-fo.patch diff --git a/target/linux/mvebu/patches-5.10/803-Revert-cpufreq-armada-37xx-Fix-setting-TBG-parent-fo.patch b/target/linux/mvebu/patches-5.10/803-Revert-cpufreq-armada-37xx-Fix-setting-TBG-parent-fo.patch new file mode 100644 index 0000000000..65184df584 --- /dev/null +++ b/target/linux/mvebu/patches-5.10/803-Revert-cpufreq-armada-37xx-Fix-setting-TBG-parent-fo.patch @@ -0,0 +1,107 @@ +From 35639bac13927d1476398b740b11cbed0ee3ddb2 Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Tue, 18 May 2021 13:24:30 +0200 +Subject: [PATCH] Revert "cpufreq: armada-37xx: Fix setting TBG parent for load + levels" + +This reverts commit a13b110e7c9e0dc2edcc7a19d4255fc88abd83cc. + +This patch actually corrects the things so that 1 or 1.2GHz models would +actually get scaled to their native frequency. + +However, due to a AVS setting voltages too low this will cause random +crashes on 1.2GHz models. + +So, until a new safe for everybody voltage is agreed on +lets revert the patch. + +Signed-off-by: Robert Marko +--- + drivers/cpufreq/armada-37xx-cpufreq.c | 35 +++++++++------------------ + 1 file changed, 12 insertions(+), 23 deletions(-) + +--- a/drivers/cpufreq/armada-37xx-cpufreq.c ++++ b/drivers/cpufreq/armada-37xx-cpufreq.c +@@ -25,10 +25,6 @@ + + #include "cpufreq-dt.h" + +-/* Clk register set */ +-#define ARMADA_37XX_CLK_TBG_SEL 0 +-#define ARMADA_37XX_CLK_TBG_SEL_CPU_OFF 22 +- + /* Power management in North Bridge register set */ + #define ARMADA_37XX_NB_L0L1 0x18 + #define ARMADA_37XX_NB_L2L3 0x1C +@@ -126,15 +122,10 @@ static struct armada_37xx_dvfs *armada_3 + * will be configured then the DVFS will be enabled. + */ + static void __init armada37xx_cpufreq_dvfs_setup(struct regmap *base, +- struct regmap *clk_base, u8 *divider) ++ struct clk *clk, u8 *divider) + { +- u32 cpu_tbg_sel; + int load_lvl; +- +- /* Determine to which TBG clock is CPU connected */ +- regmap_read(clk_base, ARMADA_37XX_CLK_TBG_SEL, &cpu_tbg_sel); +- cpu_tbg_sel >>= ARMADA_37XX_CLK_TBG_SEL_CPU_OFF; +- cpu_tbg_sel &= ARMADA_37XX_NB_TBG_SEL_MASK; ++ struct clk *parent; + + for (load_lvl = 0; load_lvl < LOAD_LEVEL_NR; load_lvl++) { + unsigned int reg, mask, val, offset = 0; +@@ -153,11 +144,6 @@ static void __init armada37xx_cpufreq_dv + mask = (ARMADA_37XX_NB_CLK_SEL_MASK + << ARMADA_37XX_NB_CLK_SEL_OFF); + +- /* Set TBG index, for all levels we use the same TBG */ +- val = cpu_tbg_sel << ARMADA_37XX_NB_TBG_SEL_OFF; +- mask = (ARMADA_37XX_NB_TBG_SEL_MASK +- << ARMADA_37XX_NB_TBG_SEL_OFF); +- + /* + * Set cpu divider based on the pre-computed array in + * order to have balanced step. +@@ -176,6 +162,14 @@ static void __init armada37xx_cpufreq_dv + + regmap_update_bits(base, reg, mask, val); + } ++ ++ /* ++ * Set cpu clock source, for all the level we keep the same ++ * clock source that the one already configured. For this one ++ * we need to use the clock framework ++ */ ++ parent = clk_get_parent(clk); ++ clk_set_parent(clk, parent); + } + + /* +@@ -401,16 +395,11 @@ static int __init armada37xx_cpufreq_dri + struct platform_device *pdev; + unsigned long freq; + unsigned int cur_frequency, base_frequency; +- struct regmap *nb_clk_base, *nb_pm_base, *avs_base; ++ struct regmap *nb_pm_base, *avs_base; + struct device *cpu_dev; + int load_lvl, ret; + struct clk *clk, *parent; + +- nb_clk_base = +- syscon_regmap_lookup_by_compatible("marvell,armada-3700-periph-clock-nb"); +- if (IS_ERR(nb_clk_base)) +- return -ENODEV; +- + nb_pm_base = + syscon_regmap_lookup_by_compatible("marvell,armada-3700-nb-pm"); + +@@ -487,7 +476,7 @@ static int __init armada37xx_cpufreq_dri + armada37xx_cpufreq_avs_configure(avs_base, dvfs); + armada37xx_cpufreq_avs_setup(avs_base, dvfs); + +- armada37xx_cpufreq_dvfs_setup(nb_pm_base, nb_clk_base, dvfs->divider); ++ armada37xx_cpufreq_dvfs_setup(nb_pm_base, clk, dvfs->divider); + clk_put(clk); + + for (load_lvl = ARMADA_37XX_DVFS_LOAD_0; load_lvl < LOAD_LEVEL_NR; diff --git a/target/linux/mvebu/patches-5.4/803-Revert-cpufreq-armada-37xx-Fix-setting-TBG-parent-fo.patch b/target/linux/mvebu/patches-5.4/803-Revert-cpufreq-armada-37xx-Fix-setting-TBG-parent-fo.patch new file mode 100644 index 0000000000..65184df584 --- /dev/null +++ b/target/linux/mvebu/patches-5.4/803-Revert-cpufreq-armada-37xx-Fix-setting-TBG-parent-fo.patch @@ -0,0 +1,107 @@ +From 35639bac13927d1476398b740b11cbed0ee3ddb2 Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Tue, 18 May 2021 13:24:30 +0200 +Subject: [PATCH] Revert "cpufreq: armada-37xx: Fix setting TBG parent for load + levels" + +This reverts commit a13b110e7c9e0dc2edcc7a19d4255fc88abd83cc. + +This patch actually corrects the things so that 1 or 1.2GHz models would +actually get scaled to their native frequency. + +However, due to a AVS setting voltages too low this will cause random +crashes on 1.2GHz models. + +So, until a new safe for everybody voltage is agreed on +lets revert the patch. + +Signed-off-by: Robert Marko +--- + drivers/cpufreq/armada-37xx-cpufreq.c | 35 +++++++++------------------ + 1 file changed, 12 insertions(+), 23 deletions(-) + +--- a/drivers/cpufreq/armada-37xx-cpufreq.c ++++ b/drivers/cpufreq/armada-37xx-cpufreq.c +@@ -25,10 +25,6 @@ + + #include "cpufreq-dt.h" + +-/* Clk register set */ +-#define ARMADA_37XX_CLK_TBG_SEL 0 +-#define ARMADA_37XX_CLK_TBG_SEL_CPU_OFF 22 +- + /* Power management in North Bridge register set */ + #define ARMADA_37XX_NB_L0L1 0x18 + #define ARMADA_37XX_NB_L2L3 0x1C +@@ -126,15 +122,10 @@ static struct armada_37xx_dvfs *armada_3 + * will be configured then the DVFS will be enabled. + */ + static void __init armada37xx_cpufreq_dvfs_setup(struct regmap *base, +- struct regmap *clk_base, u8 *divider) ++ struct clk *clk, u8 *divider) + { +- u32 cpu_tbg_sel; + int load_lvl; +- +- /* Determine to which TBG clock is CPU connected */ +- regmap_read(clk_base, ARMADA_37XX_CLK_TBG_SEL, &cpu_tbg_sel); +- cpu_tbg_sel >>= ARMADA_37XX_CLK_TBG_SEL_CPU_OFF; +- cpu_tbg_sel &= ARMADA_37XX_NB_TBG_SEL_MASK; ++ struct clk *parent; + + for (load_lvl = 0; load_lvl < LOAD_LEVEL_NR; load_lvl++) { + unsigned int reg, mask, val, offset = 0; +@@ -153,11 +144,6 @@ static void __init armada37xx_cpufreq_dv + mask = (ARMADA_37XX_NB_CLK_SEL_MASK + << ARMADA_37XX_NB_CLK_SEL_OFF); + +- /* Set TBG index, for all levels we use the same TBG */ +- val = cpu_tbg_sel << ARMADA_37XX_NB_TBG_SEL_OFF; +- mask = (ARMADA_37XX_NB_TBG_SEL_MASK +- << ARMADA_37XX_NB_TBG_SEL_OFF); +- + /* + * Set cpu divider based on the pre-computed array in + * order to have balanced step. +@@ -176,6 +162,14 @@ static void __init armada37xx_cpufreq_dv + + regmap_update_bits(base, reg, mask, val); + } ++ ++ /* ++ * Set cpu clock source, for all the level we keep the same ++ * clock source that the one already configured. For this one ++ * we need to use the clock framework ++ */ ++ parent = clk_get_parent(clk); ++ clk_set_parent(clk, parent); + } + + /* +@@ -401,16 +395,11 @@ static int __init armada37xx_cpufreq_dri + struct platform_device *pdev; + unsigned long freq; + unsigned int cur_frequency, base_frequency; +- struct regmap *nb_clk_base, *nb_pm_base, *avs_base; ++ struct regmap *nb_pm_base, *avs_base; + struct device *cpu_dev; + int load_lvl, ret; + struct clk *clk, *parent; + +- nb_clk_base = +- syscon_regmap_lookup_by_compatible("marvell,armada-3700-periph-clock-nb"); +- if (IS_ERR(nb_clk_base)) +- return -ENODEV; +- + nb_pm_base = + syscon_regmap_lookup_by_compatible("marvell,armada-3700-nb-pm"); + +@@ -487,7 +476,7 @@ static int __init armada37xx_cpufreq_dri + armada37xx_cpufreq_avs_configure(avs_base, dvfs); + armada37xx_cpufreq_avs_setup(avs_base, dvfs); + +- armada37xx_cpufreq_dvfs_setup(nb_pm_base, nb_clk_base, dvfs->divider); ++ armada37xx_cpufreq_dvfs_setup(nb_pm_base, clk, dvfs->divider); + clk_put(clk); + + for (load_lvl = ARMADA_37XX_DVFS_LOAD_0; load_lvl < LOAD_LEVEL_NR; From 81d0ddc806e1f088328ca29eb56db9285b2a4f7b Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Mon, 17 May 2021 00:38:03 +0000 Subject: [PATCH 36/45] prereq-build: g++ formatting and consistency fixes Remove \n that mangles output, and fix inconsistent version name check. Example before: Build dependency: Please install the GNU C++ Compiler (g++) 6 or later Build dependency: \nPlease reinstall the GNU C++ Compiler (4.8 or later) - it appears to be broken Build dependency: Please install ncurses. (Missing libncurses.so or ncurses.h) Signed-off-by: Karl Palsson --- include/prereq-build.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 8adf0d03dd..639d1ad0fa 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -31,7 +31,7 @@ $(eval $(call SetupHostCommand,gcc, \ gcc --version | grep -E 'Apple.(LLVM|clang)' )) $(eval $(call TestHostCommand,working-gcc, \ - \nPlease reinstall the GNU C Compiler (6 or later) - \ + Please reinstall the GNU C Compiler (6 or later) - \ it appears to be broken, \ echo 'int main(int argc, char **argv) { return 0; }' | \ gcc -x c -o $(TMP_DIR)/a.out -)) @@ -43,7 +43,7 @@ $(eval $(call SetupHostCommand,g++, \ g++ --version | grep -E 'Apple.(LLVM|clang)' )) $(eval $(call TestHostCommand,working-g++, \ - \nPlease reinstall the GNU C++ Compiler (4.8 or later) - \ + Please reinstall the GNU C++ Compiler (6 or later) - \ it appears to be broken, \ echo 'int main(int argc, char **argv) { return 0; }' | \ g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \ From b054009854d3aa5bdba24334673cd56a4a6f9a5a Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sun, 16 May 2021 18:06:58 +0200 Subject: [PATCH 37/45] mac80211: fix ATH_REG_DYNAMIC_USER_REG_HINTS ATH_REG_DYNAMIC_USER_REG_HINTS is currently not being set as mac80211 tries to set it as m which is not possible as its boolean only. Since its used alongside user regulatory, move it to USER_REGD. This is required for ath11k to accept regulatory changes, otherwise it wont accept any changes and will simply force US. Signed-off-by: Robert Marko --- package/kernel/mac80211/ath.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/mac80211/ath.mk b/package/kernel/mac80211/ath.mk index 24abb910ff..ba03ae11a6 100644 --- a/package/kernel/mac80211/ath.mk +++ b/package/kernel/mac80211/ath.mk @@ -34,7 +34,7 @@ ifdef CONFIG_PACKAGE_MAC80211_TRACING WIL6210_TRACING endif -config-$(call config_package,ath) += ATH_CARDS ATH_COMMON ATH_REG_DYNAMIC_USER_REG_HINTS +config-$(call config_package,ath) += ATH_CARDS ATH_COMMON config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH9K_STATION_STATISTICS config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL @@ -45,7 +45,7 @@ config-$(call config_package,owl-loader) += ATH9K_PCI_NO_EEPROM config-$(CONFIG_TARGET_ath79) += ATH9K_AHB config-$(CONFIG_TARGET_ipq40xx) += ATH10K_AHB config-$(CONFIG_PCI) += ATH9K_PCI -config-$(CONFIG_ATH_USER_REGD) += ATH_USER_REGD +config-$(CONFIG_ATH_USER_REGD) += ATH_USER_REGD ATH_REG_DYNAMIC_USER_REG_HINTS config-$(CONFIG_ATH9K_HWRNG) += ATH9K_HWRNG config-$(CONFIG_ATH9K_SUPPORT_PCOEM) += ATH9K_PCOEM config-$(CONFIG_ATH9K_TX99) += ATH9K_TX99 From 2d1546832357a3a8bd18680bd31dd92050e739b2 Mon Sep 17 00:00:00 2001 From: David Adair Date: Fri, 14 May 2021 16:04:27 -0700 Subject: [PATCH 38/45] ccache: Build with ENABLE_DOCUMENTATION=OFF This adjusts the Makefile to use the new option to turn off the doc builds. It will not cause any problems except a warning about unused options if combined with a ccache source missing the upstream patch. Since a config setting is required to re-enable the doc build this is equivalent to unconditionally disabling the docs if the config setting is not created. Signed-off-by: David Adair --- tools/ccache/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/ccache/Makefile b/tools/ccache/Makefile index b4dc81aaaa..3db6cc0818 100644 --- a/tools/ccache/Makefile +++ b/tools/ccache/Makefile @@ -25,6 +25,9 @@ CMAKE_HOST_OPTIONS += \ -DCMAKE_SKIP_RPATH=FALSE \ -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOST}/lib" \ +ifneq (docs-$(CONFIG_BUILD_DOCUMENTATION),docs-y) +CMAKE_HOST_OPTIONS += -DENABLE_DOCUMENTATION=OFF +endif define Host/Install/ccache $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/ From 8d1567ba6177f24969e76733d0cee30a830b5f7e Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Fri, 7 May 2021 12:36:03 +0800 Subject: [PATCH 39/45] generic: mt7530: fix EEE patch The higher 16-bit of EEE register was overwritten by mistake, fix that. Fixes: 5b9ba4a93e83 ("generic: mt7530: support adjusting EEE") Signed-off-by: DENG Qingfang --- .../pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/generic/pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch b/target/linux/generic/pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch index b9ca691f6f..0fd4151ad0 100644 --- a/target/linux/generic/pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch +++ b/target/linux/generic/pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch @@ -66,7 +66,7 @@ Signed-off-by: René van Dorst + eeecr &= 0xFFFF0000; + if (!e->tx_lpi_enabled) + eeecr |= LPI_MODE_EN; -+ eeecr = LPI_THRESH(e->tx_lpi_timer); ++ eeecr |= LPI_THRESH(e->tx_lpi_timer); + mt7530_write(priv, MT7530_PMEEECR_P(port), eeecr); + } else { + priv->eee_enable &= ~(BIT(port)); From d6831752367722e916bd15e5d1af79993c637a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cabanelas?= Date: Fri, 23 Apr 2021 17:33:32 +0200 Subject: [PATCH 40/45] kernel: backport "mvmdio avoid error message for optional IRQ" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rid of kernel error message: [ 0.780828] orion-mdio d0072004.mdio: IRQ index 0 not found on Marvell targets backporting the kernel commit fa2632f74e57 Signed-off-by: Daniel González Cabanelas --- ...avoid-error-message-for-optional-IRQ.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 target/linux/generic/backport-5.4/751-v5.6-net-mvmdio-avoid-error-message-for-optional-IRQ.patch diff --git a/target/linux/generic/backport-5.4/751-v5.6-net-mvmdio-avoid-error-message-for-optional-IRQ.patch b/target/linux/generic/backport-5.4/751-v5.6-net-mvmdio-avoid-error-message-for-optional-IRQ.patch new file mode 100644 index 0000000000..6d51de8372 --- /dev/null +++ b/target/linux/generic/backport-5.4/751-v5.6-net-mvmdio-avoid-error-message-for-optional-IRQ.patch @@ -0,0 +1,33 @@ +From fa2632f74e57bbc869c8ad37751a11b6147a3acc Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Mon, 16 Mar 2020 20:49:07 +1300 +Subject: [PATCH] net: mvmdio: avoid error message for optional IRQ + +Per the dt-binding the interrupt is optional so use +platform_get_irq_optional() instead of platform_get_irq(). Since +commit 7723f4c5ecdb ("driver core: platform: Add an error message to +platform_get_irq*()") platform_get_irq() produces an error message + + orion-mdio f1072004.mdio: IRQ index 0 not found + +which is perfectly normal if one hasn't specified the optional property +in the device tree. + +Signed-off-by: Chris Packham +Reviewed-by: Andrew Lunn +Signed-off-by: David S. Miller +--- + drivers/net/ethernet/marvell/mvmdio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/marvell/mvmdio.c ++++ b/drivers/net/ethernet/marvell/mvmdio.c +@@ -347,7 +347,7 @@ static int orion_mdio_probe(struct platf + } + + +- dev->err_interrupt = platform_get_irq(pdev, 0); ++ dev->err_interrupt = platform_get_irq_optional(pdev, 0); + if (dev->err_interrupt > 0 && + resource_size(r) < MVMDIO_ERR_INT_MASK + 4) { + dev_err(&pdev->dev, From a6616eea406d8654f5a0198a26c5748a86c75272 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 18 Apr 2021 21:51:00 +0200 Subject: [PATCH 41/45] mediatek: update mtd parser patches This updates the patches to match the versions included in the mtd subsystem for the next Linux kernel version. Signed-off-by: Hauke Mehrtens --- .../dts/mt7622-buffalo-wsr-2533dhp2.dts | 2 +- ...ings-mtd-brcm-trx-Add-brcm-trx-magic.patch | 32 ++++++++ ...trx-Allow-to-specify-trx-magic-in-DT.patch | 75 ------------------- ...Allow-to-specify-brcm-trx-magic-in-D.patch | 50 +++++++++++++ ...llow-to-use-TRX-parser-on-Mediatek-.patch} | 12 +-- ...trx-Allow-to-specify-trx-magic-in-DT.patch | 8 +- 6 files changed, 94 insertions(+), 85 deletions(-) create mode 100644 target/linux/mediatek/patches-5.10/350-dt-bindings-mtd-brcm-trx-Add-brcm-trx-magic.patch delete mode 100644 target/linux/mediatek/patches-5.10/350-mtd-parsers-trx-Allow-to-specify-trx-magic-in-DT.patch create mode 100644 target/linux/mediatek/patches-5.10/351-mtd-parsers-trx-Allow-to-specify-brcm-trx-magic-in-D.patch rename target/linux/mediatek/patches-5.10/{351-mtd-parsers-Remove-dependency-to-BRCM-architectures.patch => 352-mtd-parsers-trx-Allow-to-use-TRX-parser-on-Mediatek-.patch} (55%) diff --git a/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts b/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts index ce5cd1c9be..62e2e7f4cb 100644 --- a/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts +++ b/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts @@ -279,7 +279,7 @@ partition@200000 { compatible = "brcm,trx"; - trx-magic = <0x32504844>; + brcm,trx-magic = <0x32504844>; label = "firmware"; reg = <0x200000 0x3a00000>; }; diff --git a/target/linux/mediatek/patches-5.10/350-dt-bindings-mtd-brcm-trx-Add-brcm-trx-magic.patch b/target/linux/mediatek/patches-5.10/350-dt-bindings-mtd-brcm-trx-Add-brcm-trx-magic.patch new file mode 100644 index 0000000000..1f34652141 --- /dev/null +++ b/target/linux/mediatek/patches-5.10/350-dt-bindings-mtd-brcm-trx-Add-brcm-trx-magic.patch @@ -0,0 +1,32 @@ +From a4d82940ff85a7e307953dfa715f65d5ab487e10 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Sun, 18 Apr 2021 23:46:14 +0200 +Subject: dt-bindings: mtd: brcm,trx: Add brcm,trx-magic + +This adds the description of an additional property which allows to +specify a custom partition parser magic to detect a trx partition. +Buffalo has multiple device which are using the trx format, but with +different magic values. + +Signed-off-by: Hauke Mehrtens +Acked-by: Rob Herring +Signed-off-by: Miquel Raynal +Link: https://lore.kernel.org/linux-mtd/20210418214616.239574-2-hauke@hauke-m.de +--- + .../devicetree/bindings/mtd/partitions/brcm,trx.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.txt ++++ b/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.txt +@@ -28,6 +28,11 @@ detected by a software parsing TRX heade + Required properties: + - compatible : (required) must be "brcm,trx" + ++Optional properties: ++ ++- brcm,trx-magic: TRX magic, if it is different from the default magic ++ 0x30524448 as a u32. ++ + Example: + + flash@0 { diff --git a/target/linux/mediatek/patches-5.10/350-mtd-parsers-trx-Allow-to-specify-trx-magic-in-DT.patch b/target/linux/mediatek/patches-5.10/350-mtd-parsers-trx-Allow-to-specify-trx-magic-in-DT.patch deleted file mode 100644 index 4db51a88ad..0000000000 --- a/target/linux/mediatek/patches-5.10/350-mtd-parsers-trx-Allow-to-specify-trx-magic-in-DT.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 0600e3d81628002a5cd80cf83ee454851b0063c0 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 7 Mar 2021 18:19:26 +0100 -Subject: mtd: parsers: trx: Allow to specify trx-magic in DT - -Buffalo uses a different TRX magic for every device, to be able to use -this trx parser, make it possible to specify the TRX magic in device -tree. If no TRX magic is specified in device tree, the standard value -will be used. This value should only be specified if a vendor chooses to -use a non standard TRX magic. - -Signed-off-by: Hauke Mehrtens ---- - .../bindings/mtd/partitions/brcm,trx.txt | 5 +++++ - drivers/mtd/parsers/parser_trx.c | 21 ++++++++++++++++++- - 2 files changed, 25 insertions(+), 1 deletion(-) - ---- a/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.txt -+++ b/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.txt -@@ -28,6 +28,11 @@ detected by a software parsing TRX heade - Required properties: - - compatible : (required) must be "brcm,trx" - -+Optional properties: -+ -+- trx-magic: TRX magic, if it is different from the default magic -+ 0x30524448 as a u32. -+ - Example: - - flash@0 { ---- a/drivers/mtd/parsers/parser_trx.c -+++ b/drivers/mtd/parsers/parser_trx.c -@@ -74,6 +74,24 @@ out_default: - return "rootfs"; - } - -+static uint32_t parser_trx_get_magic(struct mtd_info *mtd) -+{ -+ uint32_t trx_magic = TRX_MAGIC; -+ struct device_node *np; -+ int err; -+ -+ np = mtd_get_of_node(mtd); -+ if (!np) -+ return trx_magic; -+ -+ /* Get different magic from device tree if specified */ -+ err = of_property_read_u32(np, "trx-magic", &trx_magic); -+ if (err != 0 && err != -EINVAL) -+ pr_err("failed to parse \"trx-magic\" DT attribute, use default: %d\n", err); -+ -+ return trx_magic; -+} -+ - static int parser_trx_parse(struct mtd_info *mtd, - const struct mtd_partition **pparts, - struct mtd_part_parser_data *data) -@@ -83,6 +101,7 @@ static int parser_trx_parse(struct mtd_i - struct trx_header trx; - size_t bytes_read; - uint8_t curr_part = 0, i = 0; -+ uint32_t trx_magic = parser_trx_get_magic(mtd); - int err; - - parts = kcalloc(TRX_PARSER_MAX_PARTS, sizeof(struct mtd_partition), -@@ -97,7 +116,7 @@ static int parser_trx_parse(struct mtd_i - return err; - } - -- if (trx.magic != TRX_MAGIC) { -+ if (trx.magic != trx_magic) { - kfree(parts); - return -ENOENT; - } diff --git a/target/linux/mediatek/patches-5.10/351-mtd-parsers-trx-Allow-to-specify-brcm-trx-magic-in-D.patch b/target/linux/mediatek/patches-5.10/351-mtd-parsers-trx-Allow-to-specify-brcm-trx-magic-in-D.patch new file mode 100644 index 0000000000..ac98556101 --- /dev/null +++ b/target/linux/mediatek/patches-5.10/351-mtd-parsers-trx-Allow-to-specify-brcm-trx-magic-in-D.patch @@ -0,0 +1,50 @@ +From d7f7e04f8b67571a4bf5a0dcd4f9da4214f5262c Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Sun, 18 Apr 2021 23:46:15 +0200 +Subject: mtd: parsers: trx: Allow to specify brcm, trx-magic in DT + +Buffalo uses a different TRX magic for every device, to be able to use +this trx parser, make it possible to specify the TRX magic in device +tree. If no TRX magic is specified in device tree, the standard value +will be used. This value should only be specified if a vendor chooses to +use a non standard TRX magic. + +Signed-off-by: Hauke Mehrtens +Signed-off-by: Miquel Raynal +Link: https://lore.kernel.org/linux-mtd/20210418214616.239574-3-hauke@hauke-m.de +--- + drivers/mtd/parsers/parser_trx.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/drivers/mtd/parsers/parser_trx.c ++++ b/drivers/mtd/parsers/parser_trx.c +@@ -78,13 +78,20 @@ static int parser_trx_parse(struct mtd_i + const struct mtd_partition **pparts, + struct mtd_part_parser_data *data) + { ++ struct device_node *np = mtd_get_of_node(mtd); + struct mtd_partition *parts; + struct mtd_partition *part; + struct trx_header trx; + size_t bytes_read; + uint8_t curr_part = 0, i = 0; ++ uint32_t trx_magic = TRX_MAGIC; + int err; + ++ /* Get different magic from device tree if specified */ ++ err = of_property_read_u32(np, "brcm,trx-magic", &trx_magic); ++ if (err != 0 && err != -EINVAL) ++ pr_err("failed to parse \"brcm,trx-magic\" DT attribute, using default: %d\n", err); ++ + parts = kcalloc(TRX_PARSER_MAX_PARTS, sizeof(struct mtd_partition), + GFP_KERNEL); + if (!parts) +@@ -97,7 +104,7 @@ static int parser_trx_parse(struct mtd_i + return err; + } + +- if (trx.magic != TRX_MAGIC) { ++ if (trx.magic != trx_magic) { + kfree(parts); + return -ENOENT; + } diff --git a/target/linux/mediatek/patches-5.10/351-mtd-parsers-Remove-dependency-to-BRCM-architectures.patch b/target/linux/mediatek/patches-5.10/352-mtd-parsers-trx-Allow-to-use-TRX-parser-on-Mediatek-.patch similarity index 55% rename from target/linux/mediatek/patches-5.10/351-mtd-parsers-Remove-dependency-to-BRCM-architectures.patch rename to target/linux/mediatek/patches-5.10/352-mtd-parsers-trx-Allow-to-use-TRX-parser-on-Mediatek-.patch index fa94c22304..b37f461101 100644 --- a/target/linux/mediatek/patches-5.10/351-mtd-parsers-Remove-dependency-to-BRCM-architectures.patch +++ b/target/linux/mediatek/patches-5.10/352-mtd-parsers-trx-Allow-to-use-TRX-parser-on-Mediatek-.patch @@ -1,11 +1,13 @@ -From 63f0cf88ab5461acb0911252f12bb94ee3bf05a2 Mon Sep 17 00:00:00 2001 +From 81bb218c829246962a6327c64eec18ddcc049936 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens -Date: Sun, 7 Mar 2021 18:23:29 +0100 -Subject: mtd: parsers: Remove dependency to BRCM architectures +Date: Sun, 18 Apr 2021 23:46:16 +0200 +Subject: mtd: parsers: trx: Allow to use TRX parser on Mediatek SoCs -Buffalo uses the TRX partition format also on Mediatek SoCs. +Buffalo uses the TRX partition format also on Mediatek MT7622 SoCs. Signed-off-by: Hauke Mehrtens +Signed-off-by: Miquel Raynal +Link: https://lore.kernel.org/linux-mtd/20210418214616.239574-4-hauke@hauke-m.de --- drivers/mtd/parsers/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) @@ -17,7 +19,7 @@ Signed-off-by: Hauke Mehrtens config MTD_PARSER_TRX tristate "Parser for TRX format partitions" - depends on MTD && (BCM47XX || ARCH_BCM_5301X || COMPILE_TEST) -+ depends on MTD ++ depends on MTD && (BCM47XX || ARCH_BCM_5301X || ARCH_MEDIATEK || COMPILE_TEST) help TRX is a firmware format used by Broadcom on their devices. It may contain up to 3/4 partitions (depending on the version). diff --git a/target/linux/mediatek/patches-5.4/0350-mtd-parsers-trx-Allow-to-specify-trx-magic-in-DT.patch b/target/linux/mediatek/patches-5.4/0350-mtd-parsers-trx-Allow-to-specify-trx-magic-in-DT.patch index 4db51a88ad..0446ce9386 100644 --- a/target/linux/mediatek/patches-5.4/0350-mtd-parsers-trx-Allow-to-specify-trx-magic-in-DT.patch +++ b/target/linux/mediatek/patches-5.4/0350-mtd-parsers-trx-Allow-to-specify-trx-magic-in-DT.patch @@ -1,7 +1,7 @@ From 0600e3d81628002a5cd80cf83ee454851b0063c0 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Mar 2021 18:19:26 +0100 -Subject: mtd: parsers: trx: Allow to specify trx-magic in DT +Subject: mtd: parsers: trx: Allow to specify brcm,trx-magic in DT Buffalo uses a different TRX magic for every device, to be able to use this trx parser, make it possible to specify the TRX magic in device @@ -23,7 +23,7 @@ Signed-off-by: Hauke Mehrtens +Optional properties: + -+- trx-magic: TRX magic, if it is different from the default magic ++- brcm,trx-magic: TRX magic, if it is different from the default magic + 0x30524448 as a u32. + Example: @@ -46,9 +46,9 @@ Signed-off-by: Hauke Mehrtens + return trx_magic; + + /* Get different magic from device tree if specified */ -+ err = of_property_read_u32(np, "trx-magic", &trx_magic); ++ err = of_property_read_u32(np, "brcm,trx-magic", &trx_magic); + if (err != 0 && err != -EINVAL) -+ pr_err("failed to parse \"trx-magic\" DT attribute, use default: %d\n", err); ++ pr_err("failed to parse \"brcm,trx-magic\" DT attribute, use default: %d\n", err); + + return trx_magic; +} From 1903233f2b312caf87aa369cd325d9689c45a1c6 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 3 May 2021 00:35:38 +0200 Subject: [PATCH 42/45] treewide: Mark packages nonshared if they depend on @TARGET_ This marks all packages which depend on a target with @TARGET nonshared. If they are not marked nonshared they would be build by the SDK build and if this happens with a different SDK, then the SDK from the target the package depends on, the package would not be added to the index. This should fix the image builder for some of these packages. This should fix the image builder at least for bcm27xx/bcm2710 and bcm4908/generic. Signed-off-by: Hauke Mehrtens --- package/firmware/amd64-microcode/Makefile | 2 ++ package/firmware/cypress-nvram/Makefile | 2 ++ package/firmware/intel-microcode/Makefile | 2 ++ package/firmware/layerscape/fman-ucode/Makefile | 2 ++ package/firmware/layerscape/ls-ddr-phy/Makefile | 2 ++ package/firmware/layerscape/ls-dpl/Makefile | 2 ++ package/firmware/layerscape/ls-mc/Makefile | 2 ++ package/firmware/layerscape/ls-rcw/Makefile | 2 ++ package/firmware/layerscape/ppfe-firmware/Makefile | 2 ++ package/network/utils/layerscape/restool/Makefile | 2 ++ package/system/iucode-tool/Makefile | 2 ++ package/utils/bcm4908img/Makefile | 2 ++ 12 files changed, 24 insertions(+) diff --git a/package/firmware/amd64-microcode/Makefile b/package/firmware/amd64-microcode/Makefile index e0051ab8c0..4444883c74 100644 --- a/package/firmware/amd64-microcode/Makefile +++ b/package/firmware/amd64-microcode/Makefile @@ -18,6 +18,8 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE) PKG_LICENSE_FILE:=LICENSE.amd-ucode +PKG_FLAGS:=nonshared + include $(INCLUDE_DIR)/package.mk define Package/amd64-microcode diff --git a/package/firmware/cypress-nvram/Makefile b/package/firmware/cypress-nvram/Makefile index bccdb3fced..777b826088 100644 --- a/package/firmware/cypress-nvram/Makefile +++ b/package/firmware/cypress-nvram/Makefile @@ -18,6 +18,8 @@ PKG_SOURCE_URL:=https://github.com/openwrt/cypress-nvram.git PKG_MAINTAINER:=Álvaro Fernández Rojas +PKG_FLAGS:=nonshared + include $(INCLUDE_DIR)/package.mk define Package/cypress-nvram-default diff --git a/package/firmware/intel-microcode/Makefile b/package/firmware/intel-microcode/Makefile index e8ae7bff58..d2f61e9bf0 100644 --- a/package/firmware/intel-microcode/Makefile +++ b/package/firmware/intel-microcode/Makefile @@ -24,6 +24,8 @@ else MICROCODE:="intel-microcode" endif +PKG_FLAGS:=nonshared + include $(INCLUDE_DIR)/package.mk define Package/intel-microcode diff --git a/package/firmware/layerscape/fman-ucode/Makefile b/package/firmware/layerscape/fman-ucode/Makefile index 8c76774ac7..69cc761110 100644 --- a/package/firmware/layerscape/fman-ucode/Makefile +++ b/package/firmware/layerscape/fman-ucode/Makefile @@ -16,6 +16,8 @@ PKG_SOURCE_URL:=https://github.com/NXP/qoriq-fm-ucode.git PKG_SOURCE_VERSION:=c275e91392e2adab1ed22f3867b8269ca3c54014 PKG_MIRROR_HASH:=90b619ed501462b92f34f2fabfa09d6aaa5235990891d1c3132821c7d18a39bd +PKG_FLAGS:=nonshared + include $(INCLUDE_DIR)/package.mk define Package/layerscape-fman diff --git a/package/firmware/layerscape/ls-ddr-phy/Makefile b/package/firmware/layerscape/ls-ddr-phy/Makefile index bd861962e7..68142b4bbf 100644 --- a/package/firmware/layerscape/ls-ddr-phy/Makefile +++ b/package/firmware/layerscape/ls-ddr-phy/Makefile @@ -18,6 +18,8 @@ PKG_BUILD_DEPENDS:=tfa-layerscape/host PKG_LICENSE:=EULA PKG_LICENSE_FILES:=NXP-Binary-EULA.txt +PKG_FLAGS:=nonshared + include $(INCLUDE_DIR)/package.mk define Package/layerscape-ddr-phy diff --git a/package/firmware/layerscape/ls-dpl/Makefile b/package/firmware/layerscape/ls-dpl/Makefile index f577c5b7e3..8ba5fafb2b 100644 --- a/package/firmware/layerscape/ls-dpl/Makefile +++ b/package/firmware/layerscape/ls-dpl/Makefile @@ -16,6 +16,8 @@ PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/mc PKG_SOURCE_VERSION:=8672a5f5abcd3a354dcab07e03f2a8a69b2e962d PKG_MIRROR_HASH:=4b8ad3148aee1e0c034206543472aebb435655fd03a661c4c1be545dcac7ddf0 +PKG_FLAGS:=nonshared + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/kernel.mk diff --git a/package/firmware/layerscape/ls-mc/Makefile b/package/firmware/layerscape/ls-mc/Makefile index daba35a3b9..3b2cdebbf1 100644 --- a/package/firmware/layerscape/ls-mc/Makefile +++ b/package/firmware/layerscape/ls-mc/Makefile @@ -16,6 +16,8 @@ PKG_SOURCE_URL:=https://github.com/NXP/qoriq-mc-binary.git PKG_SOURCE_VERSION:=f73683596a7b72124d67b62e64f3dc2bb36b9321 PKG_MIRROR_HASH:=1cba30c2a6814763c3e155c1cc5fa21998bb6ad5814fcb09e99f98bf36f65d9e +PKG_FLAGS:=nonshared + include $(INCLUDE_DIR)/package.mk define Package/layerscape-mc diff --git a/package/firmware/layerscape/ls-rcw/Makefile b/package/firmware/layerscape/ls-rcw/Makefile index f7f99a0c30..fdc5c0ce24 100644 --- a/package/firmware/layerscape/ls-rcw/Makefile +++ b/package/firmware/layerscape/ls-rcw/Makefile @@ -16,6 +16,8 @@ PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/rc PKG_SOURCE_VERSION:=e0fab6d9b61003caef577f7474c2fac61e6ba2ff PKG_MIRROR_HASH:=b6bc66e27b7c6db31101fdc2e6be7255181861bd38d8f25eb5eb80c468983eb2 +PKG_FLAGS:=nonshared + include $(INCLUDE_DIR)/package.mk define Package/layerscape-rcw diff --git a/package/firmware/layerscape/ppfe-firmware/Makefile b/package/firmware/layerscape/ppfe-firmware/Makefile index 14ceb0218b..96246fa0d9 100644 --- a/package/firmware/layerscape/ppfe-firmware/Makefile +++ b/package/firmware/layerscape/ppfe-firmware/Makefile @@ -16,6 +16,8 @@ PKG_SOURCE_URL:=https://github.com/NXP/qoriq-engine-pfe-bin.git PKG_SOURCE_VERSION:=d3a8ef0760c54ddc243039c86389497e37be90ab PKG_MIRROR_HASH:=64be93b8249d298e7b5fd0846787835f0659b6ab6c55b40b809366c79e272eb8 +PKG_FLAGS:=nonshared + include $(INCLUDE_DIR)/package.mk RSTRIP:=: diff --git a/package/network/utils/layerscape/restool/Makefile b/package/network/utils/layerscape/restool/Makefile index 935513d4ed..73fa8e4d9e 100644 --- a/package/network/utils/layerscape/restool/Makefile +++ b/package/network/utils/layerscape/restool/Makefile @@ -16,6 +16,8 @@ PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/re PKG_SOURCE_VERSION:=f0cec094e4c6d1c975b377203a3bf994ba9325a9 PKG_MIRROR_HASH:=1863acfaef319e6b277671fead51df0a31bdddb59022080d86b7d81da0bc8490 +PKG_FLAGS:=nonshared + include $(INCLUDE_DIR)/package.mk define Package/restool diff --git a/package/system/iucode-tool/Makefile b/package/system/iucode-tool/Makefile index 5f4cfb6238..b8227ed4a1 100644 --- a/package/system/iucode-tool/Makefile +++ b/package/system/iucode-tool/Makefile @@ -20,6 +20,8 @@ PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone PKG_MAINTAINER:=Zoltan HERPAI PKG_LICENSE:=GPL-2.0 +PKG_FLAGS:=nonshared + PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/package/utils/bcm4908img/Makefile b/package/utils/bcm4908img/Makefile index 108fe600e5..c18ac958f8 100644 --- a/package/utils/bcm4908img/Makefile +++ b/package/utils/bcm4908img/Makefile @@ -5,6 +5,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bcm4908img PKG_RELEASE:=1 +PKG_FLAGS:=nonshared + PKG_BUILD_DEPENDS := bcm4908img/host include $(INCLUDE_DIR)/package.mk From 7a90ad3c431031191afe51b163bf97d3ec820d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 24 May 2021 07:46:12 +0200 Subject: [PATCH 43/45] base-files: support setting bridge MAC address MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: 43fc720657c6 ("base-files: generate "device" UCI type section for bridge") Signed-off-by: Rafał Miłecki --- package/base-files/files/bin/config_generate | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index efcd734242..604c49a709 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -114,10 +114,12 @@ generate_network() { add network device set network.@device[-1].name='br-$1' set network.@device[-1].type='bridge' + set network.@device[-1].macaddr='$macaddr' EOF for port in $ports; do uci add_list network.@device[-1].ports="$port"; done ifname=br-$1 type= + macaddr="" } [ -n "$bridge" ] && { From 8cc4e87a2f81df02dbe481759ae6c36cf056c13b Mon Sep 17 00:00:00 2001 From: INAGAKI Hiroshi Date: Sun, 23 May 2021 20:30:58 +0900 Subject: [PATCH 44/45] base-files: fix configuration generation of network if "bridge" exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After the commit 43fc720657c6e3b30c6ed89d7227ee6e646c158b ("base-files: generate "device UCI type section for bridge"), the wrong network configuration is generated for the devices that already have the bridge device section for VLAN, such as the devices in realtek target. As a result, the bridge device by additional "device" section is specified to the "ports" option in the "bridge-vlan" section and netifd shuts down the switch and the ethernet when the network service started. Fixes: 43fc720657 ("base-files: generate "device" UCI type section for bridge") Signed-off-by: INAGAKI Hiroshi [rmilecki: use $ports for generate_bridge_vlan argument] Signed-off-by: Rafał Miłecki --- package/base-files/files/bin/config_generate | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index 604c49a709..be688a4ba3 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -109,7 +109,7 @@ generate_network() { ports="$ifname" } - [ -n "$ports" ] && { + [ -n "$ports" -a -z "$bridge" ] && { uci -q batch <<-EOF add network device set network.@device[-1].name='br-$1' @@ -123,11 +123,12 @@ generate_network() { } [ -n "$bridge" ] && { + [ -z "$ports" ] && ports="$ifname" if [ -z "$vlan" ]; then bridge_vlan_id=$((bridge_vlan_id + 1)) vlan=$bridge_vlan_id fi - generate_bridge_vlan $1 $bridge "$ifname" $vlan + generate_bridge_vlan $1 $bridge "$ports" $vlan ifname=$bridge.$vlan type="" } From 7131f5a2fb5df0235657285596eaee7453bd36e4 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Mon, 24 May 2021 12:59:29 +0200 Subject: [PATCH 45/45] nat46: fix memory leak 0d5860d fix memory leak in nat46_netdev_destroy().The netdev is forgotten to free in nat46_netdev_destroy function (#26) Signed-off-by: Hans Dedecker --- package/kernel/nat46/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/kernel/nat46/Makefile b/package/kernel/nat46/Makefile index 29e03a04d5..ef1a90ed8c 100644 --- a/package/kernel/nat46/Makefile +++ b/package/kernel/nat46/Makefile @@ -3,11 +3,11 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=nat46 -PKG_MIRROR_HASH:=aef3dae41e896c69b29d7fa3639c69f5a88db605a72dcd1133635980656a558c +PKG_MIRROR_HASH:=3b424241de42b96d47217decf6f9071153cd0c11651f1ee006700836c6660fe8 PKG_SOURCE_URL:=https://github.com/ayourtch/nat46.git -PKG_SOURCE_DATE:=2021-04-15 +PKG_SOURCE_DATE:=2021-05-17 PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=9df230a143477e8bc86968114439ee748ac9fd21 +PKG_SOURCE_VERSION:=0d5860d63a8037e001e293091ebf6219cc2f9255 PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=GPL-2.0