From 43792ff189d888f25c64750c38b8608c493c7eb2 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Fri, 3 Dec 2021 17:54:34 +0800 Subject: [PATCH 01/65] autocore: speedup cpufreq calculation 2x faster Signed-off-by: Tianling Shen --- package/emortal/autocore/files/generic/cpuinfo | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/emortal/autocore/files/generic/cpuinfo b/package/emortal/autocore/files/generic/cpuinfo index 58d1de92d4..bbc94cedd4 100755 --- a/package/emortal/autocore/files/generic/cpuinfo +++ b/package/emortal/autocore/files/generic/cpuinfo @@ -3,7 +3,7 @@ cpu_arch="$(grep "model name" "/proc/cpuinfo" | head -n1 | awk -F ': ' '{print $2}' | xargs)" [ -z "${cpu_arch}" ] && cpu_arch="?" if grep -q "x86" "/etc/openwrt_release"; then - cpu_cores="$(grep "core id" "/proc/cpuinfo" | sort -u | wc -l)C $(grep -c "processor" "/proc/cpuinfo")T" + cpu_cores="$(grep "core id" "/proc/cpuinfo" | uniq | wc -l)C $(grep -c "processor" "/proc/cpuinfo")T" else cpu_cores="$(grep -c "processor" "/proc/cpuinfo")" fi @@ -17,10 +17,10 @@ elif grep -q "mvebu" "/etc/openwrt_release"; then elif grep -q "x86" "/etc/openwrt_release"; then cpu_freq="$(grep "MHz" "/proc/cpuinfo" | head -n1 | awk -F ': ' '{print $2}')MHz" elif [ -e "/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq" ]; then - cpu_freq="$(expr $(cat "/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq") / 1000)MHz" + cpu_freq="$(awk '{printf("%.fMHz", $0 / 1000)}' "/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq")" fi if ! grep -q "x86" "/etc/openwrt_release" && [ -e "/sys/devices/system/cpu/cpufreq/policy4/cpuinfo_cur_freq" ]; then - big_cpu_freq="$(expr $(cat "/sys/devices/system/cpu/cpufreq/policy4/cpuinfo_cur_freq") / 1000)MHz " + big_cpu_freq="$(awk '{printf("%.fMHz ", $0 / 1000)}' "/sys/devices/system/cpu/cpufreq/policy4/cpuinfo_cur_freq")" fi if grep -q "bcm27xx" "/etc/openwrt_release"; then From 1e33ff12b8d3f9f8cbcfe3108456df42edf44556 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 13 Dec 2020 00:12:37 +0000 Subject: [PATCH 02/65] odhcpd: remove local mkdir_p implementation Replace local mkdir_p implementation in favour of using mkdir_p now added to libubox. Signed-off-by: Daniel Golle --- package/network/services/odhcpd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/services/odhcpd/Makefile b/package/network/services/odhcpd/Makefile index 3a059dd82e..9a1d4f5dd6 100644 --- a/package/network/services/odhcpd/Makefile +++ b/package/network/services/odhcpd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git -PKG_SOURCE_DATE:=2020-11-15 -PKG_SOURCE_VERSION:=fb55e80394c51d7502bb278f57520dec15a11355 -PKG_MIRROR_HASH:=631d15fd7c93529fa33433380c4811dbacca9665864e5836c6daca0c7165f25a +PKG_SOURCE_DATE:=2020-12-13 +PKG_SOURCE_VERSION:=2cf6232fd170a24b801d71d497947d7aabd12015 +PKG_MIRROR_HASH:=097a6b186bc85cc8ff95a611e23ab50a6d8025988f19e0d48520e12a1020274d PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=GPL-2.0 From dd41e1ad0915effb7b6b4b7f665e16adf89f9c3d Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Thu, 24 Dec 2020 17:21:17 +0100 Subject: [PATCH 03/65] odhcpd: update to latest git HEAD b75bcad dhcpv6-ia: remove assignment equal to 0 checks d1ae052 dhcpv6-ia: fix logic to include IA_PD prefix with lifetimes set to 0 9d5e379 dhcpv6-ia: fix prefix delegation behavior Signed-off-by: Hans Dedecker --- package/network/services/odhcpd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/services/odhcpd/Makefile b/package/network/services/odhcpd/Makefile index 9a1d4f5dd6..b35bfbf371 100644 --- a/package/network/services/odhcpd/Makefile +++ b/package/network/services/odhcpd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git -PKG_SOURCE_DATE:=2020-12-13 -PKG_SOURCE_VERSION:=2cf6232fd170a24b801d71d497947d7aabd12015 -PKG_MIRROR_HASH:=097a6b186bc85cc8ff95a611e23ab50a6d8025988f19e0d48520e12a1020274d +PKG_SOURCE_DATE:=2020-12-24 +PKG_SOURCE_VERSION:=b75bcad7bd5fd03f64011a532b9960d78e4aac22 +PKG_MIRROR_HASH:=f795e0268b6fe09eaf15b5701a236c3a74c11deb8436af6b6ab0a59d251fc3fd PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=GPL-2.0 From c2d9ad1d54ba2f411127686545efca525045a97e Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Mon, 19 Jul 2021 23:10:02 +0800 Subject: [PATCH 04/65] libubox: update to 2021-05-16 --- package/libs/libubox/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile index 3117bf428a..20badb8eab 100644 --- a/package/libs/libubox/Makefile +++ b/package/libs/libubox/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libubox -PKG_RELEASE=2 +PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git -PKG_MIRROR_HASH:=cf963b19f5a25da85b2d8888514cbcc33c3f641c4478c9c25312b8bf83fe9e6b -PKG_SOURCE_DATE:=2020-08-06 -PKG_SOURCE_VERSION:=9e52171d70def760a6949676800d0b73f85ee22d +PKG_MIRROR_HASH:=7dd1db1e0074a9c7c722db654cce3111b3bd3cff0bfd791c4497cb0f6c22d3ca +PKG_SOURCE_DATE:=2021-05-16 +PKG_SOURCE_VERSION:=b14c4688612c05c78ce984d7bde633bce8703b1e CMAKE_INSTALL:=1 PKG_LICENSE:=ISC From 8fc7bdc4a9bba94811654a8fb7ed86c3144c5b10 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Tue, 20 Jul 2021 23:16:00 +0800 Subject: [PATCH 05/65] fstools: update to 2021-05-16 --- package/system/fstools/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile index dd4ec06bfb..4668338c48 100644 --- a/package/system/fstools/Makefile +++ b/package/system/fstools/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git -PKG_MIRROR_HASH:=04cc533f567e8a928a1c13dedcad781e73dfc796db8e83ac1218b47412ce01bd -PKG_SOURCE_DATE:=2020-07-11 -PKG_SOURCE_VERSION:=5345343828df944ae247d91cc77182f87559bc9a +PKG_MIRROR_HASH:=41c9c51d193f5150db67fcd898b6ea904b88476c94cdfd021d81e2711441b430 +PKG_SOURCE_DATE:=2021-05-16 +PKG_SOURCE_VERSION:=3d40a1b591cd569f95891116cd033b496de0f92b CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From aa1e603c6bb08a266b43459d606c4690669e8b51 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Wed, 21 Jul 2021 23:18:05 +0800 Subject: [PATCH 06/65] procd: update to 2021-05-05 --- package/system/procd/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index b73bb1fc7b..5c6a9e8be6 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2020-11-06 -PKG_SOURCE_VERSION:=b0de894830a93da5b303a3d89a42baf163d0a58c -PKG_MIRROR_HASH:=ba7f7631fa74d3bede0241f5d96ee4939f15164e79290d1ac7fd15fc8ed628d9 +PKG_SOURCE_DATE:=2021-05-05 +PKG_SOURCE_VERSION:=021ece84de430fca988acd6934f6046ea59d8c37 +PKG_MIRROR_HASH:=edbe464cadbae000f4a48a6f1e6a0f5d27ae3ad521e308205252ad89639b6f9d CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 @@ -45,7 +45,7 @@ define Package/procd/Default SECTION:=base CATEGORY:=Base system DEPENDS:=+ubusd +ubus +libjson-script +ubox +USE_GLIBC:librt +libubox \ - +libubus +libblobmsg-json +libjson-c + +libubus +libblobmsg-json +libjson-c +jshn TITLE:=OpenWrt system process manager USERID:=:dialout=20 :audio=29 endef @@ -82,7 +82,7 @@ endef define Package/procd-seccomp SECTION:=base CATEGORY:=Base system - DEPENDS:=@(arm||armeb||mips||mipsel||i386||powerpc||x86_64) @!TARGET_uml \ + DEPENDS:=@(aarch64||arm||armeb||mips||mipsel||i386||powerpc||x86_64) @!TARGET_uml \ @KERNEL_SECCOMP +libubox +libblobmsg-json TITLE:=OpenWrt process seccomp helper + utrace endef From ce085d34a155f65d5fb650d6c4c46f708f22957f Mon Sep 17 00:00:00 2001 From: "Sergey V. Lobanov" Date: Mon, 29 Nov 2021 19:07:34 +0300 Subject: [PATCH 07/65] tools/fakeroot: fix build on MacOS arm64 Added patch for MacOS without 32 bit inodes support (__DARWIN_ONLY_64_BIT_INO_T is true) This patch based on discussion https://github.com/archmac/bootstrap/issues/4 Signed-off-by: Sergey V. Lobanov --- .../patches/500-macos_arm64_compile_fix.patch | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 tools/fakeroot/patches/500-macos_arm64_compile_fix.patch diff --git a/tools/fakeroot/patches/500-macos_arm64_compile_fix.patch b/tools/fakeroot/patches/500-macos_arm64_compile_fix.patch new file mode 100644 index 0000000000..a3731b9e99 --- /dev/null +++ b/tools/fakeroot/patches/500-macos_arm64_compile_fix.patch @@ -0,0 +1,86 @@ +diff --git a/communicate.c b/communicate.c +index e2699a2..21e5366 100644 +--- a/communicate.c ++++ b/communicate.c +@@ -24,7 +24,12 @@ + In this file, we want 'struct stat' to have a 32-bit 'ino_t'. + We use 'struct stat64' when we need a 64-bit 'ino_t'. + */ +-#define _DARWIN_NO_64_BIT_INODE ++# include ++# if __DARWIN_ONLY_64_BIT_INO_T ++# define _DARWIN_USE_64_BIT_INODE ++# else ++# define _DARWIN_NO_64_BIT_INODE ++# endif + #endif + + #include "communicate.h" +diff --git a/communicate.h b/communicate.h +index 3f9ca39..a586108 100644 +--- a/communicate.h ++++ b/communicate.h +@@ -91,6 +91,10 @@ + # include + #endif + ++#if __DARWIN_ONLY_64_BIT_INO_T ++struct stat64 __DARWIN_STRUCT_STAT64; ++#endif ++ + #ifndef FAKEROOT_FAKENET + # define FAKEROOTKEY_ENV "FAKEROOTKEY" + #endif /* ! FAKEROOT_FAKENET */ +diff --git a/faked.c b/faked.c +index a970184..ea51a23 100644 +--- a/faked.c ++++ b/faked.c +@@ -84,7 +84,12 @@ + In this file, we want 'struct stat' to have a 32-bit 'ino_t'. + We use 'struct stat64' when we need a 64-bit 'ino_t'. + */ +-#define _DARWIN_NO_64_BIT_INODE ++# include ++# if __DARWIN_ONLY_64_BIT_INO_T ++# define _DARWIN_USE_64_BIT_INODE ++# else ++# define _DARWIN_NO_64_BIT_INODE ++# endif + #endif + + #include "config.h" +diff --git a/libfakeroot.c b/libfakeroot.c +index c967d5d..836337d 100644 +--- a/libfakeroot.c ++++ b/libfakeroot.c +@@ -38,7 +38,12 @@ + In this file, we want 'struct stat' to have a 32-bit 'ino_t'. + We use 'struct stat64' when we need a 64-bit 'ino_t'. + */ +-#define _DARWIN_NO_64_BIT_INODE ++# include ++# if __DARWIN_ONLY_64_BIT_INO_T ++# define _DARWIN_USE_64_BIT_INODE ++# else ++# define _DARWIN_NO_64_BIT_INODE ++# endif + + /* The helper _unix2003 version of this file calls a few functions in this file + that are marked with static_nonapple so that needs to become private instead +diff --git a/libfakeroot_unix2003.c b/libfakeroot_unix2003.c +index e1e19b6..f32bfec 100644 +--- a/libfakeroot_unix2003.c ++++ b/libfakeroot_unix2003.c +@@ -18,7 +18,11 @@ + In this file, we want 'struct stat' to have a 32-bit 'ino_t'. + We use 'struct stat64' when we need a 64-bit 'ino_t'. + */ +-#define _DARWIN_NO_64_BIT_INODE ++# if __DARWIN_ONLY_64_BIT_INO_T ++# define _DARWIN_USE_64_BIT_INODE ++# else ++# define _DARWIN_NO_64_BIT_INODE ++# endif + + /* + This file is for 32-bit symbols which have the "$UNIX2003" version, i.e. From 2ac719c8fb819826ddb3d26dc0833bcdf50d2cfa Mon Sep 17 00:00:00 2001 From: "Sergey V. Lobanov" Date: Mon, 29 Nov 2021 19:09:10 +0300 Subject: [PATCH 08/65] toolchain/gcc: fix build on MacOS arm64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added patch for GCC to fix compilation issues on MacOS arm64 The original commit message from Przemysław Buczkowski: GCC: Patch for Apple Silicon compatibility This patch fixes a linker error occuring when compiling the cross-compiler on macOS and ARM64 architecture. Adapted from: https://github.com/richfelker/musl-cross-make/issues/116#issuecomment-823612404 Signed-off-by: Sergey V. Lobanov --- .../11.2.0/970-macos_arm64-building-fix.patch | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 toolchain/gcc/patches/11.2.0/970-macos_arm64-building-fix.patch diff --git a/toolchain/gcc/patches/11.2.0/970-macos_arm64-building-fix.patch b/toolchain/gcc/patches/11.2.0/970-macos_arm64-building-fix.patch new file mode 100644 index 0000000000..6572b8e559 --- /dev/null +++ b/toolchain/gcc/patches/11.2.0/970-macos_arm64-building-fix.patch @@ -0,0 +1,49 @@ +commit 9c6e71079b46ad5433165feaa2001450f2017b56 +Author: Przemysław Buczkowski +Date: Mon Aug 16 13:16:21 2021 +0100 + + GCC: Patch for Apple Silicon compatibility + + This patch fixes a linker error occuring when compiling + the cross-compiler on macOS and ARM64 architecture. + + Adapted from: + https://github.com/richfelker/musl-cross-make/issues/116#issuecomment-823612404 + + Change-Id: Ia3ee98a163bbb62689f42e2da83a5ef36beb0913 + Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4329 + Reviewed-by: John Scipione + Reviewed-by: Adrien Destugues + +diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h +index 976f9afae5..736b83ff0b 100644 +--- a/gcc/config/aarch64/aarch64.h ++++ b/gcc/config/aarch64/aarch64.h +@@ -1000,7 +1000,7 @@ extern const char *aarch64_rewrite_mcpu (int argc, const char **argv); + #define MCPU_TO_MARCH_SPEC_FUNCTIONS \ + { "rewrite_mcpu", aarch64_rewrite_mcpu }, + +-#if defined(__aarch64__) ++#if defined(__aarch64__) && ! defined(__APPLE__) + extern const char *host_detect_local_cpu (int argc, const char **argv); + #define HAVE_LOCAL_CPU_DETECT + # define EXTRA_SPEC_FUNCTIONS \ +diff --git a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c +index 8f700eec85..b737abc006 100644 +--- a/gcc/config/host-darwin.c ++++ b/gcc/config/host-darwin.c +@@ -22,6 +22,8 @@ + #include "coretypes.h" + #include "diagnostic-core.h" + #include "config/host-darwin.h" ++#include "hosthooks.h" ++#include "hosthooks-def.h" + + /* Yes, this is really supposed to work. */ + static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096))); +@@ -75,3 +77,5 @@ darwin_gt_pch_use_address (void *addr, size_t sz, int fd, size_t off) + + return ret; + } ++ ++const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER; From 52186f8d222a41a5d5a60821b3bbca58e42d2efa Mon Sep 17 00:00:00 2001 From: Tan Zien Date: Fri, 27 Aug 2021 21:27:11 +0800 Subject: [PATCH 09/65] firmware: intel-microcode: update to 20210608 intel-microcode (3.20210608.2) * Correct INTEL-SA-00442 CVE id to CVE-2020-24489 in changelog and debian/changelog (3.20210608.1). intel-microcode (3.20210608.1) * New upstream microcode datafile 20210608 (closes: #989615) * Implements mitigations for CVE-2020-24511 CVE-2020-24512 (INTEL-SA-00464), information leakage through shared resources, and timing discrepancy sidechannels * Implements mitigations for CVE-2020-24513 (INTEL-SA-00465), Domain-bypass transient execution vulnerability in some Intel Atom Processors, affects Intel SGX. * Implements mitigations for CVE-2020-24489 (INTEL-SA-00442), Intel VT-d privilege escalation * Fixes critical errata on several processors * New Microcodes: sig 0x00050655, pf_mask 0xb7, 2018-11-16, rev 0x3000010, size 47104 sig 0x000606a5, pf_mask 0x87, 2021-03-08, rev 0xc0002f0, size 283648 sig 0x000606a6, pf_mask 0x87, 2021-04-25, rev 0xd0002a0, size 283648 sig 0x00080664, pf_mask 0x01, 2021-02-17, rev 0xb00000f, size 130048 sig 0x00080665, pf_mask 0x01, 2021-02-17, rev 0xb00000f, size 130048 sig 0x000806c1, pf_mask 0x80, 2021-03-31, rev 0x0088, size 109568 sig 0x000806c2, pf_mask 0xc2, 2021-04-07, rev 0x0016, size 94208 sig 0x000806d1, pf_mask 0xc2, 2021-04-23, rev 0x002c, size 99328 sig 0x00090661, pf_mask 0x01, 2021-02-04, rev 0x0011, size 19456 sig 0x000906c0, pf_mask 0x01, 2021-03-23, rev 0x001d, size 19456 sig 0x000a0671, pf_mask 0x02, 2021-04-11, rev 0x0040, size 100352 * Updated Microcodes: sig 0x000306f2, pf_mask 0x6f, 2021-01-27, rev 0x0046, size 34816 sig 0x000306f4, pf_mask 0x80, 2021-02-05, rev 0x0019, size 19456 sig 0x000406e3, pf_mask 0xc0, 2021-01-25, rev 0x00ea, size 105472 sig 0x000406f1, pf_mask 0xef, 2021-02-06, rev 0xb00003e, size 31744 sig 0x00050653, pf_mask 0x97, 2021-03-08, rev 0x100015b, size 34816 sig 0x00050654, pf_mask 0xb7, 2021-03-08, rev 0x2006b06, size 36864 sig 0x00050656, pf_mask 0xbf, 2021-03-08, rev 0x4003102, size 30720 sig 0x00050657, pf_mask 0xbf, 2021-03-08, rev 0x5003102, size 30720 sig 0x0005065b, pf_mask 0xbf, 2021-04-23, rev 0x7002302, size 27648 sig 0x00050663, pf_mask 0x10, 2021-02-04, rev 0x700001b, size 24576 sig 0x00050664, pf_mask 0x10, 2021-02-04, rev 0xf000019, size 24576 sig 0x00050665, pf_mask 0x10, 2021-02-04, rev 0xe000012, size 19456 sig 0x000506c9, pf_mask 0x03, 2020-10-23, rev 0x0044, size 17408 sig 0x000506ca, pf_mask 0x03, 2020-10-23, rev 0x0020, size 15360 sig 0x000506e3, pf_mask 0x36, 2021-01-25, rev 0x00ea, size 105472 sig 0x000506f1, pf_mask 0x01, 2020-10-23, rev 0x0034, size 11264 sig 0x000706a1, pf_mask 0x01, 2020-10-23, rev 0x0036, size 74752 sig 0x000706a8, pf_mask 0x01, 2020-10-23, rev 0x001a, size 75776 sig 0x000706e5, pf_mask 0x80, 2020-11-01, rev 0x00a6, size 110592 sig 0x000806a1, pf_mask 0x10, 2020-11-06, rev 0x002a, size 32768 sig 0x000806e9, pf_mask 0x10, 2021-01-05, rev 0x00ea, size 104448 sig 0x000806e9, pf_mask 0xc0, 2021-01-05, rev 0x00ea, size 104448 sig 0x000806ea, pf_mask 0xc0, 2021-01-06, rev 0x00ea, size 103424 sig 0x000806eb, pf_mask 0xd0, 2021-01-05, rev 0x00ea, size 104448 sig 0x000806ec, pf_mask 0x94, 2021-01-05, rev 0x00ea, size 104448 sig 0x000906e9, pf_mask 0x2a, 2021-01-05, rev 0x00ea, size 104448 sig 0x000906ea, pf_mask 0x22, 2021-01-05, rev 0x00ea, size 102400 sig 0x000906eb, pf_mask 0x02, 2021-01-05, rev 0x00ea, size 104448 sig 0x000906ec, pf_mask 0x22, 2021-01-05, rev 0x00ea, size 103424 sig 0x000906ed, pf_mask 0x22, 2021-01-05, rev 0x00ea, size 103424 sig 0x000a0652, pf_mask 0x20, 2021-02-07, rev 0x00ea, size 93184 sig 0x000a0653, pf_mask 0x22, 2021-03-08, rev 0x00ea, size 94208 sig 0x000a0655, pf_mask 0x22, 2021-03-08, rev 0x00ec, size 94208 sig 0x000a0660, pf_mask 0x80, 2020-12-08, rev 0x00e8, size 94208 sig 0x000a0661, pf_mask 0x80, 2021-02-07, rev 0x00ea, size 93184 * source: update symlinks to reflect id of the latest release, 20210608 intel-microcode (3.20210216.1) * New upstream microcode datafile 20210216 * Mitigates an issue on Skylake Server (H0/M0/U0), Xeon-D 21xx, and Cascade Lake Server (B0/B1) when using an active JTAG agent like In Target Probe (ITP), Direct Connect Interface (DCI) or a Baseboard Management Controller (BMC) to take the CPU JTAG/TAP out of reset and then returning it to reset. * This issue is related to the INTEL-SA-00381 mitigation. * Updated Microcodes: sig 0x00050654, pf_mask 0xb7, 2020-12-31, rev 0x2006a0a, size 36864 sig 0x00050656, pf_mask 0xbf, 2020-12-31, rev 0x4003006, size 53248 sig 0x00050657, pf_mask 0xbf, 2020-12-31, rev 0x5003006, size 53248 * source: update symlinks to reflect id of the latest release, 20210216 intel-microcode (3.20201118.1) * New upstream microcode datafile 20201118 * Removes a faulty microcode update from release 2020-11-10 for Tiger Lake processors. Note that Debian already had removed this specific falty microcode update on the 3.20201110.1 release * Add a microcode update for the Pentium Silver N/J5xxx and Celeron N/J4xxx which didn't make it to release 20201110, fixing security issues (INTEL-SA-00381, INTEL-SA-00389) * Updated Microcodes: sig 0x000706a1, pf_mask 0x01, 2020-06-09, rev 0x0034, size 74752 * Removed Microcodes: sig 0x000806c1, pf_mask 0x80, 2020-10-02, rev 0x0068, size 107520 intel-microcode (3.20201110.1) * New upstream microcode datafile 20201110 (closes: #974533) * Implements mitigation for CVE-2020-8696 and CVE-2020-8698, aka INTEL-SA-00381: AVX register information leakage; Fast-Forward store predictor information leakage * Implements mitigation for CVE-2020-8695, Intel SGX information disclosure via RAPL, aka INTEL-SA-00389 * Fixes critical errata on several processor models * Reintroduces SRBDS mitigations(CVE-2020-0543, INTEL-SA-00320) for Skylake-U/Y, Skylake Xeon E3 * New Microcodes sig 0x0005065b, pf_mask 0xbf, 2020-08-20, rev 0x700001e, size 27648 sig 0x000806a1, pf_mask 0x10, 2020-06-26, rev 0x0028, size 32768 sig 0x000806c1, pf_mask 0x80, 2020-10-02, rev 0x0068, size 107520 sig 0x000a0652, pf_mask 0x20, 2020-07-08, rev 0x00e0, size 93184 sig 0x000a0653, pf_mask 0x22, 2020-07-08, rev 0x00e0, size 94208 sig 0x000a0655, pf_mask 0x22, 2020-07-08, rev 0x00e0, size 93184 sig 0x000a0661, pf_mask 0x80, 2020-07-02, rev 0x00e0, size 93184 * Updated Microcodes sig 0x000306f2, pf_mask 0x6f, 2020-05-27, rev 0x0044, size 34816 sig 0x000406e3, pf_mask 0xc0, 2020-07-14, rev 0x00e2, size 105472 sig 0x00050653, pf_mask 0x97, 2020-06-18, rev 0x1000159, size 33792 sig 0x00050654, pf_mask 0xb7, 2020-06-16, rev 0x2006a08, size 35840 sig 0x00050656, pf_mask 0xbf, 2020-06-18, rev 0x4003003, size 52224 sig 0x00050657, pf_mask 0xbf, 2020-06-18, rev 0x5003003, size 52224 sig 0x000506c9, pf_mask 0x03, 2020-02-27, rev 0x0040, size 17408 sig 0x000506ca, pf_mask 0x03, 2020-02-27, rev 0x001e, size 15360 sig 0x000506e3, pf_mask 0x36, 2020-07-14, rev 0x00e2, size 105472 sig 0x000706a8, pf_mask 0x01, 2020-06-09, rev 0x0018, size 75776 sig 0x000706e5, pf_mask 0x80, 2020-07-30, rev 0x00a0, size 109568 sig 0x000806e9, pf_mask 0x10, 2020-05-27, rev 0x00de, size 104448 sig 0x000806e9, pf_mask 0xc0, 2020-05-27, rev 0x00de, size 104448 sig 0x000806ea, pf_mask 0xc0, 2020-06-17, rev 0x00e0, size 104448 sig 0x000806eb, pf_mask 0xd0, 2020-06-03, rev 0x00de, size 104448 sig 0x000806ec, pf_mask 0x94, 2020-05-18, rev 0x00de, size 104448 sig 0x000906e9, pf_mask 0x2a, 2020-05-26, rev 0x00de, size 104448 sig 0x000906ea, pf_mask 0x22, 2020-05-25, rev 0x00de, size 103424 sig 0x000906eb, pf_mask 0x02, 2020-05-25, rev 0x00de, size 104448 sig 0x000906ec, pf_mask 0x22, 2020-06-03, rev 0x00de, size 103424 sig 0x000906ed, pf_mask 0x22, 2020-05-24, rev 0x00de, size 103424 sig 0x000a0660, pf_mask 0x80, 2020-07-08, rev 0x00e0, size 94208 * 0x806c1: remove the new Tiger Lake update: causes hang on cold/warm boot https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/issues/44 INTEL-SA-00381 AND INTEL-SA-00389 MITIGATIONS ARE THEREFORE NOT INSTALLED FOR 0x806c1 TIGER LAKE PROCESSORS by this package update. Contact your system vendor for a firmware update, or wait fo a possible fix in a future Intel microcode release. * source: update symlinks to reflect id of the latest release, 20201110 * source: ship new upstream documentation (security.md, releasenote.md) Signed-off-by: Tan Zien [used different .tar.xz source, but with the same content] Signed-off-by: Christian Lamparter --- package/firmware/intel-microcode/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/firmware/intel-microcode/Makefile b/package/firmware/intel-microcode/Makefile index d2f61e9bf0..7f8d5adf7c 100644 --- a/package/firmware/intel-microcode/Makefile +++ b/package/firmware/intel-microcode/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=intel-microcode -PKG_VERSION:=20200616 +PKG_VERSION:=20210608 PKG_RELEASE:=1 -PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).$(PKG_RELEASE).tar.xz +PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).2.tar.xz PKG_SOURCE_URL:=@DEBIAN/pool/non-free/i/intel-microcode/ -PKG_HASH:=bcc3b81c452fe4649a948c022475d76c1cdfbb730f36749a082f412f1406a3b9 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE) +PKG_HASH:=fbf82688ffd0d87b352a35c57bd097ea014f0ad32c9c8f9629725c1b43d1c84d +PKG_BUILD_DIR:=$(BUILD_DIR)/intel-microcode-3.$(PKG_VERSION).2 PKG_BUILD_DEPENDS:=iucode-tool/host From 870f67f109b8d07484a4df49c24e8e7083612838 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 8 Dec 2021 00:49:58 +0800 Subject: [PATCH 10/65] openwrt-keyring: add ImmortalWrt 18.06 release key Signed-off-by: Tianling Shen --- package/system/openwrt-keyring/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/system/openwrt-keyring/Makefile b/package/system/openwrt-keyring/Makefile index 92a6f70c00..6c1fe51042 100644 --- a/package/system/openwrt-keyring/Makefile +++ b/package/system/openwrt-keyring/Makefile @@ -7,9 +7,9 @@ PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/immortalwrt/keyring.git -PKG_MIRROR_HASH:=c8600265b922462431c8f87a8cf3cd12f3e55b3c54078bb15bad9a8f41be2424 -PKG_SOURCE_DATE:=2021-08-06 -PKG_SOURCE_VERSION:=746fa1a0c45bd82d9bf25d5334933a2e454fdeeb +PKG_MIRROR_HASH:=5665cceada943ec6430b21326256064ac5d9ce6488d2909c0247411f48fdf974 +PKG_SOURCE_DATE:=2021-12-08 +PKG_SOURCE_VERSION:=4bed7e2c5c72d164066777e0c5f358f2c9843247 PKG_MAINTAINER:=John Crispin PKG_LICENSE:=GPL-2.0 @@ -38,6 +38,7 @@ define Package/openwrt-keyring/install $(INSTALL_DATA) $(PKG_BUILD_DIR)/usign/b5043e70f9a75cde $(1)/etc/opkg/keys/ # Public usign key for 18.06 release builds $(INSTALL_DATA) $(PKG_BUILD_DIR)/usign/1035ac73cc4e59e3 $(1)/etc/opkg/keys/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/usign/a5891a78070b865a $(1)/etc/opkg/keys/ endef $(eval $(call BuildPackage,openwrt-keyring)) From 7ad96cf680b3cf8bcc75724b6fb06e77cb92a730 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 8 Dec 2021 05:03:59 +0800 Subject: [PATCH 11/65] kmod-usb-net-aqc111: remove kernel 4.9 support Signed-off-by: Tianling Shen --- package/kernel/linux/modules/usb.mk | 2 +- ...leton-for-Aquantia-AQtionUSB-to-5GbE.patch | 1889 ----------------- 2 files changed, 1 insertion(+), 1890 deletions(-) delete mode 100644 target/linux/generic/pending-4.9/760-net-usb-aqc111-Driver-skeleton-for-Aquantia-AQtionUSB-to-5GbE.patch diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index 297bc2042e..b49566ab14 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -1159,7 +1159,7 @@ endef define KernelPackage/usb-net-aqc111 TITLE:=Kernel module for Aquantia AQtion USB to 5/2.5GbE Controllers - DEPENDS:=+kmod-libphy + DEPENDS:=@!LINUX_4_9 +kmod-libphy KCONFIG:=CONFIG_USB_NET_AQC111 FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/aqc111.ko AUTOLOAD:=$(call AutoProbe,aqc111) diff --git a/target/linux/generic/pending-4.9/760-net-usb-aqc111-Driver-skeleton-for-Aquantia-AQtionUSB-to-5GbE.patch b/target/linux/generic/pending-4.9/760-net-usb-aqc111-Driver-skeleton-for-Aquantia-AQtionUSB-to-5GbE.patch deleted file mode 100644 index 8a39690a38..0000000000 --- a/target/linux/generic/pending-4.9/760-net-usb-aqc111-Driver-skeleton-for-Aquantia-AQtionUSB-to-5GbE.patch +++ /dev/null @@ -1,1889 +0,0 @@ ---- a/drivers/net/usb/Kconfig -+++ b/drivers/net/usb/Kconfig -@@ -611,4 +611,16 @@ config USB_NET_CH9200 - To compile this driver as a module, choose M here: the - module will be called ch9200. - -+config USB_NET_AQC111 -+ tristate "Aquantia AQtion USB to 5/2.5GbE Controllers support" -+ depends on USB_USBNET -+ select CRC32 -+ default y -+ help -+ This option adds support for Aquantia AQtion USB -+ Ethernet adapters based on AQC111U/AQC112 chips. -+ -+ This driver should work with at least the following devices: -+ * Aquantia AQtion USB to 5GbE -+ - endif # USB_NET_DRIVERS ---- a/drivers/net/usb/Makefile -+++ b/drivers/net/usb/Makefile -@@ -39,3 +39,4 @@ obj-$(CONFIG_USB_VL600) += lg-vl600.o - obj-$(CONFIG_USB_NET_QMI_WWAN) += qmi_wwan.o - obj-$(CONFIG_USB_NET_CDC_MBIM) += cdc_mbim.o - obj-$(CONFIG_USB_NET_CH9200) += ch9200.o -+obj-$(CONFIG_USB_NET_AQC111) += aqc111.o ---- /dev/null -+++ b/drivers/net/usb/aqc111.c -@@ -0,0 +1,1489 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later -+/* Aquantia Corp. Aquantia AQtion USB to 5GbE Controller -+ * Copyright (C) 2003-2005 David Hollis -+ * Copyright (C) 2005 Phil Chang -+ * Copyright (C) 2002-2003 TiVo Inc. -+ * Copyright (C) 2017-2018 ASIX -+ * Copyright (C) 2018 Aquantia Corp. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "aqc111.h" -+ -+#define DRIVER_NAME "aqc111" -+ -+static int aqc111_read_cmd_nopm(struct usbnet *dev, u8 cmd, u16 value, -+ u16 index, u16 size, void *data) -+{ -+ int ret; -+ -+ ret = usbnet_read_cmd_nopm(dev, cmd, USB_DIR_IN | USB_TYPE_VENDOR | -+ USB_RECIP_DEVICE, value, index, data, size); -+ -+ if (unlikely(ret < 0)) -+ netdev_warn(dev->net, -+ "Failed to read(0x%x) reg index 0x%04x: %d\n", -+ cmd, index, ret); -+ -+ return ret; -+} -+ -+static int aqc111_read_cmd(struct usbnet *dev, u8 cmd, u16 value, -+ u16 index, u16 size, void *data) -+{ -+ int ret; -+ -+ ret = usbnet_read_cmd(dev, cmd, USB_DIR_IN | USB_TYPE_VENDOR | -+ USB_RECIP_DEVICE, value, index, data, size); -+ -+ if (unlikely(ret < 0)) -+ netdev_warn(dev->net, -+ "Failed to read(0x%x) reg index 0x%04x: %d\n", -+ cmd, index, ret); -+ -+ return ret; -+} -+ -+static int aqc111_read16_cmd_nopm(struct usbnet *dev, u8 cmd, u16 value, -+ u16 index, u16 *data) -+{ -+ int ret = 0; -+ -+ ret = aqc111_read_cmd_nopm(dev, cmd, value, index, sizeof(*data), data); -+ le16_to_cpus(data); -+ -+ return ret; -+} -+ -+static int aqc111_read16_cmd(struct usbnet *dev, u8 cmd, u16 value, -+ u16 index, u16 *data) -+{ -+ int ret = 0; -+ -+ ret = aqc111_read_cmd(dev, cmd, value, index, sizeof(*data), data); -+ le16_to_cpus(data); -+ -+ return ret; -+} -+ -+static int __aqc111_write_cmd(struct usbnet *dev, u8 cmd, u8 reqtype, -+ u16 value, u16 index, u16 size, const void *data) -+{ -+ int err = -ENOMEM; -+ void *buf = NULL; -+ -+ netdev_dbg(dev->net, -+ "%s cmd=%#x reqtype=%#x value=%#x index=%#x size=%d\n", -+ __func__, cmd, reqtype, value, index, size); -+ -+ if (data) { -+ buf = kmemdup(data, size, GFP_KERNEL); -+ if (!buf) -+ goto out; -+ } -+ -+ err = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), -+ cmd, reqtype, value, index, buf, size, -+ (cmd == AQ_PHY_POWER) ? AQ_USB_PHY_SET_TIMEOUT : -+ AQ_USB_SET_TIMEOUT); -+ -+ if (unlikely(err < 0)) -+ netdev_warn(dev->net, -+ "Failed to write(0x%x) reg index 0x%04x: %d\n", -+ cmd, index, err); -+ kfree(buf); -+ -+out: -+ return err; -+} -+ -+static int aqc111_write_cmd_nopm(struct usbnet *dev, u8 cmd, u16 value, -+ u16 index, u16 size, void *data) -+{ -+ int ret; -+ -+ ret = __aqc111_write_cmd(dev, cmd, USB_DIR_OUT | USB_TYPE_VENDOR | -+ USB_RECIP_DEVICE, value, index, size, data); -+ -+ return ret; -+} -+ -+static int aqc111_write_cmd(struct usbnet *dev, u8 cmd, u16 value, -+ u16 index, u16 size, void *data) -+{ -+ int ret; -+ -+ if (usb_autopm_get_interface(dev->intf) < 0) -+ return -ENODEV; -+ -+ ret = __aqc111_write_cmd(dev, cmd, USB_DIR_OUT | USB_TYPE_VENDOR | -+ USB_RECIP_DEVICE, value, index, size, data); -+ -+ usb_autopm_put_interface(dev->intf); -+ -+ return ret; -+} -+ -+static int aqc111_write16_cmd_nopm(struct usbnet *dev, u8 cmd, u16 value, -+ u16 index, u16 *data) -+{ -+ u16 tmp = *data; -+ -+ cpu_to_le16s(&tmp); -+ -+ return aqc111_write_cmd_nopm(dev, cmd, value, index, sizeof(tmp), &tmp); -+} -+ -+static int aqc111_write16_cmd(struct usbnet *dev, u8 cmd, u16 value, -+ u16 index, u16 *data) -+{ -+ u16 tmp = *data; -+ -+ cpu_to_le16s(&tmp); -+ -+ return aqc111_write_cmd(dev, cmd, value, index, sizeof(tmp), &tmp); -+} -+ -+static int aqc111_write32_cmd_nopm(struct usbnet *dev, u8 cmd, u16 value, -+ u16 index, u32 *data) -+{ -+ u32 tmp = *data; -+ -+ cpu_to_le32s(&tmp); -+ -+ return aqc111_write_cmd_nopm(dev, cmd, value, index, sizeof(tmp), &tmp); -+} -+ -+static int aqc111_write32_cmd(struct usbnet *dev, u8 cmd, u16 value, -+ u16 index, u32 *data) -+{ -+ u32 tmp = *data; -+ -+ cpu_to_le32s(&tmp); -+ -+ return aqc111_write_cmd(dev, cmd, value, index, sizeof(tmp), &tmp); -+} -+ -+static int aqc111_write_cmd_async(struct usbnet *dev, u8 cmd, u16 value, -+ u16 index, u16 size, void *data) -+{ -+ return usbnet_write_cmd_async(dev, cmd, USB_DIR_OUT | USB_TYPE_VENDOR | -+ USB_RECIP_DEVICE, value, index, data, -+ size); -+} -+ -+static int aqc111_write16_cmd_async(struct usbnet *dev, u8 cmd, u16 value, -+ u16 index, u16 *data) -+{ -+ u16 tmp = *data; -+ -+ cpu_to_le16s(&tmp); -+ -+ return aqc111_write_cmd_async(dev, cmd, value, index, -+ sizeof(tmp), &tmp); -+} -+ -+static void aqc111_get_drvinfo(struct net_device *net, -+ struct ethtool_drvinfo *info) -+{ -+ struct usbnet *dev = netdev_priv(net); -+ struct aqc111_data *aqc111_data = dev->driver_priv; -+ -+ /* Inherit standard device info */ -+ usbnet_get_drvinfo(net, info); -+ strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver)); -+ snprintf(info->fw_version, sizeof(info->fw_version), "%u.%u.%u", -+ aqc111_data->fw_ver.major, -+ aqc111_data->fw_ver.minor, -+ aqc111_data->fw_ver.rev); -+ info->eedump_len = 0x00; -+ info->regdump_len = 0x00; -+} -+ -+static void aqc111_get_wol(struct net_device *net, -+ struct ethtool_wolinfo *wolinfo) -+{ -+ struct usbnet *dev = netdev_priv(net); -+ struct aqc111_data *aqc111_data = dev->driver_priv; -+ -+ wolinfo->supported = WAKE_MAGIC; -+ wolinfo->wolopts = 0; -+ -+ if (aqc111_data->wol_flags & AQ_WOL_FLAG_MP) -+ wolinfo->wolopts |= WAKE_MAGIC; -+} -+ -+static int aqc111_set_wol(struct net_device *net, -+ struct ethtool_wolinfo *wolinfo) -+{ -+ struct usbnet *dev = netdev_priv(net); -+ struct aqc111_data *aqc111_data = dev->driver_priv; -+ -+ if (wolinfo->wolopts & ~WAKE_MAGIC) -+ return -EINVAL; -+ -+ aqc111_data->wol_flags = 0; -+ if (wolinfo->wolopts & WAKE_MAGIC) -+ aqc111_data->wol_flags |= AQ_WOL_FLAG_MP; -+ -+ return 0; -+} -+ -+static void aqc111_speed_to_link_mode(u32 speed, -+ struct ethtool_link_ksettings *elk) -+{ -+ switch (speed) { -+ case SPEED_5000: -+ ethtool_link_ksettings_add_link_mode(elk, advertising, -+ 5000baseT_Full); -+ break; -+ case SPEED_2500: -+ ethtool_link_ksettings_add_link_mode(elk, advertising, -+ 2500baseT_Full); -+ break; -+ case SPEED_1000: -+ ethtool_link_ksettings_add_link_mode(elk, advertising, -+ 1000baseT_Full); -+ break; -+ case SPEED_100: -+ ethtool_link_ksettings_add_link_mode(elk, advertising, -+ 100baseT_Full); -+ break; -+ } -+} -+ -+static int aqc111_get_link_ksettings(struct net_device *net, -+ struct ethtool_link_ksettings *elk) -+{ -+ struct usbnet *dev = netdev_priv(net); -+ struct aqc111_data *aqc111_data = dev->driver_priv; -+ enum usb_device_speed usb_speed = dev->udev->speed; -+ u32 speed = SPEED_UNKNOWN; -+ -+ ethtool_link_ksettings_zero_link_mode(elk, supported); -+ ethtool_link_ksettings_add_link_mode(elk, supported, -+ 100baseT_Full); -+ ethtool_link_ksettings_add_link_mode(elk, supported, -+ 1000baseT_Full); -+ if (usb_speed == USB_SPEED_SUPER) { -+ ethtool_link_ksettings_add_link_mode(elk, supported, -+ 2500baseT_Full); -+ ethtool_link_ksettings_add_link_mode(elk, supported, -+ 5000baseT_Full); -+ } -+ ethtool_link_ksettings_add_link_mode(elk, supported, TP); -+ ethtool_link_ksettings_add_link_mode(elk, supported, Autoneg); -+ -+ elk->base.port = PORT_TP; -+ elk->base.transceiver = XCVR_INTERNAL; -+ -+ elk->base.mdio_support = 0x00; /*Not supported*/ -+ -+ if (aqc111_data->autoneg) -+ linkmode_copy(elk->link_modes.advertising, -+ elk->link_modes.supported); -+ else -+ aqc111_speed_to_link_mode(aqc111_data->advertised_speed, elk); -+ -+ elk->base.autoneg = aqc111_data->autoneg; -+ -+ switch (aqc111_data->link_speed) { -+ case AQ_INT_SPEED_5G: -+ speed = SPEED_5000; -+ break; -+ case AQ_INT_SPEED_2_5G: -+ speed = SPEED_2500; -+ break; -+ case AQ_INT_SPEED_1G: -+ speed = SPEED_1000; -+ break; -+ case AQ_INT_SPEED_100M: -+ speed = SPEED_100; -+ break; -+ } -+ elk->base.duplex = DUPLEX_FULL; -+ elk->base.speed = speed; -+ -+ return 0; -+} -+ -+static void aqc111_set_phy_speed(struct usbnet *dev, u8 autoneg, u16 speed) -+{ -+ struct aqc111_data *aqc111_data = dev->driver_priv; -+ -+ aqc111_data->phy_cfg &= ~AQ_ADV_MASK; -+ aqc111_data->phy_cfg |= AQ_PAUSE; -+ aqc111_data->phy_cfg |= AQ_ASYM_PAUSE; -+ aqc111_data->phy_cfg |= AQ_DOWNSHIFT; -+ aqc111_data->phy_cfg &= ~AQ_DSH_RETRIES_MASK; -+ aqc111_data->phy_cfg |= (3 << AQ_DSH_RETRIES_SHIFT) & -+ AQ_DSH_RETRIES_MASK; -+ -+ if (autoneg == AUTONEG_ENABLE) { -+ switch (speed) { -+ case SPEED_5000: -+ aqc111_data->phy_cfg |= AQ_ADV_5G; -+ /* fall-through */ -+ case SPEED_2500: -+ aqc111_data->phy_cfg |= AQ_ADV_2G5; -+ /* fall-through */ -+ case SPEED_1000: -+ aqc111_data->phy_cfg |= AQ_ADV_1G; -+ /* fall-through */ -+ case SPEED_100: -+ aqc111_data->phy_cfg |= AQ_ADV_100M; -+ /* fall-through */ -+ } -+ } else { -+ switch (speed) { -+ case SPEED_5000: -+ aqc111_data->phy_cfg |= AQ_ADV_5G; -+ break; -+ case SPEED_2500: -+ aqc111_data->phy_cfg |= AQ_ADV_2G5; -+ break; -+ case SPEED_1000: -+ aqc111_data->phy_cfg |= AQ_ADV_1G; -+ break; -+ case SPEED_100: -+ aqc111_data->phy_cfg |= AQ_ADV_100M; -+ break; -+ } -+ } -+ -+ aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, &aqc111_data->phy_cfg); -+} -+ -+static int aqc111_set_link_ksettings(struct net_device *net, -+ const struct ethtool_link_ksettings *elk) -+{ -+ struct usbnet *dev = netdev_priv(net); -+ struct aqc111_data *aqc111_data = dev->driver_priv; -+ enum usb_device_speed usb_speed = dev->udev->speed; -+ u8 autoneg = elk->base.autoneg; -+ u32 speed = elk->base.speed; -+ -+ if (autoneg == AUTONEG_ENABLE) { -+ if (aqc111_data->autoneg != AUTONEG_ENABLE) { -+ aqc111_data->autoneg = AUTONEG_ENABLE; -+ aqc111_data->advertised_speed = -+ (usb_speed == USB_SPEED_SUPER) ? -+ SPEED_5000 : SPEED_1000; -+ aqc111_set_phy_speed(dev, aqc111_data->autoneg, -+ aqc111_data->advertised_speed); -+ } -+ } else { -+ if (speed != SPEED_100 && -+ speed != SPEED_1000 && -+ speed != SPEED_2500 && -+ speed != SPEED_5000 && -+ speed != SPEED_UNKNOWN) -+ return -EINVAL; -+ -+ if (elk->base.duplex != DUPLEX_FULL) -+ return -EINVAL; -+ -+ if (usb_speed != USB_SPEED_SUPER && speed > SPEED_1000) -+ return -EINVAL; -+ -+ aqc111_data->autoneg = AUTONEG_DISABLE; -+ if (speed != SPEED_UNKNOWN) -+ aqc111_data->advertised_speed = speed; -+ -+ aqc111_set_phy_speed(dev, aqc111_data->autoneg, -+ aqc111_data->advertised_speed); -+ } -+ -+ return 0; -+} -+ -+static const struct ethtool_ops aqc111_ethtool_ops = { -+ .get_drvinfo = aqc111_get_drvinfo, -+ .get_wol = aqc111_get_wol, -+ .set_wol = aqc111_set_wol, -+ .get_msglevel = usbnet_get_msglevel, -+ .set_msglevel = usbnet_set_msglevel, -+ .get_link = ethtool_op_get_link, -+ .get_link_ksettings = aqc111_get_link_ksettings, -+ .set_link_ksettings = aqc111_set_link_ksettings -+}; -+ -+static int aqc111_change_mtu(struct net_device *net, int new_mtu) -+{ -+ struct usbnet *dev = netdev_priv(net); -+ u16 reg16 = 0; -+ u8 buf[5]; -+ -+ net->mtu = new_mtu; -+ dev->hard_mtu = net->mtu + net->hard_header_len; -+ -+ aqc111_read16_cmd(dev, AQ_ACCESS_MAC, SFR_MEDIUM_STATUS_MODE, -+ 2, ®16); -+ if (net->mtu > 1500) -+ reg16 |= SFR_MEDIUM_JUMBO_EN; -+ else -+ reg16 &= ~SFR_MEDIUM_JUMBO_EN; -+ -+ aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_MEDIUM_STATUS_MODE, -+ 2, ®16); -+ -+ if (dev->net->mtu > 12500) { -+ memcpy(buf, &AQC111_BULKIN_SIZE[2], 5); -+ /* RX bulk configuration */ -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_RX_BULKIN_QCTRL, -+ 5, 5, buf); -+ } -+ -+ /* Set high low water level */ -+ if (dev->net->mtu <= 4500) -+ reg16 = 0x0810; -+ else if (dev->net->mtu <= 9500) -+ reg16 = 0x1020; -+ else if (dev->net->mtu <= 12500) -+ reg16 = 0x1420; -+ else -+ reg16 = 0x1A20; -+ -+ aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_PAUSE_WATERLVL_LOW, -+ 2, ®16); -+ -+ return 0; -+} -+ -+static int aqc111_set_mac_addr(struct net_device *net, void *p) -+{ -+ struct usbnet *dev = netdev_priv(net); -+ int ret = 0; -+ -+ ret = eth_mac_addr(net, p); -+ if (ret < 0) -+ return ret; -+ -+ /* Set the MAC address */ -+ return aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_NODE_ID, ETH_ALEN, -+ ETH_ALEN, net->dev_addr); -+} -+ -+static int aqc111_vlan_rx_kill_vid(struct net_device *net, -+ __be16 proto, u16 vid) -+{ -+ struct usbnet *dev = netdev_priv(net); -+ u8 vlan_ctrl = 0; -+ u16 reg16 = 0; -+ u8 reg8 = 0; -+ -+ aqc111_read_cmd(dev, AQ_ACCESS_MAC, SFR_VLAN_ID_CONTROL, 1, 1, ®8); -+ vlan_ctrl = reg8; -+ -+ /* Address */ -+ reg8 = (vid / 16); -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_VLAN_ID_ADDRESS, 1, 1, ®8); -+ /* Data */ -+ reg8 = vlan_ctrl | SFR_VLAN_CONTROL_RD; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_VLAN_ID_CONTROL, 1, 1, ®8); -+ aqc111_read16_cmd(dev, AQ_ACCESS_MAC, SFR_VLAN_ID_DATA0, 2, ®16); -+ reg16 &= ~(1 << (vid % 16)); -+ aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_VLAN_ID_DATA0, 2, ®16); -+ reg8 = vlan_ctrl | SFR_VLAN_CONTROL_WE; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_VLAN_ID_CONTROL, 1, 1, ®8); -+ -+ return 0; -+} -+ -+static int aqc111_vlan_rx_add_vid(struct net_device *net, __be16 proto, u16 vid) -+{ -+ struct usbnet *dev = netdev_priv(net); -+ u8 vlan_ctrl = 0; -+ u16 reg16 = 0; -+ u8 reg8 = 0; -+ -+ aqc111_read_cmd(dev, AQ_ACCESS_MAC, SFR_VLAN_ID_CONTROL, 1, 1, ®8); -+ vlan_ctrl = reg8; -+ -+ /* Address */ -+ reg8 = (vid / 16); -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_VLAN_ID_ADDRESS, 1, 1, ®8); -+ /* Data */ -+ reg8 = vlan_ctrl | SFR_VLAN_CONTROL_RD; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_VLAN_ID_CONTROL, 1, 1, ®8); -+ aqc111_read16_cmd(dev, AQ_ACCESS_MAC, SFR_VLAN_ID_DATA0, 2, ®16); -+ reg16 |= (1 << (vid % 16)); -+ aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_VLAN_ID_DATA0, 2, ®16); -+ reg8 = vlan_ctrl | SFR_VLAN_CONTROL_WE; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_VLAN_ID_CONTROL, 1, 1, ®8); -+ -+ return 0; -+} -+ -+static void aqc111_set_rx_mode(struct net_device *net) -+{ -+ struct usbnet *dev = netdev_priv(net); -+ struct aqc111_data *aqc111_data = dev->driver_priv; -+ int mc_count = 0; -+ -+ mc_count = netdev_mc_count(net); -+ -+ aqc111_data->rxctl &= ~(SFR_RX_CTL_PRO | SFR_RX_CTL_AMALL | -+ SFR_RX_CTL_AM); -+ -+ if (net->flags & IFF_PROMISC) { -+ aqc111_data->rxctl |= SFR_RX_CTL_PRO; -+ } else if ((net->flags & IFF_ALLMULTI) || mc_count > AQ_MAX_MCAST) { -+ aqc111_data->rxctl |= SFR_RX_CTL_AMALL; -+ } else if (!netdev_mc_empty(net)) { -+ u8 m_filter[AQ_MCAST_FILTER_SIZE] = { 0 }; -+ struct netdev_hw_addr *ha = NULL; -+ u32 crc_bits = 0; -+ -+ netdev_for_each_mc_addr(ha, net) { -+ crc_bits = ether_crc(ETH_ALEN, ha->addr) >> 26; -+ m_filter[crc_bits >> 3] |= BIT(crc_bits & 7); -+ } -+ -+ aqc111_write_cmd_async(dev, AQ_ACCESS_MAC, -+ SFR_MULTI_FILTER_ARRY, -+ AQ_MCAST_FILTER_SIZE, -+ AQ_MCAST_FILTER_SIZE, m_filter); -+ -+ aqc111_data->rxctl |= SFR_RX_CTL_AM; -+ } -+ -+ aqc111_write16_cmd_async(dev, AQ_ACCESS_MAC, SFR_RX_CTL, -+ 2, &aqc111_data->rxctl); -+} -+ -+static int aqc111_set_features(struct net_device *net, -+ netdev_features_t features) -+{ -+ struct usbnet *dev = netdev_priv(net); -+ struct aqc111_data *aqc111_data = dev->driver_priv; -+ netdev_features_t changed = net->features ^ features; -+ u16 reg16 = 0; -+ u8 reg8 = 0; -+ -+ if (changed & NETIF_F_IP_CSUM) { -+ aqc111_read_cmd(dev, AQ_ACCESS_MAC, SFR_TXCOE_CTL, 1, 1, ®8); -+ reg8 ^= SFR_TXCOE_TCP | SFR_TXCOE_UDP; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_TXCOE_CTL, -+ 1, 1, ®8); -+ } -+ -+ if (changed & NETIF_F_IPV6_CSUM) { -+ aqc111_read_cmd(dev, AQ_ACCESS_MAC, SFR_TXCOE_CTL, 1, 1, ®8); -+ reg8 ^= SFR_TXCOE_TCPV6 | SFR_TXCOE_UDPV6; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_TXCOE_CTL, -+ 1, 1, ®8); -+ } -+ -+ if (changed & NETIF_F_RXCSUM) { -+ aqc111_read_cmd(dev, AQ_ACCESS_MAC, SFR_RXCOE_CTL, 1, 1, ®8); -+ if (features & NETIF_F_RXCSUM) { -+ aqc111_data->rx_checksum = 1; -+ reg8 &= ~(SFR_RXCOE_IP | SFR_RXCOE_TCP | SFR_RXCOE_UDP | -+ SFR_RXCOE_TCPV6 | SFR_RXCOE_UDPV6); -+ } else { -+ aqc111_data->rx_checksum = 0; -+ reg8 |= SFR_RXCOE_IP | SFR_RXCOE_TCP | SFR_RXCOE_UDP | -+ SFR_RXCOE_TCPV6 | SFR_RXCOE_UDPV6; -+ } -+ -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_RXCOE_CTL, -+ 1, 1, ®8); -+ } -+ if (changed & NETIF_F_HW_VLAN_CTAG_FILTER) { -+ if (features & NETIF_F_HW_VLAN_CTAG_FILTER) { -+ u16 i = 0; -+ -+ for (i = 0; i < 256; i++) { -+ /* Address */ -+ reg8 = i; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, -+ SFR_VLAN_ID_ADDRESS, -+ 1, 1, ®8); -+ /* Data */ -+ aqc111_write16_cmd(dev, AQ_ACCESS_MAC, -+ SFR_VLAN_ID_DATA0, -+ 2, ®16); -+ reg8 = SFR_VLAN_CONTROL_WE; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, -+ SFR_VLAN_ID_CONTROL, -+ 1, 1, ®8); -+ } -+ aqc111_read_cmd(dev, AQ_ACCESS_MAC, SFR_VLAN_ID_CONTROL, -+ 1, 1, ®8); -+ reg8 |= SFR_VLAN_CONTROL_VFE; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, -+ SFR_VLAN_ID_CONTROL, 1, 1, ®8); -+ } else { -+ aqc111_read_cmd(dev, AQ_ACCESS_MAC, SFR_VLAN_ID_CONTROL, -+ 1, 1, ®8); -+ reg8 &= ~SFR_VLAN_CONTROL_VFE; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, -+ SFR_VLAN_ID_CONTROL, 1, 1, ®8); -+ } -+ } -+ -+ return 0; -+} -+ -+static const struct net_device_ops aqc111_netdev_ops = { -+ .ndo_open = usbnet_open, -+ .ndo_stop = usbnet_stop, -+ .ndo_start_xmit = usbnet_start_xmit, -+ .ndo_tx_timeout = usbnet_tx_timeout, -+ .ndo_get_stats64 = usbnet_get_stats64, -+ .ndo_change_mtu = aqc111_change_mtu, -+ .ndo_set_mac_address = aqc111_set_mac_addr, -+ .ndo_validate_addr = eth_validate_addr, -+ .ndo_vlan_rx_add_vid = aqc111_vlan_rx_add_vid, -+ .ndo_vlan_rx_kill_vid = aqc111_vlan_rx_kill_vid, -+ .ndo_set_rx_mode = aqc111_set_rx_mode, -+ .ndo_set_features = aqc111_set_features, -+}; -+ -+static int aqc111_read_perm_mac(struct usbnet *dev) -+{ -+ u8 buf[ETH_ALEN]; -+ int ret; -+ -+ ret = aqc111_read_cmd(dev, AQ_FLASH_PARAMETERS, 0, 0, ETH_ALEN, buf); -+ if (ret < 0) -+ goto out; -+ -+ ether_addr_copy(dev->net->perm_addr, buf); -+ -+ return 0; -+out: -+ return ret; -+} -+ -+static void aqc111_read_fw_version(struct usbnet *dev, -+ struct aqc111_data *aqc111_data) -+{ -+ aqc111_read_cmd(dev, AQ_ACCESS_MAC, AQ_FW_VER_MAJOR, -+ 1, 1, &aqc111_data->fw_ver.major); -+ aqc111_read_cmd(dev, AQ_ACCESS_MAC, AQ_FW_VER_MINOR, -+ 1, 1, &aqc111_data->fw_ver.minor); -+ aqc111_read_cmd(dev, AQ_ACCESS_MAC, AQ_FW_VER_REV, -+ 1, 1, &aqc111_data->fw_ver.rev); -+ -+ if (aqc111_data->fw_ver.major & 0x80) -+ aqc111_data->fw_ver.major &= ~0x80; -+} -+ -+static int aqc111_bind(struct usbnet *dev, struct usb_interface *intf) -+{ -+ struct usb_device *udev = interface_to_usbdev(intf); -+ enum usb_device_speed usb_speed = udev->speed; -+ struct aqc111_data *aqc111_data; -+ int ret; -+ -+ /* Check if vendor configuration */ -+ if (udev->actconfig->desc.bConfigurationValue != 1) { -+ usb_driver_set_configuration(udev, 1); -+ return -ENODEV; -+ } -+ -+ usb_reset_configuration(dev->udev); -+ -+ ret = usbnet_get_endpoints(dev, intf); -+ if (ret < 0) { -+ netdev_dbg(dev->net, "usbnet_get_endpoints failed"); -+ return ret; -+ } -+ -+ aqc111_data = kzalloc(sizeof(*aqc111_data), GFP_KERNEL); -+ if (!aqc111_data) -+ return -ENOMEM; -+ -+ /* store aqc111_data pointer in device data field */ -+ dev->driver_priv = aqc111_data; -+ -+ /* Init the MAC address */ -+ ret = aqc111_read_perm_mac(dev); -+ if (ret) -+ goto out; -+ -+ ether_addr_copy(dev->net->dev_addr, dev->net->perm_addr); -+ -+ /* Set Rx urb size */ -+ dev->rx_urb_size = URB_SIZE; -+ -+ /* Set TX needed headroom & tailroom */ -+ dev->net->needed_headroom += sizeof(u64); -+ dev->net->needed_tailroom += sizeof(u64); -+ -+ dev->net->max_mtu = 16334; -+ -+ dev->net->netdev_ops = &aqc111_netdev_ops; -+ dev->net->ethtool_ops = &aqc111_ethtool_ops; -+ -+ if (usb_device_no_sg_constraint(dev->udev)) -+ dev->can_dma_sg = 1; -+ -+ dev->net->hw_features |= AQ_SUPPORT_HW_FEATURE; -+ dev->net->features |= AQ_SUPPORT_FEATURE; -+ dev->net->vlan_features |= AQ_SUPPORT_VLAN_FEATURE; -+ -+ netif_set_gso_max_size(dev->net, 65535); -+ -+ aqc111_read_fw_version(dev, aqc111_data); -+ aqc111_data->autoneg = AUTONEG_ENABLE; -+ aqc111_data->advertised_speed = (usb_speed == USB_SPEED_SUPER) ? -+ SPEED_5000 : SPEED_1000; -+ -+ return 0; -+ -+out: -+ kfree(aqc111_data); -+ return ret; -+} -+ -+static void aqc111_unbind(struct usbnet *dev, struct usb_interface *intf) -+{ -+ struct aqc111_data *aqc111_data = dev->driver_priv; -+ u16 reg16; -+ -+ /* Force bz */ -+ reg16 = SFR_PHYPWR_RSTCTL_BZ; -+ aqc111_write16_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_PHYPWR_RSTCTL, -+ 2, ®16); -+ reg16 = 0; -+ aqc111_write16_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_PHYPWR_RSTCTL, -+ 2, ®16); -+ -+ /* Power down ethernet PHY */ -+ aqc111_data->phy_cfg &= ~AQ_ADV_MASK; -+ aqc111_data->phy_cfg |= AQ_LOW_POWER; -+ aqc111_data->phy_cfg &= ~AQ_PHY_POWER_EN; -+ aqc111_write32_cmd_nopm(dev, AQ_PHY_OPS, 0, 0, -+ &aqc111_data->phy_cfg); -+ -+ kfree(aqc111_data); -+} -+ -+static void aqc111_status(struct usbnet *dev, struct urb *urb) -+{ -+ struct aqc111_data *aqc111_data = dev->driver_priv; -+ u64 *event_data = NULL; -+ int link = 0; -+ -+ if (urb->actual_length < sizeof(*event_data)) -+ return; -+ -+ event_data = urb->transfer_buffer; -+ le64_to_cpus(event_data); -+ -+ if (*event_data & AQ_LS_MASK) -+ link = 1; -+ else -+ link = 0; -+ -+ aqc111_data->link_speed = (*event_data & AQ_SPEED_MASK) >> -+ AQ_SPEED_SHIFT; -+ aqc111_data->link = link; -+ -+ if (netif_carrier_ok(dev->net) != link) -+ usbnet_defer_kevent(dev, EVENT_LINK_RESET); -+} -+ -+static void aqc111_configure_rx(struct usbnet *dev, -+ struct aqc111_data *aqc111_data) -+{ -+ enum usb_device_speed usb_speed = dev->udev->speed; -+ u16 link_speed = 0, usb_host = 0; -+ u8 buf[5] = { 0 }; -+ u8 queue_num = 0; -+ u16 reg16 = 0; -+ u8 reg8 = 0; -+ -+ buf[0] = 0x00; -+ buf[1] = 0xF8; -+ buf[2] = 0x07; -+ switch (aqc111_data->link_speed) { -+ case AQ_INT_SPEED_5G: -+ link_speed = 5000; -+ reg8 = 0x05; -+ reg16 = 0x001F; -+ break; -+ case AQ_INT_SPEED_2_5G: -+ link_speed = 2500; -+ reg16 = 0x003F; -+ break; -+ case AQ_INT_SPEED_1G: -+ link_speed = 1000; -+ reg16 = 0x009F; -+ break; -+ case AQ_INT_SPEED_100M: -+ link_speed = 100; -+ queue_num = 1; -+ reg16 = 0x063F; -+ buf[1] = 0xFB; -+ buf[2] = 0x4; -+ break; -+ } -+ -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_INTER_PACKET_GAP_0, -+ 1, 1, ®8); -+ -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_TX_PAUSE_RESEND_T, 3, 3, buf); -+ -+ switch (usb_speed) { -+ case USB_SPEED_SUPER: -+ usb_host = 3; -+ break; -+ case USB_SPEED_HIGH: -+ usb_host = 2; -+ break; -+ case USB_SPEED_FULL: -+ case USB_SPEED_LOW: -+ usb_host = 1; -+ queue_num = 0; -+ break; -+ default: -+ usb_host = 0; -+ break; -+ } -+ -+ if (dev->net->mtu > 12500 && dev->net->mtu <= 16334) -+ queue_num = 2; /* For Jumbo packet 16KB */ -+ -+ memcpy(buf, &AQC111_BULKIN_SIZE[queue_num], 5); -+ /* RX bulk configuration */ -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_RX_BULKIN_QCTRL, 5, 5, buf); -+ -+ /* Set high low water level */ -+ if (dev->net->mtu <= 4500) -+ reg16 = 0x0810; -+ else if (dev->net->mtu <= 9500) -+ reg16 = 0x1020; -+ else if (dev->net->mtu <= 12500) -+ reg16 = 0x1420; -+ else if (dev->net->mtu <= 16334) -+ reg16 = 0x1A20; -+ -+ aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_PAUSE_WATERLVL_LOW, -+ 2, ®16); -+ netdev_info(dev->net, "Link Speed %d, USB %d", link_speed, usb_host); -+} -+ -+static void aqc111_configure_csum_offload(struct usbnet *dev) -+{ -+ u8 reg8 = 0; -+ -+ if (dev->net->features & NETIF_F_RXCSUM) { -+ reg8 |= SFR_RXCOE_IP | SFR_RXCOE_TCP | SFR_RXCOE_UDP | -+ SFR_RXCOE_TCPV6 | SFR_RXCOE_UDPV6; -+ } -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_RXCOE_CTL, 1, 1, ®8); -+ -+ reg8 = 0; -+ if (dev->net->features & NETIF_F_IP_CSUM) -+ reg8 |= SFR_TXCOE_IP | SFR_TXCOE_TCP | SFR_TXCOE_UDP; -+ -+ if (dev->net->features & NETIF_F_IPV6_CSUM) -+ reg8 |= SFR_TXCOE_TCPV6 | SFR_TXCOE_UDPV6; -+ -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_TXCOE_CTL, 1, 1, ®8); -+} -+ -+static int aqc111_link_reset(struct usbnet *dev) -+{ -+ struct aqc111_data *aqc111_data = dev->driver_priv; -+ u16 reg16 = 0; -+ u8 reg8 = 0; -+ -+ if (aqc111_data->link == 1) { /* Link up */ -+ aqc111_configure_rx(dev, aqc111_data); -+ -+ /* Vlan Tag Filter */ -+ reg8 = SFR_VLAN_CONTROL_VSO; -+ if (dev->net->features & NETIF_F_HW_VLAN_CTAG_FILTER) -+ reg8 |= SFR_VLAN_CONTROL_VFE; -+ -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_VLAN_ID_CONTROL, -+ 1, 1, ®8); -+ -+ reg8 = 0x0; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_BMRX_DMA_CONTROL, -+ 1, 1, ®8); -+ -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_BMTX_DMA_CONTROL, -+ 1, 1, ®8); -+ -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_ARC_CTRL, 1, 1, ®8); -+ -+ reg16 = SFR_RX_CTL_IPE | SFR_RX_CTL_AB; -+ aqc111_data->rxctl = reg16; -+ aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_RX_CTL, 2, ®16); -+ -+ reg8 = SFR_RX_PATH_READY; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_ETH_MAC_PATH, -+ 1, 1, ®8); -+ -+ reg8 = SFR_BULK_OUT_EFF_EN; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_BULK_OUT_CTRL, -+ 1, 1, ®8); -+ -+ reg16 = 0; -+ aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_MEDIUM_STATUS_MODE, -+ 2, ®16); -+ -+ reg16 = SFR_MEDIUM_XGMIIMODE | SFR_MEDIUM_FULL_DUPLEX; -+ aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_MEDIUM_STATUS_MODE, -+ 2, ®16); -+ -+ aqc111_configure_csum_offload(dev); -+ -+ aqc111_set_rx_mode(dev->net); -+ -+ aqc111_read16_cmd(dev, AQ_ACCESS_MAC, SFR_MEDIUM_STATUS_MODE, -+ 2, ®16); -+ -+ if (dev->net->mtu > 1500) -+ reg16 |= SFR_MEDIUM_JUMBO_EN; -+ -+ reg16 |= SFR_MEDIUM_RECEIVE_EN | SFR_MEDIUM_RXFLOW_CTRLEN | -+ SFR_MEDIUM_TXFLOW_CTRLEN; -+ aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_MEDIUM_STATUS_MODE, -+ 2, ®16); -+ -+ aqc111_data->rxctl |= SFR_RX_CTL_START; -+ aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_RX_CTL, -+ 2, &aqc111_data->rxctl); -+ -+ netif_carrier_on(dev->net); -+ } else { -+ aqc111_read16_cmd(dev, AQ_ACCESS_MAC, SFR_MEDIUM_STATUS_MODE, -+ 2, ®16); -+ reg16 &= ~SFR_MEDIUM_RECEIVE_EN; -+ aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_MEDIUM_STATUS_MODE, -+ 2, ®16); -+ -+ aqc111_data->rxctl &= ~SFR_RX_CTL_START; -+ aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_RX_CTL, -+ 2, &aqc111_data->rxctl); -+ -+ reg8 = SFR_BULK_OUT_FLUSH_EN | SFR_BULK_OUT_EFF_EN; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_BULK_OUT_CTRL, -+ 1, 1, ®8); -+ reg8 = SFR_BULK_OUT_EFF_EN; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_BULK_OUT_CTRL, -+ 1, 1, ®8); -+ -+ netif_carrier_off(dev->net); -+ } -+ return 0; -+} -+ -+static int aqc111_reset(struct usbnet *dev) -+{ -+ struct aqc111_data *aqc111_data = dev->driver_priv; -+ u8 reg8 = 0; -+ -+ dev->rx_urb_size = URB_SIZE; -+ -+ if (usb_device_no_sg_constraint(dev->udev)) -+ dev->can_dma_sg = 1; -+ -+ dev->net->hw_features |= AQ_SUPPORT_HW_FEATURE; -+ dev->net->features |= AQ_SUPPORT_FEATURE; -+ dev->net->vlan_features |= AQ_SUPPORT_VLAN_FEATURE; -+ -+ /* Power up ethernet PHY */ -+ aqc111_data->phy_cfg = AQ_PHY_POWER_EN; -+ aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, -+ &aqc111_data->phy_cfg); -+ -+ /* Set the MAC address */ -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_NODE_ID, ETH_ALEN, -+ ETH_ALEN, dev->net->dev_addr); -+ -+ reg8 = 0xFF; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_BM_INT_MASK, 1, 1, ®8); -+ -+ reg8 = 0x0; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_SWP_CTRL, 1, 1, ®8); -+ -+ aqc111_read_cmd(dev, AQ_ACCESS_MAC, SFR_MONITOR_MODE, 1, 1, ®8); -+ reg8 &= ~(SFR_MONITOR_MODE_EPHYRW | SFR_MONITOR_MODE_RWLC | -+ SFR_MONITOR_MODE_RWMP | SFR_MONITOR_MODE_RWWF | -+ SFR_MONITOR_MODE_RW_FLAG); -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_MONITOR_MODE, 1, 1, ®8); -+ -+ netif_carrier_off(dev->net); -+ -+ /* Phy advertise */ -+ aqc111_set_phy_speed(dev, aqc111_data->autoneg, -+ aqc111_data->advertised_speed); -+ -+ return 0; -+} -+ -+static int aqc111_stop(struct usbnet *dev) -+{ -+ struct aqc111_data *aqc111_data = dev->driver_priv; -+ u16 reg16 = 0; -+ -+ aqc111_read16_cmd(dev, AQ_ACCESS_MAC, SFR_MEDIUM_STATUS_MODE, -+ 2, ®16); -+ reg16 &= ~SFR_MEDIUM_RECEIVE_EN; -+ aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_MEDIUM_STATUS_MODE, -+ 2, ®16); -+ reg16 = 0; -+ aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_RX_CTL, 2, ®16); -+ -+ /* Put PHY to low power*/ -+ aqc111_data->phy_cfg |= AQ_LOW_POWER; -+ aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, -+ &aqc111_data->phy_cfg); -+ -+ netif_carrier_off(dev->net); -+ -+ return 0; -+} -+ -+static void aqc111_rx_checksum(struct sk_buff *skb, u64 pkt_desc) -+{ -+ u32 pkt_type = 0; -+ -+ skb->ip_summed = CHECKSUM_NONE; -+ /* checksum error bit is set */ -+ if (pkt_desc & AQ_RX_PD_L4_ERR || pkt_desc & AQ_RX_PD_L3_ERR) -+ return; -+ -+ pkt_type = pkt_desc & AQ_RX_PD_L4_TYPE_MASK; -+ /* It must be a TCP or UDP packet with a valid checksum */ -+ if (pkt_type == AQ_RX_PD_L4_TCP || pkt_type == AQ_RX_PD_L4_UDP) -+ skb->ip_summed = CHECKSUM_UNNECESSARY; -+} -+ -+static int aqc111_rx_fixup(struct usbnet *dev, struct sk_buff *skb) -+{ -+ struct aqc111_data *aqc111_data = dev->driver_priv; -+ struct sk_buff *new_skb = NULL; -+ u32 pkt_total_offset = 0; -+ u64 *pkt_desc_ptr = NULL; -+ u32 start_of_descs = 0; -+ u32 desc_offset = 0; /*RX Header Offset*/ -+ u16 pkt_count = 0; -+ u64 desc_hdr = 0; -+ u16 vlan_tag = 0; -+ u32 skb_len = 0; -+ -+ if (!skb) -+ goto err; -+ -+ if (skb->len == 0) -+ goto err; -+ -+ skb_len = skb->len; -+ /* RX Descriptor Header */ -+ skb_trim(skb, skb->len - sizeof(desc_hdr)); -+ desc_hdr = le64_to_cpup((u64 *)skb_tail_pointer(skb)); -+ -+ /* Check these packets */ -+ desc_offset = (desc_hdr & AQ_RX_DH_DESC_OFFSET_MASK) >> -+ AQ_RX_DH_DESC_OFFSET_SHIFT; -+ pkt_count = desc_hdr & AQ_RX_DH_PKT_CNT_MASK; -+ start_of_descs = skb_len - ((pkt_count + 1) * sizeof(desc_hdr)); -+ -+ /* self check descs position */ -+ if (start_of_descs != desc_offset) -+ goto err; -+ -+ /* self check desc_offset from header*/ -+ if (desc_offset >= skb_len) -+ goto err; -+ -+ if (pkt_count == 0) -+ goto err; -+ -+ /* Get the first RX packet descriptor */ -+ pkt_desc_ptr = (u64 *)(skb->data + desc_offset); -+ -+ while (pkt_count--) { -+ u64 pkt_desc = le64_to_cpup(pkt_desc_ptr); -+ u32 pkt_len_with_padd = 0; -+ u32 pkt_len = 0; -+ -+ pkt_len = (u32)((pkt_desc & AQ_RX_PD_LEN_MASK) >> -+ AQ_RX_PD_LEN_SHIFT); -+ pkt_len_with_padd = ((pkt_len + 7) & 0x7FFF8); -+ -+ pkt_total_offset += pkt_len_with_padd; -+ if (pkt_total_offset > desc_offset || -+ (pkt_count == 0 && pkt_total_offset != desc_offset)) { -+ goto err; -+ } -+ -+ if (pkt_desc & AQ_RX_PD_DROP || -+ !(pkt_desc & AQ_RX_PD_RX_OK) || -+ pkt_len > (dev->hard_mtu + AQ_RX_HW_PAD)) { -+ skb_pull(skb, pkt_len_with_padd); -+ /* Next RX Packet Descriptor */ -+ pkt_desc_ptr++; -+ continue; -+ } -+ -+ /* Clone SKB */ -+ new_skb = skb_clone(skb, GFP_ATOMIC); -+ -+ if (!new_skb) -+ goto err; -+ -+ new_skb->len = pkt_len; -+ skb_pull(new_skb, AQ_RX_HW_PAD); -+ skb_set_tail_pointer(new_skb, new_skb->len); -+ -+ new_skb->truesize = SKB_TRUESIZE(new_skb->len); -+ if (aqc111_data->rx_checksum) -+ aqc111_rx_checksum(new_skb, pkt_desc); -+ -+ if (pkt_desc & AQ_RX_PD_VLAN) { -+ vlan_tag = pkt_desc >> AQ_RX_PD_VLAN_SHIFT; -+ __vlan_hwaccel_put_tag(new_skb, htons(ETH_P_8021Q), -+ vlan_tag & VLAN_VID_MASK); -+ } -+ -+ usbnet_skb_return(dev, new_skb); -+ if (pkt_count == 0) -+ break; -+ -+ skb_pull(skb, pkt_len_with_padd); -+ -+ /* Next RX Packet Header */ -+ pkt_desc_ptr++; -+ -+ new_skb = NULL; -+ } -+ -+ return 1; -+ -+err: -+ return 0; -+} -+ -+static struct sk_buff *aqc111_tx_fixup(struct usbnet *dev, struct sk_buff *skb, -+ gfp_t flags) -+{ -+ int frame_size = dev->maxpacket; -+ struct sk_buff *new_skb = NULL; -+ u64 *tx_desc_ptr = NULL; -+ int padding_size = 0; -+ int headroom = 0; -+ int tailroom = 0; -+ u64 tx_desc = 0; -+ u16 tci = 0; -+ -+ /*Length of actual data*/ -+ tx_desc |= skb->len & AQ_TX_DESC_LEN_MASK; -+ -+ /* TSO MSS */ -+ tx_desc |= ((u64)(skb_shinfo(skb)->gso_size & AQ_TX_DESC_MSS_MASK)) << -+ AQ_TX_DESC_MSS_SHIFT; -+ -+ headroom = (skb->len + sizeof(tx_desc)) % 8; -+ if (headroom != 0) -+ padding_size = 8 - headroom; -+ -+ if (((skb->len + sizeof(tx_desc) + padding_size) % frame_size) == 0) { -+ padding_size += 8; -+ tx_desc |= AQ_TX_DESC_DROP_PADD; -+ } -+ -+ /* Vlan Tag */ -+ if (vlan_get_tag(skb, &tci) >= 0) { -+ tx_desc |= AQ_TX_DESC_VLAN; -+ tx_desc |= ((u64)tci & AQ_TX_DESC_VLAN_MASK) << -+ AQ_TX_DESC_VLAN_SHIFT; -+ } -+ -+ if (!dev->can_dma_sg && (dev->net->features & NETIF_F_SG) && -+ skb_linearize(skb)) -+ return NULL; -+ -+ headroom = skb_headroom(skb); -+ tailroom = skb_tailroom(skb); -+ -+ if (!(headroom >= sizeof(tx_desc) && tailroom >= padding_size)) { -+ new_skb = skb_copy_expand(skb, sizeof(tx_desc), -+ padding_size, flags); -+ dev_kfree_skb_any(skb); -+ skb = new_skb; -+ if (!skb) -+ return NULL; -+ } -+ if (padding_size != 0) -+ skb_put_zero(skb, padding_size); -+ /* Copy TX header */ -+ tx_desc_ptr = skb_push(skb, sizeof(tx_desc)); -+ *tx_desc_ptr = cpu_to_le64(tx_desc); -+ -+ usbnet_set_skb_tx_stats(skb, 1, 0); -+ -+ return skb; -+} -+ -+static const struct driver_info aqc111_info = { -+ .description = "Aquantia AQtion USB to 5GbE Controller", -+ .bind = aqc111_bind, -+ .unbind = aqc111_unbind, -+ .status = aqc111_status, -+ .link_reset = aqc111_link_reset, -+ .reset = aqc111_reset, -+ .stop = aqc111_stop, -+ .flags = FLAG_ETHER | FLAG_FRAMING_AX | -+ FLAG_AVOID_UNLINK_URBS | FLAG_MULTI_PACKET, -+ .rx_fixup = aqc111_rx_fixup, -+ .tx_fixup = aqc111_tx_fixup, -+}; -+ -+#define ASIX111_DESC \ -+"ASIX USB 3.1 Gen1 to 5G Multi-Gigabit Ethernet Adapter" -+ -+static const struct driver_info asix111_info = { -+ .description = ASIX111_DESC, -+ .bind = aqc111_bind, -+ .unbind = aqc111_unbind, -+ .status = aqc111_status, -+ .link_reset = aqc111_link_reset, -+ .reset = aqc111_reset, -+ .stop = aqc111_stop, -+ .flags = FLAG_ETHER | FLAG_FRAMING_AX | -+ FLAG_AVOID_UNLINK_URBS | FLAG_MULTI_PACKET, -+ .rx_fixup = aqc111_rx_fixup, -+ .tx_fixup = aqc111_tx_fixup, -+}; -+ -+#undef ASIX111_DESC -+ -+#define ASIX112_DESC \ -+"ASIX USB 3.1 Gen1 to 2.5G Multi-Gigabit Ethernet Adapter" -+ -+static const struct driver_info asix112_info = { -+ .description = ASIX112_DESC, -+ .bind = aqc111_bind, -+ .unbind = aqc111_unbind, -+ .status = aqc111_status, -+ .link_reset = aqc111_link_reset, -+ .reset = aqc111_reset, -+ .stop = aqc111_stop, -+ .flags = FLAG_ETHER | FLAG_FRAMING_AX | -+ FLAG_AVOID_UNLINK_URBS | FLAG_MULTI_PACKET, -+ .rx_fixup = aqc111_rx_fixup, -+ .tx_fixup = aqc111_tx_fixup, -+}; -+ -+#undef ASIX112_DESC -+ -+static const struct driver_info trendnet_info = { -+ .description = "USB-C 3.1 to 5GBASE-T Ethernet Adapter", -+ .bind = aqc111_bind, -+ .unbind = aqc111_unbind, -+ .status = aqc111_status, -+ .link_reset = aqc111_link_reset, -+ .reset = aqc111_reset, -+ .stop = aqc111_stop, -+ .flags = FLAG_ETHER | FLAG_FRAMING_AX | -+ FLAG_AVOID_UNLINK_URBS | FLAG_MULTI_PACKET, -+ .rx_fixup = aqc111_rx_fixup, -+ .tx_fixup = aqc111_tx_fixup, -+}; -+ -+static const struct driver_info qnap_info = { -+ .description = "QNAP QNA-UC5G1T USB to 5GbE Adapter", -+ .bind = aqc111_bind, -+ .unbind = aqc111_unbind, -+ .status = aqc111_status, -+ .link_reset = aqc111_link_reset, -+ .reset = aqc111_reset, -+ .stop = aqc111_stop, -+ .flags = FLAG_ETHER | FLAG_FRAMING_AX | -+ FLAG_AVOID_UNLINK_URBS | FLAG_MULTI_PACKET, -+ .rx_fixup = aqc111_rx_fixup, -+ .tx_fixup = aqc111_tx_fixup, -+}; -+ -+static int aqc111_suspend(struct usb_interface *intf, pm_message_t message) -+{ -+ struct usbnet *dev = usb_get_intfdata(intf); -+ struct aqc111_data *aqc111_data = dev->driver_priv; -+ u16 temp_rx_ctrl = 0x00; -+ u16 reg16; -+ u8 reg8; -+ -+ usbnet_suspend(intf, message); -+ -+ aqc111_read16_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_RX_CTL, 2, ®16); -+ temp_rx_ctrl = reg16; -+ /* Stop RX operations*/ -+ reg16 &= ~SFR_RX_CTL_START; -+ aqc111_write16_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_RX_CTL, 2, ®16); -+ /* Force bz */ -+ aqc111_read16_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_PHYPWR_RSTCTL, -+ 2, ®16); -+ reg16 |= SFR_PHYPWR_RSTCTL_BZ; -+ aqc111_write16_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_PHYPWR_RSTCTL, -+ 2, ®16); -+ -+ reg8 = SFR_BULK_OUT_EFF_EN; -+ aqc111_write_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_BULK_OUT_CTRL, -+ 1, 1, ®8); -+ -+ temp_rx_ctrl &= ~(SFR_RX_CTL_START | SFR_RX_CTL_RF_WAK | -+ SFR_RX_CTL_AP | SFR_RX_CTL_AM); -+ aqc111_write16_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_RX_CTL, -+ 2, &temp_rx_ctrl); -+ -+ reg8 = 0x00; -+ aqc111_write_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_ETH_MAC_PATH, -+ 1, 1, ®8); -+ -+ if (aqc111_data->wol_flags) { -+ struct aqc111_wol_cfg wol_cfg; -+ -+ memset(&wol_cfg, 0, sizeof(struct aqc111_wol_cfg)); -+ -+ aqc111_data->phy_cfg |= AQ_WOL; -+ ether_addr_copy(wol_cfg.hw_addr, dev->net->dev_addr); -+ wol_cfg.flags = aqc111_data->wol_flags; -+ -+ temp_rx_ctrl |= (SFR_RX_CTL_AB | SFR_RX_CTL_START); -+ aqc111_write16_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_RX_CTL, -+ 2, &temp_rx_ctrl); -+ reg8 = 0x00; -+ aqc111_write_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_BM_INT_MASK, -+ 1, 1, ®8); -+ reg8 = SFR_BMRX_DMA_EN; -+ aqc111_write_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_BMRX_DMA_CONTROL, -+ 1, 1, ®8); -+ reg8 = SFR_RX_PATH_READY; -+ aqc111_write_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_ETH_MAC_PATH, -+ 1, 1, ®8); -+ reg8 = 0x07; -+ aqc111_write_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_RX_BULKIN_QCTRL, -+ 1, 1, ®8); -+ reg8 = 0x00; -+ aqc111_write_cmd_nopm(dev, AQ_ACCESS_MAC, -+ SFR_RX_BULKIN_QTIMR_LOW, 1, 1, ®8); -+ aqc111_write_cmd_nopm(dev, AQ_ACCESS_MAC, -+ SFR_RX_BULKIN_QTIMR_HIGH, 1, 1, ®8); -+ reg8 = 0xFF; -+ aqc111_write_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_RX_BULKIN_QSIZE, -+ 1, 1, ®8); -+ aqc111_write_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_RX_BULKIN_QIFG, -+ 1, 1, ®8); -+ -+ aqc111_read16_cmd_nopm(dev, AQ_ACCESS_MAC, -+ SFR_MEDIUM_STATUS_MODE, 2, ®16); -+ reg16 |= SFR_MEDIUM_RECEIVE_EN; -+ aqc111_write16_cmd_nopm(dev, AQ_ACCESS_MAC, -+ SFR_MEDIUM_STATUS_MODE, 2, ®16); -+ -+ aqc111_write_cmd(dev, AQ_WOL_CFG, 0, 0, -+ WOL_CFG_SIZE, &wol_cfg); -+ aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, -+ &aqc111_data->phy_cfg); -+ } else { -+ aqc111_data->phy_cfg |= AQ_LOW_POWER; -+ aqc111_write32_cmd(dev, AQ_PHY_OPS, 0, 0, -+ &aqc111_data->phy_cfg); -+ -+ /* Disable RX path */ -+ aqc111_read16_cmd_nopm(dev, AQ_ACCESS_MAC, -+ SFR_MEDIUM_STATUS_MODE, 2, ®16); -+ reg16 &= ~SFR_MEDIUM_RECEIVE_EN; -+ aqc111_write16_cmd_nopm(dev, AQ_ACCESS_MAC, -+ SFR_MEDIUM_STATUS_MODE, 2, ®16); -+ } -+ -+ return 0; -+} -+ -+static int aqc111_resume(struct usb_interface *intf) -+{ -+ struct usbnet *dev = usb_get_intfdata(intf); -+ struct aqc111_data *aqc111_data = dev->driver_priv; -+ u16 reg16; -+ u8 reg8; -+ -+ netif_carrier_off(dev->net); -+ -+ /* Power up ethernet PHY */ -+ aqc111_data->phy_cfg |= AQ_PHY_POWER_EN; -+ aqc111_data->phy_cfg &= ~AQ_LOW_POWER; -+ aqc111_data->phy_cfg &= ~AQ_WOL; -+ -+ reg8 = 0xFF; -+ aqc111_write_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_BM_INT_MASK, -+ 1, 1, ®8); -+ /* Configure RX control register => start operation */ -+ reg16 = aqc111_data->rxctl; -+ reg16 &= ~SFR_RX_CTL_START; -+ aqc111_write16_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_RX_CTL, 2, ®16); -+ -+ reg16 |= SFR_RX_CTL_START; -+ aqc111_write16_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_RX_CTL, 2, ®16); -+ -+ aqc111_set_phy_speed(dev, aqc111_data->autoneg, -+ aqc111_data->advertised_speed); -+ -+ aqc111_read16_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_MEDIUM_STATUS_MODE, -+ 2, ®16); -+ reg16 |= SFR_MEDIUM_RECEIVE_EN; -+ aqc111_write16_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_MEDIUM_STATUS_MODE, -+ 2, ®16); -+ reg8 = SFR_RX_PATH_READY; -+ aqc111_write_cmd_nopm(dev, AQ_ACCESS_MAC, SFR_ETH_MAC_PATH, -+ 1, 1, ®8); -+ reg8 = 0x0; -+ aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_BMRX_DMA_CONTROL, 1, 1, ®8); -+ -+ return usbnet_resume(intf); -+} -+ -+#define AQC111_USB_ETH_DEV(vid, pid, table) \ -+ USB_DEVICE_INTERFACE_CLASS((vid), (pid), USB_CLASS_VENDOR_SPEC), \ -+ .driver_info = (unsigned long)&(table) \ -+}, \ -+{ \ -+ USB_DEVICE_AND_INTERFACE_INFO((vid), (pid), \ -+ USB_CLASS_COMM, \ -+ USB_CDC_SUBCLASS_ETHERNET, \ -+ USB_CDC_PROTO_NONE), \ -+ .driver_info = (unsigned long)&(table), -+ -+static const struct usb_device_id products[] = { -+ {AQC111_USB_ETH_DEV(0x2eca, 0xc101, aqc111_info)}, -+ {AQC111_USB_ETH_DEV(0x0b95, 0x2790, asix111_info)}, -+ {AQC111_USB_ETH_DEV(0x0b95, 0x2791, asix112_info)}, -+ {AQC111_USB_ETH_DEV(0x20f4, 0xe05a, trendnet_info)}, -+ {AQC111_USB_ETH_DEV(0x1c04, 0x0015, qnap_info)}, -+ { },/* END */ -+}; -+MODULE_DEVICE_TABLE(usb, products); -+ -+static struct usb_driver aq_driver = { -+ .name = "aqc111", -+ .id_table = products, -+ .probe = usbnet_probe, -+ .suspend = aqc111_suspend, -+ .resume = aqc111_resume, -+ .disconnect = usbnet_disconnect, -+}; -+ -+module_usb_driver(aq_driver); -+ -+MODULE_DESCRIPTION("Aquantia AQtion USB to 5/2.5GbE Controllers"); -+MODULE_LICENSE("GPL"); ---- /dev/null -+++ b/drivers/net/usb/aqc111.h -@@ -0,0 +1,232 @@ -+/* SPDX-License-Identifier: GPL-2.0-or-later */ -+/* Aquantia Corp. Aquantia AQtion USB to 5GbE Controller -+ * Copyright (C) 2003-2005 David Hollis -+ * Copyright (C) 2005 Phil Chang -+ * Copyright (C) 2002-2003 TiVo Inc. -+ * Copyright (C) 2017-2018 ASIX -+ * Copyright (C) 2018 Aquantia Corp. -+ */ -+ -+#ifndef __LINUX_USBNET_AQC111_H -+#define __LINUX_USBNET_AQC111_H -+ -+#define URB_SIZE (1024 * 62) -+ -+#define AQ_MCAST_FILTER_SIZE 8 -+#define AQ_MAX_MCAST 64 -+ -+#define AQ_ACCESS_MAC 0x01 -+#define AQ_FLASH_PARAMETERS 0x20 -+#define AQ_PHY_POWER 0x31 -+#define AQ_WOL_CFG 0x60 -+#define AQ_PHY_OPS 0x61 -+ -+#define AQ_USB_PHY_SET_TIMEOUT 10000 -+#define AQ_USB_SET_TIMEOUT 4000 -+ -+/* Feature. ********************************************/ -+#define AQ_SUPPORT_FEATURE (NETIF_F_SG | NETIF_F_IP_CSUM |\ -+ NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM |\ -+ NETIF_F_TSO | NETIF_F_HW_VLAN_CTAG_TX |\ -+ NETIF_F_HW_VLAN_CTAG_RX) -+ -+#define AQ_SUPPORT_HW_FEATURE (NETIF_F_SG | NETIF_F_IP_CSUM |\ -+ NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM |\ -+ NETIF_F_TSO | NETIF_F_HW_VLAN_CTAG_FILTER) -+ -+#define AQ_SUPPORT_VLAN_FEATURE (NETIF_F_SG | NETIF_F_IP_CSUM |\ -+ NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM |\ -+ NETIF_F_TSO) -+ -+/* SFR Reg. ********************************************/ -+ -+#define SFR_GENERAL_STATUS 0x03 -+#define SFR_CHIP_STATUS 0x05 -+#define SFR_RX_CTL 0x0B -+ #define SFR_RX_CTL_TXPADCRC 0x0400 -+ #define SFR_RX_CTL_IPE 0x0200 -+ #define SFR_RX_CTL_DROPCRCERR 0x0100 -+ #define SFR_RX_CTL_START 0x0080 -+ #define SFR_RX_CTL_RF_WAK 0x0040 -+ #define SFR_RX_CTL_AP 0x0020 -+ #define SFR_RX_CTL_AM 0x0010 -+ #define SFR_RX_CTL_AB 0x0008 -+ #define SFR_RX_CTL_AMALL 0x0002 -+ #define SFR_RX_CTL_PRO 0x0001 -+ #define SFR_RX_CTL_STOP 0x0000 -+#define SFR_INTER_PACKET_GAP_0 0x0D -+#define SFR_NODE_ID 0x10 -+#define SFR_MULTI_FILTER_ARRY 0x16 -+#define SFR_MEDIUM_STATUS_MODE 0x22 -+ #define SFR_MEDIUM_XGMIIMODE 0x0001 -+ #define SFR_MEDIUM_FULL_DUPLEX 0x0002 -+ #define SFR_MEDIUM_RXFLOW_CTRLEN 0x0010 -+ #define SFR_MEDIUM_TXFLOW_CTRLEN 0x0020 -+ #define SFR_MEDIUM_JUMBO_EN 0x0040 -+ #define SFR_MEDIUM_RECEIVE_EN 0x0100 -+#define SFR_MONITOR_MODE 0x24 -+ #define SFR_MONITOR_MODE_EPHYRW 0x01 -+ #define SFR_MONITOR_MODE_RWLC 0x02 -+ #define SFR_MONITOR_MODE_RWMP 0x04 -+ #define SFR_MONITOR_MODE_RWWF 0x08 -+ #define SFR_MONITOR_MODE_RW_FLAG 0x10 -+ #define SFR_MONITOR_MODE_PMEPOL 0x20 -+ #define SFR_MONITOR_MODE_PMETYPE 0x40 -+#define SFR_PHYPWR_RSTCTL 0x26 -+ #define SFR_PHYPWR_RSTCTL_BZ 0x0010 -+ #define SFR_PHYPWR_RSTCTL_IPRL 0x0020 -+#define SFR_VLAN_ID_ADDRESS 0x2A -+#define SFR_VLAN_ID_CONTROL 0x2B -+ #define SFR_VLAN_CONTROL_WE 0x0001 -+ #define SFR_VLAN_CONTROL_RD 0x0002 -+ #define SFR_VLAN_CONTROL_VSO 0x0010 -+ #define SFR_VLAN_CONTROL_VFE 0x0020 -+#define SFR_VLAN_ID_DATA0 0x2C -+#define SFR_VLAN_ID_DATA1 0x2D -+#define SFR_RX_BULKIN_QCTRL 0x2E -+ #define SFR_RX_BULKIN_QCTRL_TIME 0x01 -+ #define SFR_RX_BULKIN_QCTRL_IFG 0x02 -+ #define SFR_RX_BULKIN_QCTRL_SIZE 0x04 -+#define SFR_RX_BULKIN_QTIMR_LOW 0x2F -+#define SFR_RX_BULKIN_QTIMR_HIGH 0x30 -+#define SFR_RX_BULKIN_QSIZE 0x31 -+#define SFR_RX_BULKIN_QIFG 0x32 -+#define SFR_RXCOE_CTL 0x34 -+ #define SFR_RXCOE_IP 0x01 -+ #define SFR_RXCOE_TCP 0x02 -+ #define SFR_RXCOE_UDP 0x04 -+ #define SFR_RXCOE_ICMP 0x08 -+ #define SFR_RXCOE_IGMP 0x10 -+ #define SFR_RXCOE_TCPV6 0x20 -+ #define SFR_RXCOE_UDPV6 0x40 -+ #define SFR_RXCOE_ICMV6 0x80 -+#define SFR_TXCOE_CTL 0x35 -+ #define SFR_TXCOE_IP 0x01 -+ #define SFR_TXCOE_TCP 0x02 -+ #define SFR_TXCOE_UDP 0x04 -+ #define SFR_TXCOE_ICMP 0x08 -+ #define SFR_TXCOE_IGMP 0x10 -+ #define SFR_TXCOE_TCPV6 0x20 -+ #define SFR_TXCOE_UDPV6 0x40 -+ #define SFR_TXCOE_ICMV6 0x80 -+#define SFR_BM_INT_MASK 0x41 -+#define SFR_BMRX_DMA_CONTROL 0x43 -+ #define SFR_BMRX_DMA_EN 0x80 -+#define SFR_BMTX_DMA_CONTROL 0x46 -+#define SFR_PAUSE_WATERLVL_LOW 0x54 -+#define SFR_PAUSE_WATERLVL_HIGH 0x55 -+#define SFR_ARC_CTRL 0x9E -+#define SFR_SWP_CTRL 0xB1 -+#define SFR_TX_PAUSE_RESEND_T 0xB2 -+#define SFR_ETH_MAC_PATH 0xB7 -+ #define SFR_RX_PATH_READY 0x01 -+#define SFR_BULK_OUT_CTRL 0xB9 -+ #define SFR_BULK_OUT_FLUSH_EN 0x01 -+ #define SFR_BULK_OUT_EFF_EN 0x02 -+ -+#define AQ_FW_VER_MAJOR 0xDA -+#define AQ_FW_VER_MINOR 0xDB -+#define AQ_FW_VER_REV 0xDC -+ -+/*PHY_OPS**********************************************************************/ -+ -+#define AQ_ADV_100M BIT(0) -+#define AQ_ADV_1G BIT(1) -+#define AQ_ADV_2G5 BIT(2) -+#define AQ_ADV_5G BIT(3) -+#define AQ_ADV_MASK 0x0F -+ -+#define AQ_PAUSE BIT(16) -+#define AQ_ASYM_PAUSE BIT(17) -+#define AQ_LOW_POWER BIT(18) -+#define AQ_PHY_POWER_EN BIT(19) -+#define AQ_WOL BIT(20) -+#define AQ_DOWNSHIFT BIT(21) -+ -+#define AQ_DSH_RETRIES_SHIFT 0x18 -+#define AQ_DSH_RETRIES_MASK 0xF000000 -+ -+#define AQ_WOL_FLAG_MP 0x2 -+ -+/******************************************************************************/ -+ -+struct aqc111_wol_cfg { -+ u8 hw_addr[6]; -+ u8 flags; -+ u8 rsvd[283]; -+} __packed; -+ -+#define WOL_CFG_SIZE sizeof(struct aqc111_wol_cfg) -+ -+struct aqc111_data { -+ u16 rxctl; -+ u8 rx_checksum; -+ u8 link_speed; -+ u8 link; -+ u8 autoneg; -+ u32 advertised_speed; -+ struct { -+ u8 major; -+ u8 minor; -+ u8 rev; -+ } fw_ver; -+ u32 phy_cfg; -+ u8 wol_flags; -+}; -+ -+#define AQ_LS_MASK 0x8000 -+#define AQ_SPEED_MASK 0x7F00 -+#define AQ_SPEED_SHIFT 0x0008 -+#define AQ_INT_SPEED_5G 0x000F -+#define AQ_INT_SPEED_2_5G 0x0010 -+#define AQ_INT_SPEED_1G 0x0011 -+#define AQ_INT_SPEED_100M 0x0013 -+ -+/* TX Descriptor */ -+#define AQ_TX_DESC_LEN_MASK 0x1FFFFF -+#define AQ_TX_DESC_DROP_PADD BIT(28) -+#define AQ_TX_DESC_VLAN BIT(29) -+#define AQ_TX_DESC_MSS_MASK 0x7FFF -+#define AQ_TX_DESC_MSS_SHIFT 0x20 -+#define AQ_TX_DESC_VLAN_MASK 0xFFFF -+#define AQ_TX_DESC_VLAN_SHIFT 0x30 -+ -+#define AQ_RX_HW_PAD 0x02 -+ -+/* RX Packet Descriptor */ -+#define AQ_RX_PD_L4_ERR BIT(0) -+#define AQ_RX_PD_L3_ERR BIT(1) -+#define AQ_RX_PD_L4_TYPE_MASK 0x1C -+#define AQ_RX_PD_L4_UDP 0x04 -+#define AQ_RX_PD_L4_TCP 0x10 -+#define AQ_RX_PD_L3_TYPE_MASK 0x60 -+#define AQ_RX_PD_L3_IP 0x20 -+#define AQ_RX_PD_L3_IP6 0x40 -+ -+#define AQ_RX_PD_VLAN BIT(10) -+#define AQ_RX_PD_RX_OK BIT(11) -+#define AQ_RX_PD_DROP BIT(31) -+#define AQ_RX_PD_LEN_MASK 0x7FFF0000 -+#define AQ_RX_PD_LEN_SHIFT 0x10 -+#define AQ_RX_PD_VLAN_SHIFT 0x20 -+ -+/* RX Descriptor header */ -+#define AQ_RX_DH_PKT_CNT_MASK 0x1FFF -+#define AQ_RX_DH_DESC_OFFSET_MASK 0xFFFFE000 -+#define AQ_RX_DH_DESC_OFFSET_SHIFT 0x0D -+ -+static struct { -+ unsigned char ctrl; -+ unsigned char timer_l; -+ unsigned char timer_h; -+ unsigned char size; -+ unsigned char ifg; -+} AQC111_BULKIN_SIZE[] = { -+ /* xHCI & EHCI & OHCI */ -+ {7, 0x00, 0x01, 0x1E, 0xFF},/* 10G, 5G, 2.5G, 1G */ -+ {7, 0xA0, 0x00, 0x14, 0x00},/* 100M */ -+ /* Jumbo packet */ -+ {7, 0x00, 0x01, 0x18, 0xFF}, -+}; -+ -+#endif /* __LINUX_USBNET_AQC111_H */ ---- /dev/null -+++ b/include/linux/linkmode.h -@@ -0,0 +1,91 @@ -+#ifndef __LINKMODE_H -+#define __LINKMODE_H -+ -+#include -+#include -+#include -+ -+static inline void linkmode_zero(unsigned long *dst) -+{ -+ bitmap_zero(dst, __ETHTOOL_LINK_MODE_MASK_NBITS); -+} -+ -+static inline void linkmode_copy(unsigned long *dst, const unsigned long *src) -+{ -+ bitmap_copy(dst, src, __ETHTOOL_LINK_MODE_MASK_NBITS); -+} -+ -+static inline void linkmode_and(unsigned long *dst, const unsigned long *a, -+ const unsigned long *b) -+{ -+ bitmap_and(dst, a, b, __ETHTOOL_LINK_MODE_MASK_NBITS); -+} -+ -+static inline void linkmode_or(unsigned long *dst, const unsigned long *a, -+ const unsigned long *b) -+{ -+ bitmap_or(dst, a, b, __ETHTOOL_LINK_MODE_MASK_NBITS); -+} -+ -+static inline bool linkmode_empty(const unsigned long *src) -+{ -+ return bitmap_empty(src, __ETHTOOL_LINK_MODE_MASK_NBITS); -+} -+ -+static inline int linkmode_andnot(unsigned long *dst, const unsigned long *src1, -+ const unsigned long *src2) -+{ -+ return bitmap_andnot(dst, src1, src2, __ETHTOOL_LINK_MODE_MASK_NBITS); -+} -+ -+static inline void linkmode_set_bit(int nr, volatile unsigned long *addr) -+{ -+ __set_bit(nr, addr); -+} -+ -+static inline void linkmode_set_bit_array(const int *array, int array_size, -+ unsigned long *addr) -+{ -+ int i; -+ -+ for (i = 0; i < array_size; i++) -+ linkmode_set_bit(array[i], addr); -+} -+ -+static inline void linkmode_clear_bit(int nr, volatile unsigned long *addr) -+{ -+ __clear_bit(nr, addr); -+} -+ -+static inline void linkmode_mod_bit(int nr, volatile unsigned long *addr, -+ int set) -+{ -+ if (set) -+ linkmode_set_bit(nr, addr); -+ else -+ linkmode_clear_bit(nr, addr); -+} -+ -+static inline void linkmode_change_bit(int nr, volatile unsigned long *addr) -+{ -+ __change_bit(nr, addr); -+} -+ -+static inline int linkmode_test_bit(int nr, volatile unsigned long *addr) -+{ -+ return test_bit(nr, addr); -+} -+ -+static inline int linkmode_equal(const unsigned long *src1, -+ const unsigned long *src2) -+{ -+ return bitmap_equal(src1, src2, __ETHTOOL_LINK_MODE_MASK_NBITS); -+} -+ -+static inline int linkmode_subset(const unsigned long *src1, -+ const unsigned long *src2) -+{ -+ return bitmap_subset(src1, src2, __ETHTOOL_LINK_MODE_MASK_NBITS); -+} -+ -+#endif /* __LINKMODE_H */ ---- a/drivers/net/usb/cdc_ether.c -+++ b/drivers/net/usb/cdc_ether.c -@@ -540,6 +540,8 @@ static const struct driver_info wwan_inf - #define LINKSYS_VENDOR_ID 0x13b1 - #define NVIDIA_VENDOR_ID 0x0955 - #define HP_VENDOR_ID 0x03f0 -+#define AQUANTIA_VENDOR_ID 0x2eca -+#define ASIX_VENDOR_ID 0x0b95 - - static const struct usb_device_id products[] = { - /* BLACKLIST !! -@@ -750,6 +752,30 @@ static const struct usb_device_id produc - .driver_info = 0, - }, - -+/* Aquantia AQtion USB to 5GbE Controller (based on AQC111U) */ -+{ -+ USB_DEVICE_AND_INTERFACE_INFO(AQUANTIA_VENDOR_ID, 0xc101, -+ USB_CLASS_COMM, USB_CDC_SUBCLASS_ETHERNET, -+ USB_CDC_PROTO_NONE), -+ .driver_info = 0, -+}, -+ -+/* ASIX USB 3.1 Gen1 to 5G Multi-Gigabit Ethernet Adapter(based on AQC111U) */ -+{ -+ USB_DEVICE_AND_INTERFACE_INFO(ASIX_VENDOR_ID, 0x2790, USB_CLASS_COMM, -+ USB_CDC_SUBCLASS_ETHERNET, -+ USB_CDC_PROTO_NONE), -+ .driver_info = 0, -+}, -+ -+/* ASIX USB 3.1 Gen1 to 2.5G Multi-Gigabit Ethernet Adapter(based on AQC112U) */ -+{ -+ USB_DEVICE_AND_INTERFACE_INFO(ASIX_VENDOR_ID, 0x2791, USB_CLASS_COMM, -+ USB_CDC_SUBCLASS_ETHERNET, -+ USB_CDC_PROTO_NONE), -+ .driver_info = 0, -+}, -+ - /* WHITELIST!!! - * - * CDC Ether uses two interfaces, not necessarily consecutive. From bb151a91ce6b8bee63566946afa2b21ac13c4810 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 24 Oct 2021 11:10:26 -0700 Subject: [PATCH 12/65] tools/meson: update to 0.60.0 Add cmake support to meson. Otherwise only pkgconfig can be used. Signed-off-by: Rosen Penev --- include/meson.mk | 2 ++ tools/meson/Makefile | 4 ++-- tools/meson/files/openwrt-cross.txt.in | 1 + tools/meson/files/openwrt-native.txt.in | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/meson.mk b/include/meson.mk index 12e38b9e71..ae17e18d2d 100644 --- a/include/meson.mk +++ b/include/meson.mk @@ -64,6 +64,7 @@ define Meson/CreateNativeFile -e "s|@CC@|$(foreach BIN,$(HOSTCC),'$(BIN)',)|" \ -e "s|@CXX@|$(foreach BIN,$(HOSTCXX),'$(BIN)',)|" \ -e "s|@PKGCONFIG@|$(PKG_CONFIG)|" \ + -e "s|@CMAKE@|$(STAGING_DIR_HOST)/bin/cmake|" \ -e "s|@CFLAGS@|$(foreach FLAG,$(HOST_CFLAGS) $(HOST_CPPFLAGS),'$(FLAG)',)|" \ -e "s|@CXXFLAGS@|$(foreach FLAG,$(HOST_CXXFLAGS) $(HOST_CPPFLAGS),'$(FLAG)',)|" \ -e "s|@LDFLAGS@|$(foreach FLAG,$(HOST_LDFLAGS),'$(FLAG)',)|" \ @@ -80,6 +81,7 @@ define Meson/CreateCrossFile -e "s|@STRIP@|$(TARGET_CROSS)strip|" \ -e "s|@NM@|$(TARGET_NM)|" \ -e "s|@PKGCONFIG@|$(PKG_CONFIG)|" \ + -e "s|@CMAKE@|$(STAGING_DIR_HOST)/bin/cmake|" \ -e "s|@CFLAGS@|$(foreach FLAG,$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \ -e "s|@CXXFLAGS@|$(foreach FLAG,$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \ -e "s|@LDFLAGS@|$(foreach FLAG,$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS),'$(FLAG)',)|" \ diff --git a/tools/meson/Makefile b/tools/meson/Makefile index 1aab5d8fcb..f648085f90 100644 --- a/tools/meson/Makefile +++ b/tools/meson/Makefile @@ -1,11 +1,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=meson -PKG_VERSION:=0.59.2 +PKG_VERSION:=0.60.0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/mesonbuild/meson/releases/download/$(PKG_VERSION) -PKG_HASH:=13dee549a7ba758b7e33ce7719f28d1d337a98d10d378a4779ccc996f5a2fc49 +PKG_HASH:=080d68b685e9a0d9c9bb475457e097b49e1d1a6f750abc971428a8d2e1b12d47 PKG_MAINTAINER:=Andre Heider PKG_LICENSE:=Apache-2.0 diff --git a/tools/meson/files/openwrt-cross.txt.in b/tools/meson/files/openwrt-cross.txt.in index 30b4c116c4..56aa393d63 100644 --- a/tools/meson/files/openwrt-cross.txt.in +++ b/tools/meson/files/openwrt-cross.txt.in @@ -5,6 +5,7 @@ ar = '@AR@' strip = '@STRIP@' nm = '@NM@' pkgconfig = '@PKGCONFIG@' +cmake = '@CMAKE@' [built-in options] c_args = [@CFLAGS@] diff --git a/tools/meson/files/openwrt-native.txt.in b/tools/meson/files/openwrt-native.txt.in index 50308ec8e4..eba63c00b1 100644 --- a/tools/meson/files/openwrt-native.txt.in +++ b/tools/meson/files/openwrt-native.txt.in @@ -2,6 +2,7 @@ c = [@CC@] cpp = [@CXX@] pkgconfig = '@PKGCONFIG@' +cmake = '@CMAKE@' [built-in options] c_args = [@CFLAGS@] From a934057148e5d714f124bdb9fc0cbb987aea3c22 Mon Sep 17 00:00:00 2001 From: Damien Mascord Date: Mon, 1 Nov 2021 20:06:20 +1100 Subject: [PATCH 13/65] build: fix ldconfig executable error in python The empty executable is causing problems with meson builds, due to the error: OSError: [Errno 8] Exec format error: 'ldconfig' This patch changes the empty ldconfig stub to symlink to /bin/true to work around this issue. Fixes: FS#4117 Fixes: 3bd31cc4d2ff ("tools/meson: update to 0.60.0") Signed-off-by: Damien Mascord Tested-by: Aleksander Jan Bajkowski # Tested on Debian 11 Tested-By: Lucian Cristian Tested-By: Baptiste Jonglez Cc: Rosen Penev --- include/prereq-build.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index e1993444f7..8123195849 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -198,5 +198,4 @@ prereq: $(STAGING_DIR_HOST)/bin/mkhash # Install ldconfig stub $(eval $(call TestHostCommand,ldconfig-stub,Failed to install stub, \ - touch $(STAGING_DIR_HOST)/bin/ldconfig && \ - chmod +x $(STAGING_DIR_HOST)/bin/ldconfig)) + $(LN) /bin/true $(STAGING_DIR_HOST)/bin/ldconfig)) From 38e8f98dc73892daa71262d635dbd7a06512b8ae Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 20 Oct 2021 16:27:49 -0700 Subject: [PATCH 14/65] strace: remove code coverage makefile var It relies on a custom ax_code_coverage.m4 file included with strace. Unfortunately, this conflicts with the one included with autoconf-macros. Instead of creating a huge patch to fix it, just remove the variable as code coverage is not used here. Signed-off-by: Rosen Penev --- package/devel/strace/Makefile | 2 +- package/devel/strace/patches/010-m4.patch | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 package/devel/strace/patches/010-m4.patch diff --git a/package/devel/strace/Makefile b/package/devel/strace/Makefile index a95d429311..8c4a26b63b 100644 --- a/package/devel/strace/Makefile +++ b/package/devel/strace/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=strace PKG_VERSION:=5.10 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION) diff --git a/package/devel/strace/patches/010-m4.patch b/package/devel/strace/patches/010-m4.patch new file mode 100644 index 0000000000..478961ce26 --- /dev/null +++ b/package/devel/strace/patches/010-m4.patch @@ -0,0 +1,10 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -408,7 +408,6 @@ strace_LDADD += $(libiberty_LIBS) + endif + endif + +-@CODE_COVERAGE_RULES@ + CODE_COVERAGE_BRANCH_COVERAGE = 1 + CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \ + --prefix $(shell cd $(abs_top_srcdir)/.. && pwd || echo .) From 98481cf527199deab697a2c6e66d577e8ae3cb16 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 27 Oct 2021 15:54:25 +0200 Subject: [PATCH 15/65] vti: squash vtiv4 and vtiv6 packages into vti This change adds the same package behaviour as gre package. Signed-off-by: Florian Eckert --- package/network/config/vti/Makefile | 43 +++++------------------------ 1 file changed, 7 insertions(+), 36 deletions(-) diff --git a/package/network/config/vti/Makefile b/package/network/config/vti/Makefile index 292ab111e5..548b8f951f 100644 --- a/package/network/config/vti/Makefile +++ b/package/network/config/vti/Makefile @@ -8,47 +8,28 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vti -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk define Package/vti/Default - SECTION:=net - CATEGORY:=Network - MAINTAINER:=Andre Valentin - PKGARCH:=all endef define Package/vti -$(call Package/vti/Default) + SECTION:=net + CATEGORY:=Network + MAINTAINER:=Andre Valentin TITLE:=Virtual IPsec Tunnel Interface config support + DEPENDS:=+kmod-ip-vti +IPV6:kmod-ip6-vti + PROVIDES:=vtiv4 vtiv6 + PKGARCH:=all endef define Package/vti/description Virtual IPsec Tunnel Interface config support (IPv4 and IPv6) in /etc/config/network. endef -define Package/vtiv4 -$(call Package/vti/Default) - TITLE:=Virtual IPsec Tunnel Interface (IPv4) config support - DEPENDS:=@(PACKAGE_vti) +kmod-ip-vti -endef - -define Package/vtiv4/description - Virtual IPsec Tunnel Interface config support (IPv4) in /etc/config/network. -endef - -define Package/vtiv6 -$(call Package/vti/Default) - TITLE:=Virtual IPsec Tunnel Interface (IPv6) config support - DEPENDS:=@(PACKAGE_vti) @IPV6 +kmod-ip6-vti -endef - -define Package/vtiv6/description - Virtual IPsec Tunnel Interface config support (IPv6) in /etc/config/network. -endef - define Build/Compile endef @@ -60,14 +41,4 @@ define Package/vti/install $(INSTALL_BIN) ./files/vti.sh $(1)/lib/netifd/proto/vti.sh endef -define Package/vtiv4/install - : -endef - -define Package/vtiv6/install - : -endef - $(eval $(call BuildPackage,vti)) -$(eval $(call BuildPackage,vtiv4)) -$(eval $(call BuildPackage,vtiv6)) From 66e801c5e6912a8269eb51a79e768fcfe1d1094f Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 31 Oct 2021 17:37:59 +0100 Subject: [PATCH 16/65] toolchain: gdb: Update to version 11.1 The removed patch was already applied upstream. gdb now mandatory depends on gmp, tell configure where to find it explicitly. We already build gmp in the tools directory for gcc. Also make it use mpfr and mpc as we also build both of them. Signed-off-by: Hauke Mehrtens --- toolchain/gdb/Makefile | 7 +++++-- .../patches/100-fix-elf-support-check.patch | 20 ------------------- 2 files changed, 5 insertions(+), 22 deletions(-) delete mode 100644 toolchain/gdb/patches/100-fix-elf-support-check.patch diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile index e769a3be3e..2adb7d165a 100644 --- a/toolchain/gdb/Makefile +++ b/toolchain/gdb/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gdb -PKG_VERSION:=10.1 +PKG_VERSION:=11.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gdb -PKG_HASH:=f82f1eceeec14a3afa2de8d9b0d3c91d5a3820e23e0a01bbb70ef9f0276b62c0 +PKG_HASH:=cccfcc407b20d343fb320d4a9a2110776dd3165118ffd41f4b1b162340333f94 GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR) @@ -30,6 +30,9 @@ HOST_CONFIGURE_ARGS = \ --build=$(GNU_HOST_NAME) \ --host=$(GNU_HOST_NAME) \ --target=$(REAL_GNU_TARGET_NAME) \ + --with-gmp=$(TOPDIR)/staging_dir/host \ + --with-mpfr=$(TOPDIR)/staging_dir/host \ + --with-mpc=$(TOPDIR)/staging_dir/host \ --disable-werror \ --without-uiout \ --enable-tui --disable-gdbtk --without-x \ diff --git a/toolchain/gdb/patches/100-fix-elf-support-check.patch b/toolchain/gdb/patches/100-fix-elf-support-check.patch deleted file mode 100644 index fe612c38db..0000000000 --- a/toolchain/gdb/patches/100-fix-elf-support-check.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/gdb/configure -+++ b/gdb/configure -@@ -16818,6 +16818,7 @@ else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include -+#include - #include "bfd.h" - #include "elf-bfd.h" - ---- a/gdb/acinclude.m4 -+++ b/gdb/acinclude.m4 -@@ -362,6 +362,7 @@ AC_DEFUN([GDB_AC_CHECK_BFD], [ - AC_CACHE_CHECK([$1], [$2], - [AC_TRY_LINK( - [#include -+ #include - #include "bfd.h" - #include "$4" - ], From c1ca95008e759acb456ecb57341c53c1a0a32f89 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 31 Oct 2021 17:38:57 +0100 Subject: [PATCH 17/65] gdb: Update to version 11.1 GDB 11.1 now depends on gmp. Signed-off-by: Hauke Mehrtens --- package/devel/gdb/Makefile | 6 +++--- package/devel/gdb/patches/110-shared_libgcc.patch | 12 ++++++------ package/devel/gdb/patches/130-gdb-ctrl-c.patch | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile index a357996991..9e20644b04 100644 --- a/package/devel/gdb/Makefile +++ b/package/devel/gdb/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gdb -PKG_VERSION:=10.2 +PKG_VERSION:=11.1 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gdb -PKG_HASH:=aaa1223d534c9b700a8bec952d9748ee1977513f178727e1bee520ee000b4f29 +PKG_HASH:=cccfcc407b20d343fb320d4a9a2110776dd3165118ffd41f4b1b162340333f94 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -26,7 +26,7 @@ include $(INCLUDE_DIR)/nls.mk define Package/gdb/Default SECTION:=devel CATEGORY:=Development - DEPENDS:=+!USE_MUSL:libthread-db $(ICONV_DEPENDS) $(INTL_DEPENDS) + DEPENDS:=+!USE_MUSL:libthread-db $(ICONV_DEPENDS) $(INTL_DEPENDS) +libgmp URL:=https://www.gnu.org/software/gdb/ endef diff --git a/package/devel/gdb/patches/110-shared_libgcc.patch b/package/devel/gdb/patches/110-shared_libgcc.patch index de92a1f945..3979ccd26b 100644 --- a/package/devel/gdb/patches/110-shared_libgcc.patch +++ b/package/devel/gdb/patches/110-shared_libgcc.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -1302,13 +1302,13 @@ if test -z "$LD"; then +@@ -1300,13 +1300,13 @@ if test -z "$LD"; then fi fi @@ -17,7 +17,7 @@ AC_LANG_PUSH(C++) AC_LINK_IFELSE([AC_LANG_SOURCE([ #if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) -@@ -1648,7 +1648,7 @@ AC_ARG_WITH(stage1-ldflags, +@@ -1705,7 +1705,7 @@ AC_ARG_WITH(stage1-ldflags, # trust that they are doing what they want. if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \ -a "$have_static_libs" = yes; then @@ -26,7 +26,7 @@ fi]) AC_SUBST(stage1_ldflags) -@@ -1677,7 +1677,7 @@ AC_ARG_WITH(boot-ldflags, +@@ -1734,7 +1734,7 @@ AC_ARG_WITH(boot-ldflags, # statically. But if the user explicitly specified the libraries to # use, trust that they are doing what they want. if test "$poststage1_libs" = ""; then @@ -37,7 +37,7 @@ --- a/configure +++ b/configure -@@ -5075,14 +5075,14 @@ if test -z "$LD"; then +@@ -5257,14 +5257,14 @@ if test -z "$LD"; then fi fi @@ -56,7 +56,7 @@ ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -@@ -5883,7 +5883,7 @@ else +@@ -6149,7 +6149,7 @@ else # trust that they are doing what they want. if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \ -a "$have_static_libs" = yes; then @@ -65,7 +65,7 @@ fi fi -@@ -5919,7 +5919,7 @@ else +@@ -6185,7 +6185,7 @@ else # statically. But if the user explicitly specified the libraries to # use, trust that they are doing what they want. if test "$poststage1_libs" = ""; then diff --git a/package/devel/gdb/patches/130-gdb-ctrl-c.patch b/package/devel/gdb/patches/130-gdb-ctrl-c.patch index 88b5de9d8c..72b7273434 100644 --- a/package/devel/gdb/patches/130-gdb-ctrl-c.patch +++ b/package/devel/gdb/patches/130-gdb-ctrl-c.patch @@ -24,7 +24,7 @@ Signed-off-by: Khem Raj --- a/gdbserver/linux-low.cc +++ b/gdbserver/linux-low.cc -@@ -5714,7 +5714,7 @@ linux_process_target::request_interrupt +@@ -5733,7 +5733,7 @@ linux_process_target::request_interrupt { /* Send a SIGINT to the process group. This acts just like the user typed a ^C on the controlling terminal. */ From 442ef6eef441c24b863159217ea21903e74f15eb Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 31 Oct 2021 17:39:23 +0100 Subject: [PATCH 18/65] valgrind: Update to version 3.18.1 This version has some improvements for musl. This version works fine for me on MIPS 32 BE without MIPS16 even on musl. The additional patch is needed to make valgrind use the correct syscall numbers for new syscalls like clock_gettime64. The MIPS architecture uses special syscall ranges which are different from most other systems. The patch is pending upstream: https://bugs.kde.org/show_bug.cgi?id=444781 Signed-off-by: Hauke Mehrtens --- package/devel/valgrind/Makefile | 4 +- .../010-mips-Fix-new-syscall-numbers.patch | 131 ++++++++++++++++++ .../patches/130-mips_fix_soft_float.patch | 12 +- 3 files changed, 139 insertions(+), 8 deletions(-) create mode 100644 package/devel/valgrind/patches/010-mips-Fix-new-syscall-numbers.patch diff --git a/package/devel/valgrind/Makefile b/package/devel/valgrind/Makefile index 829f37569e..4f0e0fd493 100644 --- a/package/devel/valgrind/Makefile +++ b/package/devel/valgrind/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=valgrind -PKG_VERSION:=3.16.1 +PKG_VERSION:=3.18.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://sourceware.org/pub/valgrind/ -PKG_HASH:=c91f3a2f7b02db0f3bc99479861656154d241d2fdb265614ba918cc6720a33ca +PKG_HASH:=00859aa13a772eddf7822225f4b46ee0d39afbe071d32778da4d99984081f7f5 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0+ diff --git a/package/devel/valgrind/patches/010-mips-Fix-new-syscall-numbers.patch b/package/devel/valgrind/patches/010-mips-Fix-new-syscall-numbers.patch new file mode 100644 index 0000000000..e84273c973 --- /dev/null +++ b/package/devel/valgrind/patches/010-mips-Fix-new-syscall-numbers.patch @@ -0,0 +1,131 @@ +From 86ab9452bd10f08dbfa22d94e1155838f6f9f2e0 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Sun, 31 Oct 2021 23:11:11 +0100 +Subject: [PATCH] mips: Fix new syscall numbers + +The MIPS32 and MIPS64 O32 ABI are adding 4000 to all syscall numbers. +The MIPS64 N64 ABI adds 5000 to each syscall and the MIPS64 N32 ABI adds +6000 to each syscall number. We can not sue the shared file for MIPS and +have to define this for each sycall separately. + +Without this change valgrind is not able to detect new syscalls like +clock_gettime64 correctly. + +Signed-off-by: Hauke Mehrtens +--- + include/pub_tool_vkiscnums_asm.h | 3 --- + include/vki/vki-scnums-mips32-linux.h | 36 +++++++++++++++++++++++++++ + include/vki/vki-scnums-mips64-linux.h | 32 ++++++++++++++++++++++++ + 3 files changed, 68 insertions(+), 3 deletions(-) + +--- a/include/pub_tool_vkiscnums_asm.h ++++ b/include/pub_tool_vkiscnums_asm.h +@@ -63,15 +63,12 @@ + # include "vki/vki-scnums-arm64-linux.h" + + #elif defined(VGP_mips32_linux) +-# include "vki/vki-scnums-shared-linux.h" +-# include "vki/vki-scnums-32bit-linux.h" + # include "vki/vki-scnums-mips32-linux.h" + + #elif defined(VGP_nanomips_linux) + # include "vki/vki-scnums-nanomips-linux.h" + + #elif defined(VGP_mips64_linux) +-# include "vki/vki-scnums-shared-linux.h" + # include "vki/vki-scnums-mips64-linux.h" + + #elif defined(VGP_x86_freebsd) || defined(VGP_amd64_freebsd) +--- a/include/vki/vki-scnums-mips32-linux.h ++++ b/include/vki/vki-scnums-mips32-linux.h +@@ -401,6 +401,42 @@ + #define __NR_pkey_free (__NR_Linux + 365) + #define __NR_statx (__NR_Linux + 366) + ++#define __NR_clock_gettime64 (__NR_Linux + 403) ++#define __NR_clock_settime64 (__NR_Linux + 404) ++#define __NR_clock_adjtime64 (__NR_Linux + 405) ++#define __NR_clock_getres_time64 (__NR_Linux + 406) ++#define __NR_clock_nanosleep_time64 (__NR_Linux + 407) ++#define __NR_timer_gettime64 (__NR_Linux + 408) ++#define __NR_timer_settime64 (__NR_Linux + 409) ++#define __NR_timerfd_gettime64 (__NR_Linux + 410) ++#define __NR_timerfd_settime64 (__NR_Linux + 411) ++#define __NR_utimensat_time64 (__NR_Linux + 412) ++#define __NR_pselect6_time64 (__NR_Linux + 413) ++#define __NR_ppoll_time64 (__NR_Linux + 414) ++#define __NR_io_pgetevents_time64 (__NR_Linux + 416) ++#define __NR_recvmmsg_time64 (__NR_Linux + 417) ++#define __NR_mq_timedsend_time64 (__NR_Linux + 418) ++#define __NR_mq_timedreceive_time64 (__NR_Linux + 419) ++#define __NR_semtimedop_time64 (__NR_Linux + 420) ++#define __NR_rt_sigtimedwait_time64 (__NR_Linux + 421) ++#define __NR_futex_time64 (__NR_Linux + 422) ++#define __NR_sched_rr_get_interval_time64 (__NR_Linux + 423) ++#define __NR_pidfd_send_signal (__NR_Linux + 424) ++#define __NR_io_uring_setup (__NR_Linux + 425) ++#define __NR_io_uring_enter (__NR_Linux + 426) ++#define __NR_io_uring_register (__NR_Linux + 427) ++#define __NR_open_tree (__NR_Linux + 428) ++#define __NR_move_mount (__NR_Linux + 429) ++#define __NR_fsopen (__NR_Linux + 430) ++#define __NR_fsconfig (__NR_Linux + 431) ++#define __NR_fsmount (__NR_Linux + 432) ++#define __NR_fspick (__NR_Linux + 433) ++ ++#define __NR_clone3 (__NR_Linux + 435) ++#define __NR_close_range (__NR_Linux + 436) ++ ++#define __NR_faccessat2 (__NR_Linux + 439) ++ + /* + * Offset of the last Linux o32 flavoured syscall + */ +--- a/include/vki/vki-scnums-mips64-linux.h ++++ b/include/vki/vki-scnums-mips64-linux.h +@@ -363,6 +363,22 @@ + #define __NR_pkey_free (__NR_Linux + 325) + #define __NR_statx (__NR_Linux + 326) + ++#define __NR_pidfd_send_signal (__NR_Linux + 424) ++#define __NR_io_uring_setup (__NR_Linux + 425) ++#define __NR_io_uring_enter (__NR_Linux + 426) ++#define __NR_io_uring_register (__NR_Linux + 427) ++#define __NR_open_tree (__NR_Linux + 428) ++#define __NR_move_mount (__NR_Linux + 429) ++#define __NR_fsopen (__NR_Linux + 430) ++#define __NR_fsconfig (__NR_Linux + 431) ++#define __NR_fsmount (__NR_Linux + 432) ++#define __NR_fspick (__NR_Linux + 433) ++ ++#define __NR_clone3 (__NR_Linux + 435) ++#define __NR_close_range (__NR_Linux + 436) ++ ++#define __NR_faccessat2 (__NR_Linux + 439) ++ + #elif defined(VGABI_N32) + + /* +@@ -702,6 +718,22 @@ + #define __NR_pkey_free (__NR_Linux + 329) + #define __NR_statx (__NR_Linux + 330) + ++#define __NR_pidfd_send_signal (__NR_Linux + 424) ++#define __NR_io_uring_setup (__NR_Linux + 425) ++#define __NR_io_uring_enter (__NR_Linux + 426) ++#define __NR_io_uring_register (__NR_Linux + 427) ++#define __NR_open_tree (__NR_Linux + 428) ++#define __NR_move_mount (__NR_Linux + 429) ++#define __NR_fsopen (__NR_Linux + 430) ++#define __NR_fsconfig (__NR_Linux + 431) ++#define __NR_fsmount (__NR_Linux + 432) ++#define __NR_fspick (__NR_Linux + 433) ++ ++#define __NR_clone3 (__NR_Linux + 435) ++#define __NR_close_range (__NR_Linux + 436) ++ ++#define __NR_faccessat2 (__NR_Linux + 439) ++ + #else + #error unknown mips64 abi + #endif diff --git a/package/devel/valgrind/patches/130-mips_fix_soft_float.patch b/package/devel/valgrind/patches/130-mips_fix_soft_float.patch index 05be099ca5..427aa85524 100644 --- a/package/devel/valgrind/patches/130-mips_fix_soft_float.patch +++ b/package/devel/valgrind/patches/130-mips_fix_soft_float.patch @@ -14,7 +14,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: --- a/VEX/priv/guest_mips_helpers.c +++ b/VEX/priv/guest_mips_helpers.c -@@ -617,6 +617,7 @@ extern UInt mips_dirtyhelper_calculate_F +@@ -616,6 +616,7 @@ extern UInt mips_dirtyhelper_calculate_F flt_op inst ) { UInt ret = 0; @@ -22,7 +22,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: #if defined(__mips__) VexGuestMIPS32State* guest_state = (VexGuestMIPS32State*)gs; UInt loFsVal, hiFsVal, loFtVal, hiFtVal; -@@ -699,6 +700,7 @@ extern UInt mips_dirtyhelper_calculate_F +@@ -698,6 +699,7 @@ extern UInt mips_dirtyhelper_calculate_F break; } #endif @@ -30,7 +30,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: return ret; } -@@ -708,6 +710,7 @@ extern UInt mips_dirtyhelper_calculate_F +@@ -707,6 +709,7 @@ extern UInt mips_dirtyhelper_calculate_F flt_op inst ) { UInt ret = 0; @@ -38,7 +38,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: #if defined(__mips__) && ((__mips == 64) || \ (defined(__mips_isa_rev) && (__mips_isa_rev >= 2))) #if defined(VGA_mips32) -@@ -860,6 +863,7 @@ extern UInt mips_dirtyhelper_calculate_F +@@ -859,6 +862,7 @@ extern UInt mips_dirtyhelper_calculate_F break; } #endif @@ -48,7 +48,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c -@@ -1828,6 +1828,7 @@ Bool VG_(machine_get_hwcaps)( void ) +@@ -2103,6 +2103,7 @@ Bool VG_(machine_get_hwcaps)( void ) we are using alternative way to determine FP mode */ ULong result = 0; @@ -56,7 +56,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: if (!VG_MINIMAL_SETJMP(env_unsup_insn)) { __asm__ volatile ( ".set push\n\t" -@@ -1845,6 +1846,9 @@ Bool VG_(machine_get_hwcaps)( void ) +@@ -2120,6 +2121,9 @@ Bool VG_(machine_get_hwcaps)( void ) fpmode = (result != 0x3FF0000000000000ull); } From a941b1b59f8acb8c795471eae9f965ebbde67767 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 1 Nov 2021 14:47:02 +0100 Subject: [PATCH 19/65] valgrind: Activate also on MIPS 64 This activates valgrind also on mips64 and mips64el. This was working fine in a basic test in qemu. Signed-off-by: Hauke Mehrtens --- package/devel/valgrind/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/devel/valgrind/Makefile b/package/devel/valgrind/Makefile index 4f0e0fd493..e6ebff4b30 100644 --- a/package/devel/valgrind/Makefile +++ b/package/devel/valgrind/Makefile @@ -33,7 +33,7 @@ include $(INCLUDE_DIR)/kernel.mk define Package/valgrind SECTION:=devel CATEGORY:=Development - DEPENDS:=@mips||mipsel||i386||x86_64||powerpc||arm_v7||aarch64 +libpthread +librt + DEPENDS:=@mips||mipsel||mips64||mips64el||i386||x86_64||powerpc||arm_v7||aarch64 +libpthread +librt TITLE:=debugging and profiling tools for Linux URL:=http://www.valgrind.org endef From 34fc274f94853819889c25ffbd1ea1c363665089 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 31 Oct 2021 17:39:50 +0100 Subject: [PATCH 20/65] strace: Update to version 5.14 Explicitly deactivate libselinux, otherwise we get a hard dependency to libselinux. Signed-off-by: Hauke Mehrtens --- package/devel/strace/Makefile | 9 +++++---- package/devel/strace/patches/010-m4.patch | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/package/devel/strace/Makefile b/package/devel/strace/Makefile index 8c4a26b63b..527b3e01d8 100644 --- a/package/devel/strace/Makefile +++ b/package/devel/strace/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=strace -PKG_VERSION:=5.10 -PKG_RELEASE:=2 +PKG_VERSION:=5.14 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION) -PKG_HASH:=fe3982ea4cd9aeb3b4ba35f6279f0b577a37175d3282be24b9a5537b56b8f01c +PKG_HASH:=901bee6db5e17debad4530dd9ffb4dc9a96c4a656edbe1c3141b7cb307b11e73 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=LGPL-2.1-or-later @@ -70,7 +70,8 @@ endef CONFIGURE_ARGS += \ --with-libdw=$(if $(CONFIG_STRACE_LIBDW),yes,no) \ --with-libunwind=$(if $(CONFIG_STRACE_LIBUNWIND),yes,no) \ - --enable-mpers=no + --enable-mpers=no \ + --without-libselinux MAKE_FLAGS := \ CCOPT="$(TARGET_CFLAGS)" diff --git a/package/devel/strace/patches/010-m4.patch b/package/devel/strace/patches/010-m4.patch index 478961ce26..32584e1180 100644 --- a/package/devel/strace/patches/010-m4.patch +++ b/package/devel/strace/patches/010-m4.patch @@ -1,10 +1,10 @@ --- a/Makefile.am +++ b/Makefile.am -@@ -408,7 +408,6 @@ strace_LDADD += $(libiberty_LIBS) - endif - endif +@@ -21,7 +21,6 @@ man_MANS = doc/strace.1 doc/strace-log-m + + ACLOCAL_AMFLAGS = -I m4 -I src/xlat -@CODE_COVERAGE_RULES@ CODE_COVERAGE_BRANCH_COVERAGE = 1 CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \ - --prefix $(shell cd $(abs_top_srcdir)/.. && pwd || echo .) + --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ From a17ecdb0b805aace64e87f87a051076e07d2872c Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Tue, 12 Oct 2021 15:36:33 -1000 Subject: [PATCH 21/65] imagebuilder: fix local packages/ folder This commit fixes commit "2999f810ff: build,IB: include kmods only in local builds" which cause the local packages/ folder only to be added for local builds but no longer for ImageBuilder created by the Buildbot. The commits intention was to use remote kmods repositories rather than storing them locally. Accidentally the entire handling of the local `packages/` was removed. Re-add the folder and include a README describing what it can be used for. Signed-off-by: Paul Spooren --- target/imagebuilder/Makefile | 6 +++++- target/imagebuilder/files/README.md | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 target/imagebuilder/files/README.md diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile index 499a64e339..c5805b08f6 100644 --- a/target/imagebuilder/Makefile +++ b/target/imagebuilder/Makefile @@ -46,12 +46,16 @@ ifeq ($(CONFIG_IB_STANDALONE),) $(VERSION_SED_SCRIPT) $(PKG_BUILD_DIR)/repositories.conf endif -ifeq ($(CONFIG_BUILDBOT),) $(INSTALL_DIR) $(PKG_BUILD_DIR)/packages + # create an empty package index so `opkg` doesn't report an error + touch $(PKG_BUILD_DIR)/packages/Packages + $(INSTALL_DATA) ./files/README.md $(PKG_BUILD_DIR)/packages/ + echo '' >> $(PKG_BUILD_DIR)/repositories.conf echo '## This is the local package repository, do not remove!' >> $(PKG_BUILD_DIR)/repositories.conf echo 'src imagebuilder file:packages' >> $(PKG_BUILD_DIR)/repositories.conf +ifeq ($(CONFIG_BUILDBOT),) ifeq ($(CONFIG_IB_STANDALONE),) $(FIND) $(call FeedPackageDir,libc) -type f \ \( -name 'libc_*.ipk' -or -name 'kernel_*.ipk' -or -name 'kmod-*.ipk' \) \ diff --git a/target/imagebuilder/files/README.md b/target/imagebuilder/files/README.md new file mode 100644 index 0000000000..9a9616d06d --- /dev/null +++ b/target/imagebuilder/files/README.md @@ -0,0 +1,11 @@ +# ./packages folder + +Add `.ipk` packages to this folder will allow the ImageBuilder to install them. + +For more complex setups consider adding a custom feed containing packages. + + src custom file:///path/to/packages + +Whenever the ImageBuilder builds a firmware image this folder will be reloaded +and a new package index created. In case signature checks are enabled the +`./packages/Packages` index will be signed with a locally generated key pair. From 047bc2ae62e4e4c2e70f01de809caa70ac88b1d5 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 6 Nov 2021 02:46:36 +0000 Subject: [PATCH 22/65] uqmi: update to git HEAD and improve proto handler script e303ba8 uqmi: update code generator 7880de8 uqmi: sync data from libqmi project d647f8d uqmi: add more diagnostics commands 6f95626 uim: add --uim-get-sim-state Use newly introduce --uim-get-sim-state command to query PIN status from modems which require using uim instead of dms command for that. Signed-off-by: Daniel Golle --- package/network/utils/uqmi/Makefile | 8 ++++---- package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 8 +++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile index 36e5d0d554..6f5db7d73d 100644 --- a/package/network/utils/uqmi/Makefile +++ b/package/network/utils/uqmi/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uqmi -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git -PKG_SOURCE_DATE:=2020-11-22 -PKG_SOURCE_VERSION:=0a19b5b77140465c29e2afa7d611fe93abc9672f -PKG_MIRROR_HASH:=0a6641f8e167efd21d464b0b2aeb1fec5f974dddcdb8822fbd5d7190d0b741b4 +PKG_SOURCE_DATE:=2021-11-06 +PKG_SOURCE_VERSION:=6f956265167945267d676c99f123a8c822f0a77b +PKG_MIRROR_HASH:=1dbe14a28ec59b364dbde5dea9e10ed1c5c3eda274b6c7690c793a06643acf3e PKG_MAINTAINER:=Matti Laakso PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh index 762076dde7..5ee61b94e0 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -94,7 +94,8 @@ proto_qmi_setup() { fi done - if uqmi -s -d "$device" --get-pin-status | grep '"Not supported"\|"Invalid QMI command"' > /dev/null; then + if uqmi -s -d "$device" --uim-get-sim-state | grep -q '"Not supported"\|"Invalid QMI command"' && + uqmi -s -d "$device" --get-pin-status | grep -q '"Not supported"\|"Invalid QMI command"' ; then [ -n "$pincode" ] && { uqmi -s -d "$device" --verify-pin1 "$pincode" > /dev/null || uqmi -s -d "$device" --uim-verify-pin1 "$pincode" > /dev/null || { echo "Unable to verify PIN" @@ -105,7 +106,8 @@ proto_qmi_setup() { } else . /usr/share/libubox/jshn.sh - json_load "$(uqmi -s -d "$device" --get-pin-status)" + json_load "$(uqmi -s -d "$device" --get-pin-status)" 2>&1 | grep -q Failed && + json_load "$(uqmi -s -d "$device" --uim-get-sim-state)" json_get_var pin1_status pin1_status json_get_var pin1_verify_tries pin1_verify_tries @@ -144,7 +146,7 @@ proto_qmi_setup() { echo "PIN already verified" ;; *) - echo "PIN status failed ($pin1_status)" + echo "PIN status failed (${pin1_status:-sim_not_present})" proto_notify_error "$interface" PIN_STATUS_FAILED proto_block_restart "$interface" return 1 From 9dd5d8ce9dcb135f3f7db424a3c9a6ade9f09bc2 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Nov 2021 17:14:16 +0100 Subject: [PATCH 23/65] gdb: Add explicit patch to libgmp Without giving the patch gdb does not compile on Arch Linux. Signed-off-by: Hauke Mehrtens --- package/devel/gdb/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile index 9e20644b04..f474502869 100644 --- a/package/devel/gdb/Makefile +++ b/package/devel/gdb/Makefile @@ -62,7 +62,11 @@ CONFIGURE_ARGS+= \ --disable-ubsan \ --disable-sim \ --disable-werror \ - --disable-source-highlight + --disable-source-highlight \ + --without-mpc \ + --without-mpfr \ + --without-isl \ + --with-libgmp-prefix=$(STAGING_DIR)/usr CONFIGURE_VARS+= \ ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline" From 144007357c77d0932426f52c8f46caa07e59aac2 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Nov 2021 17:15:06 +0100 Subject: [PATCH 24/65] gdb: Make only full gdb depend on libgmp libgmp is only needed for the full gdb and not for the gdbserver application. Signed-off-by: Hauke Mehrtens --- package/devel/gdb/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile index f474502869..24569634a9 100644 --- a/package/devel/gdb/Makefile +++ b/package/devel/gdb/Makefile @@ -26,14 +26,14 @@ include $(INCLUDE_DIR)/nls.mk define Package/gdb/Default SECTION:=devel CATEGORY:=Development - DEPENDS:=+!USE_MUSL:libthread-db $(ICONV_DEPENDS) $(INTL_DEPENDS) +libgmp + DEPENDS:=+!USE_MUSL:libthread-db $(ICONV_DEPENDS) $(INTL_DEPENDS) URL:=https://www.gnu.org/software/gdb/ endef define Package/gdb $(call Package/gdb/Default) TITLE:=GNU Debugger - DEPENDS+=+libreadline +libncurses +zlib + DEPENDS+=+libreadline +libncurses +zlib +libgmp endef define Package/gdb/description From 6146b35e045c65e83af83d3124ae4821ce56db3c Mon Sep 17 00:00:00 2001 From: Russell Senior Date: Sun, 7 Nov 2021 15:32:18 -0800 Subject: [PATCH 25/65] iproute2: update to 5.15 from https://git.kernel.org/pub/scm/network/iproute2/iproute2.git changes since 5.14.0: ad3a118f rdma: Fix SRQ resource tracking information json 7a235a10 man: devlink-port: fix pfnum for devlink port add 229eaba5 uapi: pickup fix for xfrm ABI breakage a500c5ac lib/bpf: fix map-in-map creation without prepopulation 7c032cac man: devlink-port: remove extra .br 04ee8e6f man: devlink-port: fix style 14802d84 man: devlink-port: fix the devlink port add synopsis 897772a7 cmd: use spaces instead of tabs for usage indentation e7a98a96 mptcp: unbreak JSON endpoint list 2f5825cb lib: bpf_legacy: fix bpffs mount when /sys/fs/bpf exists d756c08a tc/f_flower: fix port range parsing 92e32f77 uapi: updates from 5.15-rc1 e7e0e2ce iptuntap: fix multi-queue flag display deef844b man: ip-link: remove double of a3272b93 configure: restore backward compatibility ceba5930 tree-wide: fix some typos found by Lintian 7a705242 ip: remove leftovers from IPX and DECnet 8ab1834e uapi: update headers from 5.15 merge 6d0d35ba ip/bond: add lacp active support 926ad641 Update kernel headers c730bd0b ip/tunnel: always print all known attributes df8912ed ipioam6: use print_nl instead of print_null 7e7270bb tc/skbmod: Introduce SKBMOD_F_ECN option 86c596ed IOAM man8 2d83c710 New IOAM6 encap type for routes f0b3808a Add, show, link, remove IOAM namespaces and schemas acbdef93 Import ioam6 uapi headers 2d6fa30b Update kernel headers 508ad89c ipneigh: add support to print brief output of neigh cache in tabular format * update patch 170-ip_tiny.patch to accomodate ioam. Signed-off-by: Russell Senior --- package/network/utils/iproute2/Makefile | 4 ++-- package/network/utils/iproute2/patches/170-ip_tiny.patch | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 2cb8adc824..5d768cc630 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=5.14.0 +PKG_VERSION:=5.15.0 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=210fa785a52f3763c4287fd5ae63e246f6311bfaa48c424baab6d383bb7591d4 +PKG_HASH:=38e3e4a5f9a7f5575c015027a10df097c149111eeb739993128e5b2b35b291ff PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iproute2/patches/170-ip_tiny.patch b/package/network/utils/iproute2/patches/170-ip_tiny.patch index 2c1ec1dcb3..cd687e7601 100644 --- a/package/network/utils/iproute2/patches/170-ip_tiny.patch +++ b/package/network/utils/iproute2/patches/170-ip_tiny.patch @@ -30,7 +30,7 @@ "Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n" " ip [ -force ] -batch filename\n" +#ifndef IPROUTE2_TINY - "where OBJECT := { address | addrlabel | fou | help | ila | l2tp | link |\n" + "where OBJECT := { address | addrlabel | fou | help | ila | ioam | l2tp | link |\n" " macsec | maddress | monitor | mptcp | mroute | mrule |\n" " neighbor | neighbour | netconf | netns | nexthop | ntable |\n" " ntbl | route | rule | sr | tap | tcpmetrics |\n" @@ -43,7 +43,7 @@ " OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n" " -h[uman-readable] | -iec | -j[son] | -p[retty] |\n" " -f[amily] { inet | inet6 | mpls | bridge | link } |\n" -@@ -91,36 +97,50 @@ static const struct cmd { +@@ -91,37 +97,51 @@ static const struct cmd { int (*func)(int argc, char **argv); } cmds[] = { { "address", do_ipaddr }, @@ -90,6 +90,7 @@ +#ifndef IPROUTE2_TINY { "nexthop", do_ipnh }, { "mptcp", do_mptcp }, + { "ioam", do_ioam6 }, +#endif { "help", do_help }, { 0 } From 43f5a0570b4013e6958729c7b15f660606d52104 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Mon, 25 Oct 2021 13:27:26 -1000 Subject: [PATCH 26/65] firewall4: update to latest Git HEAD eb0a3ee fw4.uc: Do not quote port ranges c5a8e3e tests: adapt test to new ICMP print logic Also start using $(AUTORELEASE) Signed-off-by: Paul Spooren --- package/network/config/firewall4/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/network/config/firewall4/Makefile b/package/network/config/firewall4/Makefile index ccf5740466..a4f63a91ee 100644 --- a/package/network/config/firewall4/Makefile +++ b/package/network/config/firewall4/Makefile @@ -5,13 +5,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=firewall4 -PKG_RELEASE:=1 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall4.git -PKG_SOURCE_DATE:=2021-09-01 -PKG_SOURCE_VERSION:=cf835cecc8a449b2d2019f1ef4f085e535d5c1c1 -PKG_MIRROR_HASH:=5798b76846107dde69a2a1ff3467f735b9a91a74106fbd6299d8a26eff70b9c2 +PKG_SOURCE_DATE:=2021-10-25 +PKG_SOURCE_VERSION:=eb0a3ee812d48f1faecbf6258c293e475b4016a0 +PKG_MIRROR_HASH:=46b5bdea13a285dbd1b3432fe8cfd8cb98a2797b86b176d7762e0987ec2f230c PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC From 80783f2a898a142a5c421bfd200b7cc2dc34b5cf Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Fri, 10 Dec 2021 22:27:02 +0800 Subject: [PATCH 27/65] mt76x8: add missing Kconfig Signed-off-by: Tianling Shen --- target/linux/ramips/mt76x8/config-4.14 | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ramips/mt76x8/config-4.14 b/target/linux/ramips/mt76x8/config-4.14 index eb74043007..287ceec871 100644 --- a/target/linux/ramips/mt76x8/config-4.14 +++ b/target/linux/ramips/mt76x8/config-4.14 @@ -121,6 +121,7 @@ CONFIG_HW_HAS_PCI=y CONFIG_HZ_PERIODIC=y CONFIG_ICPLUS_PHY=y CONFIG_INITRAMFS_SOURCE="" +# CONFIG_IR_PWM_TX is not set CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_FORCED_THREADING=y From 3ad4abcb7ba4c870094fd358bd4c1daf13fb0154 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Mon, 6 Dec 2021 23:01:08 +0800 Subject: [PATCH 28/65] kernel 4.9: backport definition of NS_GET_NSTYPE That is required for procd-ujail compilation. --- ...n-ioctl-to-return-the-namespace-type.patch | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 target/linux/generic/backport-4.9/050-v4.11-nsfs-Add-an-ioctl-to-return-the-namespace-type.patch diff --git a/target/linux/generic/backport-4.9/050-v4.11-nsfs-Add-an-ioctl-to-return-the-namespace-type.patch b/target/linux/generic/backport-4.9/050-v4.11-nsfs-Add-an-ioctl-to-return-the-namespace-type.patch new file mode 100644 index 0000000000..53ffa3503d --- /dev/null +++ b/target/linux/generic/backport-4.9/050-v4.11-nsfs-Add-an-ioctl-to-return-the-namespace-type.patch @@ -0,0 +1,68 @@ +From e5ff5ce6e20ee22511398bb31fb912466cf82a36 Mon Sep 17 00:00:00 2001 +From: "Michael Kerrisk (man-pages)" +Date: Wed, 25 Jan 2017 14:03:36 +1300 +Subject: [PATCH] nsfs: Add an ioctl() to return the namespace type + +Linux 4.9 added two ioctl() operations that can be used to discover: + +* the parental relationships for hierarchical namespaces (user and PID) + [NS_GET_PARENT] +* the user namespaces that owns a specified non-user-namespace + [NS_GET_USERNS] + +For no good reason that I can glean, NS_GET_USERNS was made synonymous +with NS_GET_PARENT for user namespaces. It might have been better if +NS_GET_USERNS had returned an error if the supplied file descriptor +referred to a user namespace, since it suggests that the caller may be +confused. More particularly, if it had generated an error, then I wouldn't +need the new ioctl() operation proposed here. (On the other hand, what +I propose here may be more generally useful.) + +I would like to write code that discovers namespace relationships for +the purpose of understanding the namespace setup on a running system. +In particular, given a file descriptor (or pathname) for a namespace, +N, I'd like to obtain the corresponding user namespace. Namespace N +might be a user namespace (in which case my code would just use N) or +a non-user namespace (in which case my code will use NS_GET_USERNS to +get the user namespace associated with N). The problem is that there +is no way to tell the difference by looking at the file descriptor +(and if I try to use NS_GET_USERNS on an N that is a user namespace, I +get the parent user namespace of N, which is not what I want). + +This patch therefore adds a new ioctl(), NS_GET_NSTYPE, which, given +a file descriptor that refers to a user namespace, returns the +namespace type (one of the CLONE_NEW* constants). + +Signed-off-by: Michael Kerrisk +Signed-off-by: Eric W. Biederman +--- + fs/nsfs.c | 2 ++ + include/uapi/linux/nsfs.h | 3 +++ + 2 files changed, 5 insertions(+) + +diff --git a/fs/nsfs.c b/fs/nsfs.c +index 8c9fb29c66732..5d534763c6626 100644 +--- a/fs/nsfs.c ++++ b/fs/nsfs.c +@@ -173,6 +173,8 @@ static long ns_ioctl(struct file *filp, unsigned int ioctl, + if (!ns->ops->get_parent) + return -EINVAL; + return open_related_ns(ns, ns->ops->get_parent); ++ case NS_GET_NSTYPE: ++ return ns->ops->type; + default: + return -ENOTTY; + } +diff --git a/include/uapi/linux/nsfs.h b/include/uapi/linux/nsfs.h +index 3af617230d1b7..2b48df11056ac 100644 +--- a/include/uapi/linux/nsfs.h ++++ b/include/uapi/linux/nsfs.h +@@ -9,5 +9,8 @@ + #define NS_GET_USERNS _IO(NSIO, 0x1) + /* Returns a file descriptor that refers to a parent namespace */ + #define NS_GET_PARENT _IO(NSIO, 0x2) ++/* Returns the type of namespace (CLONE_NEW* value) referred to by ++ file descriptor */ ++#define NS_GET_NSTYPE _IO(NSIO, 0x3) + + #endif /* __LINUX_NSFS_H */ From 7c1641b44445f794abf9efd11cca3231b78f52b6 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Tue, 7 Dec 2021 23:15:03 +0800 Subject: [PATCH 29/65] README: update build dependencies Add the dependencies required to run nconfig, also remove outdated dependencies due to the old version of ubuntu no longer supports this compilation. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f3fa242e54..0558804284 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,11 @@ To build your own firmware you need a GNU/Linux, BSD or MacOSX system (case sens sudo apt full-upgrade -y sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ bzip2 ccache cmake cpio curl device-tree-compiler ecj fastjar flex gawk gettext gcc-multilib g++-multilib \ - git git-core gperf haveged help2man intltool lib32gcc1 libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev \ - libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncurses5-dev libreadline-dev libssl-dev libtool libz-dev \ - lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pip python3-ply \ - python-docutils qemu-utils re2c rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim \ - wget xmlto xxd zlib1g-dev + git gperf haveged help2man intltool lib32gcc1 libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \ + libmpc-dev libmpfr-dev libncurses5-dev libncursesw5 libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \ + mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pip python3-ply \ + python-docutils qemu-utils re2c rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip \ + vim wget xmlto xxd zlib1g-dev ``` - Method 2: @@ -85,7 +85,7 @@ To build your own firmware you need a GNU/Linux, BSD or MacOSX system (case sens 2. Enter docker container and update feeds. ```bash docker run --rm -it -v immortalwrt:/openwrt immortalwrt/opde:base - ./scripts/feeds update -a && ./scripts/feeds install -a + ./scripts/feeds update -a && ./scripts/feeds install -a ``` - Tips: ImmortalWrt source code can not be cloned into NTFS filesystem (symbol link problem during compilation), but docker volume is fine. From 08045d99578c17b3b382e682dbce5240f0bd716f Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Tue, 14 Dec 2021 20:57:58 +0800 Subject: [PATCH 30/65] r8125: Update to 9.007.01 Signed-off-by: Tianling Shen (cherry picked from commit 8ca4d542d854a69191af8493f251297020d2a22f) --- package/kernel/r8125/Makefile | 2 +- package/kernel/r8125/src/Makefile | 4 +- package/kernel/r8125/src/r8125.h | 13 +- package/kernel/r8125/src/r8125_n.c | 502 ++++++++++++++++++++++++----- 4 files changed, 429 insertions(+), 92 deletions(-) diff --git a/package/kernel/r8125/Makefile b/package/kernel/r8125/Makefile index be28bc5b2c..49cd4326ad 100644 --- a/package/kernel/r8125/Makefile +++ b/package/kernel/r8125/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=r8125 -PKG_VERSION:=9.006.04 +PKG_VERSION:=9.007.01 PKG_RELEASE:=$(AUTORELEASE) PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) diff --git a/package/kernel/r8125/src/Makefile b/package/kernel/r8125/src/Makefile index 514c0acdda..e64f995af4 100644 --- a/package/kernel/r8125/src/Makefile +++ b/package/kernel/r8125/src/Makefile @@ -35,13 +35,13 @@ ENABLE_REALWOW_SUPPORT = n ENABLE_DASH_SUPPORT = n ENABLE_DASH_PRINTER_SUPPORT = n CONFIG_DOWN_SPEED_100 = n -CONFIG_ASPM = y +CONFIG_ASPM = n ENABLE_S5WOL = y ENABLE_S5_KEEP_CURR_MAC = n ENABLE_EEE = y ENABLE_S0_MAGIC_PACKET = n ENABLE_TX_NO_CLOSE = y -ENABLE_MULTIPLE_TX_QUEUE = n +ENABLE_MULTIPLE_TX_QUEUE = y ENABLE_PTP_SUPPORT = n ENABLE_PTP_MASTER_MODE = n ENABLE_RSS_SUPPORT = y diff --git a/package/kernel/r8125/src/r8125.h b/package/kernel/r8125/src/r8125.h index 6dd541d4ab..8b4085c40b 100644 --- a/package/kernel/r8125/src/r8125.h +++ b/package/kernel/r8125/src/r8125.h @@ -363,7 +363,7 @@ do { \ #define RSS_SUFFIX "" #endif -#define RTL8125_VERSION "9.006.04" NAPI_SUFFIX DASH_SUFFIX REALWOW_SUFFIX PTP_SUFFIX RSS_SUFFIX +#define RTL8125_VERSION "9.007.01" NAPI_SUFFIX DASH_SUFFIX REALWOW_SUFFIX PTP_SUFFIX RSS_SUFFIX #define MODULENAME "r8125" #define PFX MODULENAME ": " @@ -557,6 +557,8 @@ This is free software, and you are welcome to redistribute it under certain cond #define D0_SPEED_UP_SPEED_1000 1 #define D0_SPEED_UP_SPEED_2500 2 +#define RTL8125_MAC_MCU_PAGE_SIZE 256 //256 words + #ifndef WRITE_ONCE #define WRITE_ONCE(var, val) (*((volatile typeof(val) *)(&(var))) = (val)) #endif @@ -2010,6 +2012,9 @@ struct rtl8125_private { unsigned int min_irq_nvecs; //struct msix_entry msix_entries[R8125_MAX_MSIX_VEC]; struct net_device_stats stats; /* statistics of net device */ +#ifdef ENABLE_PTP_SUPPORT + spinlock_t lock; /* spin lock flag */ +#endif u32 msg_enable; u32 tx_tcp_csum_cmd; u32 tx_udp_csum_cmd; @@ -2300,6 +2305,9 @@ struct rtl8125_private { u8 rss_indir_tbl[RTL8125_MAX_INDIRECTION_TABLE_ENTRIES]; u32 rss_options; #endif + + u8 HwSuppMacMcuVer; + u16 MacMcuPageSize; }; #ifdef ENABLE_LIB_SUPPORT @@ -2365,6 +2373,8 @@ enum mcfg { CFG_METHOD_3, CFG_METHOD_4, CFG_METHOD_5, + CFG_METHOD_6, + CFG_METHOD_7, CFG_METHOD_DEFAULT, CFG_METHOD_MAX }; @@ -2496,6 +2506,7 @@ static inline void rtl8125_lib_reset_complete(struct rtl8125_private *tp) { } #define HW_SUPPORT_CHECK_PHY_DISABLE_MODE(_M) ((_M)->HwSuppCheckPhyDisableModeVer > 0 ) #define HW_HAS_WRITE_PHY_MCU_RAM_CODE(_M) (((_M)->HwHasWrRamCodeToMicroP == TRUE) ? 1 : 0) #define HW_SUPPORT_D0_SPEED_UP(_M) ((_M)->HwSuppD0SpeedUpVer > 0) +#define HW_SUPPORT_MAC_MCU(_M) ((_M)->HwSuppMacMcuVer > 0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34) #define netdev_mc_count(dev) ((dev)->mc_count) diff --git a/package/kernel/r8125/src/r8125_n.c b/package/kernel/r8125/src/r8125_n.c index fd96e8f8e4..ec117a766a 100644 --- a/package/kernel/r8125/src/r8125_n.c +++ b/package/kernel/r8125/src/r8125_n.c @@ -106,6 +106,8 @@ static const struct { [CFG_METHOD_3] = {"RTL8125A", FIRMWARE_8125A_3}, [CFG_METHOD_4] = {"RTL8125B", }, [CFG_METHOD_5] = {"RTL8125B", FIRMWARE_8125B_2}, + [CFG_METHOD_6] = {"RTL8168KB", FIRMWARE_8125A_3}, + [CFG_METHOD_7] = {"RTL8168KB", FIRMWARE_8125B_2}, [CFG_METHOD_DEFAULT] = {"Unknown", }, }; @@ -143,6 +145,18 @@ static const struct { 0xff7e5880, Jumbo_Frame_9k), + _R("RTL8168KB", + CFG_METHOD_6, + BIT_30 | EnableInnerVlan | EnableOuterVlan | (RX_DMA_BURST << RxCfgDMAShift), + 0xff7e5880, + Jumbo_Frame_9k), + + _R("RTL8168KB", + CFG_METHOD_7, + BIT_30 | RxCfg_pause_slot_en | EnableInnerVlan | EnableOuterVlan | (RX_DMA_BURST << RxCfgDMAShift), + 0xff7e5880, + Jumbo_Frame_9k), + _R("Unknown", CFG_METHOD_DEFAULT, (RX_DMA_BURST << RxCfgDMAShift), @@ -158,6 +172,7 @@ static const struct { static struct pci_device_id rtl8125_pci_tbl[] = { { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8125), }, + { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8162), }, { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x3000), }, {0,}, }; @@ -646,6 +661,7 @@ static u32 rtl8125_read_thermal_sensor(struct rtl8125_private *tp) switch (tp->mcfg) { case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_7: ts_digout = mdio_direct_read_phy_ocp(tp, 0xBD84); ts_digout &= 0x3ff; break; @@ -1049,6 +1065,7 @@ static int proc_get_temperature(struct seq_file *m, void *v) switch (tp->mcfg) { case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_7: seq_puts(m, "\nChip Temperature\n"); break; default: @@ -1668,6 +1685,7 @@ static int proc_get_temperature(char *page, char **start, switch (tp->mcfg) { case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_7: len += snprintf(page + len, count - len, "\nChip Temperature\n"); break; @@ -2250,6 +2268,8 @@ void rtl8125_oob_mutex_lock(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: default: ocp_reg_mutex_oob = 0x110; ocp_reg_mutex_ib = 0x114; @@ -2299,6 +2319,8 @@ void rtl8125_oob_mutex_unlock(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: default: ocp_reg_mutex_oob = 0x110; ocp_reg_mutex_ib = 0x114; @@ -2794,6 +2816,8 @@ rtl8125_enable_rxdvgate(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: RTL_W8(tp, 0xF2, RTL_R8(tp, 0xF2) | BIT_3); mdelay(2); break; @@ -2810,6 +2834,8 @@ rtl8125_disable_rxdvgate(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: RTL_W8(tp, 0xF2, RTL_R8(tp, 0xF2) & ~BIT_3); mdelay(2); break; @@ -2879,6 +2905,7 @@ rtl8125_stop_all_request(struct net_device *dev) switch (tp->mcfg) { case CFG_METHOD_2: case CFG_METHOD_3: + case CFG_METHOD_6: for (i = 0; i < 20; i++) { udelay(10); if (!(RTL_R8(tp, ChipCmd) & StopReq)) break; @@ -2901,6 +2928,7 @@ rtl8125_wait_txrx_fifo_empty(struct net_device *dev) switch (tp->mcfg) { case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_7: rtl8125_stop_all_request(dev); break; } @@ -2910,6 +2938,8 @@ rtl8125_wait_txrx_fifo_empty(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: for (i = 0; i < 3000; i++) { udelay(50); if ((RTL_R8(tp, MCUCmd_reg) & (Txfifo_empty | Rxfifo_empty)) == (Txfifo_empty | Rxfifo_empty)) @@ -2921,6 +2951,7 @@ rtl8125_wait_txrx_fifo_empty(struct net_device *dev) switch (tp->mcfg) { case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_7: for (i = 0; i < 3000; i++) { udelay(50); if ((RTL_R16(tp, IntrMitigate) & (BIT_0 | BIT_1 | BIT_8)) == (BIT_0 | BIT_1 | BIT_8)) @@ -3132,6 +3163,8 @@ rtl8125_hw_clear_timer_int(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: RTL_W32(tp, TIMER_INT0_8125, 0x0000); RTL_W32(tp, TIMER_INT1_8125, 0x0000); RTL_W32(tp, TIMER_INT2_8125, 0x0000); @@ -3306,6 +3339,8 @@ rtl8125_issue_offset_99_event(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_mac_ocp_write(tp, 0xE09A, rtl8125_mac_ocp_read(tp, 0xE09A) | BIT_0); break; } @@ -3337,6 +3372,8 @@ static int rtl8125_enable_eee_plus(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_mac_ocp_write(tp, 0xE080, rtl8125_mac_ocp_read(tp, 0xE080)|BIT_1); break; @@ -3359,6 +3396,8 @@ static int rtl8125_disable_eee_plus(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_mac_ocp_write(tp, 0xE080, rtl8125_mac_ocp_read(tp, 0xE080)&~BIT_1); break; @@ -3389,7 +3428,9 @@ rtl8125_link_on_patch(struct net_device *dev) if ((tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3 || tp->mcfg == CFG_METHOD_4 || - tp->mcfg == CFG_METHOD_5) && + tp->mcfg == CFG_METHOD_5 || + tp->mcfg == CFG_METHOD_6 || + tp->mcfg == CFG_METHOD_7) && (RTL_R8(tp, PHYstatus) & _10bps)) rtl8125_enable_eee_plus(tp); @@ -3418,7 +3459,9 @@ rtl8125_link_down_patch(struct net_device *dev) if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3 || tp->mcfg == CFG_METHOD_4 || - tp->mcfg == CFG_METHOD_5) + tp->mcfg == CFG_METHOD_5 || + tp->mcfg == CFG_METHOD_6 || + tp->mcfg == CFG_METHOD_7) rtl8125_disable_eee_plus(tp); netif_tx_stop_all_queues(dev); @@ -3472,6 +3515,38 @@ rtl8125_check_link_status(struct net_device *dev) tp->resume_not_chg_speed = 0; } +static void +rtl8125_link_option_giga(u8 *aut, + u32 *spd, + u8 *dup, + u32 *adv) +{ + if ((*spd != SPEED_1000) && + (*spd != SPEED_100) && + (*spd != SPEED_10)) + *spd = SPEED_1000; + + if ((*dup != DUPLEX_FULL) && (*dup != DUPLEX_HALF)) + *dup = DUPLEX_FULL; + + if ((*aut != AUTONEG_ENABLE) && (*aut != AUTONEG_DISABLE)) + *aut = AUTONEG_ENABLE; + + *adv &= (ADVERTISED_10baseT_Half | + ADVERTISED_10baseT_Full | + ADVERTISED_100baseT_Half | + ADVERTISED_100baseT_Full | + ADVERTISED_1000baseT_Half | + ADVERTISED_1000baseT_Full); + if (*adv == 0) + *adv = (ADVERTISED_10baseT_Half | + ADVERTISED_10baseT_Full | + ADVERTISED_100baseT_Half | + ADVERTISED_100baseT_Full | + ADVERTISED_1000baseT_Half | + ADVERTISED_1000baseT_Full); +} + static void rtl8125_link_option(u8 *aut, u32 *spd, @@ -3515,7 +3590,9 @@ rtl8125_enable_ocp_phy_power_saving(struct net_device *dev) if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3 || tp->mcfg == CFG_METHOD_4 || - tp->mcfg == CFG_METHOD_5) { + tp->mcfg == CFG_METHOD_5 || + tp->mcfg == CFG_METHOD_6 || + tp->mcfg == CFG_METHOD_7) { val = mdio_direct_read_phy_ocp(tp, 0xC416); if (val != 0x0050) { rtl8125_set_phy_mcu_patch_request(tp); @@ -3536,7 +3613,9 @@ rtl8125_disable_ocp_phy_power_saving(struct net_device *dev) if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3 || tp->mcfg == CFG_METHOD_4 || - tp->mcfg == CFG_METHOD_5) { + tp->mcfg == CFG_METHOD_5 || + tp->mcfg == CFG_METHOD_6 || + tp->mcfg == CFG_METHOD_7) { val = mdio_direct_read_phy_ocp(tp, 0xC416); if (val != 0x0500) { rtl8125_set_phy_mcu_patch_request(tp); @@ -3568,6 +3647,8 @@ rtl8125_disable_pci_offset_99(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_mac_ocp_write(tp, 0xE032, rtl8125_mac_ocp_read(tp, 0xE032) & ~(BIT_0 | BIT_1)); break; } @@ -3577,6 +3658,8 @@ rtl8125_disable_pci_offset_99(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_csi_fun0_write_byte(tp, 0x99, 0x00); break; } @@ -3592,6 +3675,8 @@ rtl8125_enable_pci_offset_99(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_csi_fun0_write_byte(tp, 0x99, tp->org_pci_offset_99); break; } @@ -3601,6 +3686,8 @@ rtl8125_enable_pci_offset_99(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: csi_tmp = rtl8125_mac_ocp_read(tp, 0xE032); csi_tmp &= ~(BIT_0 | BIT_1); if (tp->org_pci_offset_99 & (BIT_5 | BIT_6)) @@ -3622,6 +3709,8 @@ rtl8125_init_pci_offset_99(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_mac_ocp_write(tp, 0xCDD0, 0x9003); csi_tmp = rtl8125_mac_ocp_read(tp, 0xE034); csi_tmp |= (BIT_15 | BIT_14); @@ -3660,6 +3749,8 @@ rtl8125_disable_pci_offset_180(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: csi_tmp = rtl8125_mac_ocp_read(tp, 0xE092); csi_tmp &= 0xFF00; rtl8125_mac_ocp_write(tp, 0xE092, csi_tmp); @@ -3677,6 +3768,8 @@ rtl8125_enable_pci_offset_180(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: csi_tmp = rtl8125_mac_ocp_read(tp, 0xE094); csi_tmp &= 0x00FF; rtl8125_mac_ocp_write(tp, 0xE094, csi_tmp); @@ -3688,6 +3781,8 @@ rtl8125_enable_pci_offset_180(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: csi_tmp = rtl8125_mac_ocp_read(tp, 0xE092); csi_tmp &= 0xFF00; csi_tmp |= BIT_2; @@ -3715,7 +3810,11 @@ rtl8125_set_pci_99_180_exit_driver_para(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: - rtl8125_issue_offset_99_event(tp); + case CFG_METHOD_6: + case CFG_METHOD_7: + if (tp->org_pci_offset_99 & BIT_2) + rtl8125_issue_offset_99_event(tp); + rtl8125_disable_pci_offset_99(tp); break; } @@ -3724,14 +3823,8 @@ rtl8125_set_pci_99_180_exit_driver_para(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: - rtl8125_disable_pci_offset_99(tp); - break; - } - switch (tp->mcfg) { - case CFG_METHOD_2: - case CFG_METHOD_3: - case CFG_METHOD_4: - case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_disable_pci_offset_180(tp); break; } @@ -3795,6 +3888,8 @@ rtl8125_hw_d3_para(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: RTL_W8(tp, 0xF1, RTL_R8(tp, 0xF1) & ~BIT_7); rtl8125_enable_cfg9346_write(tp); RTL_W8(tp, Config2, RTL_R8(tp, Config2) & ~BIT_7); @@ -3814,6 +3909,8 @@ rtl8125_hw_d3_para(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_mac_ocp_write(tp, 0xEA18, 0x0064); break; } @@ -3824,7 +3921,9 @@ rtl8125_hw_d3_para(struct net_device *dev) if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3 || tp->mcfg == CFG_METHOD_4 || - tp->mcfg == CFG_METHOD_5) + tp->mcfg == CFG_METHOD_5 || + tp->mcfg == CFG_METHOD_6 || + tp->mcfg == CFG_METHOD_7) rtl8125_disable_ocp_phy_power_saving(dev); rtl8125_disable_rxdvgate(dev); @@ -4182,7 +4281,9 @@ rtl8125_powerdown_pll(struct net_device *dev, u8 from_suspend) if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3 || tp->mcfg == CFG_METHOD_4 || - tp->mcfg == CFG_METHOD_5) { + tp->mcfg == CFG_METHOD_5 || + tp->mcfg == CFG_METHOD_6 || + tp->mcfg == CFG_METHOD_7) { rtl8125_enable_cfg9346_write(tp); RTL_W8(tp, Config2, RTL_R8(tp, Config2) | PMSTS_En); rtl8125_disable_cfg9346_write(tp); @@ -4219,6 +4320,8 @@ rtl8125_powerdown_pll(struct net_device *dev, u8 from_suspend) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: RTL_W8(tp, PMCH, RTL_R8(tp, PMCH) & ~BIT_7); break; } @@ -4229,6 +4332,8 @@ rtl8125_powerdown_pll(struct net_device *dev, u8 from_suspend) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: RTL_W8(tp, 0xF2, RTL_R8(tp, 0xF2) & ~BIT_6); break; } @@ -4243,6 +4348,8 @@ static void rtl8125_powerup_pll(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: RTL_W8(tp, PMCH, RTL_R8(tp, PMCH) | BIT_7 | BIT_6); break; } @@ -4617,7 +4724,9 @@ rtl8125_vlan_rx_register(struct net_device *dev, if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3 || tp->mcfg == CFG_METHOD_4 || - tp->mcfg == CFG_METHOD_5) { + tp->mcfg == CFG_METHOD_5 || + tp->mcfg == CFG_METHOD_6 || + tp->mcfg == CFG_METHOD_7) { if (tp->vlgrp) { tp->rtl8125_rx_config |= (EnableInnerVlan | EnableOuterVlan); RTL_W32(tp, RxConfig, RTL_R32(tp, RxConfig) | (EnableInnerVlan | EnableOuterVlan)) @@ -4789,6 +4898,9 @@ static void rtl8125_gset_xmii(struct net_device *dev, SUPPORTED_Pause | SUPPORTED_Asym_Pause; + if (tp->mcfg == CFG_METHOD_6 || tp->mcfg == CFG_METHOD_7) + supported &= ~SUPPORTED_2500baseX_Full; + advertising = ADVERTISED_TP; rtl8125_mdio_write(tp, 0x1F, 0x0000); @@ -4968,6 +5080,8 @@ static void rtl8125_get_regs(struct net_device *dev, struct ethtool_regs *regs, case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: default: for (i = 0; i < R8125_ERI_REGS_SIZE; i+=4) { *(u32*)data = rtl8125_eri_read(tp, i , 4, ERIAR_ExGMAC); @@ -5164,7 +5278,7 @@ rtl8125_get_strings(struct net_device *dev, { switch (stringset) { case ETH_SS_STATS: - memcpy(data, *rtl8125_gstrings, sizeof(rtl8125_gstrings)); + memcpy(data, rtl8125_gstrings, sizeof(rtl8125_gstrings)); break; } } @@ -5199,6 +5313,8 @@ static int rtl_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: default: VPD_addr = 0xD2; VPD_data = 0xD4; @@ -5290,6 +5406,7 @@ static int rtl8125_enable_eee(struct rtl8125_private *tp) switch (tp->mcfg) { case CFG_METHOD_2: case CFG_METHOD_3: + case CFG_METHOD_6: RTL_W16(tp, EEE_TXIDLE_TIMER_8125, eee->tx_lpi_timer); SetMcuAccessRegBit(tp, 0xE040, (BIT_1|BIT_0)); @@ -5305,6 +5422,7 @@ static int rtl8125_enable_eee(struct rtl8125_private *tp) break; case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_7: RTL_W16(tp, EEE_TXIDLE_TIMER_8125, eee->tx_lpi_timer); SetMcuAccessRegBit(tp, 0xE040, (BIT_1|BIT_0)); @@ -5331,6 +5449,8 @@ static int rtl8125_enable_eee(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_set_phy_mcu_patch_request(tp); ClearMcuAccessRegBit(tp, 0xE052, BIT_0); ClearEthPhyOcpBit(tp, 0xA442, BIT_12 | BIT_13); @@ -5350,6 +5470,7 @@ static int rtl8125_disable_eee(struct rtl8125_private *tp) switch (tp->mcfg) { case CFG_METHOD_2: case CFG_METHOD_3: + case CFG_METHOD_6: ClearMcuAccessRegBit(tp, 0xE040, (BIT_1|BIT_0)); ClearMcuAccessRegBit(tp, 0xEB62, (BIT_2|BIT_1)); @@ -5363,6 +5484,7 @@ static int rtl8125_disable_eee(struct rtl8125_private *tp) break; case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_7: ClearMcuAccessRegBit(tp, 0xE040, (BIT_1|BIT_0)); ClearEthPhyOcpBit(tp, 0xA5D0, (BIT_2 | BIT_1)); @@ -5384,6 +5506,8 @@ static int rtl8125_disable_eee(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_set_phy_mcu_patch_request(tp); ClearMcuAccessRegBit(tp, 0xE052, BIT_0); ClearEthPhyOcpBit(tp, 0xA442, BIT_12 | BIT_13); @@ -5644,6 +5768,8 @@ static int rtl8125_enable_green_feature(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: mdio_direct_write_phy_ocp(tp, 0xA436, 0x8011); SetEthPhyOcpBit(tp, 0xA438, BIT_15); rtl8125_mdio_write(tp, 0x00, 0x9200); @@ -5665,6 +5791,8 @@ static int rtl8125_disable_green_feature(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: mdio_direct_write_phy_ocp(tp, 0xA436, 0x8011); ClearEthPhyOcpBit(tp, 0xA438, BIT_15); rtl8125_mdio_write(tp, 0x00, 0x9200); @@ -5683,6 +5811,7 @@ static void rtl8125_get_mac_version(struct rtl8125_private *tp) { u32 reg,val32; u32 ICVerID; + struct pci_dev *pdev = tp->pci_dev; val32 = RTL_R32(tp, TxConfig); reg = val32 & 0x7c800000; @@ -5720,6 +5849,13 @@ static void rtl8125_get_mac_version(struct rtl8125_private *tp) tp->efuse_ver = EFUSE_NOT_SUPPORT; break; } + + if (pdev->subsystem_vendor == 0x8162) { + if (tp->mcfg == CFG_METHOD_3) + tp->mcfg = CFG_METHOD_6; + else if (tp->mcfg == CFG_METHOD_5) + tp->mcfg = CFG_METHOD_7; + } } static void @@ -5765,6 +5901,7 @@ rtl8125_clear_phy_ups_reg(struct net_device *dev) switch (tp->mcfg) { case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_7: ClearEthPhyOcpBit(tp, 0xA466, BIT_0); break; }; @@ -5779,7 +5916,9 @@ rtl8125_is_ups_resume(struct net_device *dev) if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3 || tp->mcfg == CFG_METHOD_4 || - tp->mcfg == CFG_METHOD_5) + tp->mcfg == CFG_METHOD_5 || + tp->mcfg == CFG_METHOD_6 || + tp->mcfg == CFG_METHOD_7) return (rtl8125_mac_ocp_read(tp, 0xD42C) & BIT_8); return 0; @@ -5793,7 +5932,9 @@ rtl8125_clear_ups_resume_bit(struct net_device *dev) if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3 || tp->mcfg == CFG_METHOD_4 || - tp->mcfg == CFG_METHOD_5) + tp->mcfg == CFG_METHOD_5 || + tp->mcfg == CFG_METHOD_6 || + tp->mcfg == CFG_METHOD_7) rtl8125_mac_ocp_write(tp, 0xD408, rtl8125_mac_ocp_read(tp, 0xD408) & ~(BIT_8)); } @@ -5807,7 +5948,9 @@ rtl8125_wait_phy_ups_resume(struct net_device *dev, u16 PhyState) if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3 || tp->mcfg == CFG_METHOD_4 || - tp->mcfg == CFG_METHOD_5) { + tp->mcfg == CFG_METHOD_5 || + tp->mcfg == CFG_METHOD_6 || + tp->mcfg == CFG_METHOD_7) { do { TmpPhyState = mdio_direct_read_phy_ocp(tp, 0xA420); TmpPhyState &= 0x7; @@ -5848,8 +5991,7 @@ rtl8125_exit_oob(struct net_device *dev) switch (tp->mcfg) { case CFG_METHOD_2: case CFG_METHOD_3: - case CFG_METHOD_4: - case CFG_METHOD_5: + case CFG_METHOD_6: rtl8125_dash2_disable_txrx(dev); break; } @@ -5871,6 +6013,8 @@ rtl8125_exit_oob(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_mac_ocp_write(tp, 0xC0BC, 0x00FF); break; } @@ -5883,6 +6027,8 @@ rtl8125_exit_oob(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_disable_now_is_oob(tp); data16 = rtl8125_mac_ocp_read(tp, 0xE8DE) & ~BIT_14; @@ -5903,6 +6049,8 @@ rtl8125_exit_oob(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: if (rtl8125_is_ups_resume(dev)) { rtl8125_wait_phy_ups_resume(dev, 2); rtl8125_clear_ups_resume_bit(dev); @@ -5915,6 +6063,8 @@ rtl8125_exit_oob(struct net_device *dev) void rtl8125_hw_disable_mac_mcu_bps(struct net_device *dev) { + u16 regAddr; + struct rtl8125_private *tp = netdev_priv(dev); switch (tp->mcfg) { @@ -5922,6 +6072,8 @@ rtl8125_hw_disable_mac_mcu_bps(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_enable_cfg9346_write(tp); RTL_W8(tp, Config5, RTL_R8(tp, Config5) & ~BIT_0); RTL_W8(tp, Config2, RTL_R8(tp, Config2) & ~BIT_7); @@ -5934,7 +6086,9 @@ rtl8125_hw_disable_mac_mcu_bps(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: - rtl8125_mac_ocp_write(tp, 0xFC38, 0x0000); + case CFG_METHOD_6: + case CFG_METHOD_7: + rtl8125_mac_ocp_write(tp, 0xFC48, 0x0000); break; } @@ -5943,21 +6097,72 @@ rtl8125_hw_disable_mac_mcu_bps(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: - rtl8125_mac_ocp_write(tp, 0xFC28, 0x0000); - rtl8125_mac_ocp_write(tp, 0xFC2A, 0x0000); - rtl8125_mac_ocp_write(tp, 0xFC2C, 0x0000); - rtl8125_mac_ocp_write(tp, 0xFC2E, 0x0000); - rtl8125_mac_ocp_write(tp, 0xFC30, 0x0000); - rtl8125_mac_ocp_write(tp, 0xFC32, 0x0000); - rtl8125_mac_ocp_write(tp, 0xFC34, 0x0000); - rtl8125_mac_ocp_write(tp, 0xFC36, 0x0000); + case CFG_METHOD_6: + case CFG_METHOD_7: + for (regAddr = 0xFC28; regAddr < 0xFC48; regAddr += 2) { + rtl8125_mac_ocp_write(tp, regAddr, 0x0000); + } + mdelay(3); + rtl8125_mac_ocp_write(tp, 0xFC26, 0x0000); break; } } #ifndef ENABLE_USE_FIRMWARE_FILE +static void +rtl8125_switch_mac_mcu_ram_code_page(struct rtl8125_private *tp, u16 page) +{ + u16 tmpUshort; + + page &= (BIT_1 | BIT_0); + tmpUshort = rtl8125_mac_ocp_read(tp, 0xE446); + tmpUshort &= ~(BIT_1 | BIT_0); + tmpUshort |= page; + rtl8125_mac_ocp_write(tp, 0xE446, tmpUshort); +} + +static void +_rtl8125_write_mac_mcu_ram_code(struct rtl8125_private *tp, const u16 *entry, u16 entry_cnt) +{ + u16 i; + + for (i = 0; i < entry_cnt; i++) { + rtl8125_mac_ocp_write(tp, 0xF800 + i * 2, entry[i]); + } +} + +static void +_rtl8125_write_mac_mcu_ram_code_with_page(struct rtl8125_private *tp, const u16 *entry, u16 entry_cnt, u16 page_size) +{ + u16 i; + u16 offset; + + if (page_size == 0) return; + + for (i = 0; i < entry_cnt; i++) { + offset = i % page_size; + if (offset == 0) { + u16 page = (i / page_size); + rtl8125_switch_mac_mcu_ram_code_page(tp, page); + } + rtl8125_mac_ocp_write(tp, 0xF800 + offset * 2, entry[i]); + } +} + +static void +rtl8125_write_mac_mcu_ram_code(struct rtl8125_private *tp, const u16 *entry, u16 entry_cnt) +{ + if (FALSE == HW_SUPPORT_MAC_MCU(tp)) return; + if (entry == NULL || entry_cnt == 0) return; + + if (tp->MacMcuPageSize > 0) + _rtl8125_write_mac_mcu_ram_code_with_page(tp, entry, entry_cnt, tp->MacMcuPageSize); + else + _rtl8125_write_mac_mcu_ram_code(tp, entry, entry_cnt); +} + static void rtl8125_set_mac_mcu_8125a_1(struct net_device *dev) { @@ -5968,49 +6173,55 @@ static void rtl8125_set_mac_mcu_8125a_2(struct net_device *dev) { struct rtl8125_private *tp = netdev_priv(dev); - u16 i; static const u16 mcu_patch_code_8125a_2[] = { - 0xE008, 0xE01E, 0xE02E, 0xE054, 0xE057, 0xE059, 0xE0C2, 0xE0CB, 0x9996, - 0x49D1, 0xF005, 0x49D4, 0xF10A, 0x49D8, 0xF108, 0xC00F, 0x7100, 0x209C, - 0x249C, 0xC009, 0x9900, 0xE004, 0xC006, 0x1900, 0x9900, 0xC602, 0xBE00, - 0x5A48, 0xE0C2, 0x0004, 0xE10A, 0xC60F, 0x73C4, 0x49B3, 0xF106, 0x73C2, - 0xC608, 0xB406, 0xC609, 0xFF80, 0xC605, 0xB406, 0xC605, 0xFF80, 0x0544, - 0x0568, 0xE906, 0xCDE8, 0xC724, 0xC624, 0x9EE2, 0x1E01, 0x9EE0, 0x76E0, - 0x49E0, 0xF1FE, 0x76E6, 0x486D, 0x4868, 0x9EE4, 0x1E03, 0x9EE0, 0x76E0, - 0x49E0, 0xF1FE, 0xC615, 0x9EE2, 0x1E01, 0x9EE0, 0x76E0, 0x49E0, 0xF1FE, - 0x76E6, 0x486F, 0x9EE4, 0x1E03, 0x9EE0, 0x76E0, 0x49E0, 0xF1FE, 0x7196, - 0xC702, 0xBF00, 0x5A44, 0xEB0E, 0x0070, 0x00C3, 0x1BC0, 0xC602, 0xBE00, - 0x0E26, 0xC602, 0xBE00, 0x0EBA, 0x1501, 0xF02A, 0x1500, 0xF15D, 0xC661, - 0x75C8, 0x49D5, 0xF00A, 0x49D6, 0xF008, 0x49D7, 0xF006, 0x49D8, 0xF004, - 0x75D2, 0x49D9, 0xF150, 0xC553, 0x77A0, 0x75C8, 0x4855, 0x4856, 0x4857, - 0x4858, 0x48DA, 0x48DB, 0x49FE, 0xF002, 0x485A, 0x49FF, 0xF002, 0x485B, - 0x9DC8, 0x75D2, 0x4859, 0x9DD2, 0xC643, 0x75C0, 0x49D4, 0xF033, 0x49D0, - 0xF137, 0xE030, 0xC63A, 0x75C8, 0x49D5, 0xF00E, 0x49D6, 0xF00C, 0x49D7, - 0xF00A, 0x49D8, 0xF008, 0x75D2, 0x49D9, 0xF005, 0xC62E, 0x75C0, 0x49D7, - 0xF125, 0xC528, 0x77A0, 0xC627, 0x75C8, 0x4855, 0x4856, 0x4857, 0x4858, - 0x48DA, 0x48DB, 0x49FE, 0xF002, 0x485A, 0x49FF, 0xF002, 0x485B, 0x9DC8, - 0x75D2, 0x4859, 0x9DD2, 0xC616, 0x75C0, 0x4857, 0x9DC0, 0xC613, 0x75C0, - 0x49DA, 0xF003, 0x49D0, 0xF107, 0xC60B, 0xC50E, 0x48D9, 0x9DC0, 0x4859, - 0x9DC0, 0xC608, 0xC702, 0xBF00, 0x3AE0, 0xE860, 0xB400, 0xB5D4, 0xE908, - 0xE86C, 0x1200, 0xC409, 0x6780, 0x48F1, 0x8F80, 0xC404, 0xC602, 0xBE00, - 0x10AA, 0xC010, 0xEA7C, 0xC602, 0xBE00, 0x0000 + 0xE010, 0xE026, 0xE036, 0xE05C, 0xE05E, 0xE060, 0xE0C9, 0xE0D2, 0xE0D4, + 0xE0DF, 0xE0EA, 0xE0FB, 0xE101, 0xE106, 0xE10B, 0xE10D, 0x9996, 0x49D1, + 0xF005, 0x49D4, 0xF10A, 0x49D8, 0xF108, 0xC00F, 0x7100, 0x209C, 0x249C, + 0xC009, 0x9900, 0xE004, 0xC006, 0x1900, 0x9900, 0xC602, 0xBE00, 0x5A48, + 0xE0C2, 0x0004, 0xE10A, 0xC60F, 0x73C4, 0x49B3, 0xF106, 0x73C2, 0xC608, + 0xB406, 0xC609, 0xFF80, 0xC605, 0xB406, 0xC605, 0xFF80, 0x0544, 0x0568, + 0xE906, 0xCDE8, 0xC724, 0xC624, 0x9EE2, 0x1E01, 0x9EE0, 0x76E0, 0x49E0, + 0xF1FE, 0x76E6, 0x486D, 0x4868, 0x9EE4, 0x1E03, 0x9EE0, 0x76E0, 0x49E0, + 0xF1FE, 0xC615, 0x9EE2, 0x1E01, 0x9EE0, 0x76E0, 0x49E0, 0xF1FE, 0x76E6, + 0x486F, 0x9EE4, 0x1E03, 0x9EE0, 0x76E0, 0x49E0, 0xF1FE, 0x7196, 0xC702, + 0xBF00, 0x5A44, 0xEB0E, 0x0070, 0x00C3, 0xC602, 0xBE00, 0x0000, 0xC602, + 0xBE00, 0x0EBA, 0x1501, 0xF02A, 0x1500, 0xF15D, 0xC661, 0x75C8, 0x49D5, + 0xF00A, 0x49D6, 0xF008, 0x49D7, 0xF006, 0x49D8, 0xF004, 0x75D2, 0x49D9, + 0xF150, 0xC553, 0x77A0, 0x75C8, 0x4855, 0x4856, 0x4857, 0x4858, 0x48DA, + 0x48DB, 0x49FE, 0xF002, 0x485A, 0x49FF, 0xF002, 0x485B, 0x9DC8, 0x75D2, + 0x4859, 0x9DD2, 0xC643, 0x75C0, 0x49D4, 0xF033, 0x49D0, 0xF137, 0xE030, + 0xC63A, 0x75C8, 0x49D5, 0xF00E, 0x49D6, 0xF00C, 0x49D7, 0xF00A, 0x49D8, + 0xF008, 0x75D2, 0x49D9, 0xF005, 0xC62E, 0x75C0, 0x49D7, 0xF125, 0xC528, + 0x77A0, 0xC627, 0x75C8, 0x4855, 0x4856, 0x4857, 0x4858, 0x48DA, 0x48DB, + 0x49FE, 0xF002, 0x485A, 0x49FF, 0xF002, 0x485B, 0x9DC8, 0x75D2, 0x4859, + 0x9DD2, 0xC616, 0x75C0, 0x4857, 0x9DC0, 0xC613, 0x75C0, 0x49DA, 0xF003, + 0x49D0, 0xF107, 0xC60B, 0xC50E, 0x48D9, 0x9DC0, 0x4859, 0x9DC0, 0xC608, + 0xC702, 0xBF00, 0x3AE0, 0xE860, 0xB400, 0xB5D4, 0xE908, 0xE86C, 0x1200, + 0xC409, 0x6780, 0x48F1, 0x8F80, 0xC404, 0xC602, 0xBE00, 0x10AA, 0xC010, + 0xEA7C, 0xC602, 0xBE00, 0x0000, 0x740A, 0x4846, 0x4847, 0x9C0A, 0xC607, + 0x74C0, 0x48C6, 0x9CC0, 0xC602, 0xBE00, 0x13FE, 0xE054, 0x72CA, 0x4826, + 0x4827, 0x9ACA, 0xC607, 0x72C0, 0x48A6, 0x9AC0, 0xC602, 0xBE00, 0x07DC, + 0xE054, 0xC60F, 0x74C4, 0x49CC, 0xF109, 0xC60C, 0x74CA, 0x48C7, 0x9CCA, + 0xC609, 0x74C0, 0x4846, 0x9CC0, 0xC602, 0xBE00, 0x2480, 0xE092, 0xE0C0, + 0xE054, 0x7420, 0x48C0, 0x9C20, 0x7444, 0xC602, 0xBE00, 0x12F8, 0x1BFF, + 0x46EB, 0x1BFF, 0xC102, 0xB900, 0x0D5A, 0x1BFF, 0x46EB, 0x1BFF, 0xC102, + 0xB900, 0x0E2A, 0xC602, 0xBE00, 0x0000, 0xC602, 0xBE00, 0x0000 }; rtl8125_hw_disable_mac_mcu_bps(dev); - for (i = 0; i < ARRAY_SIZE(mcu_patch_code_8125a_2); i++) { - rtl8125_mac_ocp_write(tp, 0xF800 + i * 2, mcu_patch_code_8125a_2[i]); - } + rtl8125_write_mac_mcu_ram_code(tp, mcu_patch_code_8125a_2, ARRAY_SIZE(mcu_patch_code_8125a_2)); rtl8125_mac_ocp_write(tp, 0xFC26, 0x8000); rtl8125_mac_ocp_write(tp, 0xFC2A, 0x0540); - rtl8125_mac_ocp_write(tp, 0xFC2E, 0x0E24); rtl8125_mac_ocp_write(tp, 0xFC30, 0x0EB8); rtl8125_mac_ocp_write(tp, 0xFC32, 0x3A5C); rtl8125_mac_ocp_write(tp, 0xFC34, 0x10A8); + rtl8125_mac_ocp_write(tp, 0xFC40, 0x0D54); + rtl8125_mac_ocp_write(tp, 0xFC42, 0x0E24); - rtl8125_mac_ocp_write(tp, 0xFC48, 0x007A); + rtl8125_mac_ocp_write(tp, 0xFC48, 0x3072); } static void @@ -6023,7 +6234,6 @@ static void rtl8125_set_mac_mcu_8125b_2(struct net_device *dev) { struct rtl8125_private *tp = netdev_priv(dev); - u16 i; static const u16 mcu_patch_code_8125b_2[] = { 0xE010, 0xE01B, 0xE026, 0xE037, 0xE03D, 0xE057, 0xE05B, 0xE05F, 0xE061, 0xE063, 0xE065, 0xE067, 0xE069, 0xE06B, 0xE06D, 0xE06F, 0x740A, 0x4846, @@ -6044,9 +6254,7 @@ rtl8125_set_mac_mcu_8125b_2(struct net_device *dev) rtl8125_hw_disable_mac_mcu_bps(dev); - for (i = 0; i < ARRAY_SIZE(mcu_patch_code_8125b_2); i++) { - rtl8125_mac_ocp_write(tp, 0xF800 + i * 2, mcu_patch_code_8125b_2[i]); - } + rtl8125_write_mac_mcu_ram_code(tp, mcu_patch_code_8125b_2, ARRAY_SIZE(mcu_patch_code_8125b_2)); rtl8125_mac_ocp_write(tp, 0xFC26, 0x8000); @@ -6056,9 +6264,9 @@ rtl8125_set_mac_mcu_8125b_2(struct net_device *dev) rtl8125_mac_ocp_write(tp, 0xFC2E, 0x12DA); rtl8125_mac_ocp_write(tp, 0xFC30, 0x4A20); rtl8125_mac_ocp_write(tp, 0xFC32, 0x47A0); - rtl8125_mac_ocp_write(tp, 0xFC34, 0x0A46); + //rtl8125_mac_ocp_write(tp, 0xFC34, 0x0A46); - rtl8125_mac_ocp_write(tp, 0xFC48, 0x007F); + rtl8125_mac_ocp_write(tp, 0xFC48, 0x003F); } static void @@ -6073,12 +6281,14 @@ rtl8125_hw_mac_mcu_config(struct net_device *dev) rtl8125_set_mac_mcu_8125a_1(dev); break; case CFG_METHOD_3: + case CFG_METHOD_6: rtl8125_set_mac_mcu_8125a_2(dev); break; case CFG_METHOD_4: rtl8125_set_mac_mcu_8125b_1(dev); break; case CFG_METHOD_5: + case CFG_METHOD_7: rtl8125_set_mac_mcu_8125b_2(dev); break; } @@ -6127,6 +6337,8 @@ rtl8125_hw_init(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_enable_cfg9346_write(tp); RTL_W8(tp, Config5, RTL_R8(tp, Config5) & ~BIT_0); RTL_W8(tp, Config2, RTL_R8(tp, Config2) & ~BIT_7); @@ -6141,6 +6353,8 @@ rtl8125_hw_init(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_mac_ocp_write(tp, 0xD40A, rtl8125_mac_ocp_read( tp, 0xD40A) & ~(BIT_4)); break; } @@ -6154,7 +6368,9 @@ rtl8125_hw_init(struct net_device *dev) if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3 || tp->mcfg == CFG_METHOD_4 || - tp->mcfg == CFG_METHOD_5) + tp->mcfg == CFG_METHOD_5 || + tp->mcfg == CFG_METHOD_6 || + tp->mcfg == CFG_METHOD_7) rtl8125_disable_ocp_phy_power_saving(dev); //Set PCIE uncorrectable error status mask pcie 0x108 @@ -6214,6 +6430,7 @@ rtl8125_hw_ephy_config(struct net_device *dev) rtl8125_ephy_write(tp, 0x63, 0xAB62); break; case CFG_METHOD_3: + case CFG_METHOD_6: rtl8125_ephy_write(tp, 0x04, 0xD000); rtl8125_ephy_write(tp, 0x0A, 0x8653); rtl8125_ephy_write(tp, 0x23, 0xAB66); @@ -6280,6 +6497,7 @@ rtl8125_hw_ephy_config(struct net_device *dev) rtl8125_ephy_write(tp, 0x5B, 0x1EA0); break; case CFG_METHOD_5: + case CFG_METHOD_7: rtl8125_ephy_write(tp, 0x0B, 0xA908); rtl8125_ephy_write(tp, 0x22, 0x0023); rtl8125_ephy_write(tp, 0x1E, 0x28EB); @@ -6301,6 +6519,8 @@ rtl8125_get_hw_phy_mcu_code_ver(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: mdio_direct_write_phy_ocp(tp, 0xA436, 0x801E); hw_ram_code_ver = mdio_direct_read_phy_ocp(tp, 0xA438); break; @@ -6384,6 +6604,8 @@ rtl8125_write_hw_phy_mcu_code_ver(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: mdio_direct_write_phy_ocp(tp, 0xA436, 0x801E); mdio_direct_write_phy_ocp(tp, 0xA438, tp->sw_ram_code_ver); tp->hw_ram_code_ver = tp->sw_ram_code_ver; @@ -6401,12 +6623,14 @@ rtl8125_acquire_phy_mcu_patch_key_lock(struct rtl8125_private *tp) PatchKey = 0x8600; break; case CFG_METHOD_3: + case CFG_METHOD_6: PatchKey = 0x8601; break; case CFG_METHOD_4: PatchKey = 0x3700; break; case CFG_METHOD_5: + case CFG_METHOD_7: PatchKey = 0x3701; break; default: @@ -6426,6 +6650,8 @@ rtl8125_release_phy_mcu_patch_key_lock(struct rtl8125_private *tp) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: mdio_direct_write_phy_ocp(tp, 0xA436, 0x0000); mdio_direct_write_phy_ocp(tp, 0xA438, 0x0000); ClearEthPhyOcpBit(tp, 0xB82E, BIT_0); @@ -8878,12 +9104,14 @@ rtl8125_init_hw_phy_mcu(struct net_device *dev) rtl8125_set_phy_mcu_8125a_1(dev); break; case CFG_METHOD_3: + case CFG_METHOD_6: rtl8125_set_phy_mcu_8125a_2(dev); break; case CFG_METHOD_4: rtl8125_set_phy_mcu_8125b_1(dev); break; case CFG_METHOD_5: + case CFG_METHOD_7: rtl8125_set_phy_mcu_8125b_2(dev); break; } @@ -9809,12 +10037,14 @@ rtl8125_hw_phy_config(struct net_device *dev) rtl8125_hw_phy_config_8125a_1(dev); break; case CFG_METHOD_3: + case CFG_METHOD_6: rtl8125_hw_phy_config_8125a_2(dev); break; case CFG_METHOD_4: rtl8125_hw_phy_config_8125b_1(dev); break; case CFG_METHOD_5: + case CFG_METHOD_7: rtl8125_hw_phy_config_8125b_2(dev); break; } @@ -9825,6 +10055,8 @@ rtl8125_hw_phy_config(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: default: rtl8125_mdio_write(tp, 0x1F, 0x0A5B); rtl8125_clear_eth_phy_bit(tp, 0x12, BIT_15); @@ -9835,7 +10067,8 @@ rtl8125_hw_phy_config(struct net_device *dev) /*ocp phy power saving*/ /* if (aspm) { - if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3) + if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3 || + tp->mcfg == CFG_METHOD_6) rtl8125_enable_ocp_phy_power_saving(dev); } */ @@ -9940,6 +10173,8 @@ rtl8125_get_bios_setting(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: tp->bios_setting = RTL_R32(tp, TimeInt2); break; } @@ -9955,6 +10190,8 @@ rtl8125_set_bios_setting(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: RTL_W32(tp, TimeInt2, tp->bios_setting); break; } @@ -10008,8 +10245,6 @@ rtl8125_init_software_variable(struct net_device *dev) switch (tp->mcfg) { case CFG_METHOD_2: case CFG_METHOD_3: - case CFG_METHOD_4: - case CFG_METHOD_5: //tp->HwSuppDashVer = 3; break; default: @@ -10022,6 +10257,8 @@ rtl8125_init_software_variable(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: tp->HwPkgDet = rtl8125_mac_ocp_read(tp, 0xDC00); tp->HwPkgDet = (tp->HwPkgDet >> 3) & 0x07; break; @@ -10035,6 +10272,8 @@ rtl8125_init_software_variable(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: tp->HwSuppNowIsOobVer = 1; break; } @@ -10044,6 +10283,8 @@ rtl8125_init_software_variable(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: tp->HwPcieSNOffset = 0x16C; break; } @@ -10099,6 +10340,8 @@ rtl8125_init_software_variable(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: tp->org_pci_offset_99 = rtl8125_csi_fun0_read_byte(tp, 0x99); tp->org_pci_offset_99 &= ~(BIT_5|BIT_6); break; @@ -10107,10 +10350,12 @@ rtl8125_init_software_variable(struct net_device *dev) switch (tp->mcfg) { case CFG_METHOD_2: case CFG_METHOD_3: + case CFG_METHOD_6: tp->org_pci_offset_180 = rtl8125_csi_fun0_read_byte(tp, 0x264); break; case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_7: tp->org_pci_offset_180 = rtl8125_csi_fun0_read_byte(tp, 0x214); break; } @@ -10124,6 +10369,8 @@ rtl8125_init_software_variable(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: default: tp->use_timer_interrrupt = TRUE; break; @@ -10137,6 +10384,8 @@ rtl8125_init_software_variable(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: tp->HwSuppMagicPktVer = WAKEUP_MAGIC_PACKET_V3; break; default: @@ -10149,6 +10398,8 @@ rtl8125_init_software_variable(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: tp->HwSuppLinkChgWakeUpVer = 3; break; } @@ -10157,6 +10408,8 @@ rtl8125_init_software_variable(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: tp->HwSuppD0SpeedUpVer = 1; break; } @@ -10166,6 +10419,8 @@ rtl8125_init_software_variable(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: tp->HwSuppCheckPhyDisableModeVer = 3; break; } @@ -10175,6 +10430,8 @@ rtl8125_init_software_variable(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: tp->HwSuppTxNoCloseVer = 3; break; } @@ -10185,6 +10442,7 @@ rtl8125_init_software_variable(struct net_device *dev) switch (tp->mcfg) { case CFG_METHOD_2: case CFG_METHOD_3: + case CFG_METHOD_6: tp->RequireLSOPatch = TRUE; break; } @@ -10194,12 +10452,14 @@ rtl8125_init_software_variable(struct net_device *dev) tp->sw_ram_code_ver = NIC_RAMCODE_VERSION_CFG_METHOD_2; break; case CFG_METHOD_3: + case CFG_METHOD_6: tp->sw_ram_code_ver = NIC_RAMCODE_VERSION_CFG_METHOD_3; break; case CFG_METHOD_4: tp->sw_ram_code_ver = NIC_RAMCODE_VERSION_CFG_METHOD_4; break; case CFG_METHOD_5: + case CFG_METHOD_7: tp->sw_ram_code_ver = NIC_RAMCODE_VERSION_CFG_METHOD_5; break; } @@ -10211,17 +10471,39 @@ rtl8125_init_software_variable(struct net_device *dev) switch (tp->mcfg) { case CFG_METHOD_3: + case CFG_METHOD_6: if ((rtl8125_mac_ocp_read(tp, 0xD442) & BIT_5) && - (mdio_direct_read_phy_ocp(tp, 0xD068) & BIT_1) - ) { + (mdio_direct_read_phy_ocp(tp, 0xD068) & BIT_1)) tp->RequirePhyMdiSwapPatch = TRUE; - } + break; + } + + switch (tp->mcfg) { + case CFG_METHOD_2: + case CFG_METHOD_3: + case CFG_METHOD_4: + case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: + tp->HwSuppMacMcuVer = 2; + break; + } + + switch (tp->mcfg) { + case CFG_METHOD_2: + case CFG_METHOD_3: + case CFG_METHOD_4: + case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: + tp->MacMcuPageSize = RTL8125_MAC_MCU_PAGE_SIZE; break; } switch (tp->mcfg) { case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_7: tp->HwSuppNumTxQueues = 2; tp->HwSuppNumRxQueues = 4; break; @@ -10241,6 +10523,7 @@ rtl8125_init_software_variable(struct net_device *dev) switch (tp->mcfg) { case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_7: tp->HwSuppRssVer = 5; tp->HwSuppIndirTblEntries = 128; break; @@ -10273,6 +10556,7 @@ rtl8125_init_software_variable(struct net_device *dev) switch (tp->mcfg) { case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_7: tp->HwSuppPtpVer = 1; break; } @@ -10298,6 +10582,7 @@ rtl8125_init_software_variable(struct net_device *dev) switch (tp->mcfg) { case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_7: tp->HwSuppIsrVer = 2; break; default: @@ -10341,10 +10626,12 @@ rtl8125_init_software_variable(struct net_device *dev) switch (tp->mcfg) { case CFG_METHOD_2: case CFG_METHOD_3: + case CFG_METHOD_6: tp->HwSuppIntMitiVer = 3; break; case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_7: tp->HwSuppIntMitiVer = 4; break; } @@ -10354,6 +10641,8 @@ rtl8125_init_software_variable(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: tp->HwSuppExtendTallyCounterVer = 1; break; } @@ -10365,7 +10654,10 @@ rtl8125_init_software_variable(struct net_device *dev) tp->wol_opts = rtl8125_get_hw_wol(tp); tp->wol_enabled = (tp->wol_opts) ? WOL_ENABLED : WOL_DISABLED; - rtl8125_link_option((u8*)&autoneg_mode, (u32*)&speed_mode, (u8*)&duplex_mode, (u32*)&advertising_mode); + if (tp->mcfg == CFG_METHOD_6 || tp->mcfg == CFG_METHOD_7) + rtl8125_link_option_giga((u8*)&autoneg_mode, (u32*)&speed_mode, (u8*)&duplex_mode, (u32*)&advertising_mode); + else + rtl8125_link_option((u8*)&autoneg_mode, (u32*)&speed_mode, (u8*)&duplex_mode, (u32*)&advertising_mode); tp->autoneg = autoneg_mode; tp->speed = speed_mode; @@ -10441,7 +10733,9 @@ rtl8125_get_mac_address(struct net_device *dev) if(tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3 || tp->mcfg == CFG_METHOD_4 || - tp->mcfg == CFG_METHOD_5) { + tp->mcfg == CFG_METHOD_5 || + tp->mcfg == CFG_METHOD_6 || + tp->mcfg == CFG_METHOD_7) { *(u32*)&mac_addr[0] = RTL_R32(tp, BACKUP_ADDR0_8125); *(u16*)&mac_addr[4] = RTL_R16(tp, BACKUP_ADDR1_8125); } @@ -11280,6 +11574,8 @@ rtl8125_phy_power_up(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_wait_phy_ups_resume(dev, 3); break; }; @@ -11489,6 +11785,12 @@ rtl8125_esd_checker(struct rtl8125_private *tp) printk(KERN_ERR "%s: cmd = 0x%02x, should be 0x%02x \n.", dev->name, cmd, tp->pci_cfg_space.cmd); pci_write_config_byte(pdev, PCI_COMMAND, tp->pci_cfg_space.cmd); tp->esd_flag |= BIT_0; + + pci_read_config_byte(pdev, PCI_COMMAND, &cmd); + if (cmd == 0xff) { + printk(KERN_ERR "%s: pci link is down \n.", dev->name); + goto exit; + } } pci_read_config_word(pdev, PCI_BASE_ADDRESS_0, &io_base_l); @@ -11604,6 +11906,8 @@ rtl8125_esd_checker(struct rtl8125_private *tp) rtl8125_set_speed(dev, tp->autoneg, tp->speed, tp->duplex, tp->advertising); tp->esd_flag = 0; } +exit: + return; } /* static void @@ -11713,6 +12017,7 @@ static int rtl8125_try_msi(struct rtl8125_private *tp) switch (tp->mcfg) { case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_7: tp->max_irq_nvecs = R8125_MAX_MSIX_VEC_8125B; tp->min_irq_nvecs = R8125_MIN_MSIX_VEC_8125B; break; @@ -12089,7 +12394,9 @@ rtl8125_init_one(struct pci_dev *pdev, dev_err(&pdev->dev, "Can't allocate interrupt\n"); goto err_out_1; } - +#ifdef ENABLE_PTP_SUPPORT + spin_lock_init(&tp->lock); +#endif rtl8125_init_software_variable(dev); RTL_NET_DEVICE_OPS(rtl8125_netdev_ops); @@ -12694,6 +13001,8 @@ rtl8125_hw_config(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: RTL_W8(tp, 0xF1, RTL_R8(tp, 0xF1) & ~BIT_7); RTL_W8(tp, Config2, RTL_R8(tp, Config2) & ~BIT_7); RTL_W8(tp, Config5, RTL_R8(tp, Config5) & ~BIT_0); @@ -12706,6 +13015,8 @@ rtl8125_hw_config(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~BIT_1); break; } @@ -12715,6 +13026,8 @@ rtl8125_hw_config(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: //IntMITI_0-IntMITI_31 for (i=0xA00; i<0xB00; i+=4) RTL_W32(tp, i, 0x00000000); @@ -12727,6 +13040,8 @@ rtl8125_hw_config(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: mac_ocp_data = rtl8125_mac_ocp_read(tp, 0xC0B6); mac_ocp_data &= BIT_0; rtl8125_mac_ocp_write(tp, 0xC0B6, mac_ocp_data); @@ -12749,7 +13064,9 @@ rtl8125_hw_config(struct net_device *dev) if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3 || tp->mcfg == CFG_METHOD_4 || - tp->mcfg == CFG_METHOD_5) { + tp->mcfg == CFG_METHOD_5 || + tp->mcfg == CFG_METHOD_6 || + tp->mcfg == CFG_METHOD_7) { set_offset70F(tp, 0x27); set_offset79(tp, 0x50); @@ -12774,21 +13091,19 @@ rtl8125_hw_config(struct net_device *dev) mac_ocp_data = rtl8125_mac_ocp_read(tp, 0xE614); mac_ocp_data &= ~( BIT_10 | BIT_9 | BIT_8); - if (tp->mcfg == CFG_METHOD_4 || tp->mcfg == CFG_METHOD_5) { + if (tp->mcfg == CFG_METHOD_4 || tp->mcfg == CFG_METHOD_5 || + tp->mcfg == CFG_METHOD_7) mac_ocp_data |= ((2 & 0x07) << 8); - } else { - if (tp->DASH && !(rtl8125_csi_fun0_read_byte(tp, 0x79) & BIT_0)) - mac_ocp_data |= ((3 & 0x07) << 8); - else - mac_ocp_data |= ((4 & 0x07) << 8); - } + else + mac_ocp_data |= ((3 & 0x07) << 8); rtl8125_mac_ocp_write(tp, 0xE614, mac_ocp_data); rtl8125_set_tx_q_num(tp, rtl8125_tot_tx_rings(tp)); mac_ocp_data = rtl8125_mac_ocp_read(tp, 0xE63E); mac_ocp_data &= ~(BIT_5 | BIT_4); - if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3) + if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3 || + tp->mcfg == CFG_METHOD_6) mac_ocp_data |= ((0x02 & 0x03) << 4); rtl8125_mac_ocp_write(tp, 0xE63E, mac_ocp_data); @@ -12846,7 +13161,8 @@ rtl8125_hw_config(struct net_device *dev) else RTL_W8(tp, 0xD0, (RTL_R8(tp, 0xD0) & ~BIT_6) | BIT_7); - if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3) + if (tp->mcfg == CFG_METHOD_2 || tp->mcfg == CFG_METHOD_3 || + tp->mcfg == CFG_METHOD_6) RTL_W8(tp, MCUCmd_reg, RTL_R8(tp, MCUCmd_reg) | BIT_0); rtl8125_disable_eee_plus(tp); @@ -12892,6 +13208,8 @@ rtl8125_hw_config(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: rtl8125_mac_ocp_write(tp, 0xE098, 0xC302); break; } @@ -12901,6 +13219,8 @@ rtl8125_hw_config(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: if (aspm) { rtl8125_init_pci_offset_99(tp); } @@ -12911,6 +13231,8 @@ rtl8125_hw_config(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: if (aspm) { rtl8125_init_pci_offset_180(tp); } @@ -12931,7 +13253,9 @@ rtl8125_hw_config(struct net_device *dev) case CFG_METHOD_2: case CFG_METHOD_3: case CFG_METHOD_4: - case CFG_METHOD_5: { + case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: { int timeout; for (timeout = 0; timeout < 10; timeout++) { if ((rtl8125_mac_ocp_read(tp, 0xE00E) & BIT_13)==0) @@ -12982,6 +13306,8 @@ rtl8125_hw_config(struct net_device *dev) case CFG_METHOD_3: case CFG_METHOD_4: case CFG_METHOD_5: + case CFG_METHOD_6: + case CFG_METHOD_7: if (aspm) { RTL_W8(tp, Config5, RTL_R8(tp, Config5) | BIT_0); RTL_W8(tp, Config2, RTL_R8(tp, Config2) | BIT_7); From 15228d688ec30eeae3ccd79e6f222b152b8ee0e9 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Tue, 14 Dec 2021 21:00:53 +0800 Subject: [PATCH 31/65] r8152: Update to 2.15.20211119 Signed-off-by: Tianling Shen (cherry picked from commit d9d24aaabe4bcf2b0ca4e7c58aa7b12e1cf02fc2) --- package/kernel/r8152/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/kernel/r8152/Makefile b/package/kernel/r8152/Makefile index 61df595de8..76fe25f3fe 100644 --- a/package/kernel/r8152/Makefile +++ b/package/kernel/r8152/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=r8152 -PKG_VERSION:=2.15 +PKG_VERSION:=2.15.20211119 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/1715173329/realtek-r8152-linux/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=dc8a06ed6ff397029c396a7e83476f1bf9541c4f927a4dbac8810c6ce014f8ca +PKG_SOURCE_URL:=https://codeload.github.com/wget/realtek-r8152-linux/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=b7926db3b4ca71d453ac1cf875d7a8ab409ece108edc6913e8bc1c0c3b99179d PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-linux-$(PKG_VERSION) From 956511e802eab3cc7b00fa5efa7f607a1c5c829f Mon Sep 17 00:00:00 2001 From: "Sergey V. Lobanov" Date: Thu, 2 Dec 2021 19:02:23 +0300 Subject: [PATCH 32/65] tools/mkimage: fix build on MacOS arm64 Fixed -no-pie compilation warning on MacOS Fixed errors related to using absolute addressing on MacOS arm64 Based on upstream patch from Jessica Clarke and suggestions from Ronny Kotzschmar Link to original patch and discussion: https://github.com/u-boot/u-boot/commit/3b142045e8a7f0ab17b6099e9226296af45967d0 Signed-off-by: Sergey V. Lobanov --- .../patches/090-macos-arm64-builing-fix.patch | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 tools/mkimage/patches/090-macos-arm64-builing-fix.patch diff --git a/tools/mkimage/patches/090-macos-arm64-builing-fix.patch b/tools/mkimage/patches/090-macos-arm64-builing-fix.patch new file mode 100644 index 0000000000..216a8abd35 --- /dev/null +++ b/tools/mkimage/patches/090-macos-arm64-builing-fix.patch @@ -0,0 +1,47 @@ +This patch fixes compilation issues on MacOS arm64. +Based on discussion +https://github.com/u-boot/u-boot/commit/3b142045e8a7f0ab17b6099e9226296af45967d0 + +diff --git a/Makefile b/Makefile +index b4f1cbc..551041f 100644 +--- a/Makefile ++++ b/Makefile +@@ -324,11 +324,6 @@ HOSTCC = $(call os_x_before, 10, 5, "cc", "gcc") + KBUILD_HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp") + KBUILD_HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress") + +-# since Lion (10.7) ASLR is on by default, but we use linker generated lists +-# in some host tools which is a problem then ... so disable ASLR for these +-# tools +-KBUILD_HOSTLDFLAGS += $(call os_x_before, 10, 7, "", "-Xlinker -no_pie") +- + # macOS Mojave (10.14.X) + # Undefined symbols for architecture x86_64: "_PyArg_ParseTuple" + KBUILD_HOSTLDFLAGS += $(call os_x_after, 10, 14, "-lpython -dynamclib", "") +diff --git a/tools/imagetool.h b/tools/imagetool.h +index 8726792..d1b72ef 100644 +--- a/tools/imagetool.h ++++ b/tools/imagetool.h +@@ -270,17 +270,20 @@ int rockchip_copy_image(int fd, struct image_tool_params *mparams); + * b) we need a API call to get the respective section symbols */ + #if defined(__MACH__) + #include ++#include + + #define INIT_SECTION(name) do { \ + unsigned long name ## _len; \ +- char *__cat(pstart_, name) = getsectdata("__TEXT", \ ++ char *__cat(pstart_, name) = getsectdata("__DATA", \ + #name, &__cat(name, _len)); \ ++ __cat(pstart_, name) += \ ++ _dyld_get_image_vmaddr_slide(0); \ + char *__cat(pstop_, name) = __cat(pstart_, name) + \ + __cat(name, _len); \ + __cat(__start_, name) = (void *)__cat(pstart_, name); \ + __cat(__stop_, name) = (void *)__cat(pstop_, name); \ + } while (0) +-#define SECTION(name) __attribute__((section("__TEXT, " #name))) ++#define SECTION(name) __attribute__((section("__DATA, " #name))) + + struct image_type_params **__start_image_type, **__stop_image_type; + #else From 0ee3e2beba559f8fb316ab284f255f92af1365e2 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 3 Mar 2021 17:59:58 -0800 Subject: [PATCH 33/65] tools/cpio: fix compilation with clang A define dealing with builtin type is wrong. A gnulib update fixes this, but that requires a new cpio version. Refresh other patch. Signed-off-by: Rosen Penev --- tools/cpio/patches/001-duplicate-program-name.patch | 2 -- tools/cpio/patches/010-clang.patch | 11 +++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 tools/cpio/patches/010-clang.patch diff --git a/tools/cpio/patches/001-duplicate-program-name.patch b/tools/cpio/patches/001-duplicate-program-name.patch index 57ff4c3cad..a7c3fbc8ae 100644 --- a/tools/cpio/patches/001-duplicate-program-name.patch +++ b/tools/cpio/patches/001-duplicate-program-name.patch @@ -4,8 +4,6 @@ https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=641d3f489cf6238bb916368d4b * src/global.c: Remove superfluous declaration of program_name -diff --git a/src/global.c b/src/global.c -index fb3abe9..acf92bc 100644 --- a/src/global.c +++ b/src/global.c @@ -184,9 +184,6 @@ unsigned int warn_option = 0; diff --git a/tools/cpio/patches/010-clang.patch b/tools/cpio/patches/010-clang.patch new file mode 100644 index 0000000000..89c7a8149e --- /dev/null +++ b/tools/cpio/patches/010-clang.patch @@ -0,0 +1,11 @@ +--- a/gnu/xalloc-oversized.h ++++ b/gnu/xalloc-oversized.h +@@ -52,7 +52,7 @@ typedef size_t __xalloc_count_type; + #elif ((5 <= __GNUC__ \ + || (__has_builtin (__builtin_mul_overflow) \ + && __has_builtin (__builtin_constant_p))) \ +- && !__STRICT_ANSI__) ++ && !__STRICT_ANSI__) && !defined(__clang__) + # define xalloc_oversized(n, s) \ + (__builtin_constant_p (n) && __builtin_constant_p (s) \ + ? __xalloc_oversized (n, s) \ From e07c42952e4473136363c090cdd47101742ae4b2 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 22 Nov 2021 00:38:36 -0800 Subject: [PATCH 34/65] tools/cmake: update to 3.22.0 Refreshed patches. Signed-off-by: Rosen Penev --- tools/cmake/Makefile | 4 ++-- tools/cmake/patches/120-curl-fix-libressl-linking.patch | 2 +- tools/cmake/patches/130-bootstrap_parallel_make_flag.patch | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/cmake/Makefile b/tools/cmake/Makefile index df61c83158..9819176713 100644 --- a/tools/cmake/Makefile +++ b/tools/cmake/Makefile @@ -7,14 +7,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cmake -PKG_VERSION:=3.21.3 +PKG_VERSION:=3.22.0 PKG_RELEASE:=1 PKG_CPE_ID:=cpe:/a:kitware:cmake PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/Kitware/CMake/releases/download/v$(PKG_VERSION)/ \ https://cmake.org/files/v3.19/ -PKG_HASH:=d14d06df4265134ee42c4d50f5a60cb8b471b7b6a47da8e5d914d49dd783794f +PKG_HASH:=998c7ba34778d2dfdb3df8a695469e24b11e2bfa21fbe41b361a3f45e1c9345e HOST_BUILD_PARALLEL:=1 HOST_CONFIGURE_PARALLEL:=1 diff --git a/tools/cmake/patches/120-curl-fix-libressl-linking.patch b/tools/cmake/patches/120-curl-fix-libressl-linking.patch index 97ef5ceb00..fd05d106c8 100644 --- a/tools/cmake/patches/120-curl-fix-libressl-linking.patch +++ b/tools/cmake/patches/120-curl-fix-libressl-linking.patch @@ -20,7 +20,7 @@ Signed-off-by: Jo-Philipp Wich --- --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt -@@ -528,6 +528,14 @@ if(CMAKE_USE_OPENSSL) +@@ -565,6 +565,14 @@ if(CMAKE_USE_OPENSSL) endif() set(SSL_ENABLED ON) set(USE_OPENSSL ON) diff --git a/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch b/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch index 3822cba166..dd66989c98 100644 --- a/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch +++ b/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch @@ -1,6 +1,6 @@ --- a/bootstrap +++ b/bootstrap -@@ -1420,7 +1420,10 @@ int main(){ printf("1%c", (char)0x0a); r +@@ -1423,7 +1423,10 @@ int main(){ printf("1%c", (char)0x0a); r ' > "test.c" cmake_original_make_flags="${cmake_make_flags}" if test "x${cmake_parallel_make}" != "x"; then From f4ce68f8170fb068eddf9a536a09424dfba1b1a9 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 22 Nov 2021 00:49:50 -0800 Subject: [PATCH 35/65] tools/ccache: update to 4.5.1 Signed-off-by: Rosen Penev --- tools/ccache/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ccache/Makefile b/tools/ccache/Makefile index 081cc46dd0..1031fdec99 100644 --- a/tools/ccache/Makefile +++ b/tools/ccache/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk PKG_NAME:=ccache -PKG_VERSION:=4.4.2 +PKG_VERSION:=4.5.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://github.com/ccache/ccache/releases/download/v$(PKG_VERSION) -PKG_HASH:=9200cafbaa5fd62c2600fccb40a18214e57747825e6cdcd76688b4b61c2dcba0 +PKG_HASH:=51186ebe0326365f4e6131e1caa8911de7da4aa6718efc00680322d63a759517 include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/cmake.mk From 9b72f9f7bbad99c6e732942c1cca3993e8348c27 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Thu, 16 Dec 2021 19:57:46 +0800 Subject: [PATCH 36/65] r8152: remove upstreamed patch Fixes: 15228d688ec30e ("r8152: Update to 2.15.20211119") Signed-off-by: Tianling Shen --- ...not_on_list-was-backported-since-ker.patch | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 package/kernel/r8152/patches/010-compat-skb_mark_not_on_list-was-backported-since-ker.patch diff --git a/package/kernel/r8152/patches/010-compat-skb_mark_not_on_list-was-backported-since-ker.patch b/package/kernel/r8152/patches/010-compat-skb_mark_not_on_list-was-backported-since-ker.patch deleted file mode 100644 index fdbf842538..0000000000 --- a/package/kernel/r8152/patches/010-compat-skb_mark_not_on_list-was-backported-since-ker.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b61b90b9aea30b944fc51b891dab3ab5eb30980c Mon Sep 17 00:00:00 2001 -From: Tianling Shen -Date: Sat, 29 May 2021 00:46:25 +0800 -Subject: [PATCH] compat: skb_mark_not_on_list was backported since kernel - 4.14.217 and 4.19.10 - -Signed-off-by: Tianling Shen ---- - compatibility.h | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/compatibility.h -+++ b/compatibility.h -@@ -548,10 +548,12 @@ - linkmode_clear_bit(nr, addr); - } - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,217) || LINUX_VERSION_CODE < KERNEL_VERSION(4,19,10) - static inline void skb_mark_not_on_list(struct sk_buff *skb) - { - skb->next = NULL; - } -+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,14,217) || LINUX_VERSION_CODE < KERNEL_VERSION(4,19,10) */ - #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0) */ - #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,1,0) */ - #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0) */ From 08a01c9be48f9bff5cbc9a687163f9a1c6c02ceb Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Tue, 14 Dec 2021 23:10:09 +0800 Subject: [PATCH 37/65] Revert "tools/mkimage: fix build on MacOS arm64" This reverts commit 956511e802eab3cc7b00fa5efa7f607a1c5c829f. Closed: #534 --- .../patches/090-macos-arm64-builing-fix.patch | 47 ------------------- 1 file changed, 47 deletions(-) delete mode 100644 tools/mkimage/patches/090-macos-arm64-builing-fix.patch diff --git a/tools/mkimage/patches/090-macos-arm64-builing-fix.patch b/tools/mkimage/patches/090-macos-arm64-builing-fix.patch deleted file mode 100644 index 216a8abd35..0000000000 --- a/tools/mkimage/patches/090-macos-arm64-builing-fix.patch +++ /dev/null @@ -1,47 +0,0 @@ -This patch fixes compilation issues on MacOS arm64. -Based on discussion -https://github.com/u-boot/u-boot/commit/3b142045e8a7f0ab17b6099e9226296af45967d0 - -diff --git a/Makefile b/Makefile -index b4f1cbc..551041f 100644 ---- a/Makefile -+++ b/Makefile -@@ -324,11 +324,6 @@ HOSTCC = $(call os_x_before, 10, 5, "cc", "gcc") - KBUILD_HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp") - KBUILD_HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress") - --# since Lion (10.7) ASLR is on by default, but we use linker generated lists --# in some host tools which is a problem then ... so disable ASLR for these --# tools --KBUILD_HOSTLDFLAGS += $(call os_x_before, 10, 7, "", "-Xlinker -no_pie") -- - # macOS Mojave (10.14.X) - # Undefined symbols for architecture x86_64: "_PyArg_ParseTuple" - KBUILD_HOSTLDFLAGS += $(call os_x_after, 10, 14, "-lpython -dynamclib", "") -diff --git a/tools/imagetool.h b/tools/imagetool.h -index 8726792..d1b72ef 100644 ---- a/tools/imagetool.h -+++ b/tools/imagetool.h -@@ -270,17 +270,20 @@ int rockchip_copy_image(int fd, struct image_tool_params *mparams); - * b) we need a API call to get the respective section symbols */ - #if defined(__MACH__) - #include -+#include - - #define INIT_SECTION(name) do { \ - unsigned long name ## _len; \ -- char *__cat(pstart_, name) = getsectdata("__TEXT", \ -+ char *__cat(pstart_, name) = getsectdata("__DATA", \ - #name, &__cat(name, _len)); \ -+ __cat(pstart_, name) += \ -+ _dyld_get_image_vmaddr_slide(0); \ - char *__cat(pstop_, name) = __cat(pstart_, name) + \ - __cat(name, _len); \ - __cat(__start_, name) = (void *)__cat(pstart_, name); \ - __cat(__stop_, name) = (void *)__cat(pstop_, name); \ - } while (0) --#define SECTION(name) __attribute__((section("__TEXT, " #name))) -+#define SECTION(name) __attribute__((section("__DATA, " #name))) - - struct image_type_params **__start_image_type, **__stop_image_type; - #else From 2401349c4528f21d3fb75249a85b834fb0789fd9 Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Thu, 16 May 2019 17:23:12 +0200 Subject: [PATCH 38/65] kernel: btrfs: enable ACL By default CONFIG_BTRFS_FS_POSIX_ACL is disabled, it should be enabled only when you enable CONFIG_FS_POSIX_ACL. Right now, when you enable CONFIG_FS_POSIX_ACL it will enable CONFIG_BTRFS_FS_POSIX_ACL, but it will be disabled once you install kmod-btrfs. This should prevent it. Btrfs has enabled by default ACL for mount option. More details: https://cateee.net/lkddb/web-lkddb/BTRFS_FS_POSIX_ACL.html https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs(5) Signed-off-by: Josef Schlehofer --- package/kernel/linux/modules/fs.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk index 0bece2abaa..39b33a8acd 100644 --- a/package/kernel/linux/modules/fs.mk +++ b/package/kernel/linux/modules/fs.mk @@ -71,7 +71,6 @@ define KernelPackage/fs-btrfs DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +!LINUX_4_9:kmod-lib-zstd KCONFIG:=\ CONFIG_BTRFS_FS \ - CONFIG_BTRFS_FS_POSIX_ACL=n \ CONFIG_BTRFS_FS_CHECK_INTEGRITY=n FILES:=\ $(LINUX_DIR)/fs/btrfs/btrfs.ko From f2e6d21d323b9e52ce3dc935761e9def019b6e1a Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Fri, 25 Jun 2021 11:31:23 +0200 Subject: [PATCH 39/65] kernel: add kmod-video-gspca-sq930x This module adds support for USB WebCams, which uses SQ930X chip [1]. [1] https://cateee.net/lkddb/web-lkddb/USB_GSPCA_SQ930X.html Signed-off-by: Josef Schlehofer --- package/kernel/linux/modules/video.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index 9a22583ef4..87f1ead06f 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -882,6 +882,21 @@ endef $(eval $(call KernelPackage,video-gspca-sq905c)) +define KernelPackage/video-gspca-sq930x + TITLE:=sq930x webcam support + KCONFIG:=CONFIG_USB_GSPCA_SQ930X + FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_sq930x.ko + AUTOLOAD:=$(call AutoProbe,gspca_sq930x) + $(call AddDepends/camera-gspca) +endef + +define KernelPackage/video-gspca-sq930x/description + The SQ Technologies SQ930X based USB Camera Driver (sq930x) kernel module +endef + +$(eval $(call KernelPackage,video-gspca-sq930x)) + + define KernelPackage/video-gspca-stk014 TITLE:=stk014 webcam support KCONFIG:=CONFIG_USB_GSPCA_STK014 From 1fbc7acc6da7d3c7126446c92106e8f4129ffc12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Old=C5=99ich=20Jedli=C4=8Dka?= Date: Sat, 9 Jan 2021 22:23:09 +0100 Subject: [PATCH 40/65] x86: added support to generate VHDX images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added support to generate dynamic-sized VHDX images for Hyper-V. Compile-tested on x86 and run-tested on Windows 10 21H2 (Hyper-V). Signed-off-by: Oldřich Jedlička --- include/image-commands.mk | 2 +- target/linux/x86/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index 381bdc0c7a..83f76c2b55 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -422,7 +422,7 @@ define Build/append-metadata endef # Convert a raw image into a $1 type image. -# E.g. | qemu-image vdi +# E.g. | qemu-image vdi define Build/qemu-image qemu-img convert -f raw -O $1 $@ $@.new @mv $@.new $@ diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile index 3d03e20b05..91322c9c61 100644 --- a/target/linux/x86/Makefile +++ b/target/linux/x86/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk ARCH:=i386 BOARD:=x86 BOARDNAME:=x86 -FEATURES:=squashfs ext4 vdi vmdk pcmcia targz fpu boot-part rootfs-part +FEATURES:=squashfs ext4 vdi vmdk vhdx pcmcia targz fpu boot-part rootfs-part SUBTARGETS:=64 generic zen legacy geode MAINTAINER:=Felix Fietkau From a2b7fdb1bea1a591cc3d8097a290fa4da75b98a6 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 12 Dec 2021 21:43:21 +0100 Subject: [PATCH 41/65] mac80211: Update to version 4.19.221 The following patch was backported from upstream before and is not needed any more: package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch Signed-off-by: Hauke Mehrtens (cherry picked from commit cc8c1be438a3d19fec06b72b1e7854f31b9e2f71) --- package/kernel/mac80211/Makefile | 6 +-- .../patches/ath/542-ath9k_debugfs_diag.patch | 4 +- .../ath/551-ath9k_ubnt_uap_plus_hsr.patch | 4 +- ...-of-peer_bw_rxnss_override-parameter.patch | 2 +- ...rolling-support-for-various-chipsets.patch | 2 +- ...980-ath10k-fix-max-antenna-gain-unit.patch | 49 ------------------- .../100-remove-cryptoapi-dependencies.patch | 10 ++-- .../subsys/140-tweak-TSQ-setting.patch | 2 +- ...d-stop-start-logic-for-software-TXQs.patch | 4 +- .../320-mac80211-Add-TXQ-scheduling-API.patch | 2 +- ...time-accounting-and-scheduling-to-TX.patch | 4 +- ...pose-ieee80211_schedule_txq-function.patch | 2 +- ...0211-add-hdrlen-to-ieee80211_tx_data.patch | 12 ++--- ...1-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch | 16 +++--- ...locking-for-txq-scheduling-airtime-f.patch | 10 ++-- ...op-redundant-rcu_read_lock-unlock-ca.patch | 2 +- ...te-hash-for-fq-without-holding-fq-lo.patch | 6 +-- ...e-dequeue-late-tx-handlers-without-h.patch | 8 +-- ...ee80211_schedule_txq-schedule-empty-.patch | 6 +-- ...ing-iTXQ-select-the-queue-in-ieee802.patch | 4 +- ...E80211_KEY_FLAG_GENERATE_MMIE-to-iee.patch | 4 +- 21 files changed, 55 insertions(+), 104 deletions(-) delete mode 100644 package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index ff75b4167e..ef4c3758c4 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 -PKG_VERSION:=4.19.207-1 +PKG_VERSION:=4.19.221-1 PKG_RELEASE:=1 -PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.19.207/ -PKG_HASH:=e119fd57c868e22c0481171ff561902f8c1565f896d97a2163c0d138808cc5f7 +PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.19.221/ +PKG_HASH:=343f54b21ddda4bc79c0457a7fa88356d430b802f86194abc20fe09c12559b05 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION) diff --git a/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch index 19bbee09a9..0bfe3ab683 100644 --- a/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch +++ b/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch @@ -125,9 +125,9 @@ REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON); --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -533,6 +533,11 @@ irqreturn_t ath_isr(int irq, void *dev) - if (test_bit(ATH_OP_HW_RESET, &common->op_flags)) +@@ -535,6 +535,11 @@ irqreturn_t ath_isr(int irq, void *dev) return IRQ_HANDLED; + } + if (test_bit(ATH_DIAG_TRIGGER_ERROR, &ah->diag)) { + status |= ATH9K_INT_FATAL; diff --git a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch index 08b92d4a86..e39c53086f 100644 --- a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch +++ b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch @@ -343,7 +343,7 @@ u8 ath9k_parse_mpdudensity(u8 mpdudensity) { -@@ -654,6 +656,7 @@ void ath_reset_work(struct work_struct * +@@ -656,6 +658,7 @@ void ath_reset_work(struct work_struct * static int ath9k_start(struct ieee80211_hw *hw) { struct ath_softc *sc = hw->priv; @@ -351,7 +351,7 @@ struct ath_hw *ah = sc->sc_ah; struct ath_common *common = ath9k_hw_common(ah); struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan; -@@ -732,6 +735,11 @@ static int ath9k_start(struct ieee80211_ +@@ -734,6 +737,11 @@ static int ath9k_start(struct ieee80211_ AR_GPIO_OUTPUT_MUX_AS_OUTPUT); } diff --git a/package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch b/package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch index 64772e8d9d..9b96535b6d 100644 --- a/package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch +++ b/package/kernel/mac80211/patches/ath/972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch @@ -121,7 +121,7 @@ v9: use SM/MS macros from code.h to simplify shift/mask handling static int --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h -@@ -6357,7 +6357,19 @@ struct wmi_10_2_peer_assoc_complete_cmd +@@ -6360,7 +6360,19 @@ struct wmi_10_2_peer_assoc_complete_cmd __le32 info0; /* WMI_PEER_ASSOC_INFO0_ */ } __packed; diff --git a/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch index 94ee41c9e2..fb8c5ed90f 100644 --- a/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch +++ b/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch @@ -573,7 +573,7 @@ v13: int ath10k_wmi_attach(struct ath10k *ar) --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h -@@ -2942,6 +2942,41 @@ enum wmi_10_4_feature_mask { +@@ -2945,6 +2945,41 @@ enum wmi_10_4_feature_mask { }; diff --git a/package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch b/package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch deleted file mode 100644 index 8a675e4fb1..0000000000 --- a/package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Sven Eckelmann -Date: Tue, 11 Jun 2019 13:58:35 +0200 -Subject: ath10k: fix max antenna gain unit - -Most of the txpower for the ath10k firmware is stored as twicepower (0.5 dB -steps). This isn't the case for max_antenna_gain - which is still expected -by the firmware as dB. - -The firmware is converting it from dB to the internal (twicepower) -representation when it calculates the limits of a channel. This can be seen -in tpc_stats when configuring "12" as max_antenna_gain. Instead of the -expected 12 (6 dB), the tpc_stats shows 24 (12 dB). - -Tested on QCA9888 and IPQ4019 with firmware 10.4-3.5.3-00057. - -Fixes: 02256930d9b8 ("ath10k: use proper tx power unit") -Signed-off-by: Sven Eckelmann - -Forwarded: https://patchwork.kernel.org/patch/10986723/ - ---- a/drivers/net/wireless/ath/ath10k/mac.c -+++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -1020,7 +1020,7 @@ static int ath10k_monitor_vdev_start(str - arg.channel.min_power = 0; - arg.channel.max_power = channel->max_power * 2; - arg.channel.max_reg_power = channel->max_reg_power * 2; -- arg.channel.max_antenna_gain = channel->max_antenna_gain * 2; -+ arg.channel.max_antenna_gain = channel->max_antenna_gain; - - reinit_completion(&ar->vdev_setup_done); - -@@ -1462,7 +1462,7 @@ static int ath10k_vdev_start_restart(str - arg.channel.min_power = 0; - arg.channel.max_power = chandef->chan->max_power * 2; - arg.channel.max_reg_power = chandef->chan->max_reg_power * 2; -- arg.channel.max_antenna_gain = chandef->chan->max_antenna_gain * 2; -+ arg.channel.max_antenna_gain = chandef->chan->max_antenna_gain; - - if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { - arg.ssid = arvif->u.ap.ssid; -@@ -3143,7 +3143,7 @@ static int ath10k_update_channel_list(st - ch->min_power = 0; - ch->max_power = channel->max_power * 2; - ch->max_reg_power = channel->max_reg_power * 2; -- ch->max_antenna_gain = channel->max_antenna_gain * 2; -+ ch->max_antenna_gain = channel->max_antenna_gain; - ch->reg_class_id = 0; /* FIXME */ - - /* FIXME: why use only legacy modes, why not any diff --git a/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch b/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch index 540ad5025e..523cbc2334 100644 --- a/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch +++ b/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch @@ -445,7 +445,7 @@ } -@@ -546,13 +545,13 @@ ieee80211_crypto_ccmp_decrypt(struct iee +@@ -549,13 +548,13 @@ ieee80211_crypto_ccmp_decrypt(struct iee u8 aad[2 * AES_BLOCK_SIZE]; u8 b_0[AES_BLOCK_SIZE]; /* hardware didn't decrypt/verify MIC */ @@ -461,7 +461,7 @@ return RX_DROP_UNUSABLE; } -@@ -649,7 +648,7 @@ static int gcmp_encrypt_skb(struct ieee8 +@@ -652,7 +651,7 @@ static int gcmp_encrypt_skb(struct ieee8 u8 *pos; u8 pn[6]; u64 pn64; @@ -470,7 +470,7 @@ u8 j_0[AES_BLOCK_SIZE]; if (info->control.hw_key && -@@ -706,8 +705,10 @@ static int gcmp_encrypt_skb(struct ieee8 +@@ -709,8 +708,10 @@ static int gcmp_encrypt_skb(struct ieee8 pos += IEEE80211_GCMP_HDR_LEN; gcmp_special_blocks(skb, pn, j_0, aad); @@ -483,7 +483,7 @@ } ieee80211_tx_result -@@ -1132,9 +1133,9 @@ ieee80211_crypto_aes_gmac_encrypt(struct +@@ -1138,9 +1139,9 @@ ieee80211_crypto_aes_gmac_encrypt(struct struct ieee80211_key *key = tx->key; struct ieee80211_mmie_16 *mmie; struct ieee80211_hdr *hdr; @@ -495,7 +495,7 @@ if (WARN_ON(skb_queue_len(&tx->skbs) != 1)) return TX_DROP; -@@ -1180,7 +1181,7 @@ ieee80211_crypto_aes_gmac_decrypt(struct +@@ -1186,7 +1187,7 @@ ieee80211_crypto_aes_gmac_decrypt(struct struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); struct ieee80211_key *key = rx->key; struct ieee80211_mmie_16 *mmie; diff --git a/package/kernel/mac80211/patches/subsys/140-tweak-TSQ-setting.patch b/package/kernel/mac80211/patches/subsys/140-tweak-TSQ-setting.patch index 5b822126e4..faab81b7d0 100644 --- a/package/kernel/mac80211/patches/subsys/140-tweak-TSQ-setting.patch +++ b/package/kernel/mac80211/patches/subsys/140-tweak-TSQ-setting.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3841,6 +3841,12 @@ out: +@@ -3853,6 +3853,12 @@ out: netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, struct net_device *dev) { diff --git a/package/kernel/mac80211/patches/subsys/300-mac80211-add-stop-start-logic-for-software-TXQs.patch b/package/kernel/mac80211/patches/subsys/300-mac80211-add-stop-start-logic-for-software-TXQs.patch index 29b3184fba..add59d3a69 100644 --- a/package/kernel/mac80211/patches/subsys/300-mac80211-add-stop-start-logic-for-software-TXQs.patch +++ b/package/kernel/mac80211/patches/subsys/300-mac80211-add-stop-start-logic-for-software-TXQs.patch @@ -100,7 +100,7 @@ Signed-off-by: Johannes Berg (unsigned long) local); --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3506,13 +3506,19 @@ struct sk_buff *ieee80211_tx_dequeue(str +@@ -3518,13 +3518,19 @@ struct sk_buff *ieee80211_tx_dequeue(str struct ieee80211_tx_info *info; struct ieee80211_tx_data tx; ieee80211_tx_result r; @@ -122,7 +122,7 @@ Signed-off-by: Johannes Berg /* Make sure fragments stay together. */ skb = __skb_dequeue(&txqi->frags); if (skb) -@@ -3625,6 +3631,7 @@ begin: +@@ -3637,6 +3643,7 @@ begin: } IEEE80211_SKB_CB(skb)->control.vif = vif; diff --git a/package/kernel/mac80211/patches/subsys/320-mac80211-Add-TXQ-scheduling-API.patch b/package/kernel/mac80211/patches/subsys/320-mac80211-Add-TXQ-scheduling-API.patch index 796222c527..2bc2efb283 100644 --- a/package/kernel/mac80211/patches/subsys/320-mac80211-Add-TXQ-scheduling-API.patch +++ b/package/kernel/mac80211/patches/subsys/320-mac80211-Add-TXQ-scheduling-API.patch @@ -229,7 +229,7 @@ Signed-off-by: Johannes Berg return true; } -@@ -3639,6 +3643,60 @@ out: +@@ -3651,6 +3655,60 @@ out: } EXPORT_SYMBOL(ieee80211_tx_dequeue); diff --git a/package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch b/package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch index 3821152805..f94073a4ca 100644 --- a/package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch +++ b/package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch @@ -412,7 +412,7 @@ Signed-off-by: Johannes Berg spin_lock_bh(&local->active_txq_lock[txqi->txq.ac]); list_del_init(&txqi->schedule_order); spin_unlock_bh(&local->active_txq_lock[txqi->txq.ac]); -@@ -3650,11 +3653,28 @@ struct ieee80211_txq *ieee80211_next_txq +@@ -3662,11 +3665,28 @@ struct ieee80211_txq *ieee80211_next_txq lockdep_assert_held(&local->active_txq_lock[ac]); @@ -442,7 +442,7 @@ Signed-off-by: Johannes Berg return NULL; list_del_init(&txqi->schedule_order); -@@ -3672,12 +3692,74 @@ void ieee80211_return_txq(struct ieee802 +@@ -3684,12 +3704,74 @@ void ieee80211_return_txq(struct ieee802 lockdep_assert_held(&local->active_txq_lock[txq->ac]); if (list_empty(&txqi->schedule_order) && diff --git a/package/kernel/mac80211/patches/subsys/323-mac80211-Expose-ieee80211_schedule_txq-function.patch b/package/kernel/mac80211/patches/subsys/323-mac80211-Expose-ieee80211_schedule_txq-function.patch index 86988f7934..59cb351297 100644 --- a/package/kernel/mac80211/patches/subsys/323-mac80211-Expose-ieee80211_schedule_txq-function.patch +++ b/package/kernel/mac80211/patches/subsys/323-mac80211-Expose-ieee80211_schedule_txq-function.patch @@ -51,7 +51,7 @@ Signed-off-by: Johannes Berg --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3712,6 +3712,19 @@ void ieee80211_return_txq(struct ieee802 +@@ -3724,6 +3724,19 @@ void ieee80211_return_txq(struct ieee802 } EXPORT_SYMBOL(ieee80211_return_txq); diff --git a/package/kernel/mac80211/patches/subsys/350-mac80211-add-hdrlen-to-ieee80211_tx_data.patch b/package/kernel/mac80211/patches/subsys/350-mac80211-add-hdrlen-to-ieee80211_tx_data.patch index 65b284f874..0be1189598 100644 --- a/package/kernel/mac80211/patches/subsys/350-mac80211-add-hdrlen-to-ieee80211_tx_data.patch +++ b/package/kernel/mac80211/patches/subsys/350-mac80211-add-hdrlen-to-ieee80211_tx_data.patch @@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau if (likely(sta)) { if (!IS_ERR(sta)) tx->sta = sta; -@@ -3544,6 +3544,7 @@ begin: +@@ -3556,6 +3556,7 @@ begin: tx.local = local; tx.skb = skb; tx.sdata = vif_to_sdata(info->control.vif); @@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau if (txq->sta) { tx.sta = container_of(txq->sta, struct sta_info, sta); -@@ -3588,7 +3589,7 @@ begin: +@@ -3600,7 +3601,7 @@ begin: if (tx.key && (tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV)) @@ -65,7 +65,7 @@ Signed-off-by: Felix Fietkau ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs, tx.key, skb); -@@ -4047,6 +4048,7 @@ ieee80211_build_data_template(struct iee +@@ -4059,6 +4060,7 @@ ieee80211_build_data_template(struct iee hdr = (void *)skb->data; tx.sta = sta_info_get(sdata, hdr->addr1); tx.skb = skb; @@ -199,7 +199,7 @@ Signed-off-by: Felix Fietkau len = skb->len - hdrlen; if (info->control.hw_key) -@@ -663,7 +662,7 @@ static int gcmp_encrypt_skb(struct ieee8 +@@ -666,7 +665,7 @@ static int gcmp_encrypt_skb(struct ieee8 return 0; } @@ -208,7 +208,7 @@ Signed-off-by: Felix Fietkau len = skb->len - hdrlen; if (info->control.hw_key) -@@ -805,7 +804,6 @@ static ieee80211_tx_result +@@ -811,7 +810,6 @@ static ieee80211_tx_result ieee80211_crypto_cs_encrypt(struct ieee80211_tx_data *tx, struct sk_buff *skb) { @@ -216,7 +216,7 @@ Signed-off-by: Felix Fietkau struct ieee80211_key *key = tx->key; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); int hdrlen; -@@ -821,8 +819,7 @@ ieee80211_crypto_cs_encrypt(struct ieee8 +@@ -827,8 +825,7 @@ ieee80211_crypto_cs_encrypt(struct ieee8 pskb_expand_head(skb, iv_len, 0, GFP_ATOMIC))) return TX_DROP; diff --git a/package/kernel/mac80211/patches/subsys/351-mac80211-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch b/package/kernel/mac80211/patches/subsys/351-mac80211-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch index 971ef9727f..2bb05b3f1a 100644 --- a/package/kernel/mac80211/patches/subsys/351-mac80211-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch +++ b/package/kernel/mac80211/patches/subsys/351-mac80211-add-TX_NEEDS_ALIGNED4_SKBS-hw-flag.patch @@ -94,7 +94,7 @@ Signed-off-by: Felix Fietkau ret = dev_alloc_name(ndev, ndev->name); --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c -@@ -106,13 +106,15 @@ void mesh_path_assign_nexthop(struct mes +@@ -109,13 +109,15 @@ void mesh_path_assign_nexthop(struct mes static void prepare_for_gate(struct sk_buff *skb, char *dst_addr, struct mesh_path *gate_mpath) { @@ -227,7 +227,7 @@ Signed-off-by: Felix Fietkau if (likely(sta)) { if (!IS_ERR(sta)) -@@ -2239,7 +2238,7 @@ netdev_tx_t ieee80211_monitor_start_xmit +@@ -2243,7 +2242,7 @@ netdev_tx_t ieee80211_monitor_start_xmit goto fail; hdr = (struct ieee80211_hdr *)(skb->data + len_rthdr); @@ -236,7 +236,7 @@ Signed-off-by: Felix Fietkau if (skb->len < len_rthdr + hdrlen) goto fail; -@@ -2458,7 +2457,7 @@ static struct sk_buff *ieee80211_build_h +@@ -2462,7 +2461,7 @@ static struct sk_buff *ieee80211_build_h struct ieee80211_chanctx_conf *chanctx_conf; struct ieee80211_sub_if_data *ap_sdata; enum nl80211_band band; @@ -245,7 +245,7 @@ Signed-off-by: Felix Fietkau if (IS_ERR(sta)) sta = NULL; -@@ -2757,7 +2756,9 @@ static struct sk_buff *ieee80211_build_h +@@ -2761,7 +2760,9 @@ static struct sk_buff *ieee80211_build_h } skb_pull(skb, skip_header_bytes); @@ -255,7 +255,7 @@ Signed-off-by: Felix Fietkau /* * So we need to modify the skb header and hence need a copy of -@@ -2790,6 +2791,9 @@ static struct sk_buff *ieee80211_build_h +@@ -2794,6 +2795,9 @@ static struct sk_buff *ieee80211_build_h memcpy(skb_push(skb, meshhdrlen), &mesh_hdr, meshhdrlen); #endif @@ -265,7 +265,7 @@ Signed-off-by: Felix Fietkau if (ieee80211_is_data_qos(fc)) { __le16 *qos_control; -@@ -2966,6 +2970,8 @@ void ieee80211_check_fast_xmit(struct st +@@ -2970,6 +2974,8 @@ void ieee80211_check_fast_xmit(struct st fc |= cpu_to_le16(IEEE80211_STYPE_QOS_DATA); } @@ -274,7 +274,7 @@ Signed-off-by: Felix Fietkau /* We store the key here so there's no point in using rcu_dereference() * but that's fine because the code that changes the pointers will call * this function after doing so. For a single CPU that would be enough, -@@ -3544,7 +3550,7 @@ begin: +@@ -3556,7 +3562,7 @@ begin: tx.local = local; tx.skb = skb; tx.sdata = vif_to_sdata(info->control.vif); @@ -283,7 +283,7 @@ Signed-off-by: Felix Fietkau if (txq->sta) { tx.sta = container_of(txq->sta, struct sta_info, sta); -@@ -4048,7 +4054,7 @@ ieee80211_build_data_template(struct iee +@@ -4060,7 +4066,7 @@ ieee80211_build_data_template(struct iee hdr = (void *)skb->data; tx.sta = sta_info_get(sdata, hdr->addr1); tx.skb = skb; diff --git a/package/kernel/mac80211/patches/subsys/352-mac80211-rework-locking-for-txq-scheduling-airtime-f.patch b/package/kernel/mac80211/patches/subsys/352-mac80211-rework-locking-for-txq-scheduling-airtime-f.patch index 6784c065d0..0a5ae10d55 100644 --- a/package/kernel/mac80211/patches/subsys/352-mac80211-rework-locking-for-txq-scheduling-airtime-f.patch +++ b/package/kernel/mac80211/patches/subsys/352-mac80211-rework-locking-for-txq-scheduling-airtime-f.patch @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau * ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3656,16 +3656,17 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue); +@@ -3668,16 +3668,17 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue); struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac) { struct ieee80211_local *local = hw_to_local(hw); @@ -115,7 +115,7 @@ Signed-off-by: Felix Fietkau if (txqi->txq.sta) { struct sta_info *sta = container_of(txqi->txq.sta, -@@ -3682,21 +3683,25 @@ struct ieee80211_txq *ieee80211_next_txq +@@ -3694,21 +3695,25 @@ struct ieee80211_txq *ieee80211_next_txq if (txqi->schedule_round == local->schedule_round[ac]) @@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau if (list_empty(&txqi->schedule_order) && (!skb_queue_empty(&txqi->frags) || txqi->tin.backlog_packets)) { -@@ -3716,18 +3721,7 @@ void ieee80211_return_txq(struct ieee802 +@@ -3728,18 +3733,7 @@ void ieee80211_return_txq(struct ieee802 list_add_tail(&txqi->schedule_order, &local->active_txqs[txq->ac]); } @@ -165,7 +165,7 @@ Signed-off-by: Felix Fietkau spin_unlock_bh(&local->active_txq_lock[txq->ac]); } EXPORT_SYMBOL(ieee80211_schedule_txq); -@@ -3740,7 +3734,7 @@ bool ieee80211_txq_may_transmit(struct i +@@ -3752,7 +3746,7 @@ bool ieee80211_txq_may_transmit(struct i struct sta_info *sta; u8 ac = txq->ac; @@ -174,7 +174,7 @@ Signed-off-by: Felix Fietkau if (!txqi->txq.sta) goto out; -@@ -3770,34 +3764,27 @@ bool ieee80211_txq_may_transmit(struct i +@@ -3782,34 +3776,27 @@ bool ieee80211_txq_may_transmit(struct i sta->airtime[ac].deficit += sta->airtime_weight; list_move_tail(&txqi->schedule_order, &local->active_txqs[ac]); diff --git a/package/kernel/mac80211/patches/subsys/353-mac80211-mesh-drop-redundant-rcu_read_lock-unlock-ca.patch b/package/kernel/mac80211/patches/subsys/353-mac80211-mesh-drop-redundant-rcu_read_lock-unlock-ca.patch index 92dbcad676..d1dbc15e6a 100644 --- a/package/kernel/mac80211/patches/subsys/353-mac80211-mesh-drop-redundant-rcu_read_lock-unlock-ca.patch +++ b/package/kernel/mac80211/patches/subsys/353-mac80211-mesh-drop-redundant-rcu_read_lock-unlock-ca.patch @@ -85,7 +85,7 @@ Signed-off-by: Felix Fietkau void mesh_path_timer(struct timer_list *t) --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c -@@ -220,7 +220,7 @@ static struct mesh_path *mpath_lookup(st +@@ -223,7 +223,7 @@ static struct mesh_path *mpath_lookup(st { struct mesh_path *mpath; diff --git a/package/kernel/mac80211/patches/subsys/354-mac80211-calculate-hash-for-fq-without-holding-fq-lo.patch b/package/kernel/mac80211/patches/subsys/354-mac80211-calculate-hash-for-fq-without-holding-fq-lo.patch index d1cc04262d..e1d83f1315 100644 --- a/package/kernel/mac80211/patches/subsys/354-mac80211-calculate-hash-for-fq-without-holding-fq-lo.patch +++ b/package/kernel/mac80211/patches/subsys/354-mac80211-calculate-hash-for-fq-without-holding-fq-lo.patch @@ -111,7 +111,7 @@ Signed-off-by: Felix Fietkau schedule_and_wake_txq(local, txqi); -@@ -3219,6 +3220,7 @@ static bool ieee80211_amsdu_aggregate(st +@@ -3223,6 +3224,7 @@ static bool ieee80211_amsdu_aggregate(st u8 max_subframes = sta->sta.max_amsdu_subframes; int max_frags = local->hw.max_tx_fragments; int max_amsdu_len = sta->sta.max_amsdu_len; @@ -119,7 +119,7 @@ Signed-off-by: Felix Fietkau int orig_truesize; __be16 len; void *data; -@@ -3241,6 +3243,8 @@ static bool ieee80211_amsdu_aggregate(st +@@ -3245,6 +3247,8 @@ static bool ieee80211_amsdu_aggregate(st max_amsdu_len = min_t(int, max_amsdu_len, sta->sta.max_rc_amsdu_len); @@ -128,7 +128,7 @@ Signed-off-by: Felix Fietkau spin_lock_bh(&fq->lock); /* TODO: Ideally aggregation should be done on dequeue to remain -@@ -3248,7 +3252,8 @@ static bool ieee80211_amsdu_aggregate(st +@@ -3252,7 +3256,8 @@ static bool ieee80211_amsdu_aggregate(st */ tin = &txqi->tin; diff --git a/package/kernel/mac80211/patches/subsys/355-mac80211-run-late-dequeue-late-tx-handlers-without-h.patch b/package/kernel/mac80211/patches/subsys/355-mac80211-run-late-dequeue-late-tx-handlers-without-h.patch index ceeb6e41c2..14fb667bac 100644 --- a/package/kernel/mac80211/patches/subsys/355-mac80211-run-late-dequeue-late-tx-handlers-without-h.patch +++ b/package/kernel/mac80211/patches/subsys/355-mac80211-run-late-dequeue-late-tx-handlers-without-h.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3526,6 +3526,7 @@ struct sk_buff *ieee80211_tx_dequeue(str +@@ -3538,6 +3538,7 @@ struct sk_buff *ieee80211_tx_dequeue(str ieee80211_tx_result r; struct ieee80211_vif *vif = txq->vif; @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau spin_lock_bh(&fq->lock); if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags) || -@@ -3542,11 +3543,12 @@ struct sk_buff *ieee80211_tx_dequeue(str +@@ -3554,11 +3555,12 @@ struct sk_buff *ieee80211_tx_dequeue(str if (skb) goto out; @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau hdr = (struct ieee80211_hdr *)skb->data; info = IEEE80211_SKB_CB(skb); -@@ -3610,8 +3612,11 @@ begin: +@@ -3622,8 +3624,11 @@ begin: skb = __skb_dequeue(&tx.skbs); @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau } if (skb && skb_has_frag_list(skb) && -@@ -3650,6 +3655,7 @@ begin: +@@ -3662,6 +3667,7 @@ begin: } IEEE80211_SKB_CB(skb)->control.vif = vif; diff --git a/package/kernel/mac80211/patches/subsys/358-mac80211-make-ieee80211_schedule_txq-schedule-empty-.patch b/package/kernel/mac80211/patches/subsys/358-mac80211-make-ieee80211_schedule_txq-schedule-empty-.patch index d7b3a71236..4fab06313a 100644 --- a/package/kernel/mac80211/patches/subsys/358-mac80211-make-ieee80211_schedule_txq-schedule-empty-.patch +++ b/package/kernel/mac80211/patches/subsys/358-mac80211-make-ieee80211_schedule_txq-schedule-empty-.patch @@ -72,7 +72,7 @@ Signed-off-by: Felix Fietkau /** --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3706,8 +3706,9 @@ out: +@@ -3718,8 +3718,9 @@ out: } EXPORT_SYMBOL(ieee80211_next_txq); @@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau { struct ieee80211_local *local = hw_to_local(hw); struct txq_info *txqi = to_txq_info(txq); -@@ -3715,7 +3716,8 @@ void ieee80211_schedule_txq(struct ieee8 +@@ -3727,7 +3728,8 @@ void ieee80211_schedule_txq(struct ieee8 spin_lock_bh(&local->active_txq_lock[txq->ac]); if (list_empty(&txqi->schedule_order) && @@ -94,7 +94,7 @@ Signed-off-by: Felix Fietkau /* If airtime accounting is active, always enqueue STAs at the * head of the list to ensure that they only get moved to the * back by the airtime DRR scheduler once they have a negative -@@ -3735,7 +3737,7 @@ void ieee80211_schedule_txq(struct ieee8 +@@ -3747,7 +3749,7 @@ void ieee80211_schedule_txq(struct ieee8 spin_unlock_bh(&local->active_txq_lock[txq->ac]); } diff --git a/package/kernel/mac80211/patches/subsys/360-mac80211-when-using-iTXQ-select-the-queue-in-ieee802.patch b/package/kernel/mac80211/patches/subsys/360-mac80211-when-using-iTXQ-select-the-queue-in-ieee802.patch index 1abe82ea6d..2cf81f52a6 100644 --- a/package/kernel/mac80211/patches/subsys/360-mac80211-when-using-iTXQ-select-the-queue-in-ieee802.patch +++ b/package/kernel/mac80211/patches/subsys/360-mac80211-when-using-iTXQ-select-the-queue-in-ieee802.patch @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -3805,6 +3805,7 @@ void __ieee80211_subif_start_xmit(struct +@@ -3817,6 +3817,7 @@ void __ieee80211_subif_start_xmit(struct u32 ctrl_flags) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau struct sta_info *sta; struct sk_buff *next; -@@ -3818,7 +3819,15 @@ void __ieee80211_subif_start_xmit(struct +@@ -3830,7 +3831,15 @@ void __ieee80211_subif_start_xmit(struct if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) goto out_free; diff --git a/package/kernel/mac80211/patches/subsys/361-mac80211-add-IEEE80211_KEY_FLAG_GENERATE_MMIE-to-iee.patch b/package/kernel/mac80211/patches/subsys/361-mac80211-add-IEEE80211_KEY_FLAG_GENERATE_MMIE-to-iee.patch index 04431bf57a..1ccbecce4a 100644 --- a/package/kernel/mac80211/patches/subsys/361-mac80211-add-IEEE80211_KEY_FLAG_GENERATE_MMIE-to-iee.patch +++ b/package/kernel/mac80211/patches/subsys/361-mac80211-add-IEEE80211_KEY_FLAG_GENERATE_MMIE-to-iee.patch @@ -36,7 +36,7 @@ Signed-off-by: Johannes Berg /** --- a/net/mac80211/wpa.c +++ b/net/mac80211/wpa.c -@@ -952,7 +952,8 @@ ieee80211_crypto_aes_cmac_encrypt(struct +@@ -958,7 +958,8 @@ ieee80211_crypto_aes_cmac_encrypt(struct info = IEEE80211_SKB_CB(skb); @@ -46,7 +46,7 @@ Signed-off-by: Johannes Berg return TX_CONTINUE; if (WARN_ON(skb_tailroom(skb) < sizeof(*mmie))) -@@ -968,6 +969,9 @@ ieee80211_crypto_aes_cmac_encrypt(struct +@@ -974,6 +975,9 @@ ieee80211_crypto_aes_cmac_encrypt(struct bip_ipn_set64(mmie->sequence_number, pn64); From a8b5d5179019c25873f9d5aa7d2f88ca4d23f9f9 Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Fri, 5 Nov 2021 10:41:26 +0100 Subject: [PATCH 42/65] uboot-lantiq: danube: fix hanging lzma kernel uncompression At least since gcc 7.3.0 (OpenWrt 18.06) lwr/lwl are used in the assembly of LzmaProps_Decode. While the decission made by the compiler looks perfect fine, it triggers some obscure hang on lantiq danube-s v1.5 with MX29LV640EB NOR flash chips. Only if the offset 1 is used, the hang can be observed. Using any other offset works fine: lwl s0,0(a1) - s0 == 0x6d000080 lwl s0,1(a1) - hangs lwl s0,2(a1) - s0 == 0x0080xxxx lwl s0,3(a1) - s0 == 0x80xxxxxx It isn't clear whether it is a limitation of the flash chip, the EBU or something else. Force 8bit reads to prevent gcc optimizing the read with lwr/lwl instructions. Signed-off-by: Mathias Kresin (cherry picked from commit 8fb714edd6e4340729e271139164a0163b027d68) --- .../patches/0030-lzma-force-8bit-reads.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/boot/uboot-lantiq/patches/0030-lzma-force-8bit-reads.patch diff --git a/package/boot/uboot-lantiq/patches/0030-lzma-force-8bit-reads.patch b/package/boot/uboot-lantiq/patches/0030-lzma-force-8bit-reads.patch new file mode 100644 index 0000000000..dc7d9ed7ee --- /dev/null +++ b/package/boot/uboot-lantiq/patches/0030-lzma-force-8bit-reads.patch @@ -0,0 +1,48 @@ +From a40a6e16ed76e5e26a0f60226b64c311d4a62c9f Mon Sep 17 00:00:00 2001 +From: Mathias Kresin +Date: Sun, 31 Oct 2021 23:04:54 +0100 +Subject: [PATCH] lzma: force 8bit reads + +At least since gcc 7.3.0 (OpenWrt 18.06) lwr/lwl are used in the +assembly of LzmaProps_Decode. While the decission made by the compiler +looks perfect fine, it triggers some obscure hang on lantiq danube-s +v1.5 with MX29LV640EB NOR flash chips. + +Only if the offset 1 is used, the hang can be observed. Using any other +offset works fine: + + lwl s0,0(a1) - s0 == 0x6d000080 + lwl s0,1(a1) - hangs + lwl s0,2(a1) - s0 == 0x0080xxxx + lwl s0,3(a1) - s0 == 0x80xxxxxx + +It isn't clear whether it is a limitation of the flash chip, the EBU or +something else. + +Force 8bit reads to prevent gcc optimizing the read with lwr/lwl +instructions. + +Signed-off-by: Mathias Kresin +--- + lib/lzma/LzmaDec.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/lib/lzma/LzmaDec.c ++++ b/lib/lzma/LzmaDec.c +@@ -7,6 +7,7 @@ + #include "LzmaDec.h" + + #include ++#include + + #define kNumTopBits 24 + #define kTopValue ((UInt32)1 << kNumTopBits) +@@ -929,7 +930,7 @@ SRes LzmaProps_Decode(CLzmaProps *p, con + if (size < LZMA_PROPS_SIZE) + return SZ_ERROR_UNSUPPORTED; + else +- dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24); ++ dicSize = readb(&data[1]) | ((UInt32)readb(&data[2]) << 8) | ((UInt32)readb(&data[3]) << 16) | ((UInt32)readb(&data[4]) << 24); + + if (dicSize < LZMA_DIC_MIN) + dicSize = LZMA_DIC_MIN; From d7edfad66b5ab43dbe60bd178fed4c1da083062a Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Sat, 27 Nov 2021 21:43:40 +0100 Subject: [PATCH 43/65] uboot-lantiq: danube: fix hanging lzma kernel uncompression #2 Follow up to commit 8fb714edd6e4340729e271139164a0163b027d68. Managed to hit the very same issue again while playing with the NOR SPL builds. Signed-off-by: Mathias Kresin (cherry picked from commit f14bc5cf5635edbb3ab2e29c14a260e2640e588f) --- .../patches/0030-lzma-force-8bit-reads.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/package/boot/uboot-lantiq/patches/0030-lzma-force-8bit-reads.patch b/package/boot/uboot-lantiq/patches/0030-lzma-force-8bit-reads.patch index dc7d9ed7ee..a934dab5cd 100644 --- a/package/boot/uboot-lantiq/patches/0030-lzma-force-8bit-reads.patch +++ b/package/boot/uboot-lantiq/patches/0030-lzma-force-8bit-reads.patch @@ -37,6 +37,15 @@ Signed-off-by: Mathias Kresin #define kNumTopBits 24 #define kTopValue ((UInt32)1 << kNumTopBits) +@@ -703,7 +704,7 @@ static ELzmaDummy LzmaDec_TryDummy(const + + static void LzmaDec_InitRc(CLzmaDec *p, const Byte *data) + { +- p->code = ((UInt32)data[1] << 24) | ((UInt32)data[2] << 16) | ((UInt32)data[3] << 8) | ((UInt32)data[4]); ++ p->code = ((UInt32)readb(&data[1]) << 24) | ((UInt32)readb(&data[2]) << 16) | ((UInt32)readb(&data[3]) << 8) | ((UInt32)readb(&data[4])); + p->range = 0xFFFFFFFF; + p->needFlush = 0; + } @@ -929,7 +930,7 @@ SRes LzmaProps_Decode(CLzmaProps *p, con if (size < LZMA_PROPS_SIZE) return SZ_ERROR_UNSUPPORTED; From b5d023ee0942dee156452a570ea36e15e105d833 Mon Sep 17 00:00:00 2001 From: SuLingGG <1215009714@QQ.COM> Date: Fri, 17 Dec 2021 20:18:00 +0800 Subject: [PATCH 44/65] ipq40xx: fixes conflict driverfor EnGenius EAP2200 --- target/linux/ipq40xx/image/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index 68297cebfd..909e602f96 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -412,7 +412,7 @@ define Device/engenius_eap2200 DEVICE_DTS := qcom-ipq4019-eap2200 BLOCKSIZE := 128k PAGESIZE := 2048 - DEVICE_PACKAGES := ath10k-firmware-qca9888 ipq-wifi-engenius_eap2200 -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers + DEVICE_PACKAGES := ath10k-firmware-qca9888 ipq-wifi-engenius_eap2200 -kmod-ath10k kmod-ath10k-ct-smallbuffers endef TARGET_DEVICES += engenius_eap2200 From 8938eed10160ed3e09107cac04a27daadcc38fcb Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Sat, 18 Dec 2021 07:06:36 +0800 Subject: [PATCH 45/65] ipq40xx: fix wifi conflict for wd1200g-eup Signed-off-by: Tianling Shen --- target/linux/ipq40xx/image/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index 909e602f96..c77e165eed 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -481,7 +481,7 @@ define Device/ezviz_cs-w3-wd1200g-eup DEVICE_DTS := qcom-ipq4018-cs-w3-wd1200g-eup IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ append-metadata - DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \ + DEVICE_PACKAGES := -kmod-ath10k -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \ ipq-wifi-ezviz_cs-w3-wd1200g-eup endef TARGET_DEVICES += ezviz_cs-w3-wd1200g-eup From 2e7d3b0bf4e36d82b7a1195b470d611ae4e5da8f Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Mon, 13 Dec 2021 23:10:40 +0800 Subject: [PATCH 46/65] ipq40xx: fix default packages for small ram devices --- target/linux/ipq40xx/image/Makefile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index c77e165eed..21d6efb53f 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -134,7 +134,7 @@ define Device/alfa-network_ap120c-ac DEVICE_VENDOR := ALFA Network DEVICE_MODEL := AP120C-AC DEVICE_DTS := qcom-ipq4018-ap120c-ac - DEVICE_PACKAGES := kmod-usb-acm kmod-tpm-i2c-atmel + DEVICE_PACKAGES := kmod-usb-acm kmod-tpm-i2c-atmel BLOCKSIZE := 128k PAGESIZE := 2048 IMAGE_SIZE := 65536k @@ -198,8 +198,8 @@ define Device/asus_rt-ac58u UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC58U') KERNEL_INITRAMFS := $$(KERNEL) | uImage none KERNEL_INITRAMFS_SUFFIX := -factory.trx - DEVICE_PACKAGES := -kmod-ath10k -ath10k-firmware-qca4019 \ - kmod-ath10k-ct-smallbuffers ath10k-firmware-qca4019-ct kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := -ath10k-firmware-qca4019 ath10k-firmware-qca4019-ct \ + -kmod-ath10k kmod-ath10k-ct-smallbuffers kmod-usb-ledtrig-usbport endef TARGET_DEVICES += asus_rt-ac58u @@ -412,7 +412,8 @@ define Device/engenius_eap2200 DEVICE_DTS := qcom-ipq4019-eap2200 BLOCKSIZE := 128k PAGESIZE := 2048 - DEVICE_PACKAGES := ath10k-firmware-qca9888 ipq-wifi-engenius_eap2200 -kmod-ath10k kmod-ath10k-ct-smallbuffers + DEVICE_PACKAGES := -ath10k-firmware-qca4019 ath10k-firmware-qca4019-ct -kmod-ath10k \ + ath10k-firmware-qca9888 ipq-wifi-engenius_eap2200 kmod-ath10k-ct-smallbuffers endef TARGET_DEVICES += engenius_eap2200 @@ -481,8 +482,8 @@ define Device/ezviz_cs-w3-wd1200g-eup DEVICE_DTS := qcom-ipq4018-cs-w3-wd1200g-eup IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ append-metadata - DEVICE_PACKAGES := -kmod-ath10k -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \ - ipq-wifi-ezviz_cs-w3-wd1200g-eup + DEVICE_PACKAGES := -ath10k-firmware-qca4019 ath10k-firmware-qca4019-ct \ + -kmod-ath10k kmod-ath10k-ct-smallbuffers ipq-wifi-ezviz_cs-w3-wd1200g-eup endef TARGET_DEVICES += ezviz_cs-w3-wd1200g-eup @@ -798,8 +799,8 @@ define Device/zyxel_wre6606 DEVICE_DTS_CONFIG := config@4 IMAGE_SIZE := 13184k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata - DEVICE_PACKAGES := -kmod-ath10k -ath10k-firmware-qca4019 \ - kmod-ath10k-ct-smallbuffers ath10k-firmware-qca4019-ct + DEVICE_PACKAGES := -ath10k-firmware-qca4019 ath10k-firmware-qca4019-ct \ + -kmod-ath10k kmod-ath10k-ct-smallbuffers endef TARGET_DEVICES += zyxel_wre6606 From 7b78eeeca74864fc42ca65304b962e2c7e8ca227 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Mon, 13 Dec 2021 23:40:30 +0800 Subject: [PATCH 47/65] CONTRIBUTED.md: reorder reference link --- CONTRIBUTED.md | 109 ++++++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 50 deletions(-) diff --git a/CONTRIBUTED.md b/CONTRIBUTED.md index 6053a80233..848a6321da 100644 --- a/CONTRIBUTED.md +++ b/CONTRIBUTED.md @@ -1,66 +1,75 @@ # CONTRIBUTED ## Thanks to + [![Dler Cloud](https://user-images.githubusercontent.com/22235437/111103249-f9ec6e00-8588-11eb-9bfc-67cc55574555.png)](https://dlercloud.com)
OSDN ## The Source of Packages + ### Based on: [coolsnowwolf/lede](https://github.com/coolsnowwolf/lede).
-Package ntlf9t: [jsda/packages2](https://github.com/jsda/packages2).
-luci-theme-netgearv2 source: [tracemouse/luci-theme-netgear](https://github.com/tracemouse/luci-theme-netgear).
-luci-app-serverchan source: [tty228/luci-app-serverchan](https://github.com/tty228/luci-app-serverchan).
-OpenAppFilter source: [destan19/OpenAppFilter](https://github.com/destan19/OpenAppFilter).
-luci-app-smartinfo source: [animefansxj/luci-app-smartinfo](https://github.com/animefansxj/luci-app-smartinfo).
-luci-app-k3screenctrl source: [lwz322/luci-app-k3screenctrl](https://github.com/lwz322/luci-app-k3screenctrl).
-phicomm-k3screenctrl source: [lwz322/k3screenctrl\_build](https://github.com/lwz322/k3screenctrl_build).
-luci-app-smstool source: [f8q8/luci-app-smstool-master](https://github.com/f8q8/luci-app-smstool-master).
-luci-app-airwhu source: [KyleRicardo/luci-app-airwhu](https://github.com/KyleRicardo/luci-app-airwhu).
+ +#### Packages + +Package gargoyle: [ericpaulbishop/gargoyle](https://github.com/ericpaulbishop/gargoyle).
Package Lienol: [Lienol/openwrt-package](https://github.com/Lienol/openwrt-package).
-luci-app-bbr-mod source: [ntlf9t/luci-app-bbr-mod](https://github.com/ntlf9t/luci-app-bbr-mod).
-Package Openwrt-BBR: [anshi233/Openwrt-BBR](https://github.com/anshi233/Openwrt-BBR).
-simple-obfs source: [aa65535/openwrt-simple-obfs](https://github.com/aa65535/openwrt-simple-obfs).
-v2ray-plugin source: [honwen/openwrt-v2ray-plugin](https://github.com/honwen/openwrt-v2ray-plugin).
-Package zxlhhyccc: [zxlhhyccc/MY-lede](https://github.com/zxlhhyccc/MY-lede).
-luci-theme-argonv3 source: [jerrykuku/luci-theme-argon](https://github.com/jerrykuku/luci-theme-argon).
-luci-theme-darkmatter source: [apollo-ng/luci-theme-darkmatter](https://github.com/apollo-ng/luci-theme-darkmatter).
-openwrt-chinadns-ng source: [pexcn/openwrt-chinadns-ng](https://github.com/pexcn/openwrt-chinadns-ng).
-openwrt-udpspeeder source: [zhfreal/openwrt-UDPspeeder](https://github.com/zhfreal/openwrt-UDPspeeder).
-luci-app-onliner source: [rufengsuixing/luci-app-onliner](https://github.com/rufengsuixing/luci-app-onliner).
-luci-app-dockerman source: [KFERMercer/luci-app-dockerman](https://github.com/KFERMercer/luci-app-dockerman).
-luci-lib-docker source: [lisaac/luci-lib-docker](https://github.com/lisaac/luci-lib-docker).
-openwrt-iptvhelper source: [riverscn/openwrt-iptvhelper](https://github.com/riverscn/openwrt-iptvhelper).
-luci-app-autoipsetadder source: [rufengsuixing/luci-app-autoipsetadder](https://github.com/rufengsuixing/luci-app-autoipsetadder).
-luci-app-adguardhome source: [rufengsuixing/luci-app-adguardhome](https://github.com/rufengsuixing/luci-app-adguardhome).
-Rclone-OpenWrt source: [ElonH/Rclone-OpenWrt](https://github.com/ElonH/Rclone-OpenWrt).
-luci-app-usb3disable source: [rufengsuixing/luci-app-usb3disable](https://github.com/rufengsuixing/luci-app-usb3disable).
-luci-app-diskman source: [lisaac/luci-app-diskman](https://github.com/lisaac/luci-app-diskman).
-NanoPi R1s(h5) support: [jerrykuku/openwrt-nanopi-r1s-h5](https://github.com/jerrykuku/openwrt-nanopi-r1s-h5).
-NanoPi support: [speedyworldclub/nlede](https://github.com/speedyworldclub/nlede).
-luci-theme-opentomato source: [Leo-Jo-My/luci-theme-opentomato](https://github.com/Leo-Jo-My/luci-theme-opentomato).
-luci-theme-opentomcat source: [Leo-Jo-My/luci-theme-opentomcat](https://github.com/Leo-Jo-My/luci-theme-opentomcat).
-luci-theme-atmaterial source: [yangsongli/luci-theme-atmaterial](https://github.com/yangsongli/luci-theme-atmaterial).
-luci-theme-Butterfly source: [Leo-Jo-My/luci-theme-Butterfly](https://github.com/Leo-Jo-My/luci-theme-Butterfly).
+Package ntlf9t: [ntlf9t/repositories](https://github.com/ntlf9t?tab=repositories).
+ lua-maxminddb source: [jerrykuku/lua-maxminddb](https://github.com/jerrykuku/lua-maxminddb).
-package openwrt-mwol: [Mleaf/openwrt-mwol](https://github.com/Mleaf/openwrt-mwol).
-package gargoyle: [ericpaulbishop/gargoyle](https://github.com/ericpaulbishop/gargoyle).
-luci-app-qos-gargoyle source: [kuoruan/luci-app-qos-gargoyle](https://github.com/kuoruan/luci-app-qos-gargoyle).
-luci-theme-rosy source: [rosywrt/luci-theme-rosy](https://github.com/rosywrt/luci-theme-rosy).
-luci-theme-argon-mc source: [sypopo/luci-theme-argon-mc](https://github.com/sypopo/luci-theme-argon-mc).
+mentohust source: [KyleRicardo/MentoHUST-OpenWrt-ipk](https://github.com/KyleRicardo/MentoHUST-OpenWrt-ipk).
+node-request source: [jerrykuku/node-request](https://github.com/jerrykuku/node-request).
+openappfilter source: [destan19/OpenAppFilter](https://github.com/destan19/OpenAppFilter).
+openwrt-BBR source: [anshi233/Openwrt-BBR](https://github.com/anshi233/Openwrt-BBR).
+openwrt-chinadns-ng source: [pexcn/openwrt-chinadns-ng](https://github.com/pexcn/openwrt-chinadns-ng).
+openwrt-iptvhelper source: [riverscn/openwrt-iptvhelper](https://github.com/riverscn/openwrt-iptvhelper).
+openwrt-mwol source: [Mleaf/openwrt-mwol](https://github.com/Mleaf/openwrt-mwol).
+openwrt-ootoc source: [ElonH/ootoc-OpenWRT](https://github.com/ElonH/ootoc-OpenWRT).
+openwrt-rclone source: [ElonH/Rclone-OpenWrt](https://github.com/ElonH/Rclone-OpenWrt).
+openwrt-r8168 source: [BROBIRD/openwrt-r8168](https://github.com/BROBIRD/openwrt-r8168).
+openwrt-udpspeeder source: [zhfreal/openwrt-UDPspeeder](https://github.com/zhfreal/openwrt-UDPspeeder).
+phicomm-k3screenctrl source: [lwz322/k3screenctrl\_build](https://github.com/lwz322/k3screenctrl_build).
+scutclient source: [scutclient/scutclient](https://github.com/scutclient/scutclient).
+simple-obfs source: [aa65535/openwrt-simple-obfs](https://github.com/aa65535/openwrt-simple-obfs).
+v2ray-plugin source: [teddysun/v2ray-plugin](https://github.com/teddysun/v2ray-plugin).
+ +#### Luci Packages + +luci-app-airwhu source: [KyleRicardo/luci-app-airwhu](https://github.com/KyleRicardo/luci-app-airwhu).
+luci-app-adguardhome source: [rufengsuixing/luci-app-adguardhome](https://github.com/rufengsuixing/luci-app-adguardhome).
+luci-app-autoipsetadder source: [rufengsuixing/luci-app-autoipsetadder](https://github.com/rufengsuixing/luci-app-autoipsetadder).
+luci-app-bbr-mod source: [ntlf9t/luci-app-bbr-mod](https://github.com/ntlf9t/luci-app-bbr-mod).
+luci-app-beardropper source: [NateLol/natelol](https://github.com/NateLol/natelol).
luci-app-cupsd source: [F-Light/luci-app-cupsd](https://github.com/F-Light/luci-app-cupsd).
-ootoc-OpenWRT source: [ElonH/ootoc-OpenWRT](https://github.com/ElonH/ootoc-OpenWRT).
-r8168 source: [BROBIRD/openwrt-r8168](https://github.com/BROBIRD/openwrt-r8168).
-MentoHUST source: [KyleRicardo/MentoHUST-OpenWrt-ipk](https://github.com/KyleRicardo/MentoHUST-OpenWrt-ipk).
+luci-app-diskman source: [lisaac/luci-app-diskman](https://github.com/lisaac/luci-app-diskman).
+luci-app-dockerman source: [KFERMercer/luci-app-dockerman](https://github.com/KFERMercer/luci-app-dockerman).
+luci-app-jd-dailybonus source: [jerrykuku/luci-app-jd-dailybonus](https://github.com/jerrykuku/luci-app-jd-dailybonus).
+luci-app-k3screenctrl source: [lwz322/luci-app-k3screenctrl](https://github.com/lwz322/luci-app-k3screenctrl).
luci-app-mentohust source: [BoringCat/luci-app-mentohust](https://github.com/BoringCat/luci-app-mentohust).
luci-app-minieap source: [BoringCat/luci-app-minieap](https://github.com/BoringCat/luci-app-minieap).
-scutclient source: [scutclient/scutclient](https://github.com/scutclient/scutclient).
-luci-app-scutclient source: [scutclient/luci-app-scutclient](https://github.com/scutclient/luci-app-scutclient).
-luci-theme-Butterfly-dark source: [Leo-Jo-My/luci-theme-Butterfly-dark](https://github.com/Leo-Jo-My/luci-theme-Butterfly-dark).
-luci-theme-argon-mod source: [Leo-Jo-My/luci-theme-argon-mod](https://github.com/Leo-Jo-My/luci-theme-argon-mod).
-node-request source: [jerrykuku/node-request](https://github.com/jerrykuku/node-request).
-luci-app-jd-dailybonus source: [jerrykuku/luci-app-jd-dailybonus](https://github.com/jerrykuku/luci-app-jd-dailybonus).
luci-app-oled source: [NateLol/luci-app-oled](https://github.com/NateLol/luci-app-oled).
-luci-app-beardropper source: [NateLol/natelol](https://github.com/NateLol/natelol).
+luci-app-onliner source: [rufengsuixing/luci-app-onliner](https://github.com/rufengsuixing/luci-app-onliner).
+luci-app-qos-gargoyle source: [kuoruan/luci-app-qos-gargoyle](https://github.com/kuoruan/luci-app-qos-gargoyle).
+luci-app-scutclient source: [scutclient/luci-app-scutclient](https://github.com/scutclient/luci-app-scutclient).
+luci-app-serverchan source: [tty228/luci-app-serverchan](https://github.com/tty228/luci-app-serverchan).
+luci-app-smartinfo source: [animefansxj/luci-app-smartinfo](https://github.com/animefansxj/luci-app-smartinfo).
+luci-app-smstool source: [f8q8/luci-app-smstool-master](https://github.com/f8q8/luci-app-smstool-master).
+luci-app-usb3disable source: [rufengsuixing/luci-app-usb3disable](https://github.com/rufengsuixing/luci-app-usb3disable).
luci-app-vssr source: [jerrykuku/luci-app-vssr](https://github.com/jerrykuku/luci-app-vssr).
-luci-proto-modemmanager source: [nickberry17/luci-proto-modemmanager](https://github.com/nickberry17/luci-proto-modemmanager).
-luci-theme-infinityfreedom source: [xiaoqingfengATGH/luci-theme-infinityfreedom](https://github.com/xiaoqingfengATGH/luci-theme-infinityfreedom).
+ +luci-lib-docker source: [lisaac/luci-lib-docker](https://github.com/lisaac/luci-lib-docker).
+ luci-proto-minieap source: [ysc3839/luci-proto-minieap](https://github.com/ysc3839/luci-proto-minieap). +luci-proto-modemmanager source: [nickberry17/luci-proto-modemmanager](https://github.com/nickberry17/luci-proto-modemmanager).
+ +luci-theme-argonv3 source: [jerrykuku/luci-theme-argon](https://github.com/jerrykuku/luci-theme-argon).
+luci-theme-argon-mc source: [sypopo/luci-theme-argon-mc](https://github.com/sypopo/luci-theme-argon-mc).
+luci-theme-argon-mod source: [Leo-Jo-My/luci-theme-argon-mod](https://github.com/Leo-Jo-My/luci-theme-argon-mod).
+luci-theme-atmaterial source: [yangsongli/luci-theme-atmaterial](https://github.com/yangsongli/luci-theme-atmaterial).
+luci-theme-butterfly source: [Leo-Jo-My/luci-theme-butterfly](https://github.com/Leo-Jo-My/luci-theme-Butterfly).
+luci-theme-butterfly-dark source: [Leo-Jo-My/luci-theme-butterfly-dark](https://github.com/Leo-Jo-My/luci-theme-Butterfly-dark).
+luci-theme-darkmatter source: [apollo-ng/luci-theme-darkmatter](https://github.com/apollo-ng/luci-theme-darkmatter).
+luci-theme-infinityfreedom source: [xiaoqingfengATGH/luci-theme-infinityfreedom](https://github.com/xiaoqingfengATGH/luci-theme-infinityfreedom).
+luci-theme-netgearv2 source: [tracemouse/luci-theme-netgear](https://github.com/tracemouse/luci-theme-netgear).
+luci-theme-opentomato source: [Leo-Jo-My/luci-theme-opentomato](https://github.com/Leo-Jo-My/luci-theme-opentomato).
+luci-theme-opentomcat source: [Leo-Jo-My/luci-theme-opentomcat](https://github.com/Leo-Jo-My/luci-theme-opentomcat).
+luci-theme-rosy source: [rosywrt/luci-theme-rosy](https://github.com/rosywrt/luci-theme-rosy).
From 4a85afe6f3e3cba3767332c5c9537e9dc746c983 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 22 Dec 2021 14:21:09 +0800 Subject: [PATCH 48/65] CONTRIBUTED: add JetBrains logo Signed-off-by: Tianling Shen --- CONTRIBUTED.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTED.md b/CONTRIBUTED.md index 848a6321da..848483d322 100644 --- a/CONTRIBUTED.md +++ b/CONTRIBUTED.md @@ -2,7 +2,8 @@ ## Thanks to -[![Dler Cloud](https://user-images.githubusercontent.com/22235437/111103249-f9ec6e00-8588-11eb-9bfc-67cc55574555.png)](https://dlercloud.com)
+Dler Cloud
+JetBrains Black Box Logo logo
OSDN ## The Source of Packages @@ -58,7 +59,7 @@ luci-app-vssr source: [jerrykuku/luci-app-vssr](https://github.com/jerrykuku/luc luci-lib-docker source: [lisaac/luci-lib-docker](https://github.com/lisaac/luci-lib-docker).
-luci-proto-minieap source: [ysc3839/luci-proto-minieap](https://github.com/ysc3839/luci-proto-minieap). +luci-proto-minieap source: [ysc3839/luci-proto-minieap](https://github.com/ysc3839/luci-proto-minieap).
luci-proto-modemmanager source: [nickberry17/luci-proto-modemmanager](https://github.com/nickberry17/luci-proto-modemmanager).
luci-theme-argonv3 source: [jerrykuku/luci-theme-argon](https://github.com/jerrykuku/luci-theme-argon).
From 9ac376921ea0083523dc4e555ad225dc64b7f83d Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Sat, 25 Dec 2021 03:54:06 +0800 Subject: [PATCH 49/65] kernel: bump to 4.9.294, 4.14.259, 4.19.222 Resolve conflicted: - mvebu/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch Remove upsteamed: - mvebu/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch - mvebu/527-PCI-aardvark-allow-to-specify-link-capability.patch Refreshed all patches. Signed-off-by: Tianling Shen --- include/kernel-version.mk | 12 +- ...8xx-Enable-LEDs-and-auto-negotiation.patch | 6 +- .../950-0039-Add-dwc_otg-driver.patch | 2 +- ...78xx-Read-initial-EEE-status-from-DT.patch | 2 +- ...Disable-TCP-Segmentation-Offload-TSO.patch | 2 +- ...e-enabling-of-EEE-into-PHY-init-code.patch | 4 +- ...e-link-events-to-minimize-poll-storm.patch | 2 +- ...xx-EEE-support-is-now-a-PHY-property.patch | 2 +- ...use-default-alignment-for-rx-buffers.patch | 2 +- ...hci_fixup_endpoint-for-interval-adju.patch | 2 +- ...or-host-controllers-that-don-t-updat.patch | 4 +- ...ce-quirks-for-Freeway-Airmouse-T3-an.patch | 2 +- ...-Make-USB-3.0-PHY-use-MDIO-PHY-drive.patch | 2 +- ...ts-BCM5301X-Specify-flash-partitions.patch | 2 +- ...-Describe-Northstar-pins-mux-control.patch | 2 +- ...01X-Update-Northstar-pinctrl-binding.patch | 2 +- ...ts-BCM5301X-Specify-flash-partitions.patch | 2 +- ...-Describe-Northstar-pins-mux-control.patch | 2 +- ...01X-Update-Northstar-pinctrl-binding.patch | 2 +- ...ption-fix-dwm-158-3g-modem-interface.patch | 2 +- ...-use-of-connmarks-as-tin-classifiers.patch | 2 +- ...erpret-fwmark-parameter-as-a-bitmask.patch | 2 +- ...n-ioctl-to-return-the-namespace-type.patch | 6 +- ...90-net-generalize-napi_complete_done.patch | 2 +- .../generic/hack-4.14/902-debloat_proc.patch | 2 +- .../661-use_fq_codel_by_default.patch | 6 +- .../generic/hack-4.19/902-debloat_proc.patch | 2 +- ...-linux-kernel-to-support-shortcut-fe.patch | 6 +- .../generic/hack-4.9/902-debloat_proc.patch | 2 +- .../pending-4.14/834-ledtrig-libata.patch | 8 +- .../601-add-kernel-imq-support.patch | 6 +- ...T-skip-GRO-for-foreign-MAC-addresses.patch | 10 +- ...dd-support-for-threaded-NAPI-polling.patch | 14 +- .../pending-4.19/834-ledtrig-libata.patch | 8 +- .../pending-4.9/834-ledtrig-libata.patch | 8 +- .../patches-4.14/999-fix-m25p-shutdown.patch | 6 +- .../patches-4.9/160-delayed_uart_io.patch | 4 +- .../807-usb-support-layerscape.patch | 4 +- ...a-3720-espressobin-wire-up-spi-flash.patch | 2 +- ...l-armada37xx-Add-emmc-sdio-pinctrl-d.patch | 6 +- ...l-armada-37xx-Enable-emmc-on-espress.patch | 2 +- ...da-3720-espressobin-correct-spi-node.patch | 2 +- ...l-armada-3720-espressobin-add-ports-.patch | 2 +- ...-device-to-the-same-MAX-payload-size.patch | 138 ------------------ ...ark-allow-to-specify-link-capability.patch | 43 ------ ...-3720-espressobin-set-max-link-to-ge.patch | 6 +- ...l-armada37xx-Add-emmc-sdio-pinctrl-d.patch | 6 +- ...l-armada-37xx-Enable-emmc-on-espress.patch | 2 +- ...da-3720-espressobin-correct-spi-node.patch | 2 +- ...l-armada-3720-espressobin-add-ports-.patch | 2 +- ...rdvark-Convert-to-use-pci_host_probe.patch | 6 +- ...-device-to-the-same-MAX-payload-size.patch | 138 ------------------ ...ark-allow-to-specify-link-capability.patch | 43 ------ ...-3720-espressobin-set-max-link-to-ge.patch | 6 +- .../oxnas/patches-4.14/999-libata-hacks.patch | 4 +- ...-arm64-dts-allwinner-h5-Add-PMU-node.patch | 2 - ...-allwinner-h5-Add-clock-to-CPU-cores.patch | 2 - ...4-dts-allwinner-h5-Add-CPU-OPP-table.patch | 3 - ...ings-on-Intel-if-BIOS-hasn-t-already.patch | 6 +- ...ings-on-Intel-if-BIOS-hasn-t-already.patch | 6 +- ...ings-on-Intel-if-BIOS-hasn-t-already.patch | 7 +- 61 files changed, 105 insertions(+), 487 deletions(-) delete mode 100644 target/linux/mvebu/patches-4.14/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch delete mode 100644 target/linux/mvebu/patches-4.14/527-PCI-aardvark-allow-to-specify-link-capability.patch delete mode 100644 target/linux/mvebu/patches-4.19/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch delete mode 100644 target/linux/mvebu/patches-4.19/527-PCI-aardvark-allow-to-specify-link-capability.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 07c6d1853d..7bc8ca57bb 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,13 +6,13 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-4.9 = .291 -LINUX_VERSION-4.14 = .256 -LINUX_VERSION-4.19 = .218 +LINUX_VERSION-4.9 = .294 +LINUX_VERSION-4.14 = .259 +LINUX_VERSION-4.19 = .222 -LINUX_KERNEL_HASH-4.9.291 = b55d77774ed631f57f736bcdab021f68167455c9daede7e9e4161b4d564d8b53 -LINUX_KERNEL_HASH-4.14.256 = 9784204f95cfc7de1c933088e6f9364e99a29988ae4e6b9353677637eb171aa0 -LINUX_KERNEL_HASH-4.19.218 = 485a2714a3a1f28b54ef1bb310e586ea0a13469a8a8966aef4549291f70124a0 +LINUX_KERNEL_HASH-4.9.294 = 31ca50df2076040d84e721a6f01021ac2a125a0c5adb73c977fed91f323fa268 +LINUX_KERNEL_HASH-4.14.259 = 26e284541ff77bd3af14e40aa690bcf229d0f9b9677704fd9fecb59e108e4368 +LINUX_KERNEL_HASH-4.19.222 = 97b0830c3d7d90acfc850bcbfdeb64e6cb3e1cb58e079b8b7d0f5bb0a9618838 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/bcm27xx/patches-4.19/950-0032-lan78xx-Enable-LEDs-and-auto-negotiation.patch b/target/linux/bcm27xx/patches-4.19/950-0032-lan78xx-Enable-LEDs-and-auto-negotiation.patch index 24f989d74b..86ea033619 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0032-lan78xx-Enable-LEDs-and-auto-negotiation.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0032-lan78xx-Enable-LEDs-and-auto-negotiation.patch @@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2481,6 +2481,11 @@ static int lan78xx_reset(struct lan78xx_ +@@ -2479,6 +2479,11 @@ static int lan78xx_reset(struct lan78xx_ int ret = 0; unsigned long timeout; u8 sig; @@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell ret = lan78xx_read_reg(dev, HW_CFG, &buf); buf |= HW_CFG_LRST_; -@@ -2534,6 +2539,9 @@ static int lan78xx_reset(struct lan78xx_ +@@ -2532,6 +2537,9 @@ static int lan78xx_reset(struct lan78xx_ ret = lan78xx_read_reg(dev, HW_CFG, &buf); buf |= HW_CFG_MEF_; @@ -36,7 +36,7 @@ Signed-off-by: Phil Elwell ret = lan78xx_write_reg(dev, HW_CFG, buf); ret = lan78xx_read_reg(dev, USB_CFG0, &buf); -@@ -2589,6 +2597,9 @@ static int lan78xx_reset(struct lan78xx_ +@@ -2587,6 +2595,9 @@ static int lan78xx_reset(struct lan78xx_ buf |= MAC_CR_AUTO_DUPLEX_ | MAC_CR_AUTO_SPEED_; } } diff --git a/target/linux/bcm27xx/patches-4.19/950-0039-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-4.19/950-0039-Add-dwc_otg-driver.patch index b2c6cda4cc..564281f757 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0039-Add-dwc_otg-driver.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0039-Add-dwc_otg-driver.patch @@ -917,7 +917,7 @@ Fixes https://github.com/raspberrypi/linux/issues/2408 } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5297,7 +5297,7 @@ static void port_event(struct usb_hub *h +@@ -5307,7 +5307,7 @@ static void port_event(struct usb_hub *h u16 status = 0, unused; port_dev->over_current_count++; diff --git a/target/linux/bcm27xx/patches-4.19/950-0120-lan78xx-Read-initial-EEE-status-from-DT.patch b/target/linux/bcm27xx/patches-4.19/950-0120-lan78xx-Read-initial-EEE-status-from-DT.patch index 8b97994673..a2e424f442 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0120-lan78xx-Read-initial-EEE-status-from-DT.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0120-lan78xx-Read-initial-EEE-status-from-DT.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2663,6 +2663,22 @@ static int lan78xx_open(struct net_devic +@@ -2661,6 +2661,22 @@ static int lan78xx_open(struct net_devic netif_dbg(dev, ifup, dev->net, "phy initialised successfully"); diff --git a/target/linux/bcm27xx/patches-4.19/950-0127-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch b/target/linux/bcm27xx/patches-4.19/950-0127-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch index b35dfa2323..fee86f52ed 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0127-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0127-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch @@ -37,7 +37,7 @@ Signed-off-by: Dave Stevenson static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data) { u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL); -@@ -2948,8 +2957,14 @@ static int lan78xx_bind(struct lan78xx_n +@@ -2946,8 +2955,14 @@ static int lan78xx_bind(struct lan78xx_n if (DEFAULT_RX_CSUM_ENABLE) dev->net->features |= NETIF_F_RXCSUM; diff --git a/target/linux/bcm27xx/patches-4.19/950-0128-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch b/target/linux/bcm27xx/patches-4.19/950-0128-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch index c26ba13560..912742d0a2 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0128-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0128-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch @@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2195,6 +2195,22 @@ static int lan78xx_phy_init(struct lan78 +@@ -2193,6 +2193,22 @@ static int lan78xx_phy_init(struct lan78 mii_adv = (u32)mii_advertise_flowctrl(dev->fc_request_control); phydev->advertising |= mii_adv_to_ethtool_adv_t(mii_adv); @@ -39,7 +39,7 @@ Signed-off-by: Phil Elwell if (phydev->mdio.dev.of_node) { u32 reg; int len; -@@ -2672,22 +2688,6 @@ static int lan78xx_open(struct net_devic +@@ -2670,22 +2686,6 @@ static int lan78xx_open(struct net_devic netif_dbg(dev, ifup, dev->net, "phy initialised successfully"); diff --git a/target/linux/bcm27xx/patches-4.19/950-0259-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch b/target/linux/bcm27xx/patches-4.19/950-0259-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch index 463c211e52..68742aa72e 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0259-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0259-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch @@ -28,7 +28,7 @@ See: https://github.com/raspberrypi/linux/issues/2447 static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data) { u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL); -@@ -3795,7 +3800,12 @@ static int lan78xx_probe(struct usb_inte +@@ -3793,7 +3798,12 @@ static int lan78xx_probe(struct usb_inte netdev->max_mtu = MAX_SINGLE_PACKET_SIZE; netif_set_gso_max_size(netdev, MAX_SINGLE_PACKET_SIZE - MAX_HEADER); diff --git a/target/linux/bcm27xx/patches-4.19/950-0316-lan78xx-EEE-support-is-now-a-PHY-property.patch b/target/linux/bcm27xx/patches-4.19/950-0316-lan78xx-EEE-support-is-now-a-PHY-property.patch index dbc74cca8c..cacd95c8a3 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0316-lan78xx-EEE-support-is-now-a-PHY-property.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0316-lan78xx-EEE-support-is-now-a-PHY-property.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2200,7 +2200,7 @@ static int lan78xx_phy_init(struct lan78 +@@ -2198,7 +2198,7 @@ static int lan78xx_phy_init(struct lan78 mii_adv = (u32)mii_advertise_flowctrl(dev->fc_request_control); phydev->advertising |= mii_adv_to_ethtool_adv_t(mii_adv); diff --git a/target/linux/bcm27xx/patches-4.19/950-0413-lan78xx-use-default-alignment-for-rx-buffers.patch b/target/linux/bcm27xx/patches-4.19/950-0413-lan78xx-use-default-alignment-for-rx-buffers.patch index 91fc9075bf..a59bd78a87 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0413-lan78xx-use-default-alignment-for-rx-buffers.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0413-lan78xx-use-default-alignment-for-rx-buffers.patch @@ -12,7 +12,7 @@ in both dwc_otg and in ipv6 processing. --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -3195,7 +3195,7 @@ static int rx_submit(struct lan78xx_net +@@ -3193,7 +3193,7 @@ static int rx_submit(struct lan78xx_net size_t size = dev->rx_urb_size; int ret = 0; diff --git a/target/linux/bcm27xx/patches-4.19/950-0573-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-4.19/950-0573-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch index 97c7907a10..a1841d37bc 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0573-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0573-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch @@ -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 */ -@@ -5257,6 +5354,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5261,6 +5358,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-4.19/950-0609-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch b/target/linux/bcm27xx/patches-4.19/950-0609-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch index a95bff083b..f24aaac269 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0609-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0609-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch @@ -37,7 +37,7 @@ Signed-off-by: Jonathan Bell pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI) --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -549,7 +549,10 @@ void xhci_find_new_dequeue_state(struct +@@ -556,7 +556,10 @@ void xhci_find_new_dequeue_state(struct struct xhci_virt_ep *ep = &dev->eps[ep_index]; struct xhci_ring *ep_ring; struct xhci_segment *new_seg; @@ -48,7 +48,7 @@ Signed-off-by: Jonathan Bell dma_addr_t addr; u64 hw_dequeue; bool cycle_found = false; -@@ -570,7 +573,28 @@ void xhci_find_new_dequeue_state(struct +@@ -577,7 +580,28 @@ void xhci_find_new_dequeue_state(struct hw_dequeue = xhci_get_hw_deq(xhci, dev, ep_index, stream_id); new_seg = ep_ring->deq_seg; new_deq = ep_ring->dequeue; diff --git a/target/linux/bcm27xx/patches-4.19/950-0636-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-4.19/950-0636-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index 16a651ee3d..a5caa30320 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0636-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0636-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 -@@ -1224,6 +1227,9 @@ +@@ -1225,6 +1228,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 diff --git a/target/linux/bcm53xx/patches-4.14/033-v4.19-0001-ARM-dts-BCM5301X-Make-USB-3.0-PHY-use-MDIO-PHY-drive.patch b/target/linux/bcm53xx/patches-4.14/033-v4.19-0001-ARM-dts-BCM5301X-Make-USB-3.0-PHY-use-MDIO-PHY-drive.patch index 226109c09c..91d630544a 100644 --- a/target/linux/bcm53xx/patches-4.14/033-v4.19-0001-ARM-dts-BCM5301X-Make-USB-3.0-PHY-use-MDIO-PHY-drive.patch +++ b/target/linux/bcm53xx/patches-4.14/033-v4.19-0001-ARM-dts-BCM5301X-Make-USB-3.0-PHY-use-MDIO-PHY-drive.patch @@ -369,7 +369,7 @@ Signed-off-by: Florian Fainelli axi@18000000 { compatible = "brcm,bus-axi"; reg = <0x18000000 0x1000>; -@@ -359,7 +352,33 @@ +@@ -361,7 +354,33 @@ reg = <0x18003000 0x8>; #size-cells = <1>; #address-cells = <0>; diff --git a/target/linux/bcm53xx/patches-4.14/034-v4.20-0001-ARM-dts-BCM5301X-Specify-flash-partitions.patch b/target/linux/bcm53xx/patches-4.14/034-v4.20-0001-ARM-dts-BCM5301X-Specify-flash-partitions.patch index e6e2522f08..fa22cbf455 100644 --- a/target/linux/bcm53xx/patches-4.14/034-v4.20-0001-ARM-dts-BCM5301X-Specify-flash-partitions.patch +++ b/target/linux/bcm53xx/patches-4.14/034-v4.20-0001-ARM-dts-BCM5301X-Specify-flash-partitions.patch @@ -152,7 +152,7 @@ Signed-off-by: Florian Fainelli }; --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -475,8 +475,11 @@ +@@ -477,8 +477,11 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <20000000>; diff --git a/target/linux/bcm53xx/patches-4.14/035-v4.21-0006-ARM-dts-BCM5301X-Describe-Northstar-pins-mux-control.patch b/target/linux/bcm53xx/patches-4.14/035-v4.21-0006-ARM-dts-BCM5301X-Describe-Northstar-pins-mux-control.patch index 5f6dd17dc7..849328a517 100644 --- a/target/linux/bcm53xx/patches-4.14/035-v4.21-0006-ARM-dts-BCM5301X-Describe-Northstar-pins-mux-control.patch +++ b/target/linux/bcm53xx/patches-4.14/035-v4.21-0006-ARM-dts-BCM5301X-Describe-Northstar-pins-mux-control.patch @@ -26,7 +26,7 @@ Signed-off-by: Florian Fainelli status = "disabled"; }; }; -@@ -391,6 +393,48 @@ +@@ -393,6 +395,48 @@ status = "disabled"; }; diff --git a/target/linux/bcm53xx/patches-4.14/302-ARM-dts-BCM5301X-Update-Northstar-pinctrl-binding.patch b/target/linux/bcm53xx/patches-4.14/302-ARM-dts-BCM5301X-Update-Northstar-pinctrl-binding.patch index d1d287588c..d17d5750e7 100644 --- a/target/linux/bcm53xx/patches-4.14/302-ARM-dts-BCM5301X-Update-Northstar-pinctrl-binding.patch +++ b/target/linux/bcm53xx/patches-4.14/302-ARM-dts-BCM5301X-Update-Northstar-pinctrl-binding.patch @@ -9,7 +9,7 @@ Signed-off-by: Rafał Miłecki --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -400,16 +400,12 @@ +@@ -402,16 +402,12 @@ #size-cells = <1>; cru@100 { diff --git a/target/linux/bcm53xx/patches-4.19/030-v4.20-0001-ARM-dts-BCM5301X-Specify-flash-partitions.patch b/target/linux/bcm53xx/patches-4.19/030-v4.20-0001-ARM-dts-BCM5301X-Specify-flash-partitions.patch index e6e2522f08..fa22cbf455 100644 --- a/target/linux/bcm53xx/patches-4.19/030-v4.20-0001-ARM-dts-BCM5301X-Specify-flash-partitions.patch +++ b/target/linux/bcm53xx/patches-4.19/030-v4.20-0001-ARM-dts-BCM5301X-Specify-flash-partitions.patch @@ -152,7 +152,7 @@ Signed-off-by: Florian Fainelli }; --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -475,8 +475,11 @@ +@@ -477,8 +477,11 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <20000000>; diff --git a/target/linux/bcm53xx/patches-4.19/031-v4.21-0006-ARM-dts-BCM5301X-Describe-Northstar-pins-mux-control.patch b/target/linux/bcm53xx/patches-4.19/031-v4.21-0006-ARM-dts-BCM5301X-Describe-Northstar-pins-mux-control.patch index 5f6dd17dc7..849328a517 100644 --- a/target/linux/bcm53xx/patches-4.19/031-v4.21-0006-ARM-dts-BCM5301X-Describe-Northstar-pins-mux-control.patch +++ b/target/linux/bcm53xx/patches-4.19/031-v4.21-0006-ARM-dts-BCM5301X-Describe-Northstar-pins-mux-control.patch @@ -26,7 +26,7 @@ Signed-off-by: Florian Fainelli status = "disabled"; }; }; -@@ -391,6 +393,48 @@ +@@ -393,6 +395,48 @@ status = "disabled"; }; diff --git a/target/linux/bcm53xx/patches-4.19/302-ARM-dts-BCM5301X-Update-Northstar-pinctrl-binding.patch b/target/linux/bcm53xx/patches-4.19/302-ARM-dts-BCM5301X-Update-Northstar-pinctrl-binding.patch index d1d287588c..d17d5750e7 100644 --- a/target/linux/bcm53xx/patches-4.19/302-ARM-dts-BCM5301X-Update-Northstar-pinctrl-binding.patch +++ b/target/linux/bcm53xx/patches-4.19/302-ARM-dts-BCM5301X-Update-Northstar-pinctrl-binding.patch @@ -9,7 +9,7 @@ Signed-off-by: Rafał Miłecki --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi -@@ -400,16 +400,12 @@ +@@ -402,16 +402,12 @@ #size-cells = <1>; cru@100 { diff --git a/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch b/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch index be733b6d1f..d813aa42c9 100644 --- a/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch +++ b/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch @@ -30,7 +30,7 @@ Signed-off-by: Johan Hovold --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c -@@ -2048,7 +2048,8 @@ static const struct usb_device_id option +@@ -2058,7 +2058,8 @@ static const struct usb_device_id option { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) }, /* D-Link DWM-156 (variant) */ { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) }, { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) }, diff --git a/target/linux/generic/backport-4.19/391-v5.1-sch_cake-Permit-use-of-connmarks-as-tin-classifiers.patch b/target/linux/generic/backport-4.19/391-v5.1-sch_cake-Permit-use-of-connmarks-as-tin-classifiers.patch index 9cb01355e7..4ced9278c9 100644 --- a/target/linux/generic/backport-4.19/391-v5.1-sch_cake-Permit-use-of-connmarks-as-tin-classifiers.patch +++ b/target/linux/generic/backport-4.19/391-v5.1-sch_cake-Permit-use-of-connmarks-as-tin-classifiers.patch @@ -105,7 +105,7 @@ Signed-off-by: David S. Miller if (q->tins) { sch_tree_lock(sch); cake_reconfigure(sch); -@@ -2810,6 +2818,10 @@ static int cake_dump(struct Qdisc *sch, +@@ -2806,6 +2814,10 @@ static int cake_dump(struct Qdisc *sch, !!(q->rate_flags & CAKE_FLAG_SPLIT_GSO))) goto nla_put_failure; diff --git a/target/linux/generic/backport-4.19/392-v5.1-sch_cake-Interpret-fwmark-parameter-as-a-bitmask.patch b/target/linux/generic/backport-4.19/392-v5.1-sch_cake-Interpret-fwmark-parameter-as-a-bitmask.patch index fa9563c7a5..5ba7f9bcf7 100644 --- a/target/linux/generic/backport-4.19/392-v5.1-sch_cake-Interpret-fwmark-parameter-as-a-bitmask.patch +++ b/target/linux/generic/backport-4.19/392-v5.1-sch_cake-Interpret-fwmark-parameter-as-a-bitmask.patch @@ -90,7 +90,7 @@ Signed-off-by: Kevin Darbyshire-Bryant } if (q->tins) { -@@ -2818,8 +2820,7 @@ static int cake_dump(struct Qdisc *sch, +@@ -2814,8 +2816,7 @@ static int cake_dump(struct Qdisc *sch, !!(q->rate_flags & CAKE_FLAG_SPLIT_GSO))) goto nla_put_failure; diff --git a/target/linux/generic/backport-4.9/050-v4.11-nsfs-Add-an-ioctl-to-return-the-namespace-type.patch b/target/linux/generic/backport-4.9/050-v4.11-nsfs-Add-an-ioctl-to-return-the-namespace-type.patch index 53ffa3503d..fd4f696f2a 100644 --- a/target/linux/generic/backport-4.9/050-v4.11-nsfs-Add-an-ioctl-to-return-the-namespace-type.patch +++ b/target/linux/generic/backport-4.9/050-v4.11-nsfs-Add-an-ioctl-to-return-the-namespace-type.patch @@ -40,11 +40,9 @@ Signed-off-by: Eric W. Biederman include/uapi/linux/nsfs.h | 3 +++ 2 files changed, 5 insertions(+) -diff --git a/fs/nsfs.c b/fs/nsfs.c -index 8c9fb29c66732..5d534763c6626 100644 --- a/fs/nsfs.c +++ b/fs/nsfs.c -@@ -173,6 +173,8 @@ static long ns_ioctl(struct file *filp, unsigned int ioctl, +@@ -173,6 +173,8 @@ static long ns_ioctl(struct file *filp, if (!ns->ops->get_parent) return -EINVAL; return open_related_ns(ns, ns->ops->get_parent); @@ -53,8 +51,6 @@ index 8c9fb29c66732..5d534763c6626 100644 default: return -ENOTTY; } -diff --git a/include/uapi/linux/nsfs.h b/include/uapi/linux/nsfs.h -index 3af617230d1b7..2b48df11056ac 100644 --- a/include/uapi/linux/nsfs.h +++ b/include/uapi/linux/nsfs.h @@ -9,5 +9,8 @@ diff --git a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch index df26d5dba5..c2e07d03f9 100644 --- a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch +++ b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch @@ -1379,7 +1379,7 @@ Signed-off-by: David S. Miller */ --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c -@@ -1073,7 +1073,7 @@ err: +@@ -1132,7 +1132,7 @@ err: if (work_done < budget) { int more_to_do = 0; diff --git a/target/linux/generic/hack-4.14/902-debloat_proc.patch b/target/linux/generic/hack-4.14/902-debloat_proc.patch index 4c1018867d..756872818f 100644 --- a/target/linux/generic/hack-4.14/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.14/902-debloat_proc.patch @@ -155,7 +155,7 @@ Signed-off-by: Felix Fietkau IPC_SEM_IDS, sysvipc_sem_proc_show); --- a/ipc/shm.c +++ b/ipc/shm.c -@@ -122,6 +122,8 @@ pure_initcall(ipc_ns_init); +@@ -123,6 +123,8 @@ pure_initcall(ipc_ns_init); void __init shm_init(void) { diff --git a/target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch b/target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch index 875619f03d..46eb686308 100644 --- a/target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch +++ b/target/linux/generic/hack-4.19/661-use_fq_codel_by_default.patch @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h -@@ -489,12 +489,13 @@ extern struct Qdisc_ops noop_qdisc_ops; +@@ -503,12 +503,13 @@ extern struct Qdisc_ops noop_qdisc_ops; extern struct Qdisc_ops pfifo_fast_ops; extern struct Qdisc_ops mq_qdisc_ops; extern struct Qdisc_ops noqueue_qdisc_ops; @@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau device, it has to decide which ones to send first, which ones to --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c -@@ -2169,7 +2169,7 @@ static int __init pktsched_init(void) +@@ -2187,7 +2187,7 @@ static int __init pktsched_init(void) return err; } @@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau EXPORT_SYMBOL(default_qdisc_ops); /* Main transmission queue. */ -@@ -1034,7 +1034,7 @@ static void attach_one_default_qdisc(str +@@ -1062,7 +1062,7 @@ static void attach_one_default_qdisc(str void *_unused) { struct Qdisc *qdisc; diff --git a/target/linux/generic/hack-4.19/902-debloat_proc.patch b/target/linux/generic/hack-4.19/902-debloat_proc.patch index 6005d68665..3b4e071e5d 100644 --- a/target/linux/generic/hack-4.19/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.19/902-debloat_proc.patch @@ -155,7 +155,7 @@ Signed-off-by: Felix Fietkau IPC_SEM_IDS, sysvipc_sem_proc_show); --- a/ipc/shm.c +++ b/ipc/shm.c -@@ -144,6 +144,8 @@ pure_initcall(ipc_ns_init); +@@ -154,6 +154,8 @@ pure_initcall(ipc_ns_init); void __init shm_init(void) { diff --git a/target/linux/generic/hack-4.19/953-net-patch-linux-kernel-to-support-shortcut-fe.patch b/target/linux/generic/hack-4.19/953-net-patch-linux-kernel-to-support-shortcut-fe.patch index c3eb9d07cd..4fa02c4054 100644 --- a/target/linux/generic/hack-4.19/953-net-patch-linux-kernel-to-support-shortcut-fe.patch +++ b/target/linux/generic/hack-4.19/953-net-patch-linux-kernel-to-support-shortcut-fe.patch @@ -72,7 +72,7 @@ #ifdef CONFIG_ETHERNET_PACKET_MANGLE if (!dev->eth_mangle_tx || -@@ -4762,6 +4771,11 @@ void netdev_rx_handler_unregister(struct +@@ -4765,6 +4774,11 @@ void netdev_rx_handler_unregister(struct } EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister); @@ -84,7 +84,7 @@ /* * Limit the use of PFMEMALLOC reserves to those protocols that implement * the special handling of PFMEMALLOC skbs. -@@ -4811,6 +4825,9 @@ static int __netif_receive_skb_core(stru +@@ -4814,6 +4828,9 @@ static int __netif_receive_skb_core(stru bool deliver_exact = false; int ret = NET_RX_DROP; __be16 type; @@ -94,7 +94,7 @@ net_timestamp_check(!netdev_tstamp_prequeue, skb); -@@ -4851,6 +4868,16 @@ another_round: +@@ -4854,6 +4871,16 @@ another_round: goto out; } diff --git a/target/linux/generic/hack-4.9/902-debloat_proc.patch b/target/linux/generic/hack-4.9/902-debloat_proc.patch index 0b9c9dd96e..a9ae0ec19f 100644 --- a/target/linux/generic/hack-4.9/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.9/902-debloat_proc.patch @@ -155,7 +155,7 @@ Signed-off-by: Felix Fietkau IPC_SEM_IDS, sysvipc_sem_proc_show); --- a/ipc/shm.c +++ b/ipc/shm.c -@@ -118,6 +118,8 @@ pure_initcall(ipc_ns_init); +@@ -119,6 +119,8 @@ pure_initcall(ipc_ns_init); void __init shm_init(void) { diff --git a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch index 4de54e0a8b..1fbdc0c54f 100644 --- a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch @@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle /** * ata_build_rw_tf - Build ATA taskfile for given read/write request * @tf: Target ATA taskfile -@@ -5157,6 +5170,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5159,6 +5172,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (tag < 0) return NULL; } @@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle qc = __ata_qc_from_tag(ap, tag); qc->tag = tag; -@@ -6060,6 +6076,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -6062,6 +6078,9 @@ struct ata_port *ata_port_alloc(struct a ap->stats.unhandled_irq = 1; ap->stats.idle_irq = 1; #endif @@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle ata_sff_port_init(ap); return ap; -@@ -6081,6 +6100,12 @@ static void ata_host_release(struct devi +@@ -6083,6 +6102,12 @@ static void ata_host_release(struct devi kfree(ap->pmp_link); kfree(ap->slave_link); @@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle kfree(ap); host->ports[i] = NULL; } -@@ -6527,7 +6552,23 @@ int ata_host_register(struct ata_host *h +@@ -6529,7 +6554,23 @@ int ata_host_register(struct ata_host *h host->ports[i]->print_id = atomic_inc_return(&ata_print_id); host->ports[i]->local_port_no = i + 1; } diff --git a/target/linux/generic/pending-4.19/601-add-kernel-imq-support.patch b/target/linux/generic/pending-4.19/601-add-kernel-imq-support.patch index ce70302109..3c16575681 100644 --- a/target/linux/generic/pending-4.19/601-add-kernel-imq-support.patch +++ b/target/linux/generic/pending-4.19/601-add-kernel-imq-support.patch @@ -1132,7 +1132,7 @@ /* Interface address info used in eth_type_trans() */ unsigned char *dev_addr; -@@ -3973,6 +3978,19 @@ static inline void netif_tx_unlock_bh(st +@@ -3980,6 +3985,19 @@ static inline void netif_tx_unlock_bh(st } \ } @@ -1295,7 +1295,7 @@ void nf_queue_entry_release_refs(struct nf_queue_entry *entry); --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h -@@ -115,6 +115,8 @@ bool sch_direct_xmit(struct sk_buff *skb +@@ -116,6 +116,8 @@ bool sch_direct_xmit(struct sk_buff *skb void __qdisc_run(struct Qdisc *q); @@ -1306,7 +1306,7 @@ if (qdisc_run_begin(q)) { --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h -@@ -709,6 +709,13 @@ static inline int qdisc_enqueue(struct s +@@ -724,6 +724,13 @@ static inline int qdisc_enqueue(struct s return sch->enqueue(skb, sch, to_free); } diff --git a/target/linux/generic/pending-4.19/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-4.19/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index a523b52805..376dfa6bea 100644 --- a/target/linux/generic/pending-4.19/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-4.19/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau __u16 tc_index; /* traffic control index */ --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -5480,6 +5480,9 @@ static enum gro_result dev_gro_receive(s +@@ -5483,6 +5483,9 @@ static enum gro_result dev_gro_receive(s int same_flow; int grow; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau if (netif_elide_gro(skb->dev)) goto normal; -@@ -7146,6 +7149,48 @@ static void __netdev_adjacent_dev_unlink +@@ -7149,6 +7152,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info, -@@ -7196,6 +7241,7 @@ static int __netdev_upper_dev_link(struc +@@ -7199,6 +7244,7 @@ static int __netdev_upper_dev_link(struc if (ret) return ret; @@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -7288,6 +7334,7 @@ void netdev_upper_dev_unlink(struct net_ +@@ -7291,6 +7337,7 @@ void netdev_upper_dev_unlink(struct net_ __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); @@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); -@@ -7927,6 +7974,7 @@ int dev_set_mac_address(struct net_devic +@@ -7930,6 +7977,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/generic/pending-4.19/690-net-add-support-for-threaded-NAPI-polling.patch b/target/linux/generic/pending-4.19/690-net-add-support-for-threaded-NAPI-polling.patch index dbaff1759d..f7035ac889 100644 --- a/target/linux/generic/pending-4.19/690-net-add-support-for-threaded-NAPI-polling.patch +++ b/target/linux/generic/pending-4.19/690-net-add-support-for-threaded-NAPI-polling.patch @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau static int netif_rx_internal(struct sk_buff *skb); static int call_netdevice_notifiers_info(unsigned long val, -@@ -5910,6 +5911,11 @@ void __napi_schedule(struct napi_struct +@@ -5913,6 +5914,11 @@ void __napi_schedule(struct napi_struct { unsigned long flags; @@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau local_irq_save(flags); ____napi_schedule(this_cpu_ptr(&softnet_data), n); local_irq_restore(flags); -@@ -5961,6 +5967,11 @@ EXPORT_SYMBOL(napi_schedule_prep); +@@ -5964,6 +5970,11 @@ EXPORT_SYMBOL(napi_schedule_prep); */ void __napi_schedule_irqoff(struct napi_struct *n) { @@ -111,7 +111,7 @@ Signed-off-by: Felix Fietkau if (!IS_ENABLED(CONFIG_PREEMPT_RT)) ____napi_schedule(this_cpu_ptr(&softnet_data), n); else -@@ -6212,6 +6223,82 @@ static void init_gro_hash(struct napi_st +@@ -6215,6 +6226,82 @@ static void init_gro_hash(struct napi_st napi->gro_bitmask = 0; } @@ -194,7 +194,7 @@ Signed-off-by: Felix Fietkau void netif_napi_add(struct net_device *dev, struct napi_struct *napi, int (*poll)(struct napi_struct *, int), int weight) { -@@ -6229,6 +6316,7 @@ void netif_napi_add(struct net_device *d +@@ -6232,6 +6319,7 @@ void netif_napi_add(struct net_device *d #ifdef CONFIG_NETPOLL napi->poll_owner = -1; #endif @@ -202,7 +202,7 @@ Signed-off-by: Felix Fietkau set_bit(NAPI_STATE_SCHED, &napi->state); set_bit(NAPI_STATE_NPSVC, &napi->state); list_add_rcu(&napi->dev_list, &dev->napi_list); -@@ -6269,6 +6357,7 @@ static void flush_gro_hash(struct napi_s +@@ -6272,6 +6360,7 @@ static void flush_gro_hash(struct napi_s void netif_napi_del(struct napi_struct *napi) { might_sleep(); @@ -210,7 +210,7 @@ Signed-off-by: Felix Fietkau if (napi_hash_del(napi)) synchronize_net(); list_del_init(&napi->dev_list); -@@ -6281,49 +6370,19 @@ EXPORT_SYMBOL(netif_napi_del); +@@ -6284,49 +6373,19 @@ EXPORT_SYMBOL(netif_napi_del); static int napi_poll(struct napi_struct *n, struct list_head *repoll) { @@ -264,7 +264,7 @@ Signed-off-by: Felix Fietkau /* Some drivers may have called napi_schedule * prior to exhausting their budget. */ -@@ -9927,6 +9986,10 @@ static int __init net_dev_init(void) +@@ -9930,6 +9989,10 @@ static int __init net_dev_init(void) sd->backlog.weight = weight_p; } diff --git a/target/linux/generic/pending-4.19/834-ledtrig-libata.patch b/target/linux/generic/pending-4.19/834-ledtrig-libata.patch index 47f7e9da3b..4ed9964d74 100644 --- a/target/linux/generic/pending-4.19/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-4.19/834-ledtrig-libata.patch @@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle /** * ata_build_rw_tf - Build ATA taskfile for given read/write request * @tf: Target ATA taskfile -@@ -5167,6 +5180,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5169,6 +5182,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (tag < 0) return NULL; } @@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle qc = __ata_qc_from_tag(ap, tag); qc->tag = qc->hw_tag = tag; -@@ -6103,6 +6119,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -6105,6 +6121,9 @@ struct ata_port *ata_port_alloc(struct a ap->stats.unhandled_irq = 1; ap->stats.idle_irq = 1; #endif @@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle ata_sff_port_init(ap); return ap; -@@ -6138,6 +6157,12 @@ static void ata_host_release(struct kref +@@ -6140,6 +6159,12 @@ static void ata_host_release(struct kref kfree(ap->pmp_link); kfree(ap->slave_link); @@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle kfree(ap); host->ports[i] = NULL; } -@@ -6601,7 +6626,23 @@ int ata_host_register(struct ata_host *h +@@ -6603,7 +6628,23 @@ int ata_host_register(struct ata_host *h host->ports[i]->print_id = atomic_inc_return(&ata_print_id); host->ports[i]->local_port_no = i + 1; } diff --git a/target/linux/generic/pending-4.9/834-ledtrig-libata.patch b/target/linux/generic/pending-4.9/834-ledtrig-libata.patch index ade0f98cd6..c83a5649d5 100644 --- a/target/linux/generic/pending-4.9/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-4.9/834-ledtrig-libata.patch @@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle /** * ata_build_rw_tf - Build ATA taskfile for given read/write request * @tf: Target ATA taskfile -@@ -5031,6 +5044,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5033,6 +5046,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (tag < 0) return NULL; } @@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle qc = __ata_qc_from_tag(ap, tag); qc->tag = tag; -@@ -5934,6 +5950,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -5936,6 +5952,9 @@ struct ata_port *ata_port_alloc(struct a ap->stats.unhandled_irq = 1; ap->stats.idle_irq = 1; #endif @@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle ata_sff_port_init(ap); return ap; -@@ -5955,6 +5974,12 @@ static void ata_host_release(struct devi +@@ -5957,6 +5976,12 @@ static void ata_host_release(struct devi kfree(ap->pmp_link); kfree(ap->slave_link); @@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle kfree(ap); host->ports[i] = NULL; } -@@ -6401,7 +6426,23 @@ int ata_host_register(struct ata_host *h +@@ -6403,7 +6428,23 @@ int ata_host_register(struct ata_host *h host->ports[i]->print_id = atomic_inc_return(&ata_print_id); host->ports[i]->local_port_no = i + 1; } diff --git a/target/linux/ipq40xx/patches-4.14/999-fix-m25p-shutdown.patch b/target/linux/ipq40xx/patches-4.14/999-fix-m25p-shutdown.patch index 0b825d61e0..6fa1b041c1 100644 --- a/target/linux/ipq40xx/patches-4.14/999-fix-m25p-shutdown.patch +++ b/target/linux/ipq40xx/patches-4.14/999-fix-m25p-shutdown.patch @@ -1,8 +1,6 @@ -diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c -index 24e1ea3..b1ff69a 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c -@@ -313,6 +313,21 @@ static int m25p_remove(struct spi_device *spi) +@@ -313,6 +313,21 @@ static int m25p_remove(struct spi_device return mtd_device_unregister(&flash->spi_nor.mtd); } @@ -24,7 +22,7 @@ index 24e1ea3..b1ff69a 100644 /* * Do NOT add to this array without reading the following: * -@@ -387,6 +402,7 @@ static struct spi_driver m25p80_driver = { +@@ -387,6 +402,7 @@ static struct spi_driver m25p80_driver = .id_table = m25p_ids, .probe = m25p_probe, .remove = m25p_remove, diff --git a/target/linux/ixp4xx/patches-4.9/160-delayed_uart_io.patch b/target/linux/ixp4xx/patches-4.9/160-delayed_uart_io.patch index 0d90d5163b..ec641e5939 100644 --- a/target/linux/ixp4xx/patches-4.9/160-delayed_uart_io.patch +++ b/target/linux/ixp4xx/patches-4.9/160-delayed_uart_io.patch @@ -18,7 +18,7 @@ uart->capabilities = up->capabilities; --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c -@@ -2275,6 +2275,7 @@ uart_report_port(struct uart_driver *drv +@@ -2286,6 +2286,7 @@ uart_report_port(struct uart_driver *drv snprintf(address, sizeof(address), "I/O 0x%lx offset 0x%x", port->iobase, port->hub6); break; @@ -26,7 +26,7 @@ case UPIO_MEM: case UPIO_MEM16: case UPIO_MEM32: -@@ -2948,6 +2949,7 @@ int uart_match_port(struct uart_port *po +@@ -2959,6 +2960,7 @@ int uart_match_port(struct uart_port *po case UPIO_HUB6: return (port1->iobase == port2->iobase) && (port1->hub6 == port2->hub6); diff --git a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch index 6c96707bb9..f8b858aed2 100644 --- a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch @@ -1289,7 +1289,7 @@ Signed-off-by: Zhao Chenhui xhci->quirks |= XHCI_BROKEN_PORT_PED; --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -2022,10 +2022,12 @@ static int finish_td(struct xhci_hcd *xh +@@ -2029,10 +2029,12 @@ static int finish_td(struct xhci_hcd *xh union xhci_trb *ep_trb, struct xhci_transfer_event *event, struct xhci_virt_ep *ep, int *status) { @@ -1302,7 +1302,7 @@ Signed-off-by: Zhao Chenhui u32 trb_comp_code; int ep_index; -@@ -2048,14 +2050,30 @@ static int finish_td(struct xhci_hcd *xh +@@ -2055,14 +2057,30 @@ static int finish_td(struct xhci_hcd *xh if (trb_comp_code == COMP_STALL_ERROR || xhci_requires_manual_halt_cleanup(xhci, ep_ctx, trb_comp_code)) { diff --git a/target/linux/mvebu/patches-4.14/508-arm64-dts-armada-3720-espressobin-wire-up-spi-flash.patch b/target/linux/mvebu/patches-4.14/508-arm64-dts-armada-3720-espressobin-wire-up-spi-flash.patch index 6395a3573d..9d9bb540fc 100644 --- a/target/linux/mvebu/patches-4.14/508-arm64-dts-armada-3720-espressobin-wire-up-spi-flash.patch +++ b/target/linux/mvebu/patches-4.14/508-arm64-dts-armada-3720-espressobin-wire-up-spi-flash.patch @@ -20,7 +20,7 @@ Signed-off-by: Gregory CLEMENT --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -100,6 +100,33 @@ +@@ -103,6 +103,33 @@ status = "okay"; }; diff --git a/target/linux/mvebu/patches-4.14/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch b/target/linux/mvebu/patches-4.14/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch index 19702a61ed..4e2952f8ab 100644 --- a/target/linux/mvebu/patches-4.14/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch +++ b/target/linux/mvebu/patches-4.14/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch @@ -35,6 +35,6 @@ Signed-off-by: Gregory CLEMENT + function = "sdio"; + }; + - }; - - eth0: ethernet@30000 { + pcie_reset_pins: pcie-reset-pins { + groups = "pcie1"; + function = "gpio"; diff --git a/target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch b/target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch index 77d9956fff..1ea710ae1e 100644 --- a/target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch +++ b/target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch @@ -15,7 +15,7 @@ Signed-off-by: Gregory CLEMENT --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -97,9 +97,31 @@ +@@ -100,9 +100,31 @@ cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>; marvell,pad-type = "sd"; vqmmc-supply = <&vcc_sd_reg1>; diff --git a/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch b/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch index 5c3f214d1e..373879ee2a 100644 --- a/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch +++ b/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch @@ -29,7 +29,7 @@ Signed-off-by: Tomasz Maciej Nowak --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -127,25 +127,9 @@ +@@ -130,25 +130,9 @@ flash@0 { reg = <0>; diff --git a/target/linux/mvebu/patches-4.14/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch b/target/linux/mvebu/patches-4.14/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch index bef9c40286..b0cf062c95 100644 --- a/target/linux/mvebu/patches-4.14/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch +++ b/target/linux/mvebu/patches-4.14/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch @@ -15,7 +15,7 @@ Signed-off-by: Tomasz Maciej Nowak --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -157,7 +157,7 @@ +@@ -160,7 +160,7 @@ dsa,member = <0 0>; diff --git a/target/linux/mvebu/patches-4.14/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch b/target/linux/mvebu/patches-4.14/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch deleted file mode 100644 index ffeba8f2fb..0000000000 --- a/target/linux/mvebu/patches-4.14/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch +++ /dev/null @@ -1,138 +0,0 @@ -From patchwork Thu Sep 28 12:58:34 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [v2, - 3/7] PCI: aardvark: set host and device to the same MAX payload size -X-Patchwork-Submitter: Thomas Petazzoni -X-Patchwork-Id: 819587 -Message-Id: <20170928125838.11887-4-thomas.petazzoni@free-electrons.com> -To: Bjorn Helgaas , linux-pci@vger.kernel.org -Cc: Jason Cooper , Andrew Lunn , - Sebastian Hesselbarth , Gregory Clement - , - Nadav Haklai , Hanna Hawa , - Yehuda Yitschak , - linux-arm-kernel@lists.infradead.org, Antoine Tenart - , =?utf-8?q?Miqu=C3=A8l_Raynal?= - , Victor Gu , - Thomas Petazzoni -Date: Thu, 28 Sep 2017 14:58:34 +0200 -From: Thomas Petazzoni -List-Id: - -From: Victor Gu - -Since the Aardvark does not implement a PCIe root bus, the Linux PCIe -subsystem will not align the MAX payload size between the host and the -device. This patch ensures that the host and device have the same MAX -payload size, fixing a number of problems with various PCIe devices. - -This is part of fixing bug -https://bugzilla.kernel.org/show_bug.cgi?id=196339, this commit was -reported as the user to be important to get a Intel 7260 mini-PCIe -WiFi card working. - -Fixes: Fixes: 8c39d710363c1 ("PCI: aardvark: Add Aardvark PCI host controller driver") -Signed-off-by: Victor Gu -Reviewed-by: Evan Wang -Reviewed-by: Nadav Haklai -[Thomas: tweak commit log.] -Signed-off-by: Thomas Petazzoni ---- - drivers/pci/host/pci-aardvark.c | 60 ++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 59 insertions(+), 1 deletion(-) - ---- a/drivers/pci/host/pci-aardvark.c -+++ b/drivers/pci/host/pci-aardvark.c -@@ -30,9 +30,11 @@ - #define PCIE_CORE_DEV_CTRL_STATS_REG 0xc8 - #define PCIE_CORE_DEV_CTRL_STATS_RELAX_ORDER_DISABLE (0 << 4) - #define PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ_SHIFT 5 -+#define PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ 0x2 - #define PCIE_CORE_DEV_CTRL_STATS_SNOOP_DISABLE (0 << 11) - #define PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT 12 - #define PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SZ 0x2 -+#define PCIE_CORE_MPS_UNIT_BYTE 128 - #define PCIE_CORE_LINK_CTRL_STAT_REG 0xd0 - #define PCIE_CORE_LINK_L0S_ENTRY BIT(0) - #define PCIE_CORE_LINK_TRAINING BIT(5) -@@ -301,7 +303,8 @@ static void advk_pcie_setup_hw(struct ad - - /* Set PCIe Device Control and Status 1 PF0 register */ - reg = PCIE_CORE_DEV_CTRL_STATS_RELAX_ORDER_DISABLE | -- (7 << PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ_SHIFT) | -+ (PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ << -+ PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ_SHIFT) | - PCIE_CORE_DEV_CTRL_STATS_SNOOP_DISABLE | - (PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SZ << - PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT); -@@ -967,6 +970,58 @@ out_release_res: - return err; - } - -+static int advk_pcie_find_smpss(struct pci_dev *dev, void *data) -+{ -+ u8 *smpss = data; -+ -+ if (!dev) -+ return 0; -+ -+ if (!pci_is_pcie(dev)) -+ return 0; -+ -+ if (*smpss > dev->pcie_mpss) -+ *smpss = dev->pcie_mpss; -+ -+ return 0; -+} -+ -+static int advk_pcie_bus_configure_mps(struct pci_dev *dev, void *data) -+{ -+ int mps; -+ -+ if (!dev) -+ return 0; -+ -+ if (!pci_is_pcie(dev)) -+ return 0; -+ -+ mps = PCIE_CORE_MPS_UNIT_BYTE << *(u8 *)data; -+ pcie_set_mps(dev, mps); -+ -+ return 0; -+} -+ -+static void advk_pcie_configure_mps(struct pci_bus *bus, struct advk_pcie *pcie) -+{ -+ u8 smpss = PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ; -+ u32 reg; -+ -+ /* Find the minimal supported MAX payload size */ -+ advk_pcie_find_smpss(bus->self, &smpss); -+ pci_walk_bus(bus, advk_pcie_find_smpss, &smpss); -+ -+ /* Configure RC MAX payload size */ -+ reg = advk_readl(pcie, PCIE_CORE_DEV_CTRL_STATS_REG); -+ reg &= ~PCI_EXP_DEVCTL_PAYLOAD; -+ reg |= smpss << PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ_SHIFT; -+ advk_writel(pcie, reg, PCIE_CORE_DEV_CTRL_STATS_REG); -+ -+ /* Configure device MAX payload size */ -+ advk_pcie_bus_configure_mps(bus->self, &smpss); -+ pci_walk_bus(bus, advk_pcie_bus_configure_mps, &smpss); -+} -+ - static int advk_pcie_probe(struct platform_device *pdev) - { - struct device *dev = &pdev->dev; -@@ -1041,6 +1096,9 @@ static int advk_pcie_probe(struct platfo - list_for_each_entry(child, &bus->children, node) - pcie_bus_configure_settings(child); - -+ /* Configure the MAX pay load size */ -+ advk_pcie_configure_mps(bus, pcie); -+ - pci_bus_add_devices(bus); - return 0; - } diff --git a/target/linux/mvebu/patches-4.14/527-PCI-aardvark-allow-to-specify-link-capability.patch b/target/linux/mvebu/patches-4.14/527-PCI-aardvark-allow-to-specify-link-capability.patch deleted file mode 100644 index 6098953c3c..0000000000 --- a/target/linux/mvebu/patches-4.14/527-PCI-aardvark-allow-to-specify-link-capability.patch +++ /dev/null @@ -1,43 +0,0 @@ -From f70b629e488cc3f2a325ac35476f4f7ae502c5d0 Mon Sep 17 00:00:00 2001 -From: Tomasz Maciej Nowak -Date: Thu, 14 Jun 2018 14:24:40 +0200 -Subject: [PATCH 1/2] PCI: aardvark: allow to specify link capability - -Use DT of_pci_get_max_link_speed() facility to allow specifying link -capability. If none or unspecified value is given it falls back to gen2, -which is default for Armada 3700 SoC. - -Signed-off-by: Tomasz Maciej Nowak ---- - drivers/pci/host/pci-aardvark.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - ---- a/drivers/pci/host/pci-aardvark.c -+++ b/drivers/pci/host/pci-aardvark.c -@@ -276,6 +276,8 @@ static void advk_pcie_set_ob_win(struct - - static void advk_pcie_setup_hw(struct advk_pcie *pcie) - { -+ struct device *dev = &pcie->pdev->dev; -+ struct device_node *node = dev->of_node; - u32 reg; - int i; - -@@ -315,10 +317,15 @@ static void advk_pcie_setup_hw(struct ad - PCIE_CORE_CTRL2_TD_ENABLE; - advk_writel(pcie, reg, PCIE_CORE_CTRL2_REG); - -- /* Set GEN2 */ -+ /* Set GEN */ - reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG); - reg &= ~PCIE_GEN_SEL_MSK; -- reg |= SPEED_GEN_2; -+ if (of_pci_get_max_link_speed(node) == 1) -+ reg |= SPEED_GEN_1; -+ else if (of_pci_get_max_link_speed(node) == 3) -+ reg |= SPEED_GEN_3; -+ else -+ reg |= SPEED_GEN_2; - advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG); - - /* Set lane X1 */ diff --git a/target/linux/mvebu/patches-4.14/528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch b/target/linux/mvebu/patches-4.14/528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch index 6ce49f71f0..ce67cd94c9 100644 --- a/target/linux/mvebu/patches-4.14/528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch +++ b/target/linux/mvebu/patches-4.14/528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch @@ -62,9 +62,9 @@ Signed-off-by: Tomasz Maciej Nowak --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -83,6 +83,8 @@ - /* J9 */ - &pcie0 { +@@ -86,6 +86,8 @@ + pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>; + reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; status = "okay"; + + max-link-speed = <1>; diff --git a/target/linux/mvebu/patches-4.19/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch b/target/linux/mvebu/patches-4.19/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch index 9f68c98ed3..59612cb142 100644 --- a/target/linux/mvebu/patches-4.19/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch +++ b/target/linux/mvebu/patches-4.19/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch @@ -35,6 +35,6 @@ Signed-off-by: Gregory CLEMENT + function = "sdio"; + }; + - }; - - eth0: ethernet@30000 { + pcie_reset_pins: pcie-reset-pins { + groups = "pcie1"; + function = "gpio"; diff --git a/target/linux/mvebu/patches-4.19/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch b/target/linux/mvebu/patches-4.19/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch index 3dc71b17bf..7ce6737228 100644 --- a/target/linux/mvebu/patches-4.19/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch +++ b/target/linux/mvebu/patches-4.19/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch @@ -15,7 +15,7 @@ Signed-off-by: Gregory CLEMENT --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -70,9 +70,31 @@ +@@ -73,9 +73,31 @@ cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>; marvell,pad-type = "sd"; vqmmc-supply = <&vcc_sd_reg1>; diff --git a/target/linux/mvebu/patches-4.19/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch b/target/linux/mvebu/patches-4.19/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch index 9b735a0f9e..26a7b0fd72 100644 --- a/target/linux/mvebu/patches-4.19/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch +++ b/target/linux/mvebu/patches-4.19/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch @@ -29,7 +29,7 @@ Signed-off-by: Tomasz Maciej Nowak --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -100,25 +100,9 @@ +@@ -103,25 +103,9 @@ flash@0 { reg = <0>; diff --git a/target/linux/mvebu/patches-4.19/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch b/target/linux/mvebu/patches-4.19/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch index 747df93179..35072d973e 100644 --- a/target/linux/mvebu/patches-4.19/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch +++ b/target/linux/mvebu/patches-4.19/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch @@ -15,7 +15,7 @@ Signed-off-by: Tomasz Maciej Nowak --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -142,7 +142,7 @@ +@@ -145,7 +145,7 @@ dsa,member = <0 0>; diff --git a/target/linux/mvebu/patches-4.19/523-Revert-PCI-aardvark-Convert-to-use-pci_host_probe.patch b/target/linux/mvebu/patches-4.19/523-Revert-PCI-aardvark-Convert-to-use-pci_host_probe.patch index c7945e8221..ed50174785 100644 --- a/target/linux/mvebu/patches-4.19/523-Revert-PCI-aardvark-Convert-to-use-pci_host_probe.patch +++ b/target/linux/mvebu/patches-4.19/523-Revert-PCI-aardvark-Convert-to-use-pci_host_probe.patch @@ -10,15 +10,15 @@ This reverts commit c8e144f8ab00e6c4a070a932ef9c57db09aa41cf. --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c -@@ -924,6 +924,7 @@ static int advk_pcie_probe(struct platfo +@@ -1165,6 +1165,7 @@ static int advk_pcie_probe(struct platfo struct device *dev = &pdev->dev; struct advk_pcie *pcie; struct resource *res; + struct pci_bus *bus, *child; struct pci_host_bridge *bridge; + struct resource_entry *entry; int ret, irq; - -@@ -977,13 +978,22 @@ static int advk_pcie_probe(struct platfo +@@ -1315,13 +1316,22 @@ static int advk_pcie_probe(struct platfo bridge->map_irq = of_irq_parse_and_map_pci; bridge->swizzle_irq = pci_common_swizzle; diff --git a/target/linux/mvebu/patches-4.19/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch b/target/linux/mvebu/patches-4.19/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch deleted file mode 100644 index 7f15dcb5eb..0000000000 --- a/target/linux/mvebu/patches-4.19/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch +++ /dev/null @@ -1,138 +0,0 @@ -From patchwork Thu Sep 28 12:58:34 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [v2, - 3/7] PCI: aardvark: set host and device to the same MAX payload size -X-Patchwork-Submitter: Thomas Petazzoni -X-Patchwork-Id: 819587 -Message-Id: <20170928125838.11887-4-thomas.petazzoni@free-electrons.com> -To: Bjorn Helgaas , linux-pci@vger.kernel.org -Cc: Jason Cooper , Andrew Lunn , - Sebastian Hesselbarth , Gregory Clement - , - Nadav Haklai , Hanna Hawa , - Yehuda Yitschak , - linux-arm-kernel@lists.infradead.org, Antoine Tenart - , =?utf-8?q?Miqu=C3=A8l_Raynal?= - , Victor Gu , - Thomas Petazzoni -Date: Thu, 28 Sep 2017 14:58:34 +0200 -From: Thomas Petazzoni -List-Id: - -From: Victor Gu - -Since the Aardvark does not implement a PCIe root bus, the Linux PCIe -subsystem will not align the MAX payload size between the host and the -device. This patch ensures that the host and device have the same MAX -payload size, fixing a number of problems with various PCIe devices. - -This is part of fixing bug -https://bugzilla.kernel.org/show_bug.cgi?id=196339, this commit was -reported as the user to be important to get a Intel 7260 mini-PCIe -WiFi card working. - -Fixes: Fixes: 8c39d710363c1 ("PCI: aardvark: Add Aardvark PCI host controller driver") -Signed-off-by: Victor Gu -Reviewed-by: Evan Wang -Reviewed-by: Nadav Haklai -[Thomas: tweak commit log.] -Signed-off-by: Thomas Petazzoni ---- - drivers/pci/controller/pci-aardvark.c | 60 ++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 59 insertions(+), 1 deletion(-) - ---- a/drivers/pci/controller/pci-aardvark.c -+++ b/drivers/pci/controller/pci-aardvark.c -@@ -29,9 +29,11 @@ - #define PCIE_CORE_DEV_CTRL_STATS_REG 0xc8 - #define PCIE_CORE_DEV_CTRL_STATS_RELAX_ORDER_DISABLE (0 << 4) - #define PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ_SHIFT 5 -+#define PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ 0x2 - #define PCIE_CORE_DEV_CTRL_STATS_SNOOP_DISABLE (0 << 11) - #define PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT 12 - #define PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SZ 0x2 -+#define PCIE_CORE_MPS_UNIT_BYTE 128 - #define PCIE_CORE_LINK_CTRL_STAT_REG 0xd0 - #define PCIE_CORE_LINK_L0S_ENTRY BIT(0) - #define PCIE_CORE_LINK_TRAINING BIT(5) -@@ -257,7 +259,8 @@ static void advk_pcie_setup_hw(struct ad - - /* Set PCIe Device Control and Status 1 PF0 register */ - reg = PCIE_CORE_DEV_CTRL_STATS_RELAX_ORDER_DISABLE | -- (7 << PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ_SHIFT) | -+ (PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ << -+ PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ_SHIFT) | - PCIE_CORE_DEV_CTRL_STATS_SNOOP_DISABLE | - (PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SZ << - PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT); -@@ -919,6 +922,58 @@ out_release_res: - return err; - } - -+static int advk_pcie_find_smpss(struct pci_dev *dev, void *data) -+{ -+ u8 *smpss = data; -+ -+ if (!dev) -+ return 0; -+ -+ if (!pci_is_pcie(dev)) -+ return 0; -+ -+ if (*smpss > dev->pcie_mpss) -+ *smpss = dev->pcie_mpss; -+ -+ return 0; -+} -+ -+static int advk_pcie_bus_configure_mps(struct pci_dev *dev, void *data) -+{ -+ int mps; -+ -+ if (!dev) -+ return 0; -+ -+ if (!pci_is_pcie(dev)) -+ return 0; -+ -+ mps = PCIE_CORE_MPS_UNIT_BYTE << *(u8 *)data; -+ pcie_set_mps(dev, mps); -+ -+ return 0; -+} -+ -+static void advk_pcie_configure_mps(struct pci_bus *bus, struct advk_pcie *pcie) -+{ -+ u8 smpss = PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ; -+ u32 reg; -+ -+ /* Find the minimal supported MAX payload size */ -+ advk_pcie_find_smpss(bus->self, &smpss); -+ pci_walk_bus(bus, advk_pcie_find_smpss, &smpss); -+ -+ /* Configure RC MAX payload size */ -+ reg = advk_readl(pcie, PCIE_CORE_DEV_CTRL_STATS_REG); -+ reg &= ~PCI_EXP_DEVCTL_PAYLOAD; -+ reg |= smpss << PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ_SHIFT; -+ advk_writel(pcie, reg, PCIE_CORE_DEV_CTRL_STATS_REG); -+ -+ /* Configure device MAX payload size */ -+ advk_pcie_bus_configure_mps(bus->self, &smpss); -+ pci_walk_bus(bus, advk_pcie_bus_configure_mps, &smpss); -+} -+ - static int advk_pcie_probe(struct platform_device *pdev) - { - struct device *dev = &pdev->dev; -@@ -993,6 +1048,9 @@ static int advk_pcie_probe(struct platfo - list_for_each_entry(child, &bus->children, node) - pcie_bus_configure_settings(child); - -+ /* Configure the MAX pay load size */ -+ advk_pcie_configure_mps(bus, pcie); -+ - pci_bus_add_devices(bus); - return 0; - } diff --git a/target/linux/mvebu/patches-4.19/527-PCI-aardvark-allow-to-specify-link-capability.patch b/target/linux/mvebu/patches-4.19/527-PCI-aardvark-allow-to-specify-link-capability.patch deleted file mode 100644 index d796326a24..0000000000 --- a/target/linux/mvebu/patches-4.19/527-PCI-aardvark-allow-to-specify-link-capability.patch +++ /dev/null @@ -1,43 +0,0 @@ -From f70b629e488cc3f2a325ac35476f4f7ae502c5d0 Mon Sep 17 00:00:00 2001 -From: Tomasz Maciej Nowak -Date: Thu, 14 Jun 2018 14:24:40 +0200 -Subject: [PATCH 1/2] PCI: aardvark: allow to specify link capability - -Use DT of_pci_get_max_link_speed() facility to allow specifying link -capability. If none or unspecified value is given it falls back to gen2, -which is default for Armada 3700 SoC. - -Signed-off-by: Tomasz Maciej Nowak ---- - drivers/pci/controller/pci-aardvark.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - ---- a/drivers/pci/controller/pci-aardvark.c -+++ b/drivers/pci/controller/pci-aardvark.c -@@ -237,6 +237,8 @@ static int advk_pcie_wait_for_link(struc - - static void advk_pcie_setup_hw(struct advk_pcie *pcie) - { -+ struct device *dev = &pcie->pdev->dev; -+ struct device_node *node = dev->of_node; - u32 reg; - - /* Set to Direct mode */ -@@ -271,10 +273,15 @@ static void advk_pcie_setup_hw(struct ad - PCIE_CORE_CTRL2_TD_ENABLE; - advk_writel(pcie, reg, PCIE_CORE_CTRL2_REG); - -- /* Set GEN2 */ -+ /* Set GEN */ - reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG); - reg &= ~PCIE_GEN_SEL_MSK; -- reg |= SPEED_GEN_2; -+ if (of_pci_get_max_link_speed(node) == 1) -+ reg |= SPEED_GEN_1; -+ else if (of_pci_get_max_link_speed(node) == 3) -+ reg |= SPEED_GEN_3; -+ else -+ reg |= SPEED_GEN_2; - advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG); - - /* Set lane X1 */ diff --git a/target/linux/mvebu/patches-4.19/528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch b/target/linux/mvebu/patches-4.19/528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch index 3a2c8e804d..c3dc447628 100644 --- a/target/linux/mvebu/patches-4.19/528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch +++ b/target/linux/mvebu/patches-4.19/528-arm64-dts-armada-3720-espressobin-set-max-link-to-ge.patch @@ -62,9 +62,9 @@ Signed-off-by: Tomasz Maciej Nowak --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -56,6 +56,8 @@ - /* J9 */ - &pcie0 { +@@ -59,6 +59,8 @@ + pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>; + reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; status = "okay"; + + max-link-speed = <1>; diff --git a/target/linux/oxnas/patches-4.14/999-libata-hacks.patch b/target/linux/oxnas/patches-4.14/999-libata-hacks.patch index 730439e03d..77d4728f5b 100644 --- a/target/linux/oxnas/patches-4.14/999-libata-hacks.patch +++ b/target/linux/oxnas/patches-4.14/999-libata-hacks.patch @@ -15,7 +15,7 @@ /* initialize internal qc */ /* XXX: Tag 0 is used for drivers with legacy EH as some -@@ -5164,6 +5172,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5166,6 +5174,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (unlikely(ap->pflags & ATA_PFLAG_FROZEN)) return NULL; @@ -25,7 +25,7 @@ /* libsas case */ if (ap->flags & ATA_FLAG_SAS_HOST) { tag = ata_sas_allocate_tag(ap); -@@ -5209,6 +5220,8 @@ void ata_qc_free(struct ata_queued_cmd * +@@ -5211,6 +5222,8 @@ void ata_qc_free(struct ata_queued_cmd * qc->tag = ATA_TAG_POISON; if (ap->flags & ATA_FLAG_SAS_HOST) ata_sas_free_tag(tag, ap); diff --git a/target/linux/sunxi/patches-4.19/023-arm64-dts-allwinner-h5-Add-PMU-node.patch b/target/linux/sunxi/patches-4.19/023-arm64-dts-allwinner-h5-Add-PMU-node.patch index 8edeae2af5..87379b5145 100644 --- a/target/linux/sunxi/patches-4.19/023-arm64-dts-allwinner-h5-Add-PMU-node.patch +++ b/target/linux/sunxi/patches-4.19/023-arm64-dts-allwinner-h5-Add-PMU-node.patch @@ -18,8 +18,6 @@ Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi -index e92c4de5bf3b4..7c775a918a4e7 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi @@ -54,21 +54,21 @@ diff --git a/target/linux/sunxi/patches-4.19/024-arm64-dts-allwinner-h5-Add-clock-to-CPU-cores.patch b/target/linux/sunxi/patches-4.19/024-arm64-dts-allwinner-h5-Add-clock-to-CPU-cores.patch index 4a16442673..1240ceb30f 100644 --- a/target/linux/sunxi/patches-4.19/024-arm64-dts-allwinner-h5-Add-clock-to-CPU-cores.patch +++ b/target/linux/sunxi/patches-4.19/024-arm64-dts-allwinner-h5-Add-clock-to-CPU-cores.patch @@ -14,8 +14,6 @@ Link: https://lore.kernel.org/r/20200717160053.31191-5-wens@kernel.org arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi -index 4462a68c06815..09523f6011c5e 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi @@ -52,6 +52,8 @@ diff --git a/target/linux/sunxi/patches-4.19/025-arm64-dts-allwinner-h5-Add-CPU-OPP-table.patch b/target/linux/sunxi/patches-4.19/025-arm64-dts-allwinner-h5-Add-CPU-OPP-table.patch index 8e231c0795..982b29b1d3 100644 --- a/target/linux/sunxi/patches-4.19/025-arm64-dts-allwinner-h5-Add-CPU-OPP-table.patch +++ b/target/linux/sunxi/patches-4.19/025-arm64-dts-allwinner-h5-Add-CPU-OPP-table.patch @@ -26,9 +26,6 @@ Link: https://lore.kernel.org/r/20200717160053.31191-7-wens@kernel.org 1 file changed, 79 insertions(+) create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h5-cpu-opp.dtsi -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-cpu-opp.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5-cpu-opp.dtsi -new file mode 100644 -index 0000000000000..b2657201957eb --- /dev/null +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-cpu-opp.dtsi @@ -0,0 +1,97 @@ diff --git a/target/linux/x86/patches-4.14/900-x86-Enable-fast-strings-on-Intel-if-BIOS-hasn-t-already.patch b/target/linux/x86/patches-4.14/900-x86-Enable-fast-strings-on-Intel-if-BIOS-hasn-t-already.patch index 06e64e3d47..7ce4aaee12 100644 --- a/target/linux/x86/patches-4.14/900-x86-Enable-fast-strings-on-Intel-if-BIOS-hasn-t-already.patch +++ b/target/linux/x86/patches-4.14/900-x86-Enable-fast-strings-on-Intel-if-BIOS-hasn-t-already.patch @@ -1,8 +1,6 @@ -diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c -index 1905ce9..a4a3ef2 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c -@@ -164,6 +164,7 @@ +@@ -164,6 +164,7 @@ static bool bad_spectre_microcode(struct static void early_init_intel(struct cpuinfo_x86 *c) { u64 misc_enable; @@ -10,7 +8,7 @@ index 1905ce9..a4a3ef2 100644 /* Unmask CPUID levels if masked: */ if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) { -@@ -259,17 +260,35 @@ +@@ -259,17 +260,35 @@ static void early_init_intel(struct cpui * * Enable PAT WC only on P4, Core 2 or later CPUs. */ diff --git a/target/linux/x86/patches-4.19/900-x86-Enable-fast-strings-on-Intel-if-BIOS-hasn-t-already.patch b/target/linux/x86/patches-4.19/900-x86-Enable-fast-strings-on-Intel-if-BIOS-hasn-t-already.patch index 06e64e3d47..7ce4aaee12 100644 --- a/target/linux/x86/patches-4.19/900-x86-Enable-fast-strings-on-Intel-if-BIOS-hasn-t-already.patch +++ b/target/linux/x86/patches-4.19/900-x86-Enable-fast-strings-on-Intel-if-BIOS-hasn-t-already.patch @@ -1,8 +1,6 @@ -diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c -index 1905ce9..a4a3ef2 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c -@@ -164,6 +164,7 @@ +@@ -164,6 +164,7 @@ static bool bad_spectre_microcode(struct static void early_init_intel(struct cpuinfo_x86 *c) { u64 misc_enable; @@ -10,7 +8,7 @@ index 1905ce9..a4a3ef2 100644 /* Unmask CPUID levels if masked: */ if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) { -@@ -259,17 +260,35 @@ +@@ -259,17 +260,35 @@ static void early_init_intel(struct cpui * * Enable PAT WC only on P4, Core 2 or later CPUs. */ diff --git a/target/linux/x86/patches-4.9/900-x86-Enable-fast-strings-on-Intel-if-BIOS-hasn-t-already.patch b/target/linux/x86/patches-4.9/900-x86-Enable-fast-strings-on-Intel-if-BIOS-hasn-t-already.patch index b23ab971a9..bdb74e88e7 100644 --- a/target/linux/x86/patches-4.9/900-x86-Enable-fast-strings-on-Intel-if-BIOS-hasn-t-already.patch +++ b/target/linux/x86/patches-4.9/900-x86-Enable-fast-strings-on-Intel-if-BIOS-hasn-t-already.patch @@ -1,8 +1,6 @@ -diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c -index 1905ce9..a4a3ef2 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c -@@ -124,6 +124,7 @@ +@@ -124,6 +124,7 @@ static bool bad_spectre_microcode(struct static void early_init_intel(struct cpuinfo_x86 *c) { u64 misc_enable; @@ -10,7 +8,7 @@ index 1905ce9..a4a3ef2 100644 /* Unmask CPUID levels if masked: */ if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) { -@@ -233,20 +234,39 @@ +@@ -233,20 +234,39 @@ static void early_init_intel(struct cpui * Ingo Molnar reported a Pentium D (model 6) and a Xeon * (model 2) with the same problem. */ @@ -54,4 +52,3 @@ index 1905ce9..a4a3ef2 100644 setup_clear_cpu_cap(X86_FEATURE_REP_GOOD); setup_clear_cpu_cap(X86_FEATURE_ERMS); } - From 2564488482a3517d90788a90aa32d27fdfd82e55 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Sat, 25 Dec 2021 21:55:11 +0800 Subject: [PATCH 50/65] wireguard: Update to 1.0.20211208 Signed-off-by: Tianling Shen --- package/network/services/wireguard/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/services/wireguard/Makefile b/package/network/services/wireguard/Makefile index 3d5056095a..2b0134b07c 100644 --- a/package/network/services/wireguard/Makefile +++ b/package/network/services/wireguard/Makefile @@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=wireguard -PKG_VERSION:=1.0.20210606 +PKG_VERSION:=1.0.20211208 PKG_RELEASE:=1 PKG_SOURCE:=wireguard-linux-compat-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-linux-compat/snapshot/ -PKG_HASH:=3f5d990006e6eabfd692d925ec314fff2c5ee7dcdb869a6510d579acfdd84ec0 +PKG_HASH:=c0e607138a17daac656f508d8e63ea3737b5221fa5d9288191ddeb099f5a3b92 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING From f0a586107e73371e67a00f72fcabf2f1b87a90dc Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 18 Dec 2021 12:01:27 +0100 Subject: [PATCH 51/65] linux-firmware: Update to version 20121216 The rtl8723bs firmware was removed and a symlink to the rtl8723bu firmware was created like it is done in upstream linux-firmware. The following OpenWrt packages are changing: * amdgpu-firmware: Multiple updates and new files * ar3k-firmware: Multiple updates and new files * ath10k-firmware-qca6174: Updated ath10k/QCA6174/hw3.0/board-2.bin * bnx2x-firmware: Added bnx2x-e1-7.13.21.0.fw, bnx2x-e1h-7.13.21.0.fw and bnx2x-e2-7.13.21.0.fw * iwlwifi-firmware-iwl8260c: Updated iwlwifi-8000C-36.ucode * iwlwifi-firmware-iwl8265: Updated iwlwifi-8265-36.ucode * iwlwifi-firmware-iwl9000: Updated iwlwifi-9000-pu-b0-jf-b0-46.ucode * iwlwifi-firmware-iwl9260: Updated iwlwifi-9260-th-b0-jf-b0-46.ucode * r8169-firmware: Updated rtl8153c-1.fw * rtl8723bs-firmware: removed * rtl8723bu-firmware: Added rtlwifi/rtl8723bs_nic.bin symlink * rtl8822ce-firmware: Updated rtw8822c_fw.bin Signed-off-by: Hauke Mehrtens --- package/firmware/linux-firmware/Makefile | 4 ++-- package/firmware/linux-firmware/realtek.mk | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/package/firmware/linux-firmware/Makefile b/package/firmware/linux-firmware/Makefile index 291b7258c6..4ef67ba747 100644 --- a/package/firmware/linux-firmware/Makefile +++ b/package/firmware/linux-firmware/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=linux-firmware -PKG_VERSION:=20210511 +PKG_VERSION:=20211216 PKG_RELEASE:=1 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=2aa6ae8b9808408f9811ac38f00c188e53e984a2b3990254f6c9c02c1ab13417 +PKG_HASH:=eeddb4e6bef31fd1a3757f12ccc324929bbad97855c0b9ec5ed780f74de1837d PKG_MAINTAINER:=Felix Fietkau diff --git a/package/firmware/linux-firmware/realtek.mk b/package/firmware/linux-firmware/realtek.mk index b0f6ff7f35..081cc1b37c 100644 --- a/package/firmware/linux-firmware/realtek.mk +++ b/package/firmware/linux-firmware/realtek.mk @@ -76,16 +76,10 @@ Package/rtl8723bu-firmware = $(call Package/firmware-default,RealTek RTL8723BU f define Package/rtl8723bu-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8723bu_nic.bin $(1)/lib/firmware/rtlwifi + ln -s rtl8723bu_nic.bin $(1)/lib/firmware/rtlwifi/rtl8723bs_nic.bin endef $(eval $(call BuildPackage,rtl8723bu-firmware)) -Package/rtl8723bs-firmware = $(call Package/firmware-default,RealTek RTL8723BS firmware) -define Package/rtl8723bs-firmware/install - $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi - $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8723bs*.bin $(1)/lib/firmware/rtlwifi -endef -$(eval $(call BuildPackage,rtl8723bs-firmware)) - Package/rtl8821ae-firmware = $(call Package/firmware-default,RealTek RTL8821AE firmware) define Package/rtl8821ae-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi From b8d4e63aabd9da878b9d78a9deee4dcfc9ca68c4 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 26 Dec 2021 23:38:52 +0100 Subject: [PATCH 52/65] tcpdump: libpcap: Remove http://www.us.tcpdump.org mirror The http://www.us.tcpdump.org mirror will go offline soon, only use the normal download URL. Reported-by: Denis Ovsienko Signed-off-by: Hauke Mehrtens --- package/libs/libpcap/Makefile | 3 +-- package/network/utils/tcpdump/Makefile | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/package/libs/libpcap/Makefile b/package/libs/libpcap/Makefile index d07c83ac6f..2e5fc07831 100644 --- a/package/libs/libpcap/Makefile +++ b/package/libs/libpcap/Makefile @@ -12,8 +12,7 @@ PKG_VERSION:=1.10.1 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \ - http://www.tcpdump.org/release/ +PKG_SOURCE_URL:=http://www.tcpdump.org/release/ PKG_HASH:=ed285f4accaf05344f90975757b3dbfe772ba41d1c401c2648b7fa45b711bdd4 PKG_MAINTAINER:=Felix Fietkau diff --git a/package/network/utils/tcpdump/Makefile b/package/network/utils/tcpdump/Makefile index f333cf98d2..a14fb9a1b7 100644 --- a/package/network/utils/tcpdump/Makefile +++ b/package/network/utils/tcpdump/Makefile @@ -12,8 +12,7 @@ PKG_VERSION:=4.9.3 PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \ - http://www.tcpdump.org/release/ +PKG_SOURCE_URL:=http://www.tcpdump.org/release/ PKG_HASH:=2cd47cb3d460b6ff75f4a9940f594317ad456cfbf2bd2c8e5151e16559db6410 PKG_MAINTAINER:=Felix Fietkau From ab7129a3c628db57f98f9c7ec8ef96be97b433b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Tue, 14 Dec 2021 12:12:18 +0100 Subject: [PATCH 53/65] toolchain: musl: disable crypt size hack by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable this option and thus re-include crypt() support for the SHA256, SHA512 and Blowfish ciphers on all devices. According to commit 9365745f8e7b ("musl: add a hack to remove unused crypt() algorithms, saves ~14k after lzma") it should add about ~14k to the resulting image, which seems to be a reasonable size increase for consistent crypt() support. Decided to not remove this hack completely as it might be still useful for people trying to fit custom images onto smaller devices and the patch is rather simple so we can afford to keep it for now. References: https://github.com/openwrt/openwrt/pull/1331 Signed-off-by: Petr Štetiar --- toolchain/musl/Config.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/toolchain/musl/Config.in b/toolchain/musl/Config.in index 7e83b6fa53..67ede4d1e7 100644 --- a/toolchain/musl/Config.in +++ b/toolchain/musl/Config.in @@ -1,9 +1,10 @@ # Password crypt stubbing config MUSL_DISABLE_CRYPT_SIZE_HACK - bool "Include crypt() support for SHA256, SHA512 and Blowfish ciphers" - depends on TOOLCHAINOPTS && USE_MUSL && !EXTERNAL_TOOLCHAIN - default n + bool + prompt "Include crypt() support for SHA256, SHA512 and Blowfish ciphers" if TOOLCHAINOPTS + depends on USE_MUSL && !EXTERNAL_TOOLCHAIN + default y help Enable this option to re-include crypt() support for the SHA256, SHA512 and Blowfish ciphers. Without this option, attempting to hash a string with a salt From c58fe0a7fb266659cbac06e6fe9d01815cbaba32 Mon Sep 17 00:00:00 2001 From: Javier Marcet Date: Sat, 4 Apr 2020 17:52:29 +0200 Subject: [PATCH 54/65] base-files: upgrade: fix efi partitions size calculation We were missing (not using) the last sector of each partition, compared with the output of gparted. Signed-off-by: Javier Marcet [moved the dot] Signed-off-by: Christian Lamparter --- package/base-files/files/lib/upgrade/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index 708320fb23..4d8392635d 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -238,7 +238,7 @@ get_partitions() { # local type="$1" local lba="$(( $(hex_le32_to_cpu $4) * 0x100000000 + $(hex_le32_to_cpu $3) ))" local end="$(( $(hex_le32_to_cpu $6) * 0x100000000 + $(hex_le32_to_cpu $5) ))" - local num="$(( $end - $lba ))" + local num="$(( $end - $lba + 1 ))" [ "$type" = "00000000000000000000000000000000" ] && continue From d300a63143d8d3ea7ac3bacafab8b5a013369bf0 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Sun, 19 Dec 2021 13:51:41 +0100 Subject: [PATCH 55/65] linux-firmware: amd: consolidate amd's linux-firmware entries this patch consolidates the amd64-microcode (moved to linux-firmware.git, previously this was an extra debian source package download), amdgpu and radeon firmwares into a shared "amd" makefile. With the upcoming 20211216 linux-firmware bump, this will include a microcode update for ZEN 3 CPUs. Signed-off-by: Christian Lamparter --- package/firmware/amd64-microcode/Makefile | 47 ----------------------- package/firmware/linux-firmware/amd.mk | 29 ++++++++++++++ package/firmware/linux-firmware/amdgpu.mk | 9 ----- package/firmware/linux-firmware/radeon.mk | 9 ----- 4 files changed, 29 insertions(+), 65 deletions(-) delete mode 100644 package/firmware/amd64-microcode/Makefile create mode 100644 package/firmware/linux-firmware/amd.mk delete mode 100644 package/firmware/linux-firmware/amdgpu.mk delete mode 100644 package/firmware/linux-firmware/radeon.mk diff --git a/package/firmware/amd64-microcode/Makefile b/package/firmware/amd64-microcode/Makefile deleted file mode 100644 index 4444883c74..0000000000 --- a/package/firmware/amd64-microcode/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (C) 2018 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=amd64-microcode -PKG_VERSION:=20191218 -PKG_RELEASE:=1 - -PKG_SOURCE:=amd64-microcode_3.$(PKG_VERSION).$(PKG_RELEASE).tar.xz -PKG_SOURCE_URL:=@DEBIAN/pool/non-free/a/amd64-microcode/ -PKG_HASH:=f469b79348097c5f04641b67a39d0ee5a2a1916c9556281626c04f2275d4132d -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 - SECTION:=firmware - CATEGORY:=Firmware - URL:=$(PKG_SOURCE_URL) - DEPENDS:=@TARGET_x86 - TITLE:=AMD64 CPU microcode -endef - -define Build/Prepare - rm -rf $(PKG_BUILD_DIR) - mkdir -p $(PKG_BUILD_DIR) - $(TAR) -C $(BUILD_DIR) -xJf $(DL_DIR)/$(PKG_SOURCE) -endef - -define Build/Compile -endef - -define Package/amd64-microcode/install - $(INSTALL_DIR) $(1)/lib/firmware/amd-ucode - $(INSTALL_DATA) $(PKG_BUILD_DIR)/*.bin $(1)/lib/firmware/amd-ucode -endef - -$(eval $(call BuildPackage,amd64-microcode)) diff --git a/package/firmware/linux-firmware/amd.mk b/package/firmware/linux-firmware/amd.mk new file mode 100644 index 0000000000..68b305e862 --- /dev/null +++ b/package/firmware/linux-firmware/amd.mk @@ -0,0 +1,29 @@ +Package/amd64-microcode = $(call Package/firmware-default,AMD64 CPU microcode,@TARGET_x86) +define Package/amd64-microcode/install + $(INSTALL_DIR) $(1)/lib/firmware/amd-ucode + $(CP) \ + $(PKG_BUILD_DIR)/amd-ucode/*.bin \ + $(1)/lib/firmware/amd-ucode +endef + +$(eval $(call BuildPackage,amd64-microcode)) + +Package/amdgpu-firmware = $(call Package/firmware-default,AMDGPU Video Driver firmware) +define Package/amdgpu-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware/amdgpu + $(CP) \ + $(PKG_BUILD_DIR)/amdgpu/*.bin \ + $(1)/lib/firmware/amdgpu +endef + +$(eval $(call BuildPackage,amdgpu-firmware)) + +Package/radeon-firmware = $(call Package/firmware-default,Radeon Video Driver firmware) +define Package/radeon-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware/radeon + $(CP) \ + $(PKG_BUILD_DIR)/radeon/*.bin \ + $(1)/lib/firmware/radeon +endef + +$(eval $(call BuildPackage,radeon-firmware)) diff --git a/package/firmware/linux-firmware/amdgpu.mk b/package/firmware/linux-firmware/amdgpu.mk deleted file mode 100644 index 89f11e7c39..0000000000 --- a/package/firmware/linux-firmware/amdgpu.mk +++ /dev/null @@ -1,9 +0,0 @@ -Package/amdgpu-firmware = $(call Package/firmware-default,AMDGPU Video Driver firmware) -define Package/amdgpu-firmware/install - $(INSTALL_DIR) $(1)/lib/firmware/amdgpu - $(CP) \ - $(PKG_BUILD_DIR)/amdgpu/*.bin \ - $(1)/lib/firmware/amdgpu -endef - -$(eval $(call BuildPackage,amdgpu-firmware)) diff --git a/package/firmware/linux-firmware/radeon.mk b/package/firmware/linux-firmware/radeon.mk deleted file mode 100644 index b750efbfce..0000000000 --- a/package/firmware/linux-firmware/radeon.mk +++ /dev/null @@ -1,9 +0,0 @@ -Package/radeon-firmware = $(call Package/firmware-default,Radeon Video Driver firmware) -define Package/radeon-firmware/install - $(INSTALL_DIR) $(1)/lib/firmware/radeon - $(CP) \ - $(PKG_BUILD_DIR)/radeon/*.bin \ - $(1)/lib/firmware/radeon -endef - -$(eval $(call BuildPackage,radeon-firmware)) From 176e1fe1919f14ce2d77d94a4b001f5c9fb5cf7f Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Tue, 2 Nov 2021 16:17:57 -1000 Subject: [PATCH 56/65] scripts: dump-target-info print kernel versions This commits adds the ability to print Kernel versions of all targets/subtargets. If a testing Kernel is set print that version as well. Example output: apm821xx/nand 5.10 apm821xx/sata 5.10 arc770/generic 5.4 archs38/generic 5.4 armvirt/32 5.10 armvirt/64 5.10 at91/sam9x 5.10 at91/sama5 5.10 ath25/generic 5.4 ath79/generic 5.4 5.10 ath79/mikrotik 5.4 5.10 --- %< --- This should help to get a quick update on the state of Kernels. Signed-off-by: Paul Spooren (cherry picked from commit 02de391b086dd2b7a72c2394cfb66cec666a51c1) --- scripts/dump-target-info.pl | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/scripts/dump-target-info.pl b/scripts/dump-target-info.pl index aa97f8d603..0e4af17fe0 100755 --- a/scripts/dump-target-info.pl +++ b/scripts/dump-target-info.pl @@ -4,7 +4,7 @@ use strict; use warnings; use Cwd; -my (%targets, %architectures); +my (%targets, %architectures, %kernels); $ENV{'TOPDIR'} = Cwd::getcwd(); @@ -13,7 +13,7 @@ sub parse_targetinfo { my ($target_dir, $subtarget) = @_; if (open M, "make -C '$target_dir' --no-print-directory DUMP=1 TARGET_BUILD=1 SUBTARGET='$subtarget' |") { - my ($target_name, $target_arch, @target_features); + my ($target_name, $target_arch, $target_kernel, $target_testing_kernel, @target_features); while (defined(my $line = readline M)) { chomp $line; @@ -23,19 +23,32 @@ sub parse_targetinfo { elsif ($line =~ /^Target-Arch-Packages: (.+)$/) { $target_arch = $1; } + elsif ($line =~ /^Linux-Version: (\d\.\d+)\.\d+$/) { + $target_kernel = $1; + } + elsif ($line =~ /^Linux-Testing-Version: (\d\.\d+)\.\d+$/) { + $target_testing_kernel = $1; + } elsif ($line =~ /^Target-Features: (.+)$/) { @target_features = split /\s+/, $1; } elsif ($line =~ /^@\@$/) { - if ($target_name && $target_arch && + if ($target_name && $target_arch && $target_kernel && !grep { $_ eq 'broken' or $_ eq 'source-only' } @target_features) { $targets{$target_name} = $target_arch; $architectures{$target_arch} ||= []; push @{$architectures{$target_arch}}, $target_name; + $kernels{$target_name} ||= []; + push @{$kernels{$target_name}}, $target_kernel; + if ($target_testing_kernel) { + push @{$kernels{$target_name}}, $target_testing_kernel; + } } undef $target_name; undef $target_arch; + undef $target_kernel; + undef $target_testing_kernel; @target_features = (); } } @@ -85,7 +98,14 @@ elsif (@ARGV == 1 && $ARGV[0] eq 'architectures') { printf "%s %s\n", $target_arch, join ' ', @{$architectures{$target_arch}}; } } +elsif (@ARGV == 1 && $ARGV[0] eq 'kernels') { + get_targetinfo(); + foreach my $target_name (sort keys %targets) { + printf "%s %s\n", $target_name, join ' ', @{$kernels{$target_name}}; + } +} else { print "Usage: $0 targets\n"; print "Usage: $0 architectures\n"; + print "Usage: $0 kernels\n"; } From 1689eefe60e6dbcdcac30bc1ef13a5322f0ba320 Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Wed, 29 Dec 2021 20:52:22 +0100 Subject: [PATCH 57/65] tools/cmake: update to version 3.22.1 Signed-off-by: Josef Schlehofer (cherry picked from commit 4b587f25614f3f7215360f96807ce760fa4ef3aa) --- tools/cmake/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/cmake/Makefile b/tools/cmake/Makefile index 9819176713..e54e8c4547 100644 --- a/tools/cmake/Makefile +++ b/tools/cmake/Makefile @@ -7,14 +7,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cmake -PKG_VERSION:=3.22.0 +PKG_VERSION:=3.22.1 PKG_RELEASE:=1 PKG_CPE_ID:=cpe:/a:kitware:cmake PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/Kitware/CMake/releases/download/v$(PKG_VERSION)/ \ https://cmake.org/files/v3.19/ -PKG_HASH:=998c7ba34778d2dfdb3df8a695469e24b11e2bfa21fbe41b361a3f45e1c9345e +PKG_HASH:=0e998229549d7b3f368703d20e248e7ee1f853910d42704aa87918c213ea82c0 HOST_BUILD_PARALLEL:=1 HOST_CONFIGURE_PARALLEL:=1 From 736a3977cf4f2c517fc894d69ff5383539cc06ef Mon Sep 17 00:00:00 2001 From: "Sergey V. Lobanov" Date: Sat, 25 Dec 2021 02:04:50 +0300 Subject: [PATCH 58/65] libs/wolfssl: add SAN (Subject Alternative Name) support x509v3 SAN extension is required to generate a certificate compatible with chromium-based web browsers (version >58) It can be disabled via unsetting CONFIG_WOLFSSL_ALT_NAMES Signed-off-by: Sergey V. Lobanov (cherry picked from commit dfd695f4b9f364a7c7db646d2cada10fdf304f02) --- package/libs/wolfssl/Config.in | 4 ++++ package/libs/wolfssl/Makefile | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package/libs/wolfssl/Config.in b/package/libs/wolfssl/Config.in index 99c156292c..b32d5ab6cb 100644 --- a/package/libs/wolfssl/Config.in +++ b/package/libs/wolfssl/Config.in @@ -55,6 +55,10 @@ config WOLFSSL_HAS_OPENVPN bool "Include OpenVPN support" default n +config WOLFSSL_ALT_NAMES + bool "Include SAN (Subject Alternative Name) support" + default y + config WOLFSSL_HAS_DEVCRYPTO bool diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index 1e8e63aa7d..9fe7fa763c 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -32,7 +32,7 @@ PKG_CONFIG_DEPENDS:=\ 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_OPENVPN + CONFIG_WOLFSSL_HAS_OPENVPN CONFIG_WOLFSSL_ALT_NAMES include $(INCLUDE_DIR)/package.mk @@ -62,7 +62,8 @@ TARGET_CFLAGS += \ -fomit-frame-pointer \ -flto \ -DFP_MAX_BITS=8192 \ - -DWOLFSSL_ALT_CERT_CHAINS + -DWOLFSSL_ALT_CERT_CHAINS \ + $(if $(CONFIG_WOLFSSL_ALT_NAMES),-DWOLFSSL_ALT_NAMES) TARGET_LDFLAGS += -flto From 7014c76c7985b0876b651abda7a359968409ea0d Mon Sep 17 00:00:00 2001 From: "Sergey V. Lobanov" Date: Sat, 25 Dec 2021 02:05:35 +0300 Subject: [PATCH 59/65] utils/px5g-wolfssl: make selfsigned certicates compatible with chromium Chromium based web-browsers (version >58) checks x509v3 extended attributes. If this check fails then chromium does not allow to click "Proceed to ... (unsafe)" link. This patch add three x509v3 extended attributes to self-signed certificate: 1. SAN (Subject Alternative Name) (DNS Name) = CN (common name) 2. Key Usage = Digital Signature, Non Repudiation, Key Encipherment 3. Extended Key Usage = TLS Web Server Authentication SAN will be added only if CONFIG_WOLFSSL_ALT_NAMES=y Signed-off-by: Sergey V. Lobanov (cherry picked from commit 6bfc8bb4a37903bd1d3bb7e7824d89f3a2cca6a1) --- package/utils/px5g-wolfssl/Makefile | 2 ++ package/utils/px5g-wolfssl/px5g-wolfssl.c | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/package/utils/px5g-wolfssl/Makefile b/package/utils/px5g-wolfssl/Makefile index 12ebcdcd2e..fa1db52648 100644 --- a/package/utils/px5g-wolfssl/Makefile +++ b/package/utils/px5g-wolfssl/Makefile @@ -12,6 +12,8 @@ PKG_USE_MIPS16:=0 PKG_MAINTAINER:=Paul Spooren +PKG_CONFIG_DEPENDS:=CONFIG_WOLFSSL_ALT_NAMES + include $(INCLUDE_DIR)/package.mk define Package/px5g-wolfssl diff --git a/package/utils/px5g-wolfssl/px5g-wolfssl.c b/package/utils/px5g-wolfssl/px5g-wolfssl.c index 763d7b4b71..86227d6afd 100644 --- a/package/utils/px5g-wolfssl/px5g-wolfssl.c +++ b/package/utils/px5g-wolfssl/px5g-wolfssl.c @@ -203,8 +203,23 @@ int selfsigned(WC_RNG *rng, char **arg) { strncpy(newCert.subject.org, val, CTC_NAME_SIZE); else if (!strcmp(key, "OU")) strncpy(newCert.subject.unit, val, CTC_NAME_SIZE); - else if (!strcmp(key, "CN")) + else if (!strcmp(key, "CN")) { strncpy(newCert.subject.commonName, val, CTC_NAME_SIZE); + +#ifdef WOLFSSL_ALT_NAMES + if(strlen(val) + 2 > 256) { + fprintf(stderr, "error: CN is too long: %s\n", val); + return 1; + } + + newCert.altNames[0] = 0x30; //Sequence with one element + newCert.altNames[1] = strlen(val) + 2; // Length of entire sequence + newCert.altNames[2] = 0x82; //8 - String, 2 - DNS Name + newCert.altNames[3] = strlen(val); //DNS Name length + memcpy(newCert.altNames + 4, val, strlen(val)); //DNS Name + newCert.altNamesSz = strlen(val) + 4; +#endif + } else if (!strcmp(key, "EMAIL")) strncpy(newCert.subject.email, val, CTC_NAME_SIZE); else @@ -216,6 +231,9 @@ int selfsigned(WC_RNG *rng, char **arg) { } newCert.daysValid = days; + newCert.keyUsage = KEYUSE_DIGITAL_SIG | KEYUSE_CONTENT_COMMIT | KEYUSE_KEY_ENCIPHER; + newCert.extKeyUsage = EXTKEYUSE_SERVER_AUTH; + gen_key(rng, &ecKey, &rsaKey, type, keySz, exp, curve); write_key(&ecKey, &rsaKey, type, keySz, keypath, pem); From 93f00af34d72d66c74f9ebe899ab6e7b1d55a5aa Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Tue, 28 Dec 2021 16:10:37 +0100 Subject: [PATCH 60/65] tfa-layerscape: fix build on systems without openssl headers The build fails when the openssl/sha.h header file is not installed on the host system. Fix this by setting the HOSTCCFLAGS variable to the OpenWrt HOST_CFLAGS variable, without setting this the include paths and other modifications in the host flags done by OpenWrt will be ignored by the build. This fixes the following build problem: gcc -c -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -Wall -Werror -pedantic -std=c99 -O2 -I../../include/tools_share fiptool.c -o fiptool.o In file included from fiptool.h:16, from fiptool.c:19: fiptool_platform.h:19:11: fatal error: openssl/sha.h: No such file or directory 19 | # include | ^~~~~~~~~~~~~~~ Signed-off-by: Hauke Mehrtens (cherry picked from commit d0501dc7fc078fb9e91d5365474db9ed8200f9e0) --- package/boot/tfa-layerscape/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/boot/tfa-layerscape/Makefile b/package/boot/tfa-layerscape/Makefile index a34c52bc3b..6485e4bd48 100644 --- a/package/boot/tfa-layerscape/Makefile +++ b/package/boot/tfa-layerscape/Makefile @@ -57,7 +57,8 @@ define Host/Compile $(MAKE) -C \ $(HOST_BUILD_DIR)/tools/fiptool \ CFLAGS="$(HOST_CFLAGS)" \ - LDFLAGS="$(HOST_LDFLAGS)" + LDFLAGS="$(HOST_LDFLAGS)" \ + HOSTCCFLAGS="$(HOST_CFLAGS)" $(MAKE) -C \ $(HOST_BUILD_DIR)/plat/nxp/tools \ CFLAGS="$(HOST_CFLAGS)" From 9bfc9841ffb99b5d38f53aea4e4acb2e20845511 Mon Sep 17 00:00:00 2001 From: Torsten Duwe Date: Wed, 22 Sep 2021 10:52:51 +0200 Subject: [PATCH 61/65] bcm27xx: add AMP2 to HifiBerry DAC+ / DAC+ Pro package According to the vendor [1] these HATs share the same DT overlay: hifiberry-dacplus. The PCM512x-compatible control unit is attached to I2C, so the additional snd-soc-pcm512x-i2c kernel module is required. Also explicitly note the Amp2 support to reduce confusion for those users. [1] Signed-off-by: Torsten Duwe (added bcm27xx tag, changed commit message) Signed-off-by: Christian Lamparter (cherry picked from commit 7ea9936f7f32fd90af1a29775ac3b297d7775db7) --- target/linux/bcm27xx/modules/sound.mk | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/target/linux/bcm27xx/modules/sound.mk b/target/linux/bcm27xx/modules/sound.mk index 8d449a51fa..3e4df676b6 100644 --- a/target/linux/bcm27xx/modules/sound.mk +++ b/target/linux/bcm27xx/modules/sound.mk @@ -463,24 +463,27 @@ $(eval $(call KernelPackage,sound-soc-hifiberry-dac)) define KernelPackage/sound-soc-hifiberry-dacplus - TITLE:=Support for HifiBerry DAC+ / DAC+ Pro + TITLE:=Support for HifiBerry DAC+ / DAC+ Pro / Amp2 KCONFIG:= \ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS \ - CONFIG_SND_SOC_PCM512x + CONFIG_SND_SOC_PCM512x \ + CONFIG_SND_SOC_PCM512x_I2C FILES:= \ $(LINUX_DIR)/drivers/clk/clk-hifiberry-dacpro.ko \ $(LINUX_DIR)/sound/soc/bcm/snd-soc-hifiberry-dacplus.ko \ - $(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm512x.ko + $(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm512x.ko \ + $(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm512x-i2c.ko AUTOLOAD:=$(call AutoLoad,68,clk-hifiberry-dacpro snd-soc-pcm512x \ - snd-soc-hifiberry-dacplus) + snd-soc-pcm512x-i2c snd-soc-hifiberry-dacplus) DEPENDS:= \ kmod-sound-soc-bcm2835-i2s \ - +kmod-i2c-bcm2835 + +kmod-i2c-bcm2835 \ + +kmod-regmap-i2c $(call AddDepends/sound) endef define KernelPackage/sound-soc-hifiberry-dacplus/description - This package contains support for HifiBerry DAC+ / DAC+ Pro + This package contains support for HifiBerry DAC+ / DAC+ Pro / Amp2 endef $(eval $(call KernelPackage,sound-soc-hifiberry-dacplus)) From d786f0ab6df6e7b203443cbc53dc5ee5717b9ba9 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Sat, 1 Jan 2022 17:35:27 +0800 Subject: [PATCH 62/65] kernel: add missing Kconfigs for kernel 4.14 All changes were taken from upstream commit 81d0b4a9f431b2 ("kernel: bump 4.14 to 4.14.259") Signed-off-by: Tianling Shen --- target/linux/armvirt/config-4.14 | 1 + target/linux/at91/config-4.14 | 1 + target/linux/bcm53xx/config-4.14 | 1 + target/linux/cns3xxx/config-4.14 | 1 + target/linux/gemini/config-4.14 | 1 + target/linux/generic/config-4.14 | 2 ++ target/linux/imx6/config-4.14 | 3 ++- target/linux/ipq40xx/config-4.14 | 1 + target/linux/ipq806x/config-4.14 | 1 + target/linux/kirkwood/config-4.14 | 1 + target/linux/mvebu/config-4.14 | 1 + target/linux/mxs/config-4.14 | 1 + target/linux/octeontx/config-4.14 | 1 + target/linux/omap/config-4.14 | 1 + target/linux/oxnas/config-4.14 | 1 + target/linux/sunxi/config-4.14 | 1 + target/linux/tegra/config-4.14 | 1 + target/linux/zynq/config-4.14 | 1 + 18 files changed, 20 insertions(+), 1 deletion(-) diff --git a/target/linux/armvirt/config-4.14 b/target/linux/armvirt/config-4.14 index a2d8bb4f20..8b0336f514 100644 --- a/target/linux/armvirt/config-4.14 +++ b/target/linux/armvirt/config-4.14 @@ -168,6 +168,7 @@ CONFIG_SRCU=y CONFIG_SWIOTLB=y CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_TREE_RCU=y +CONFIG_UNWINDER_FRAME_POINTER=y CONFIG_USB_SUPPORT=y CONFIG_VIRTIO=y CONFIG_VIRTIO_BALLOON=y diff --git a/target/linux/at91/config-4.14 b/target/linux/at91/config-4.14 index b1b49054ab..d849491cca 100644 --- a/target/linux/at91/config-4.14 +++ b/target/linux/at91/config-4.14 @@ -520,6 +520,7 @@ CONFIG_UBIFS_FS_ADVANCED_COMPR=y CONFIG_UBIFS_FS_LZO=y CONFIG_UBIFS_FS_ZLIB=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNWINDER_ARM=y CONFIG_USB=y CONFIG_USB_ACM=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y diff --git a/target/linux/bcm53xx/config-4.14 b/target/linux/bcm53xx/config-4.14 index 12da0eec9f..377eb8e72b 100644 --- a/target/linux/bcm53xx/config-4.14 +++ b/target/linux/bcm53xx/config-4.14 @@ -349,6 +349,7 @@ CONFIG_UBIFS_FS=y CONFIG_UBIFS_FS_LZO=y CONFIG_UBIFS_FS_ZLIB=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNWINDER_FRAME_POINTER=y CONFIG_USB_SUPPORT=y CONFIG_USE_OF=y CONFIG_VECTORS_BASE=0xffff0000 diff --git a/target/linux/cns3xxx/config-4.14 b/target/linux/cns3xxx/config-4.14 index a0c65fa5f0..d1000e1e01 100644 --- a/target/linux/cns3xxx/config-4.14 +++ b/target/linux/cns3xxx/config-4.14 @@ -355,6 +355,7 @@ CONFIG_TIMER_PROBE=y CONFIG_TREE_RCU=y CONFIG_TREE_SRCU=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNWINDER_FRAME_POINTER=y CONFIG_USB=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y CONFIG_USB_CNS3XXX_EHCI=y diff --git a/target/linux/gemini/config-4.14 b/target/linux/gemini/config-4.14 index fb96aa78c7..d92b947c00 100644 --- a/target/linux/gemini/config-4.14 +++ b/target/linux/gemini/config-4.14 @@ -409,6 +409,7 @@ CONFIG_TMPFS_POSIX_ACL=y CONFIG_TREE_SRCU=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_UNWINDER_ARM=y CONFIG_USB_SUPPORT=y # CONFIG_USERIO is not set CONFIG_USER_NS=y diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14 index 81e0467129..706696d419 100644 --- a/target/linux/generic/config-4.14 +++ b/target/linux/generic/config-4.14 @@ -5263,6 +5263,8 @@ CONFIG_UNIX98_PTYS=y # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_UNIX_DIAG is not set # CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_UNWINDER_ARM is not set +# CONFIG_UNWINDER_FRAME_POINTER is not set # CONFIG_UPROBES is not set # CONFIG_UPROBE_EVENTS is not set # CONFIG_US5182D is not set diff --git a/target/linux/imx6/config-4.14 b/target/linux/imx6/config-4.14 index 313f657a80..ddbf217376 100644 --- a/target/linux/imx6/config-4.14 +++ b/target/linux/imx6/config-4.14 @@ -49,6 +49,7 @@ CONFIG_ARM_PATCH_IDIV=y CONFIG_ARM_PATCH_PHYS_VIRT=y CONFIG_ARM_THUMB=y # CONFIG_ARM_THUMBEE is not set +CONFIG_ARM_UNWIND=y CONFIG_ARM_VIRT_EXT=y CONFIG_ASN1=y CONFIG_ASSOCIATIVE_ARRAY=y @@ -193,7 +194,6 @@ CONFIG_F2FS_STAT_FS=y CONFIG_FEC=y CONFIG_FIXED_PHY=y CONFIG_FIX_EARLYCON_MEM=y -CONFIG_FRAME_POINTER=y CONFIG_FSL_GUTS=y CONFIG_FS_ENCRYPTION=y CONFIG_FS_MBCACHE=y @@ -494,6 +494,7 @@ CONFIG_UBIFS_FS_ADVANCED_COMPR=y CONFIG_UBIFS_FS_LZO=y CONFIG_UBIFS_FS_ZLIB=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNWINDER_ARM=y CONFIG_USB=y CONFIG_USB_CHIPIDEA=y CONFIG_USB_CHIPIDEA_HOST=y diff --git a/target/linux/ipq40xx/config-4.14 b/target/linux/ipq40xx/config-4.14 index b977d56940..e213ebfcd3 100644 --- a/target/linux/ipq40xx/config-4.14 +++ b/target/linux/ipq40xx/config-4.14 @@ -484,6 +484,7 @@ CONFIG_UBIFS_FS_LZO=y CONFIG_UBIFS_FS_ZLIB=y CONFIG_UEVENT_HELPER_PATH="" CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNWINDER_ARM=y CONFIG_USB=y CONFIG_USB_COMMON=y # CONFIG_USB_EHCI_HCD is not set diff --git a/target/linux/ipq806x/config-4.14 b/target/linux/ipq806x/config-4.14 index 19f5f8ff7f..6f477c17e6 100644 --- a/target/linux/ipq806x/config-4.14 +++ b/target/linux/ipq806x/config-4.14 @@ -470,6 +470,7 @@ CONFIG_UBIFS_FS_LZO=y CONFIG_UBIFS_FS_ZLIB=y CONFIG_UEVENT_HELPER_PATH="" CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNWINDER_ARM=y CONFIG_USB=y CONFIG_USB_COMMON=y # CONFIG_USB_EHCI_HCD is not set diff --git a/target/linux/kirkwood/config-4.14 b/target/linux/kirkwood/config-4.14 index 95c01d7500..7db1fedb5d 100644 --- a/target/linux/kirkwood/config-4.14 +++ b/target/linux/kirkwood/config-4.14 @@ -326,6 +326,7 @@ CONFIG_UBIFS_FS_ADVANCED_COMPR=y CONFIG_UBIFS_FS_LZO=y CONFIG_UBIFS_FS_ZLIB=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNWINDER_FRAME_POINTER=y CONFIG_USB=y CONFIG_USB_COMMON=y CONFIG_USB_EHCI_HCD=y diff --git a/target/linux/mvebu/config-4.14 b/target/linux/mvebu/config-4.14 index 7a0caeeb61..ab2e9dfa99 100644 --- a/target/linux/mvebu/config-4.14 +++ b/target/linux/mvebu/config-4.14 @@ -471,6 +471,7 @@ CONFIG_UBIFS_FS=y CONFIG_UBIFS_FS_LZO=y CONFIG_UBIFS_FS_ZLIB=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNWINDER_ARM=y CONFIG_USB=y CONFIG_USB_COMMON=y CONFIG_USB_EHCI_HCD=y diff --git a/target/linux/mxs/config-4.14 b/target/linux/mxs/config-4.14 index 43d6a59bae..0ca639b56b 100644 --- a/target/linux/mxs/config-4.14 +++ b/target/linux/mxs/config-4.14 @@ -290,6 +290,7 @@ CONFIG_TIMER_OF=y CONFIG_TIMER_PROBE=y CONFIG_TINY_SRCU=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNWINDER_FRAME_POINTER=y CONFIG_USB=y CONFIG_USB_CHIPIDEA=y CONFIG_USB_CHIPIDEA_HOST=y diff --git a/target/linux/octeontx/config-4.14 b/target/linux/octeontx/config-4.14 index 09d22d517f..43dbe4d4fa 100644 --- a/target/linux/octeontx/config-4.14 +++ b/target/linux/octeontx/config-4.14 @@ -508,6 +508,7 @@ CONFIG_TASK_XACCT=y CONFIG_TEE=y CONFIG_THREAD_INFO_IN_TASK=y CONFIG_UNMAP_KERNEL_AT_EL0=y +CONFIG_UNWINDER_FRAME_POINTER=y CONFIG_THUNDER_NIC_BGX=y CONFIG_THUNDER_NIC_PF=y CONFIG_THUNDER_NIC_RGX=y diff --git a/target/linux/omap/config-4.14 b/target/linux/omap/config-4.14 index 795ff758e3..5e7e819e70 100644 --- a/target/linux/omap/config-4.14 +++ b/target/linux/omap/config-4.14 @@ -698,6 +698,7 @@ CONFIG_UBIFS_FS_LZO=y CONFIG_UBIFS_FS_ZLIB=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_UNWINDER_FRAME_POINTER=y CONFIG_USB=y CONFIG_USB_COMMON=y CONFIG_USB_DWC3=y diff --git a/target/linux/oxnas/config-4.14 b/target/linux/oxnas/config-4.14 index 5ff868ad87..300c7598d2 100644 --- a/target/linux/oxnas/config-4.14 +++ b/target/linux/oxnas/config-4.14 @@ -342,6 +342,7 @@ CONFIG_TINY_SRCU=y CONFIG_TRACE_CLOCK=y CONFIG_UEVENT_HELPER_PATH="" CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNWINDER_ARM=y CONFIG_USB_SUPPORT=y # CONFIG_USERIO is not set CONFIG_USE_OF=y diff --git a/target/linux/sunxi/config-4.14 b/target/linux/sunxi/config-4.14 index 6e19f1599b..b757502341 100644 --- a/target/linux/sunxi/config-4.14 +++ b/target/linux/sunxi/config-4.14 @@ -563,6 +563,7 @@ CONFIG_TOUCHSCREEN_SUN4I=y CONFIG_TREE_SRCU=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_UNWINDER_ARM=y CONFIG_USB=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y CONFIG_USB_COMMON=y diff --git a/target/linux/tegra/config-4.14 b/target/linux/tegra/config-4.14 index 42547da301..e5603f62b5 100644 --- a/target/linux/tegra/config-4.14 +++ b/target/linux/tegra/config-4.14 @@ -529,6 +529,7 @@ CONFIG_TREE_RCU=y CONFIG_TREE_SRCU=y CONFIG_TRUSTED_FOUNDATIONS=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNWINDER_FRAME_POINTER=y CONFIG_USB=y CONFIG_USB_COMMON=y CONFIG_USB_EHCI_HCD=y diff --git a/target/linux/zynq/config-4.14 b/target/linux/zynq/config-4.14 index 72b3a2d6c7..242c333098 100644 --- a/target/linux/zynq/config-4.14 +++ b/target/linux/zynq/config-4.14 @@ -666,6 +666,7 @@ CONFIG_UIO_PDRV_GENIRQ=y # CONFIG_UIO_SERCOS3 is not set CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_UNWINDER_ARM=y CONFIG_USB=y CONFIG_USB_CHIPIDEA=y CONFIG_USB_CHIPIDEA_HOST=y From beae30302bab9ca8c2a24f161da50b6d0d4b99b7 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Mon, 3 Jan 2022 13:40:06 +0800 Subject: [PATCH 63/65] include/version: Update ImmortalWrt info Signed-off-by: Tianling Shen --- include/version.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/version.mk b/include/version.mk index e1d92cc8b1..a26cac124a 100644 --- a/include/version.mk +++ b/include/version.mk @@ -36,19 +36,19 @@ VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),ImmortalWrt) VERSION_DIST_SANITIZED:=$(call sanitize,$(VERSION_DIST)) VERSION_MANUFACTURER:=$(call qstrip,$(CONFIG_VERSION_MANUFACTURER)) -VERSION_MANUFACTURER:=$(if $(VERSION_MANUFACTURER),$(VERSION_MANUFACTURER),OpenWrt) +VERSION_MANUFACTURER:=$(if $(VERSION_MANUFACTURER),$(VERSION_MANUFACTURER),ImmortalWrt) VERSION_MANUFACTURER_URL:=$(call qstrip,$(CONFIG_VERSION_MANUFACTURER_URL)) -VERSION_MANUFACTURER_URL:=$(if $(VERSION_MANUFACTURER_URL),$(VERSION_MANUFACTURER_URL),https://openwrt.org/) +VERSION_MANUFACTURER_URL:=$(if $(VERSION_MANUFACTURER_URL),$(VERSION_MANUFACTURER_URL),https://immortalwrt.org/) VERSION_BUG_URL:=$(call qstrip,$(CONFIG_VERSION_BUG_URL)) -VERSION_BUG_URL:=$(if $(VERSION_BUG_URL),$(VERSION_BUG_URL),https://bugs.openwrt.org/) +VERSION_BUG_URL:=$(if $(VERSION_BUG_URL),$(VERSION_BUG_URL),https://github.com/immortalwrt/immortalwrt/issues) VERSION_HOME_URL:=$(call qstrip,$(CONFIG_VERSION_HOME_URL)) -VERSION_HOME_URL:=$(if $(VERSION_HOME_URL),$(VERSION_HOME_URL),https://openwrt.org/) +VERSION_HOME_URL:=$(if $(VERSION_HOME_URL),$(VERSION_HOME_URL),https://immortalwrt.org/) VERSION_SUPPORT_URL:=$(call qstrip,$(CONFIG_VERSION_SUPPORT_URL)) -VERSION_SUPPORT_URL:=$(if $(VERSION_SUPPORT_URL),$(VERSION_SUPPORT_URL),https://forum.openwrt.org/) +VERSION_SUPPORT_URL:=$(if $(VERSION_SUPPORT_URL),$(VERSION_SUPPORT_URL),https://github.com/immortalwrt/immortalwrt/discussions) VERSION_PRODUCT:=$(call qstrip,$(CONFIG_VERSION_PRODUCT)) VERSION_PRODUCT:=$(if $(VERSION_PRODUCT),$(VERSION_PRODUCT),Generic) From 7b5bc6039e418a1c8c5ba3d71c1420a3295ff373 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Fri, 31 Dec 2021 11:06:25 -0300 Subject: [PATCH 64/65] openssl: bump to 1.1.1m This is a bugfix release. Changelog: *) Avoid loading of a dynamic engine twice. *) Fixed building on Debian with kfreebsd kernels *) Prioritise DANE TLSA issuer certs over peer certs *) Fixed random API for MacOS prior to 10.12 Patches were refreshed. Signed-off-by: Eneas U de Queiroz (cherry picked from commit def9565be632b316c82ffc5a7b28c789e9df75b4) --- package/libs/openssl/Makefile | 4 ++-- .../libs/openssl/patches/100-Configure-afalg-support.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index f01b50e5bc..9a8b03d5fd 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssl PKG_BASE:=1.1.1 -PKG_BUGFIX:=l +PKG_BUGFIX:=m PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) PKG_RELEASE:=1 PKG_USE_MIPS16:=0 @@ -28,7 +28,7 @@ PKG_SOURCE_URL:= \ ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \ ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/ -PKG_HASH:=0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1 +PKG_HASH:=f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96 PKG_LICENSE:=OpenSSL PKG_LICENSE_FILES:=LICENSE diff --git a/package/libs/openssl/patches/100-Configure-afalg-support.patch b/package/libs/openssl/patches/100-Configure-afalg-support.patch index 98944103b5..d8789f4b45 100644 --- a/package/libs/openssl/patches/100-Configure-afalg-support.patch +++ b/package/libs/openssl/patches/100-Configure-afalg-support.patch @@ -12,7 +12,7 @@ diff --git a/Configure b/Configure index 5a699836f3..74d057c219 100755 --- a/Configure +++ b/Configure -@@ -1545,7 +1545,9 @@ unless ($disabled{"crypto-mdebug-backtrace"}) +@@ -1548,7 +1548,9 @@ unless ($disabled{"crypto-mdebug-backtrace"}) unless ($disabled{afalgeng}) { $config{afalgeng}=""; From cf2cb83498f422f65e402e47843ad8a6f02de193 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Thu, 30 Dec 2021 23:49:27 +0100 Subject: [PATCH 65/65] binutils: fix compiling with arch-based distros Arch Linux users have encountered problems with packages that have a dependency on binutils. This error happens when libtool is doing: libtool: relink: ... So change PKG_FIXUP to "patch-libtool". Fixes error in the form of: libtool: install: error: relink `libctf.la' with the above command before installing it Upstream Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28545 OpenWrt Bug: https://bugs.openwrt.org/index.php?do=details&task_id=4149 Acked-by: John Audia Signed-off-by: Nick Hainke (cherry picked from commit 7df80be410ca846bbea632a9f32a189dc5afe374) --- package/devel/binutils/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/devel/binutils/Makefile b/package/devel/binutils/Makefile index ca1099349c..b904d4974d 100644 --- a/package/devel/binutils/Makefile +++ b/package/devel/binutils/Makefile @@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=binutils PKG_VERSION:=2.35.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=@GNU/binutils PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_VERSION:=$(PKG_VERSION) PKG_HASH:=dcd5b0416e7b0a9b24bed76cd8c6c132526805761863150a26d016415b8bdc7b -PKG_FIXUP:=autoreconf +PKG_FIXUP:=patch-libtool PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld libiberty gold intl PKG_REMOVE_FILES:=libtool.m4 PKG_INSTALL:=1