diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 3bfb4e6827..b99ab180ab 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.14 = .180 -LINUX_VERSION-4.19 = .123 -LINUX_VERSION-5.4 = .48 +LINUX_VERSION-4.14 = .187 +LINUX_VERSION-4.19 = .131 +LINUX_VERSION-5.4 = .50 -LINUX_KERNEL_HASH-4.14.180 = 444ef973d9b6a6ea174e4a9086f0aea980d8575d13302e431ad688f22e27ed0e -LINUX_KERNEL_HASH-4.19.123 = a79914d31a8d8c6b0e2bb0f2b143d615fe8a6c4dd2e0f36e97aa20efd69a993f -LINUX_KERNEL_HASH-5.4.48 = bf20ddafcd04c114d34654bb10d1eb74f1864f3d14b676c6f0d42d60bbcf1d53 +LINUX_KERNEL_HASH-4.14.187 = 5b223475eaeea196aa7e127d3f253bca5c35d8afdc72ca75230ce1ecdd1454bd +LINUX_KERNEL_HASH-4.19.131 = 19dfb9f6cc4ba30104b65dcce7d78240a4ae188cb366747d5f8eae35e98964ba +LINUX_KERNEL_HASH-5.4.50 = ad10f4c1e900f4e3eb4903b65dbcb4ca74250de63aa9fa7105b9b3c3f9a8a6e2 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/package/firmware/linux-firmware/Makefile b/package/firmware/linux-firmware/Makefile index 01dee59171..b50a025409 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:=20200122 +PKG_VERSION:=20200619 PKG_RELEASE:=1 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=a30e811b3736a72b874ac27e10662f5e5409b1cadf8aab7ba88e8f8bc8083986 +PKG_HASH:=962d3ae197d226c8259f9cc7746f7ef12a9d23787cd56bd27302021ba6339722 PKG_MAINTAINER:=Felix Fietkau diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile index 16930a13a8..76077ec156 100644 --- a/package/kernel/ath10k-ct/Makefile +++ b/package/kernel/ath10k-ct/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2020-04-29 -PKG_SOURCE_VERSION:=3637be6f6baf99e85a7f0b27f80a99a2f2a5f78d -PKG_MIRROR_HASH:=97cf22a4a57381c7eb7a9b8a8b1e347e9711ce51c89db971b4ab9a35af476ece +PKG_SOURCE_DATE:=2020-06-30 +PKG_SOURCE_VERSION:=edfbf9161ab75e4831981284ab2d5b1b9fb6ef72 +PKG_MIRROR_HASH:=98b7f88baea7314144fa8f8d141ad0dbbf2816f9606b0a89afb396761b558d14 # Build the 5.4 ath10k-ct driver version. Other option is "-4.19". # Probably this should match as closely as diff --git a/package/kernel/ath10k-ct/patches/201-ath10k-add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/ath10k-ct/patches/201-ath10k-add-LED-and-GPIO-controlling-support-for-various-chipsets.patch index c20800209d..15343abd5f 100644 --- a/package/kernel/ath10k-ct/patches/201-ath10k-add-LED-and-GPIO-controlling-support-for-various-chipsets.patch +++ b/package/kernel/ath10k-ct/patches/201-ath10k-add-LED-and-GPIO-controlling-support-for-various-chipsets.patch @@ -210,7 +210,7 @@ v13: #include "htt.h" #include "htc.h" -@@ -1469,6 +1470,13 @@ struct ath10k { +@@ -1470,6 +1471,13 @@ struct ath10k { } testmode; struct { @@ -445,7 +445,7 @@ v13: { --- a/ath10k-5.4/wmi-tlv.c +++ b/ath10k-5.4/wmi-tlv.c -@@ -4364,6 +4364,8 @@ static const struct wmi_ops wmi_tlv_ops +@@ -4367,6 +4367,8 @@ static const struct wmi_ops wmi_tlv_ops .gen_echo = ath10k_wmi_tlv_op_gen_echo, .gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf, .gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable, @@ -456,7 +456,7 @@ v13: static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = { --- a/ath10k-5.4/wmi.c +++ b/ath10k-5.4/wmi.c -@@ -8295,6 +8295,49 @@ ath10k_wmi_op_gen_peer_set_param(struct +@@ -8305,6 +8305,49 @@ ath10k_wmi_op_gen_peer_set_param(struct return skb; } @@ -506,7 +506,7 @@ v13: static struct sk_buff * ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id, enum wmi_sta_ps_mode psmode) -@@ -10094,6 +10137,9 @@ static const struct wmi_ops wmi_ops = { +@@ -10104,6 +10147,9 @@ static const struct wmi_ops wmi_ops = { .fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, .gen_echo = ath10k_wmi_op_gen_echo, @@ -516,7 +516,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -10164,6 +10210,8 @@ static const struct wmi_ops wmi_10_1_ops +@@ -10174,6 +10220,8 @@ static const struct wmi_ops wmi_10_1_ops .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, .gen_echo = ath10k_wmi_op_gen_echo, @@ -525,7 +525,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -10243,6 +10291,8 @@ static const struct wmi_ops wmi_10_2_ops +@@ -10253,6 +10301,8 @@ static const struct wmi_ops wmi_10_2_ops .gen_delba_send = ath10k_wmi_op_gen_delba_send, .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, @@ -534,7 +534,7 @@ v13: /* .gen_pdev_enable_adaptive_cca not implemented */ }; -@@ -10314,6 +10364,8 @@ static const struct wmi_ops wmi_10_2_4_o +@@ -10324,6 +10374,8 @@ static const struct wmi_ops wmi_10_2_4_o ath10k_wmi_op_gen_pdev_enable_adaptive_cca, .get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype, .gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing, @@ -543,7 +543,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -10395,6 +10447,8 @@ static const struct wmi_ops wmi_10_4_ops +@@ -10405,6 +10457,8 @@ static const struct wmi_ops wmi_10_4_ops .gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info, .gen_echo = ath10k_wmi_op_gen_echo, .gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config, diff --git a/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch b/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch index b1c7bae193..dd35e2937c 100644 --- a/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch +++ b/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch @@ -16,7 +16,7 @@ Signed-off-by: Mathias Kresin --- a/ath10k-5.4/core.h +++ b/ath10k-5.4/core.h -@@ -1573,6 +1573,10 @@ struct ath10k { +@@ -1574,6 +1574,10 @@ struct ath10k { u8 csi_data[4096]; u16 csi_data_len; @@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin if (ret) --- a/ath10k-5.4/mac.c +++ b/ath10k-5.4/mac.c -@@ -10367,7 +10367,7 @@ int ath10k_mac_register(struct ath10k *a +@@ -10383,7 +10383,7 @@ int ath10k_mac_register(struct ath10k *a ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; #ifdef CPTCFG_MAC80211_LEDS diff --git a/package/kernel/ath10k-ct/patches/205-ath10k-Add-NL80211_EXT_FEATURE_AQL-flag.patch b/package/kernel/ath10k-ct/patches/205-ath10k-Add-NL80211_EXT_FEATURE_AQL-flag.patch index 41b917089c..33d69e7975 100644 --- a/package/kernel/ath10k-ct/patches/205-ath10k-Add-NL80211_EXT_FEATURE_AQL-flag.patch +++ b/package/kernel/ath10k-ct/patches/205-ath10k-Add-NL80211_EXT_FEATURE_AQL-flag.patch @@ -1,6 +1,6 @@ --- a/ath10k-5.4/mac.c +++ b/ath10k-5.4/mac.c -@@ -10180,6 +10180,7 @@ int ath10k_mac_register(struct ath10k *a +@@ -10182,6 +10182,7 @@ int ath10k_mac_register(struct ath10k *a wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_VHT_IBSS); wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_SET_SCAN_DWELL); diff --git a/package/libs/libjson-c/Makefile b/package/libs/libjson-c/Makefile index f02518310a..5e88bba9a3 100644 --- a/package/libs/libjson-c/Makefile +++ b/package/libs/libjson-c/Makefile @@ -8,26 +8,25 @@ include $(TOPDIR)/rules.mk PKG_NAME:=json-c -PKG_VERSION:=0.13.1 -PKG_RELEASE:=2 +PKG_VERSION:=0.14 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-nodoc.tar.gz PKG_SOURCE_URL:=https://s3.amazonaws.com/json-c_releases/releases/ -PKG_HASH:=94a26340c0785fcff4f46ff38609cf84ebcd670df0c8efd75d039cc951d80132 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) +PKG_HASH:=99914e644a25201d82ccefa20430f7515c110923360f9ef46755527c02412afa PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:json-c_project:json-c -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 +CMAKE_INSTALL:=1 +CMAKE_OPTIONS += -DCMAKE_INSTALL_INCLUDEDIR=$(STAGING_DIR)/usr/include PKG_MAINTAINER:=Felix Fietkau include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/cmake.mk TARGET_CFLAGS += $(FPIC) -Wno-implicit-fallthrough HOST_CFLAGS += -Wno-implicit-fallthrough @@ -38,22 +37,13 @@ define Package/libjson-c CATEGORY:=Libraries TITLE:=javascript object notation URL:=https://json-c.github.io/json-c/ - ABI_VERSION:=4 + ABI_VERSION:=5 endef define Package/libjson-c/description This package contains a library for javascript object notation backends. endef -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/json-c $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-c.{a,so*} $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/json-c.pc $(1)/usr/lib/pkgconfig/ -endef - define Package/libjson-c/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-c.so.* $(1)/usr/lib/ diff --git a/package/libs/libjson-c/patches/000-libm.patch b/package/libs/libjson-c/patches/000-libm.patch index de98e35d43..35ffec8724 100644 --- a/package/libs/libjson-c/patches/000-libm.patch +++ b/package/libs/libjson-c/patches/000-libm.patch @@ -1,18 +1,3 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -76,12 +76,6 @@ AC_FUNC_VPRINTF - AC_FUNC_MEMCMP - AC_CHECK_FUNCS([realloc]) - AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf vasprintf open vsyslog strncasecmp setlocale) --AC_CHECK_DECLS([INFINITY], [], [], [[#include ]]) --AC_CHECK_DECLS([nan], [], [], [[#include ]]) --AC_CHECK_DECLS([isnan], [], [], [[#include ]]) --AC_CHECK_DECLS([isinf], [], [], [[#include ]]) --AC_CHECK_DECLS([_isnan], [], [], [[#include ]]) --AC_CHECK_DECLS([_finite], [], [], [[#include ]]) - AC_MSG_CHECKING(for GCC atomic builtins) - AC_LINK_IFELSE( - [ --- a/math_compat.h +++ b/math_compat.h @@ -6,31 +6,9 @@ @@ -22,17 +7,17 @@ -/* Define isnan, isinf, infinity and nan on Windows/MSVC */ - -#ifndef HAVE_DECL_ISNAN --# ifdef HAVE_DECL__ISNAN +-#ifdef HAVE_DECL__ISNAN -#include -#define isnan(x) _isnan(x) --# endif +-#endif -#endif - -#ifndef HAVE_DECL_ISINF --# ifdef HAVE_DECL__FINITE +-#ifdef HAVE_DECL__FINITE -#include -#define isinf(x) (!_finite(x)) --# endif +-#endif -#endif - -#ifndef HAVE_DECL_INFINITY diff --git a/package/libs/libjson-c/patches/001-Fix-CVE-2020-12762.patch b/package/libs/libjson-c/patches/001-Fix-CVE-2020-12762.patch new file mode 100644 index 0000000000..3871d9992f --- /dev/null +++ b/package/libs/libjson-c/patches/001-Fix-CVE-2020-12762.patch @@ -0,0 +1,180 @@ +From 5d6fa331418d49f1bd488553fd1cfa9ab023fabb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= +Date: Thu, 14 May 2020 12:32:30 +0200 +Subject: [PATCH] Fix CVE-2020-12762. + +This commit is a squashed backport of the following commits +on the master branch: + + * 099016b7e8d70a6d5dd814e788bba08d33d48426 + * 77d935b7ae7871a1940cd827e850e6063044ec45 + * d07b91014986900a3a75f306d302e13e005e9d67 + * 519dfe1591d85432986f9762d41d1a883198c157 + * a59d5acfab4485d5133114df61785b1fc633e0c6 + * 26f080997d41cfdb17beab65e90c82217d0ac43b +--- + arraylist.c | 3 +++ + linkhash.c | 9 ++++++++- + printbuf.c | 18 ++++++++++++++++-- + tests/test4.c | 29 +++++++++++++++++++++++++++++ + tests/test4.expected | 1 + + 5 files changed, 57 insertions(+), 3 deletions(-) + +--- a/arraylist.c ++++ b/arraylist.c +@@ -136,6 +136,9 @@ int array_list_del_idx(struct array_list + { + size_t i, stop; + ++ /* Avoid overflow in calculation with large indices. */ ++ if (idx > SIZE_T_MAX - count) ++ return -1; + stop = idx + count; + if (idx >= arr->length || stop > arr->length) + return -1; +--- a/linkhash.c ++++ b/linkhash.c +@@ -12,6 +12,7 @@ + + #include "config.h" + ++#include + #include + #include + #include +@@ -499,6 +500,8 @@ struct lh_table *lh_table_new(int size, + int i; + struct lh_table *t; + ++ /* Allocate space for elements to avoid divisions by zero. */ ++ assert(size > 0); + t = (struct lh_table *)calloc(1, sizeof(struct lh_table)); + if (!t) + return NULL; +@@ -578,8 +581,12 @@ int lh_table_insert_w_hash(struct lh_tab + unsigned long n; + + if (t->count >= t->size * LH_LOAD_FACTOR) +- if (lh_table_resize(t, t->size * 2) != 0) ++ { ++ /* Avoid signed integer overflow with large tables. */ ++ int new_size = (t->size > INT_MAX / 2) ? INT_MAX : (t->size * 2); ++ if (t->size == INT_MAX || lh_table_resize(t, new_size) != 0) + return -1; ++ } + + n = h % t->size; + +--- a/printbuf.c ++++ b/printbuf.c +@@ -15,6 +15,7 @@ + + #include "config.h" + ++#include + #include + #include + #include +@@ -66,9 +67,16 @@ static int printbuf_extend(struct printb + if (p->size >= min_size) + return 0; + +- new_size = p->size * 2; +- if (new_size < min_size + 8) ++ /* Prevent signed integer overflows with large buffers. */ ++ if (min_size > INT_MAX - 8) ++ return -1; ++ if (p->size > INT_MAX / 2) + new_size = min_size + 8; ++ else { ++ new_size = p->size * 2; ++ if (new_size < min_size + 8) ++ new_size = min_size + 8; ++ } + #ifdef PRINTBUF_DEBUG + MC_DEBUG("printbuf_memappend: realloc " + "bpos=%d min_size=%d old_size=%d new_size=%d\n", +@@ -83,6 +91,9 @@ static int printbuf_extend(struct printb + + int printbuf_memappend(struct printbuf *p, const char *buf, int size) + { ++ /* Prevent signed integer overflows with large buffers. */ ++ if (size > INT_MAX - p->bpos - 1) ++ return -1; + if (p->size <= p->bpos + size + 1) + { + if (printbuf_extend(p, p->bpos + size + 1) < 0) +@@ -100,6 +111,9 @@ int printbuf_memset(struct printbuf *pb, + + if (offset == -1) + offset = pb->bpos; ++ /* Prevent signed integer overflows with large buffers. */ ++ if (len > INT_MAX - offset) ++ return -1; + size_needed = offset + len; + if (pb->size < size_needed) + { +--- a/tests/test4.c ++++ b/tests/test4.c +@@ -3,12 +3,15 @@ + */ + + #include "config.h" ++#include + #include ++#include + #include + + #include "json_inttypes.h" + #include "json_object.h" + #include "json_tokener.h" ++#include "snprintf_compat.h" + + void print_hex(const char *s) + { +@@ -24,6 +27,29 @@ void print_hex(const char *s) + putchar('\n'); + } + ++static void test_lot_of_adds(void); ++static void test_lot_of_adds() ++{ ++ int ii; ++ char key[50]; ++ json_object *jobj = json_object_new_object(); ++ assert(jobj != NULL); ++ for (ii = 0; ii < 500; ii++) ++ { ++ snprintf(key, sizeof(key), "k%d", ii); ++ json_object *iobj = json_object_new_int(ii); ++ assert(iobj != NULL); ++ if (json_object_object_add(jobj, key, iobj)) ++ { ++ fprintf(stderr, "FAILED to add object #%d\n", ii); ++ abort(); ++ } ++ } ++ printf("%s\n", json_object_to_json_string(jobj)); ++ assert(json_object_object_length(jobj) == 500); ++ json_object_put(jobj); ++} ++ + int main(void) + { + const char *input = "\"\\ud840\\udd26,\\ud840\\udd27,\\ud800\\udd26,\\ud800\\udd27\""; +@@ -52,5 +78,8 @@ int main(void) + retval = 1; + } + json_object_put(parse_result); ++ ++ test_lot_of_adds(); ++ + return retval; + } +--- a/tests/test4.expected ++++ b/tests/test4.expected +@@ -1,3 +1,4 @@ + input: "\ud840\udd26,\ud840\udd27,\ud800\udd26,\ud800\udd27" + JSON parse result is correct: 𠄦,𠄧,𐄦,𐄧 + PASS ++{ "k0": 0, "k1": 1, "k2": 2, "k3": 3, "k4": 4, "k5": 5, "k6": 6, "k7": 7, "k8": 8, "k9": 9, "k10": 10, "k11": 11, "k12": 12, "k13": 13, "k14": 14, "k15": 15, "k16": 16, "k17": 17, "k18": 18, "k19": 19, "k20": 20, "k21": 21, "k22": 22, "k23": 23, "k24": 24, "k25": 25, "k26": 26, "k27": 27, "k28": 28, "k29": 29, "k30": 30, "k31": 31, "k32": 32, "k33": 33, "k34": 34, "k35": 35, "k36": 36, "k37": 37, "k38": 38, "k39": 39, "k40": 40, "k41": 41, "k42": 42, "k43": 43, "k44": 44, "k45": 45, "k46": 46, "k47": 47, "k48": 48, "k49": 49, "k50": 50, "k51": 51, "k52": 52, "k53": 53, "k54": 54, "k55": 55, "k56": 56, "k57": 57, "k58": 58, "k59": 59, "k60": 60, "k61": 61, "k62": 62, "k63": 63, "k64": 64, "k65": 65, "k66": 66, "k67": 67, "k68": 68, "k69": 69, "k70": 70, "k71": 71, "k72": 72, "k73": 73, "k74": 74, "k75": 75, "k76": 76, "k77": 77, "k78": 78, "k79": 79, "k80": 80, "k81": 81, "k82": 82, "k83": 83, "k84": 84, "k85": 85, "k86": 86, "k87": 87, "k88": 88, "k89": 89, "k90": 90, "k91": 91, "k92": 92, "k93": 93, "k94": 94, "k95": 95, "k96": 96, "k97": 97, "k98": 98, "k99": 99, "k100": 100, "k101": 101, "k102": 102, "k103": 103, "k104": 104, "k105": 105, "k106": 106, "k107": 107, "k108": 108, "k109": 109, "k110": 110, "k111": 111, "k112": 112, "k113": 113, "k114": 114, "k115": 115, "k116": 116, "k117": 117, "k118": 118, "k119": 119, "k120": 120, "k121": 121, "k122": 122, "k123": 123, "k124": 124, "k125": 125, "k126": 126, "k127": 127, "k128": 128, "k129": 129, "k130": 130, "k131": 131, "k132": 132, "k133": 133, "k134": 134, "k135": 135, "k136": 136, "k137": 137, "k138": 138, "k139": 139, "k140": 140, "k141": 141, "k142": 142, "k143": 143, "k144": 144, "k145": 145, "k146": 146, "k147": 147, "k148": 148, "k149": 149, "k150": 150, "k151": 151, "k152": 152, "k153": 153, "k154": 154, "k155": 155, "k156": 156, "k157": 157, "k158": 158, "k159": 159, "k160": 160, "k161": 161, "k162": 162, "k163": 163, "k164": 164, "k165": 165, "k166": 166, "k167": 167, "k168": 168, "k169": 169, "k170": 170, "k171": 171, "k172": 172, "k173": 173, "k174": 174, "k175": 175, "k176": 176, "k177": 177, "k178": 178, "k179": 179, "k180": 180, "k181": 181, "k182": 182, "k183": 183, "k184": 184, "k185": 185, "k186": 186, "k187": 187, "k188": 188, "k189": 189, "k190": 190, "k191": 191, "k192": 192, "k193": 193, "k194": 194, "k195": 195, "k196": 196, "k197": 197, "k198": 198, "k199": 199, "k200": 200, "k201": 201, "k202": 202, "k203": 203, "k204": 204, "k205": 205, "k206": 206, "k207": 207, "k208": 208, "k209": 209, "k210": 210, "k211": 211, "k212": 212, "k213": 213, "k214": 214, "k215": 215, "k216": 216, "k217": 217, "k218": 218, "k219": 219, "k220": 220, "k221": 221, "k222": 222, "k223": 223, "k224": 224, "k225": 225, "k226": 226, "k227": 227, "k228": 228, "k229": 229, "k230": 230, "k231": 231, "k232": 232, "k233": 233, "k234": 234, "k235": 235, "k236": 236, "k237": 237, "k238": 238, "k239": 239, "k240": 240, "k241": 241, "k242": 242, "k243": 243, "k244": 244, "k245": 245, "k246": 246, "k247": 247, "k248": 248, "k249": 249, "k250": 250, "k251": 251, "k252": 252, "k253": 253, "k254": 254, "k255": 255, "k256": 256, "k257": 257, "k258": 258, "k259": 259, "k260": 260, "k261": 261, "k262": 262, "k263": 263, "k264": 264, "k265": 265, "k266": 266, "k267": 267, "k268": 268, "k269": 269, "k270": 270, "k271": 271, "k272": 272, "k273": 273, "k274": 274, "k275": 275, "k276": 276, "k277": 277, "k278": 278, "k279": 279, "k280": 280, "k281": 281, "k282": 282, "k283": 283, "k284": 284, "k285": 285, "k286": 286, "k287": 287, "k288": 288, "k289": 289, "k290": 290, "k291": 291, "k292": 292, "k293": 293, "k294": 294, "k295": 295, "k296": 296, "k297": 297, "k298": 298, "k299": 299, "k300": 300, "k301": 301, "k302": 302, "k303": 303, "k304": 304, "k305": 305, "k306": 306, "k307": 307, "k308": 308, "k309": 309, "k310": 310, "k311": 311, "k312": 312, "k313": 313, "k314": 314, "k315": 315, "k316": 316, "k317": 317, "k318": 318, "k319": 319, "k320": 320, "k321": 321, "k322": 322, "k323": 323, "k324": 324, "k325": 325, "k326": 326, "k327": 327, "k328": 328, "k329": 329, "k330": 330, "k331": 331, "k332": 332, "k333": 333, "k334": 334, "k335": 335, "k336": 336, "k337": 337, "k338": 338, "k339": 339, "k340": 340, "k341": 341, "k342": 342, "k343": 343, "k344": 344, "k345": 345, "k346": 346, "k347": 347, "k348": 348, "k349": 349, "k350": 350, "k351": 351, "k352": 352, "k353": 353, "k354": 354, "k355": 355, "k356": 356, "k357": 357, "k358": 358, "k359": 359, "k360": 360, "k361": 361, "k362": 362, "k363": 363, "k364": 364, "k365": 365, "k366": 366, "k367": 367, "k368": 368, "k369": 369, "k370": 370, "k371": 371, "k372": 372, "k373": 373, "k374": 374, "k375": 375, "k376": 376, "k377": 377, "k378": 378, "k379": 379, "k380": 380, "k381": 381, "k382": 382, "k383": 383, "k384": 384, "k385": 385, "k386": 386, "k387": 387, "k388": 388, "k389": 389, "k390": 390, "k391": 391, "k392": 392, "k393": 393, "k394": 394, "k395": 395, "k396": 396, "k397": 397, "k398": 398, "k399": 399, "k400": 400, "k401": 401, "k402": 402, "k403": 403, "k404": 404, "k405": 405, "k406": 406, "k407": 407, "k408": 408, "k409": 409, "k410": 410, "k411": 411, "k412": 412, "k413": 413, "k414": 414, "k415": 415, "k416": 416, "k417": 417, "k418": 418, "k419": 419, "k420": 420, "k421": 421, "k422": 422, "k423": 423, "k424": 424, "k425": 425, "k426": 426, "k427": 427, "k428": 428, "k429": 429, "k430": 430, "k431": 431, "k432": 432, "k433": 433, "k434": 434, "k435": 435, "k436": 436, "k437": 437, "k438": 438, "k439": 439, "k440": 440, "k441": 441, "k442": 442, "k443": 443, "k444": 444, "k445": 445, "k446": 446, "k447": 447, "k448": 448, "k449": 449, "k450": 450, "k451": 451, "k452": 452, "k453": 453, "k454": 454, "k455": 455, "k456": 456, "k457": 457, "k458": 458, "k459": 459, "k460": 460, "k461": 461, "k462": 462, "k463": 463, "k464": 464, "k465": 465, "k466": 466, "k467": 467, "k468": 468, "k469": 469, "k470": 470, "k471": 471, "k472": 472, "k473": 473, "k474": 474, "k475": 475, "k476": 476, "k477": 477, "k478": 478, "k479": 479, "k480": 480, "k481": 481, "k482": 482, "k483": 483, "k484": 484, "k485": 485, "k486": 486, "k487": 487, "k488": 488, "k489": 489, "k490": 490, "k491": 491, "k492": 492, "k493": 493, "k494": 494, "k495": 495, "k496": 496, "k497": 497, "k498": 498, "k499": 499 } diff --git a/package/libs/libjson-c/patches/001-Protect-array_list_del_idx-against-size_t-overflow.patch b/package/libs/libjson-c/patches/001-Protect-array_list_del_idx-against-size_t-overflow.patch deleted file mode 100644 index 456fbf35ff..0000000000 --- a/package/libs/libjson-c/patches/001-Protect-array_list_del_idx-against-size_t-overflow.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 099016b7e8d70a6d5dd814e788bba08d33d48426 Mon Sep 17 00:00:00 2001 -From: Tobias Stoeckmann -Date: Mon, 4 May 2020 19:41:16 +0200 -Subject: [PATCH 1/2] Protect array_list_del_idx against size_t overflow. - -If the assignment of stop overflows due to idx and count being -larger than SIZE_T_MAX in sum, out of boundary access could happen. - -It takes invalid usage of this function for this to happen, but -I decided to add this check so array_list_del_idx is as safe against -bad usage as the other arraylist functions. ---- - arraylist.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/arraylist.c -+++ b/arraylist.c -@@ -135,6 +135,9 @@ array_list_del_idx( struct array_list *a - { - size_t i, stop; - -+ /* Avoid overflow in calculation with large indices. */ -+ if (idx > SIZE_T_MAX - count) -+ return -1; - stop = idx + count; - if ( idx >= arr->length || stop > arr->length ) return -1; - for ( i = idx; i < stop; ++i ) { diff --git a/package/libs/libjson-c/patches/002-Prevent-division-by-zero-in-linkhash.patch b/package/libs/libjson-c/patches/002-Prevent-division-by-zero-in-linkhash.patch deleted file mode 100644 index d37fe5857b..0000000000 --- a/package/libs/libjson-c/patches/002-Prevent-division-by-zero-in-linkhash.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 77d935b7ae7871a1940cd827e850e6063044ec45 Mon Sep 17 00:00:00 2001 -From: Tobias Stoeckmann -Date: Mon, 4 May 2020 19:46:45 +0200 -Subject: [PATCH 2/2] Prevent division by zero in linkhash. - -If a linkhash with a size of zero is created, then modulo operations -are prone to division by zero operations. - -Purely protective measure against bad usage. ---- - linkhash.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/linkhash.c -+++ b/linkhash.c -@@ -12,6 +12,7 @@ - - #include "config.h" - -+#include - #include - #include - #include -@@ -498,6 +499,8 @@ struct lh_table* lh_table_new(int size, - int i; - struct lh_table *t; - -+ /* Allocate space for elements to avoid divisions by zero. */ -+ assert(size > 0); - t = (struct lh_table*)calloc(1, sizeof(struct lh_table)); - if (!t) - return NULL; diff --git a/package/libs/libjson-c/patches/003-Fix-integer-overflows.patch b/package/libs/libjson-c/patches/003-Fix-integer-overflows.patch deleted file mode 100644 index 2fac62df59..0000000000 --- a/package/libs/libjson-c/patches/003-Fix-integer-overflows.patch +++ /dev/null @@ -1,86 +0,0 @@ -From d07b91014986900a3a75f306d302e13e005e9d67 Mon Sep 17 00:00:00 2001 -From: Tobias Stoeckmann -Date: Mon, 4 May 2020 19:47:25 +0200 -Subject: [PATCH] Fix integer overflows. - -The data structures linkhash and printbuf are limited to 2 GB in size -due to a signed integer being used to track their current size. - -If too much data is added, then size variable can overflow, which is -an undefined behaviour in C programming language. - -Assuming that a signed int overflow just leads to a negative value, -like it happens on many sytems (Linux i686/amd64 with gcc), then -printbuf is vulnerable to an out of boundary write on 64 bit systems. ---- - linkhash.c | 7 +++++-- - printbuf.c | 19 ++++++++++++++++--- - 2 files changed, 21 insertions(+), 5 deletions(-) - ---- a/linkhash.c -+++ b/linkhash.c -@@ -579,9 +579,12 @@ int lh_table_insert_w_hash(struct lh_tab - { - unsigned long n; - -- if (t->count >= t->size * LH_LOAD_FACTOR) -- if (lh_table_resize(t, t->size * 2) != 0) -+ if (t->count >= t->size * LH_LOAD_FACTOR) { -+ /* Avoid signed integer overflow with large tables. */ -+ int new_size = INT_MAX / 2 < t->size ? t->size * 2 : INT_MAX; -+ if (t->size == INT_MAX || lh_table_resize(t, new_size) != 0) - return -1; -+ } - - n = h % t->size; - ---- a/printbuf.c -+++ b/printbuf.c -@@ -15,6 +15,7 @@ - - #include "config.h" - -+#include - #include - #include - #include -@@ -65,9 +66,16 @@ static int printbuf_extend(struct printb - if (p->size >= min_size) - return 0; - -- new_size = p->size * 2; -- if (new_size < min_size + 8) -- new_size = min_size + 8; -+ /* Prevent signed integer overflows with large buffers. */ -+ if (min_size > INT_MAX - 8) -+ return -1; -+ if (p->size > INT_MAX / 2) -+ new_size = min_size + 8; -+ else { -+ new_size = p->size * 2; -+ if (new_size < min_size + 8) -+ new_size = min_size + 8; -+ } - #ifdef PRINTBUF_DEBUG - MC_DEBUG("printbuf_memappend: realloc " - "bpos=%d min_size=%d old_size=%d new_size=%d\n", -@@ -82,6 +90,9 @@ static int printbuf_extend(struct printb - - int printbuf_memappend(struct printbuf *p, const char *buf, int size) - { -+ /* Prevent signed integer overflows with large buffers. */ -+ if (size > INT_MAX - p->bpos - 1) -+ return -1; - if (p->size <= p->bpos + size + 1) { - if (printbuf_extend(p, p->bpos + size + 1) < 0) - return -1; -@@ -98,6 +109,9 @@ int printbuf_memset(struct printbuf *pb, - - if (offset == -1) - offset = pb->bpos; -+ /* Prevent signed integer overflows with large buffers. */ -+ if (len > INT_MAX - offset) -+ return -1; - size_needed = offset + len; - if (pb->size < size_needed) - { diff --git a/package/libs/libjson-c/patches/004-Issue-599-Fix-the-backwards-check-in-lh_table_insert.patch b/package/libs/libjson-c/patches/004-Issue-599-Fix-the-backwards-check-in-lh_table_insert.patch deleted file mode 100644 index aed6918e70..0000000000 --- a/package/libs/libjson-c/patches/004-Issue-599-Fix-the-backwards-check-in-lh_table_insert.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 519dfe1591d85432986f9762d41d1a883198c157 Mon Sep 17 00:00:00 2001 -From: Eric Haszlakiewicz -Date: Sun, 10 May 2020 03:32:19 +0000 -Subject: [PATCH] Issue #599: Fix the backwards check in - lh_table_insert_w_hash() that was preventing adding more than 11 objects. Add - a test to check for this too. - ---- - linkhash.c | 2 +- - tests/test4.c | 29 +++++++++++++++++++++++++++++ - tests/test4.expected | 1 + - 3 files changed, 31 insertions(+), 1 deletion(-) - -diff --git a/linkhash.c b/linkhash.c -index 51e90b1..f930efd 100644 ---- a/linkhash.c -+++ b/linkhash.c -@@ -582,7 +582,7 @@ int lh_table_insert_w_hash(struct lh_table *t, const void *k, const void *v, con - - if (t->count >= t->size * LH_LOAD_FACTOR) { - /* Avoid signed integer overflow with large tables. */ -- int new_size = INT_MAX / 2 < t->size ? t->size * 2 : INT_MAX; -+ int new_size = (t->size > INT_MAX / 2) ? INT_MAX : (t->size * 2); - if (t->size == INT_MAX || lh_table_resize(t, new_size) != 0) - return -1; - } --- -2.26.2 - diff --git a/package/network/services/odhcpd/Makefile b/package/network/services/odhcpd/Makefile index 07d7d7d673..d3e131caec 100644 --- a/package/network/services/odhcpd/Makefile +++ b/package/network/services/odhcpd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=4 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git -PKG_SOURCE_DATE:=2020-05-04 -PKG_SOURCE_VERSION:=5ce077026b991f49d96464587386f93d92f56385 -PKG_MIRROR_HASH:=5fcb4e9f219398ac09ab87e942d1a9a3f4c58431dceefa30b429a19d2dba8ff6 +PKG_SOURCE_DATE:=2020-06-21 +PKG_SOURCE_VERSION:=5da52992a3926b36e53d0a5d55955a6ccbc35872 +PKG_MIRROR_HASH:=6e1f06fd1467d078dc8b4c5ee3cf13a695aa7222e98b2193479e862a4bd21049 PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/curl/Makefile b/package/network/utils/curl/Makefile index f2a7406164..54ca5d8b6b 100644 --- a/package/network/utils/curl/Makefile +++ b/package/network/utils/curl/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=curl -PKG_VERSION:=7.70.0 +PKG_VERSION:=7.71.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz @@ -16,7 +16,7 @@ PKG_SOURCE_URL:=https://dl.uxnr.de/mirror/curl/ \ https://curl.mirror.anstey.ca/ \ https://curl.askapache.com/download/ \ https://curl.haxx.se/download/ -PKG_HASH:=032f43f2674008c761af19bf536374128c16241fb234699a55f9fb603fcfbae7 +PKG_HASH:=cdf18794393d8bead915312708a9e5d819c6e9919de14b20d5c8e7987abd9772 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING diff --git a/package/network/utils/curl/patches/200-no_docs_tests.patch b/package/network/utils/curl/patches/200-no_docs_tests.patch index 53f8c6c3f6..b5f92b58c8 100644 --- a/package/network/utils/curl/patches/200-no_docs_tests.patch +++ b/package/network/utils/curl/patches/200-no_docs_tests.patch @@ -1,6 +1,6 @@ --- a/Makefile.am +++ b/Makefile.am -@@ -189,7 +189,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) +@@ -192,7 +192,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) bin_SCRIPTS = curl-config SUBDIRS = lib src @@ -9,10 +9,10 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libcurl.pc -@@ -300,8 +300,8 @@ cygwinbin: +@@ -303,8 +303,8 @@ cygwinbin: # We extend the standard install with a custom hook: install-data-hook: - (cd include && $(MAKE) install) + (cd include && $(MAKE) install) - (cd docs && $(MAKE) install) - (cd docs/libcurl && $(MAKE) install) + #(cd docs && $(MAKE) install) diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index 59d69df314..8f3525f890 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -32,22 +32,23 @@ for json_file in work_dir.glob("*.json"): image_info["profiles"][device_id]["images"][0] ) - -output["default_packages"] = run( - [ - "make", - "--no-print-directory", - "-C", - f"target/linux/{output['target'].split('/')[0]}", - "val.DEFAULT_PACKAGES", - ], - capture_output=True, - check=True, - env=environ.copy().update({"TOPDIR": Path().cwd()}), - text=True, -).stdout.split() - if output: + default_packages, output["arch_packages"] = run( + [ + "make", + "--no-print-directory", + "-C", + f"target/linux/{output['target'].split('/')[0]}", + "val.DEFAULT_PACKAGES", + "val.ARCH_PACKAGES", + ], + capture_output=True, + check=True, + env=environ.copy().update({"TOPDIR": Path().cwd()}), + text=True, + ).stdout.splitlines() + + output["default_packages"] = default_packages.split() output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":"))) else: print("JSON info file script could not find any JSON files for target") diff --git a/target/linux/apm821xx/patches-4.19/301-fix-memory-map-wndr4700.patch b/target/linux/apm821xx/patches-4.19/301-fix-memory-map-wndr4700.patch index 6eb04b2c25..0c9fb370f1 100644 --- a/target/linux/apm821xx/patches-4.19/301-fix-memory-map-wndr4700.patch +++ b/target/linux/apm821xx/patches-4.19/301-fix-memory-map-wndr4700.patch @@ -1,6 +1,6 @@ --- a/arch/powerpc/platforms/4xx/pci.c +++ b/arch/powerpc/platforms/4xx/pci.c -@@ -1905,9 +1905,9 @@ static void __init ppc4xx_configure_pcie +@@ -1903,9 +1903,9 @@ static void __init ppc4xx_configure_pcie * if it works */ out_le32(mbase + PECFG_PIM0LAL, 0x00000000); diff --git a/target/linux/apm821xx/patches-5.4/301-fix-memory-map-wndr4700.patch b/target/linux/apm821xx/patches-5.4/301-fix-memory-map-wndr4700.patch index 9c0ed35cf1..452d97e85a 100644 --- a/target/linux/apm821xx/patches-5.4/301-fix-memory-map-wndr4700.patch +++ b/target/linux/apm821xx/patches-5.4/301-fix-memory-map-wndr4700.patch @@ -1,6 +1,6 @@ --- a/arch/powerpc/platforms/4xx/pci.c +++ b/arch/powerpc/platforms/4xx/pci.c -@@ -1904,9 +1904,9 @@ static void __init ppc4xx_configure_pcie +@@ -1902,9 +1902,9 @@ static void __init ppc4xx_configure_pcie * if it works */ out_le32(mbase + PECFG_PIM0LAL, 0x00000000); diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c b/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c index 26f14fdac6..2e25c6b885 100644 --- a/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c +++ b/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c @@ -1566,7 +1566,7 @@ ar934x_nfc_remove(struct platform_device *pdev) nfc = platform_get_drvdata(pdev); if (nfc) { mtd = ar934x_nfc_to_mtd(nfc); - nand_release(mtd); + nand_release(&nfc->nand_chip); ar934x_nfc_free_buf(nfc); free_irq(nfc->irq, nfc); } diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c b/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c index 717a94237c..3479d5cc65 100644 --- a/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c +++ b/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c @@ -335,7 +335,7 @@ static int rb4xx_nand_probe(struct platform_device *pdev) return 0; err_release_nand: - nand_release(mtd); + nand_release(&info->chip); err_set_drvdata: platform_set_drvdata(pdev, NULL); err_free_info: @@ -356,7 +356,7 @@ static int rb4xx_nand_remove(struct platform_device *pdev) { struct rb4xx_nand_info *info = platform_get_drvdata(pdev); - nand_release(rbinfo_to_mtd(info)); + nand_release(&info->chip)); platform_set_drvdata(pdev, NULL); kfree(info); gpio_free(RB4XX_NAND_GPIO_NCE); diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/rb750_nand.c b/target/linux/ar71xx/files/drivers/mtd/nand/rb750_nand.c index 74f7f2913e..a578c54ad3 100644 --- a/target/linux/ar71xx/files/drivers/mtd/nand/rb750_nand.c +++ b/target/linux/ar71xx/files/drivers/mtd/nand/rb750_nand.c @@ -393,7 +393,7 @@ static int rb750_nand_probe(struct platform_device *pdev) return 0; err_release_nand: - nand_release(mtd); + nand_release(&info->chip); err_set_drvdata: platform_set_drvdata(pdev, NULL); err_free_info: @@ -405,7 +405,7 @@ static int rb750_nand_remove(struct platform_device *pdev) { struct rb750_nand_info *info = platform_get_drvdata(pdev); - nand_release(rbinfo_to_mtd(info)); + nand_release(&info->chip); platform_set_drvdata(pdev, NULL); kfree(info); diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/rb91x_nand.c b/target/linux/ar71xx/files/drivers/mtd/nand/rb91x_nand.c index 943b8e935e..f5a31bf58f 100644 --- a/target/linux/ar71xx/files/drivers/mtd/nand/rb91x_nand.c +++ b/target/linux/ar71xx/files/drivers/mtd/nand/rb91x_nand.c @@ -434,7 +434,7 @@ static int rb91x_nand_probe(struct platform_device *pdev) return 0; err_release_nand: - nand_release(mtd); + nand_release(&rbni->chip); return ret; } @@ -442,7 +442,7 @@ static int rb91x_nand_remove(struct platform_device *pdev) { struct rb91x_nand_info *info = platform_get_drvdata(pdev); - nand_release(rbinfo_to_mtd(info)); + nand_release(&rbni->chip); return 0; } diff --git a/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch index b6d8348e18..52f48d0d0e 100644 --- a/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch +++ b/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch @@ -276,7 +276,7 @@ case IPV6_2292HOPOPTS: --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c -@@ -397,7 +397,7 @@ static void ip6gre_err(struct sk_buff *s +@@ -400,7 +400,7 @@ static void ip6gre_err(struct sk_buff *s return; ipv6h = (const struct ipv6hdr *)skb->data; greh = (const struct gre_base_hdr *)(skb->data + offset); @@ -850,7 +850,7 @@ *sum = csum_fold(csum_partial(diff, sizeof(diff), --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c -@@ -1868,15 +1868,15 @@ static int vxlan_build_skb(struct sk_buf +@@ -1872,15 +1872,15 @@ static int vxlan_build_skb(struct sk_buf return err; vxh = __skb_push(skb, sizeof(*vxh)); diff --git a/target/linux/ath79/dts/ar7241_tplink.dtsi b/target/linux/ath79/dts/ar7241_tplink.dtsi index 09a239f67e..bb5d6d95da 100644 --- a/target/linux/ath79/dts/ar7241_tplink.dtsi +++ b/target/linux/ath79/dts/ar7241_tplink.dtsi @@ -109,10 +109,6 @@ mtd-mac-address-increment = <1>; }; -&gpio { - status = "okay"; -}; - &uart { status = "okay"; }; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts index 64833bf2c9..4d2741fbe6 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts +++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts @@ -156,10 +156,6 @@ mtd-mac-address-increment = <1>; }; -&gpio { - status = "okay"; -}; - &uart { status = "okay"; }; diff --git a/target/linux/ath79/dts/ar9330.dtsi b/target/linux/ath79/dts/ar9330.dtsi index 8e52ae8fdb..7d2f74122a 100644 --- a/target/linux/ath79/dts/ar9330.dtsi +++ b/target/linux/ath79/dts/ar9330.dtsi @@ -57,8 +57,6 @@ interrupt-controller; #interrupt-cells = <2>; - - status = "disabled"; }; pinmux: pinmux@18040028 { diff --git a/target/linux/ath79/dts/ar9330_dlink_dir-505.dts b/target/linux/ath79/dts/ar9330_dlink_dir-505.dts index 6984176daa..7fe5c8abe4 100644 --- a/target/linux/ath79/dts/ar9330_dlink_dir-505.dts +++ b/target/linux/ath79/dts/ar9330_dlink_dir-505.dts @@ -56,8 +56,6 @@ }; &gpio { - status = "okay"; - led_enable { gpio-hog; output-low; diff --git a/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts b/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts index d81d477227..b8c6959d5d 100644 --- a/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts +++ b/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts @@ -67,10 +67,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &usb { dr_mode = "host"; status = "okay"; diff --git a/target/linux/ath79/dts/ar9330_pqi_air-pen.dts b/target/linux/ath79/dts/ar9330_pqi_air-pen.dts index 8537faa0f9..2d7f79ee87 100644 --- a/target/linux/ath79/dts/ar9330_pqi_air-pen.dts +++ b/target/linux/ath79/dts/ar9330_pqi_air-pen.dts @@ -55,10 +55,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &usb { dr_mode = "host"; status = "okay"; diff --git a/target/linux/ath79/dts/ar9331_8dev_carambola2.dts b/target/linux/ath79/dts/ar9331_8dev_carambola2.dts index ffb9745e03..f35f1850f2 100644 --- a/target/linux/ath79/dts/ar9331_8dev_carambola2.dts +++ b/target/linux/ath79/dts/ar9331_8dev_carambola2.dts @@ -54,10 +54,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &usb { dr_mode = "host"; status = "okay"; diff --git a/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dts b/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dts index 971d158faf..d1b49b2c25 100644 --- a/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dts +++ b/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dts @@ -73,10 +73,6 @@ compatible = "syscon", "simple-mfd"; }; -&gpio { - status = "okay"; -}; - &spi { status = "okay"; diff --git a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts index 349c7ffc4d..614c31e1e7 100644 --- a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts +++ b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts @@ -48,10 +48,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &usb { dr_mode = "host"; status = "okay"; diff --git a/target/linux/ath79/dts/ar9331_etactica_eg200.dts b/target/linux/ath79/dts/ar9331_etactica_eg200.dts index 079cc88767..3cf72a321a 100644 --- a/target/linux/ath79/dts/ar9331_etactica_eg200.dts +++ b/target/linux/ath79/dts/ar9331_etactica_eg200.dts @@ -58,10 +58,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &usb { dr_mode = "host"; status = "okay"; diff --git a/target/linux/ath79/dts/ar9331_glinet_64xx.dtsi b/target/linux/ath79/dts/ar9331_glinet_64xx.dtsi index 2fa970248a..fd6791915f 100644 --- a/target/linux/ath79/dts/ar9331_glinet_64xx.dtsi +++ b/target/linux/ath79/dts/ar9331_glinet_64xx.dtsi @@ -65,10 +65,6 @@ mtd-mac-address = <&uboot 0x1fc00>; }; -&gpio { - status = "okay"; -}; - &uart { status = "okay"; }; diff --git a/target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts b/target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts new file mode 100644 index 0000000000..e969007fc0 --- /dev/null +++ b/target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts @@ -0,0 +1,152 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar9331.dtsi" + +/ { + compatible = "glinet,gl-mifi", "qca,ar9331"; + model = "GL.iNet GL-MiFi"; + + aliases { + serial0 = &uart; + label-mac-device = ð0; + }; + + leds { + compatible = "gpio-leds"; + + wlan { + label = "gl-mifi:green:wlan"; + gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0tpt"; + }; + + lan { + label = "gl-mifi:green:lan"; + gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; + }; + + wan { + label = "gl-mifi:green:wan"; + gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; + }; + + 3g4g { + label = "gl-mifi:green:3g4g"; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + debounce-interval = <60>; + }; + }; + + reg_usb_vbus: reg_usb_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio 6 GPIO_ACTIVE_LOW>; + }; + + gpio-export { + compatible = "gpio-export"; + + minipcie { + gpio-export,name = "minipcie"; + gpio-export,output = <0>; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&uart { + status = "okay"; +}; + +&usb { + status = "okay"; + + dr_mode = "host"; + vbus-supply = <®_usb_vbus>; +}; + +&usb_phy { + status = "okay"; +}; + +&spi { + status = "okay"; + + num-chipselects = <1>; + + flash@0 { + compatible = "jedec,spi-nor"; + spi-max-frequency = <33000000>; + reg = <0>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x040000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x040000 0x010000>; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x050000 0xfa0000>; + }; + + art: partition@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&art 0x0>; + + gmac-config { + device = <&gmac>; + + switch-phy-addr-swap = <0>; + switch-phy-swap = <0>; + }; +}; + +ð1 { + status = "okay"; + + mtd-mac-address = <&art 0x0>; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; +}; diff --git a/target/linux/ath79/dts/ar9331_pisen_ts-d084.dts b/target/linux/ath79/dts/ar9331_pisen_ts-d084.dts index 8b8e304c9b..565c236f67 100644 --- a/target/linux/ath79/dts/ar9331_pisen_ts-d084.dts +++ b/target/linux/ath79/dts/ar9331_pisen_ts-d084.dts @@ -92,10 +92,6 @@ compatible = "syscon", "simple-mfd"; }; -&gpio { - status = "okay"; -}; - &uart { status = "okay"; }; diff --git a/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts b/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts index 6fb11545ad..6b746bb152 100644 --- a/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts +++ b/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts @@ -101,10 +101,6 @@ compatible = "syscon", "simple-mfd"; }; -&gpio { - status = "okay"; -}; - &uart { status = "okay"; }; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts index 8f4147b7f7..704f7c41a8 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts +++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts @@ -91,10 +91,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &usb { #address-cells = <1>; #size-cells = <0>; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts index 85ab924009..d0a479712d 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts +++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts @@ -87,10 +87,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &usb { #address-cells = <1>; #size-cells = <0>; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi index 2bacd08245..c2bc50a505 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi @@ -99,10 +99,6 @@ compatible = "syscon", "simple-mfd"; }; -&gpio { - status = "okay"; -}; - &uart { status = "okay"; }; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr710n-v1.dts b/target/linux/ath79/dts/ar9331_tplink_tl-wr710n-v1.dts index 49dd11469c..493dbfe7b6 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr710n-v1.dts +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr710n-v1.dts @@ -104,10 +104,6 @@ mtd-mac-address-increment = <(-1)>; }; -&gpio { - status = "okay"; -}; - &uart { status = "okay"; }; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi index 4f11d5d7a4..8e36c6851c 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi @@ -142,10 +142,6 @@ mtd-mac-address-increment = <(-1)>; }; -&gpio { - status = "okay"; -}; - &uart { status = "okay"; }; diff --git a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts index 272b0909b5..6d780eff11 100644 --- a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts +++ b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts @@ -89,10 +89,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &spi { num-cs = <1>; diff --git a/target/linux/ath79/dts/ar9341_pisen_wmb001n.dts b/target/linux/ath79/dts/ar9341_pisen_wmb001n.dts index 46b6053cce..40a838f825 100644 --- a/target/linux/ath79/dts/ar9341_pisen_wmb001n.dts +++ b/target/linux/ath79/dts/ar9341_pisen_wmb001n.dts @@ -134,10 +134,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &spi { num-cs = <1>; diff --git a/target/linux/ath79/dts/ar9342_ubnt_wa.dtsi b/target/linux/ath79/dts/ar9342_ubnt_wa.dtsi index 2847d4098c..1f2f8e37f3 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_wa.dtsi +++ b/target/linux/ath79/dts/ar9342_ubnt_wa.dtsi @@ -29,10 +29,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &pcie { status = "okay"; }; diff --git a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi index cf24aba5aa..1d9df2170c 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi +++ b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi @@ -61,10 +61,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &spi { status = "okay"; num-cs = <1>; diff --git a/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts b/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts index ede248759b..347f12fce7 100644 --- a/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts +++ b/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts @@ -71,8 +71,6 @@ }; &gpio { - status = "okay"; - pinctrl-names = "default"; pinctrl-0 = <&jtag_disable_pins>; diff --git a/target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts b/target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts new file mode 100644 index 0000000000..09edeb5884 --- /dev/null +++ b/target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts @@ -0,0 +1,153 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar9344.dtsi" + +/ { + compatible = "compex,wpj344-16m", "qca,ar9344"; + model = "Compex WPJ344 (16MB flash)"; + + aliases { + label-mac-device = ð0; + led-boot = &led_status; + led-failsafe = &led_status; + led-running = &led_status; + led-upgrade = &led_status; + }; + + leds { + compatible = "gpio-leds"; + + led_status: status { + label = "wpj344:green:status"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + sig1 { + label = "wpj344:red:sig1"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + sig2 { + label = "wpj344:yellow:sig2"; + gpios = <&gpio 20 GPIO_ACTIVE_LOW>; + }; + + sig3 { + label = "wpj344:green:sig3"; + gpios = <&gpio 21 GPIO_ACTIVE_LOW>; + }; + + sig4 { + label = "wpj344:green:sig4"; + gpios = <&gpio 22 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + linux,code = ; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; +}; + +&ref { + clock-frequency = <40000000>; +}; + +&uart { + status = "okay"; +}; + +&spi { + status = "okay"; + + num-cs = <1>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + uboot: partition@0 { + label = "u-boot"; + reg = <0x000000 0x030000>; + read-only; + }; + + partition@30000 { + label = "firmware"; + reg = <0x030000 0xfc0000>; + compatible = "denx,uimage"; + }; + + art: partition@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +&usb { + status = "okay"; +}; + +&usb_phy { + status = "okay"; +}; + +&pcie { + status = "okay"; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; +}; + +&mdio0 { + status = "okay"; + + phy-mask = <0>; + + phy0: ethernet-phy@0 { + reg = <0>; + phy-mode = "rgmii"; + + qca,ar8327-initvals = < + 0x04 0x07600000 /* PORT0 PAD MODE CTRL */ + 0x10 0x80000080 /* POWER_ON_STRIP */ + 0x50 0x00000000 /* LED_CTRL0 */ + 0x54 0xc737c737 /* LED_CTRL1 */ + 0x58 0x00000000 /* LED_CTRL2 */ + 0x5c 0x00c30c00 /* LED_CTRL3 */ + 0x7c 0x0000007e /* PORT0_STATUS */ + >; + }; +}; + +ð0 { + status = "okay"; + + pll-data = <0x06000000 0x00000101 0x00001616>; + + mtd-mac-address = <&uboot 0x2e010>; + + phy-mode = "rgmii"; + phy-handle = <&phy0>; +}; diff --git a/target/linux/ath79/dts/ar9344_devolo_magic-2-wifi.dts b/target/linux/ath79/dts/ar9344_devolo_magic-2-wifi.dts index 4f58cd5c37..90702a0a9e 100644 --- a/target/linux/ath79/dts/ar9344_devolo_magic-2-wifi.dts +++ b/target/linux/ath79/dts/ar9344_devolo_magic-2-wifi.dts @@ -65,8 +65,6 @@ }; &gpio { - status = "okay"; - wlan_power { gpio-hog; line-name = "WLAN power"; diff --git a/target/linux/ath79/dts/ar9344_enterasys_ws-ap3705i.dts b/target/linux/ath79/dts/ar9344_enterasys_ws-ap3705i.dts index 0f02881471..20ff48cc27 100644 --- a/target/linux/ath79/dts/ar9344_enterasys_ws-ap3705i.dts +++ b/target/linux/ath79/dts/ar9344_enterasys_ws-ap3705i.dts @@ -111,10 +111,6 @@ }; }; -&gpio { - status = "okay"; -}; - &wmac { status = "okay"; qca,no-eeprom; diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi b/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi index 9fd428a1b3..90978fb99f 100644 --- a/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi +++ b/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi @@ -240,8 +240,6 @@ }; &gpio { - status = "okay"; - lna0 { gpio-hog; line-name = "netgear:ext:lna0"; diff --git a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts index e7186425f3..f01ad769d2 100644 --- a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts +++ b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts @@ -71,10 +71,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &spi { status = "okay"; diff --git a/target/linux/ath79/dts/ar9344_pcs_cap324.dts b/target/linux/ath79/dts/ar9344_pcs_cap324.dts index 50a069cb63..efd9d6262c 100644 --- a/target/linux/ath79/dts/ar9344_pcs_cap324.dts +++ b/target/linux/ath79/dts/ar9344_pcs_cap324.dts @@ -78,10 +78,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &spi { status = "okay"; diff --git a/target/linux/ath79/dts/ar9344_pcs_cr5000.dts b/target/linux/ath79/dts/ar9344_pcs_cr5000.dts index a43ac4e935..3b0716e798 100644 --- a/target/linux/ath79/dts/ar9344_pcs_cr5000.dts +++ b/target/linux/ath79/dts/ar9344_pcs_cr5000.dts @@ -70,10 +70,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &spi { status = "okay"; diff --git a/target/linux/ath79/dts/ar9344_qihoo_c301.dts b/target/linux/ath79/dts/ar9344_qihoo_c301.dts index 46d1f4c4c8..2d5b5b3ab2 100644 --- a/target/linux/ath79/dts/ar9344_qihoo_c301.dts +++ b/target/linux/ath79/dts/ar9344_qihoo_c301.dts @@ -82,8 +82,6 @@ }; &gpio { - status = "okay"; - gpio_ext_lna0 { gpio-hog; gpios = <14 0>; diff --git a/target/linux/ath79/dts/ar9344_wd_mynet-n750.dts b/target/linux/ath79/dts/ar9344_wd_mynet-n750.dts index 48dcf12305..871928c0a9 100644 --- a/target/linux/ath79/dts/ar9344_wd_mynet-n750.dts +++ b/target/linux/ath79/dts/ar9344_wd_mynet-n750.dts @@ -69,8 +69,6 @@ }; &gpio { - status = "okay"; - gpio_ext_lna0 { gpio-hog; gpios = <15 0>; diff --git a/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts b/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts index 57312f6ff4..3fb37f2ae2 100644 --- a/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts +++ b/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts @@ -78,8 +78,6 @@ }; &gpio { - status = "okay"; - pinctrl-names = "default"; pinctrl-0 = <&jtag_disable_pins>; }; diff --git a/target/linux/ath79/dts/ar934x.dtsi b/target/linux/ath79/dts/ar934x.dtsi index 0451960a60..763d1c8afe 100644 --- a/target/linux/ath79/dts/ar934x.dtsi +++ b/target/linux/ath79/dts/ar934x.dtsi @@ -148,24 +148,6 @@ }; }; - nand: nand@1b000200 { - compatible = "qca,ar934x-nand"; - reg = <0x1b000200 0xb8>; - - interrupts = <21>; - interrupt-parent = <&miscintc>; - - resets = <&rst 14>; - reset-names = "nand"; - - nand-ecc-mode = "hw"; - - #address-cells = <1>; - #size-cells = <0>; - - status = "disabled"; - }; - gmac: gmac@18070000 { compatible = "qca,ar9340-gmac"; reg = <0x18070000 0x14>; @@ -195,6 +177,24 @@ status = "disabled"; }; + nand: nand@1b000200 { + compatible = "qca,ar934x-nand"; + reg = <0x1b000200 0xb8>; + + interrupts = <21>; + interrupt-parent = <&miscintc>; + + resets = <&rst 14>; + reset-names = "nand"; + + nand-ecc-mode = "hw"; + + #address-cells = <1>; + #size-cells = <0>; + + status = "disabled"; + }; + spi: spi@1f000000 { compatible = "qca,ar934x-spi"; reg = <0x1f000000 0x1c>; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi index 208d6e3580..62b947440a 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi @@ -44,10 +44,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &spi { status = "okay"; diff --git a/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts b/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts index 8a55abd244..3a2ae598ff 100644 --- a/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts +++ b/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts @@ -80,10 +80,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &usb_phy0 { status = "okay"; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi b/target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi index 1f3d0b8d7b..cd602a2a75 100644 --- a/target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi @@ -85,10 +85,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &usb_phy0 { status = "okay"; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi index 618f0d434b..2f753f7617 100644 --- a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi @@ -104,10 +104,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &spi { status = "okay"; num-cs = <1>; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi index aca5745ff3..161f8ccb0a 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi @@ -76,10 +76,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &usb_phy0 { status = "okay"; }; diff --git a/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts b/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts index e23a5991b1..3cafda1d3e 100644 --- a/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts +++ b/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts @@ -72,10 +72,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &usb_phy0 { status = "okay"; }; diff --git a/target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts b/target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts index ade9159fcf..aa33eed164 100644 --- a/target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts +++ b/target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts @@ -255,10 +255,6 @@ }; }; -&gpio { - status = "okay"; -}; - &wmac { status = "okay"; diff --git a/target/linux/ath79/dts/qca955x.dtsi b/target/linux/ath79/dts/qca955x.dtsi index ff8ac70d73..4883965db7 100644 --- a/target/linux/ath79/dts/qca955x.dtsi +++ b/target/linux/ath79/dts/qca955x.dtsi @@ -182,24 +182,6 @@ }; }; - nand: nand@1b800200 { - compatible = "qca,ar934x-nand"; - reg = <0x1b800200 0xb8>; - - interrupts = <21>; - interrupt-parent = <&miscintc>; - - resets = <&rst 14>; - reset-names = "nand"; - - nand-ecc-mode = "hw"; - - #address-cells = <1>; - #size-cells = <0>; - - status = "disabled"; - }; - gmac: gmac@18070000 { compatible = "qca,qca9550-gmac"; reg = <0x18070000 0x58>; @@ -301,6 +283,24 @@ status = "disabled"; }; + nand: nand@1b800200 { + compatible = "qca,ar934x-nand"; + reg = <0x1b800200 0xb8>; + + interrupts = <21>; + interrupt-parent = <&miscintc>; + + resets = <&rst 14>; + reset-names = "nand"; + + nand-ecc-mode = "hw"; + + #address-cells = <1>; + #size-cells = <0>; + + status = "disabled"; + }; + spi: spi@1f000000 { compatible = "qca,ar934x-spi"; reg = <0x1f000000 0x1c>; diff --git a/target/linux/ath79/dts/qca9561_avm_fritz4020.dts b/target/linux/ath79/dts/qca9561_avm_fritz4020.dts index 7c13c3e470..c4a50536b7 100644 --- a/target/linux/ath79/dts/qca9561_avm_fritz4020.dts +++ b/target/linux/ath79/dts/qca9561_avm_fritz4020.dts @@ -100,10 +100,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &spi { status = "okay"; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi b/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi index 4d1eb64160..aa33d13c85 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi @@ -121,10 +121,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &pcie { status = "okay"; }; diff --git a/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts b/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts index 5f1748f936..360e9cd415 100644 --- a/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts +++ b/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts @@ -57,10 +57,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &spi { status = "okay"; num-cs = <1>; diff --git a/target/linux/ath79/dts/qca9563_dlink_dir-859-a1.dts b/target/linux/ath79/dts/qca9563_dlink_dir-859-a1.dts index b9e413a265..4b328c5cf3 100644 --- a/target/linux/ath79/dts/qca9563_dlink_dir-859-a1.dts +++ b/target/linux/ath79/dts/qca9563_dlink_dir-859-a1.dts @@ -74,10 +74,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &pcie { status = "okay"; }; diff --git a/target/linux/ath79/dts/qca9563_phicomm_k2t.dts b/target/linux/ath79/dts/qca9563_phicomm_k2t.dts index f12d0c9973..ba185c568b 100644 --- a/target/linux/ath79/dts/qca9563_phicomm_k2t.dts +++ b/target/linux/ath79/dts/qca9563_phicomm_k2t.dts @@ -51,10 +51,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &pcie { status = "okay"; }; diff --git a/target/linux/ath79/dts/qca9563_rosinson_wr818.dts b/target/linux/ath79/dts/qca9563_rosinson_wr818.dts index 6a06f8904b..34c95b593a 100644 --- a/target/linux/ath79/dts/qca9563_rosinson_wr818.dts +++ b/target/linux/ath79/dts/qca9563_rosinson_wr818.dts @@ -48,10 +48,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &spi { status = "okay"; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts index 6b40de2546..97d36d76dd 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts @@ -145,10 +145,6 @@ }; }; -&gpio { - status = "okay"; -}; - &mdio0 { status = "okay"; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts index 4b45fa6da6..5c0e2e0f82 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts @@ -152,10 +152,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &usb_phy0 { status = "okay"; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi b/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi index 8d28b088d2..275f71316c 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi @@ -19,10 +19,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &mdio0 { status = "okay"; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi b/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi index f5daf98ca6..44bcc1e538 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi @@ -108,10 +108,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &usb_phy0 { status = "okay"; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_re450.dtsi b/target/linux/ath79/dts/qca9563_tplink_re450.dtsi index 9fc30decaf..8d20f1375c 100644 --- a/target/linux/ath79/dts/qca9563_tplink_re450.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_re450.dtsi @@ -112,10 +112,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &spi { status = "okay"; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi index eab19fe1f2..b849858027 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi @@ -88,10 +88,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &mdio0 { status = "okay"; diff --git a/target/linux/ath79/dts/qca9563_ubnt_unifiac.dtsi b/target/linux/ath79/dts/qca9563_ubnt_unifiac.dtsi index 574baae304..e904bb75c3 100644 --- a/target/linux/ath79/dts/qca9563_ubnt_unifiac.dtsi +++ b/target/linux/ath79/dts/qca9563_ubnt_unifiac.dtsi @@ -43,10 +43,6 @@ status = "okay"; }; -&gpio { - status = "okay"; -}; - &pcie { status = "okay"; }; diff --git a/target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi b/target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi index 657ed31003..c80aec409e 100644 --- a/target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi +++ b/target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi @@ -31,10 +31,6 @@ phy-handle = <&phy0>; }; -&gpio { - status = "okay"; -}; - &mdio0 { status = "okay"; diff --git a/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c b/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c index 63abc4a8d8..b35343c8d9 100644 --- a/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c +++ b/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c @@ -1535,9 +1535,12 @@ static int ar934x_nfc_probe(struct platform_device *pdev) goto err_free_buf; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 130) nand->dummy_controller.ops = &ar934x_nfc_controller_ops; ret = nand_scan(mtd, 1); +#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0) + nand->dummy_controller.ops = &ar934x_nfc_controller_ops; + ret = nand_scan(nand, 1); #else nand->legacy.dummy_controller.ops = &ar934x_nfc_controller_ops; ret = nand_scan(nand, 1); @@ -1569,12 +1572,7 @@ static int ar934x_nfc_remove(struct platform_device *pdev) nfc = platform_get_drvdata(pdev); if (nfc) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0) - mtd = ar934x_nfc_to_mtd(nfc); - nand_release(mtd); -#else nand_release(&nfc->nand_chip); -#endif ar934x_nfc_free_buf(nfc); } diff --git a/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c b/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c index 922d7095cb..382af09978 100644 --- a/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c +++ b/target/linux/ath79/files/drivers/mtd/nand/raw/nand_rb4xx.c @@ -232,7 +232,11 @@ static int rb4xx_nand_probe(struct platform_device *pdev) nand->chip.dev_ready = rb4xx_nand_dev_ready; nand->chip.chip_delay = 25; +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,19,130) ret = nand_scan(mtd, 1); +#else + ret = nand_scan(&nand->chip, 1); +#endif #else nand->chip.legacy.read_byte = rb4xx_nand_read_byte; nand->chip.legacy.write_buf = rb4xx_nand_write_buf; @@ -248,11 +252,7 @@ static int rb4xx_nand_probe(struct platform_device *pdev) ret = mtd_device_register(mtd, NULL, 0); if (ret) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(4,20,0) - nand_release(mtd); -#else nand_release(&nand->chip); -#endif return ret; } @@ -263,11 +263,7 @@ static int rb4xx_nand_remove(struct platform_device *pdev) { struct rb4xx_nand *nand = platform_get_drvdata(pdev); -#if LINUX_VERSION_CODE < KERNEL_VERSION(4,20,0) - nand_release(nand_to_mtd(&nand->chip)); -#else nand_release(&nand->chip); -#endif return 0; } diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index aaa830c6ea..f3e3b758b5 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -115,6 +115,13 @@ engenius,ecb1750|\ enterasys,ws-ap3705i) ucidef_set_led_netdev "lan" "LAN" "$boardname:blue:lan" "eth0" ;; +compex,wpj344-16m) + ucidef_set_rssimon "wlan0" "200000" "1" + ucidef_set_led_rssi "sig1" "SIG1" "wpj344:red:sig1" "wlan0" "85" "100" + ucidef_set_led_rssi "sig2" "SIG2" "wpj344:yellow:sig2" "wlan0" "75" "100" + ucidef_set_led_rssi "sig3" "SIG3" "wpj344:green:sig3" "wlan0" "65" "100" + ucidef_set_led_rssi "sig4" "SIG4" "wpj344:green:sig4" "wlan0" "50" "100" + ;; compex,wpj531-16m) ucidef_set_rssimon "wlan0" "200000" "1" ucidef_set_led_rssi "sig1" "SIG1" "wpj531:red:sig1" "wlan0" "85" "100" @@ -146,6 +153,10 @@ glinet,gl-ar300m-lite) glinet,gl-ar300m16) ucidef_set_led_netdev "lan" "LAN" "gl-ar300m:green:lan" "eth0" ;; +glinet,gl-mifi) + ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x02" + ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1" + ;; glinet,gl-x750) ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1" ;; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index d0e73a5d3f..f2b6ef0aed 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -131,6 +131,10 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth1" ;; + compex,wpj344-16m) + ucidef_add_switch "switch0" \ + "0@eth0" "3:lan" "2:wan" + ;; devolo,dvl1200e|\ devolo,dvl1750e|\ ocedo,ursus) @@ -366,6 +370,9 @@ ath79_setup_macs() lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) wan_mac=$(fritz_tffs -n macb -i $(find_mtd_part "tffs (1)")) ;; + compex,wpj344-16m) + wan_mac=$(mtd_get_mac_binary u-boot 0x2e018) + ;; devolo,magic-2-wifi) label_mac=$(macaddr_add "$(mtd_get_mac_binary art 0x1002)" 3) ;; diff --git a/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration b/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration index 1c7ecba5f8..757b0c9974 100644 --- a/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration +++ b/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration @@ -8,6 +8,9 @@ case "$board" in engenius,epg5000) migrate_leds ":wlan-2g=:wlan2g" ":wlan-5g=:wlan5g" ;; +glinet,gl-mifi) + migrate_leds ":net=:3g4g" + ;; tplink,archer-c25-v1|\ tplink,archer-c58-v1|\ tplink,archer-c59-v1|\ diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index f99fcdeda2..0e7efa32af 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -441,6 +441,19 @@ define Device/comfast_cf-wr752ac-v1 endef TARGET_DEVICES += comfast_cf-wr752ac-v1 +define Device/compex_wpj344-16m + SOC := ar9344 + DEVICE_PACKAGES := kmod-usb2 + IMAGE_SIZE := 16128k + DEVICE_VENDOR := Compex + DEVICE_MODEL := WPJ344 + DEVICE_VARIANT := 16M + SUPPORTED_DEVICES += wpj344 + IMAGES += cpximg-6a08.bin + IMAGE/cpximg-6a08.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | mkmylofw_16m 0x690 3 +endef +TARGET_DEVICES += compex_wpj344-16m + define Device/compex_wpj531-16m SOC := qca9531 DEVICE_PACKAGES := kmod-usb2 @@ -808,6 +821,16 @@ define Device/glinet_gl-ar750 endef TARGET_DEVICES += glinet_gl-ar750 +define Device/glinet_gl-mifi + SOC := ar9331 + DEVICE_VENDOR := GL.iNET + DEVICE_MODEL := GL-MiFi + DEVICE_PACKAGES := kmod-usb-chipidea2 + IMAGE_SIZE := 16000k + SUPPORTED_DEVICES += gl-mifi +endef +TARGET_DEVICES += glinet_gl-mifi + define Device/glinet_gl-x750 SOC := qca9531 DEVICE_VENDOR := GL.iNet diff --git a/target/linux/ath79/patches-4.19/0005-usb-add-more-OF-quirk-properties.patch b/target/linux/ath79/patches-4.19/0005-usb-add-more-OF-quirk-properties.patch index 52d77c805c..82e563b29c 100644 --- a/target/linux/ath79/patches-4.19/0005-usb-add-more-OF-quirk-properties.patch +++ b/target/linux/ath79/patches-4.19/0005-usb-add-more-OF-quirk-properties.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c -@@ -161,6 +161,11 @@ static int ehci_platform_probe(struct pl +@@ -271,6 +271,11 @@ static int ehci_platform_probe(struct pl ehci = hcd_to_ehci(hcd); if (pdata == &ehci_platform_defaults && dev->dev.of_node) { diff --git a/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch index 0efb33676a..61695ae55f 100644 --- a/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch @@ -267,7 +267,7 @@ case IPV6_2292HOPOPTS: --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c -@@ -452,7 +452,7 @@ static void ip6gre_err(struct sk_buff *s +@@ -455,7 +455,7 @@ static void ip6gre_err(struct sk_buff *s return; ipv6h = (const struct ipv6hdr *)skb->data; greh = (const struct gre_base_hdr *)(skb->data + offset); @@ -728,7 +728,7 @@ EXPORT_SYMBOL(xfrm_parse_spi); --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c -@@ -3896,14 +3896,16 @@ static bool tcp_parse_aligned_timestamp( +@@ -3906,14 +3906,16 @@ static bool tcp_parse_aligned_timestamp( { const __be32 *ptr = (const __be32 *)(th + 1); diff --git a/target/linux/ath79/patches-5.4/0005-usb-add-more-OF-quirk-properties.patch b/target/linux/ath79/patches-5.4/0005-usb-add-more-OF-quirk-properties.patch index 83033a117b..3c8740311d 100644 --- a/target/linux/ath79/patches-5.4/0005-usb-add-more-OF-quirk-properties.patch +++ b/target/linux/ath79/patches-5.4/0005-usb-add-more-OF-quirk-properties.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c -@@ -159,6 +159,11 @@ static int ehci_platform_probe(struct pl +@@ -269,6 +269,11 @@ static int ehci_platform_probe(struct pl ehci = hcd_to_ehci(hcd); if (pdata == &ehci_platform_defaults && dev->dev.of_node) { diff --git a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch index 0f41faf9df..053b72023f 100644 --- a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch @@ -706,7 +706,7 @@ EXPORT_SYMBOL(xfrm_parse_spi); --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c -@@ -3958,14 +3958,16 @@ static bool tcp_parse_aligned_timestamp( +@@ -3968,14 +3968,16 @@ static bool tcp_parse_aligned_timestamp( { const __be32 *ptr = (const __be32 *)(th + 1); diff --git a/target/linux/bcm27xx/patches-5.4/950-0034-amba_pl011-Add-cts-event-workaround-DT-property.patch b/target/linux/bcm27xx/patches-5.4/950-0034-amba_pl011-Add-cts-event-workaround-DT-property.patch index efa24ac9e9..07989b5a1f 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0034-amba_pl011-Add-cts-event-workaround-DT-property.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0034-amba_pl011-Add-cts-event-workaround-DT-property.patch @@ -36,7 +36,7 @@ Signed-off-by: Phil Elwell - reg --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -2659,6 +2659,11 @@ static int pl011_probe(struct amba_devic +@@ -2660,6 +2660,11 @@ static int pl011_probe(struct amba_devic if (IS_ERR(uap->clk)) return PTR_ERR(uap->clk); diff --git a/target/linux/bcm27xx/patches-5.4/950-0144-rtc-rv3028-Add-backup-switchover-mode-support.patch b/target/linux/bcm27xx/patches-5.4/950-0144-rtc-rv3028-Add-backup-switchover-mode-support.patch index e94d865f7b..375bd6e6b7 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0144-rtc-rv3028-Add-backup-switchover-mode-support.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0144-rtc-rv3028-Add-backup-switchover-mode-support.patch @@ -26,7 +26,7 @@ Signed-off-by: Phil Howard struct nvmem_config nvmem_cfg = { .name = "rv3028_nvram", .word_size = 1, -@@ -669,6 +671,21 @@ static int rv3028_probe(struct i2c_clien +@@ -671,6 +673,21 @@ static int rv3028_probe(struct i2c_clien if (ret) return ret; diff --git a/target/linux/bcm27xx/patches-5.4/950-0211-bcmgenet-Better-coalescing-parameter-defaults.patch b/target/linux/bcm27xx/patches-5.4/950-0211-bcmgenet-Better-coalescing-parameter-defaults.patch index 159506bf96..3a38f64436 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0211-bcmgenet-Better-coalescing-parameter-defaults.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0211-bcmgenet-Better-coalescing-parameter-defaults.patch @@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c -@@ -2151,7 +2151,7 @@ static void bcmgenet_init_tx_ring(struct +@@ -2149,7 +2149,7 @@ static void bcmgenet_init_tx_ring(struct bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_PROD_INDEX); bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_CONS_INDEX); @@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell /* Disable rate control for now */ bcmgenet_tdma_ring_writel(priv, index, flow_period_val, TDMA_FLOW_PERIOD); -@@ -3575,9 +3575,12 @@ static int bcmgenet_probe(struct platfor +@@ -3573,9 +3573,12 @@ static int bcmgenet_probe(struct platfor netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1); /* Set default coalescing parameters */ diff --git a/target/linux/bcm27xx/patches-5.4/950-0222-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-5.4/950-0222-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch index 70c5c09a2b..0bb08a56fa 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0222-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0222-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch @@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -1452,6 +1452,103 @@ command_cleanup: +@@ -1453,6 +1453,103 @@ command_cleanup: } /* @@ -119,7 +119,7 @@ Signed-off-by: Jonathan Bell * non-error returns are a promise to giveback() the urb later * we drop ownership so next owner (or urb unlink) can get it */ -@@ -5327,6 +5424,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5334,6 +5431,7 @@ static const struct hc_driver xhci_hc_dr .endpoint_reset = xhci_endpoint_reset, .check_bandwidth = xhci_check_bandwidth, .reset_bandwidth = xhci_reset_bandwidth, diff --git a/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index 7f2b53562e..26a54c22c9 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0283-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 -@@ -1231,6 +1234,9 @@ +@@ -1234,6 +1237,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 @@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL }, -@@ -177,6 +178,7 @@ static const struct hid_device_id hid_qu +@@ -178,6 +179,7 @@ static const struct hid_device_id hid_qu { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT }, diff --git a/target/linux/bcm27xx/patches-5.4/950-0295-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch b/target/linux/bcm27xx/patches-5.4/950-0295-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch index 562312d279..db1866d6e7 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0295-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0295-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch @@ -38,7 +38,7 @@ Signed-off-by: Phil Elwell static inline void bcmgenet_writel(u32 value, void __iomem *offset) { /* MIPS chips strapped for BE will automagically configure the -@@ -1997,6 +2001,11 @@ static void reset_umac(struct bcmgenet_p +@@ -1995,6 +1999,11 @@ static void reset_umac(struct bcmgenet_p bcmgenet_rbuf_ctrl_set(priv, 0); udelay(10); diff --git a/target/linux/bcm27xx/patches-5.4/950-0340-drm-v3d-The-third-IRQ-is-optional.patch b/target/linux/bcm27xx/patches-5.4/950-0340-drm-v3d-The-third-IRQ-is-optional.patch index edb4ede525..97ff76a6a3 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0340-drm-v3d-The-third-IRQ-is-optional.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0340-drm-v3d-The-third-IRQ-is-optional.patch @@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c -@@ -3476,7 +3476,7 @@ static int bcmgenet_probe(struct platfor +@@ -3474,7 +3474,7 @@ static int bcmgenet_probe(struct platfor priv = netdev_priv(dev); priv->irq0 = platform_get_irq(pdev, 0); priv->irq1 = platform_get_irq(pdev, 1); diff --git a/target/linux/bcm27xx/patches-5.4/950-0447-PCI-of-Add-inbound-resource-parsing-to-helpers.patch b/target/linux/bcm27xx/patches-5.4/950-0447-PCI-of-Add-inbound-resource-parsing-to-helpers.patch index 987351c1fc..6bdd9d2dcf 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0447-PCI-of-Add-inbound-resource-parsing-to-helpers.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0447-PCI-of-Add-inbound-resource-parsing-to-helpers.patch @@ -65,7 +65,7 @@ Cc: linux-rockchip@lists.infradead.org --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c -@@ -343,12 +343,8 @@ int dw_pcie_host_init(struct pcie_port * +@@ -345,12 +345,8 @@ int dw_pcie_host_init(struct pcie_port * if (!bridge) return -ENOMEM; @@ -82,7 +82,7 @@ Cc: linux-rockchip@lists.infradead.org --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c -@@ -1023,7 +1023,8 @@ static int advk_pcie_probe(struct platfo +@@ -1019,7 +1019,8 @@ static int advk_pcie_probe(struct platfo return ret; } @@ -224,7 +224,7 @@ Cc: linux-rockchip@lists.infradead.org return ret; --- a/drivers/pci/controller/pcie-rcar.c +++ b/drivers/pci/controller/pcie-rcar.c -@@ -1143,7 +1143,8 @@ static int rcar_pcie_probe(struct platfo +@@ -1144,7 +1144,8 @@ static int rcar_pcie_probe(struct platfo pcie->dev = dev; platform_set_drvdata(pdev, pcie); diff --git a/target/linux/bcm47xx/patches-4.19/032-v5.4-MIPS-BCM47XX-Add-support-for-Netgear-R6200v1.patch b/target/linux/bcm47xx/patches-4.19/032-v5.4-MIPS-BCM47XX-Add-support-for-Netgear-R6200v1.patch index 883b7216ce..c09c65c5fd 100644 --- a/target/linux/bcm47xx/patches-4.19/032-v5.4-MIPS-BCM47XX-Add-support-for-Netgear-R6200v1.patch +++ b/target/linux/bcm47xx/patches-4.19/032-v5.4-MIPS-BCM47XX-Add-support-for-Netgear-R6200v1.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm47xx/board.c +++ b/arch/mips/bcm47xx/board.c -@@ -160,6 +160,7 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = { +@@ -160,6 +160,7 @@ struct bcm47xx_board_type_list1 bcm47xx_ {{BCM47XX_BOARD_LUXUL_XVW_P30_V1, "Luxul XVW-P30 V1"}, "luxul_xvwp30_v1"}, {{BCM47XX_BOARD_LUXUL_XWR_600_V1, "Luxul XWR-600 V1"}, "luxul_xwr600_v1"}, {{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"}, @@ -10,24 +10,24 @@ {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"}, --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c -@@ -384,6 +384,13 @@ bcm47xx_buttons_motorola_wr850gv2v3[] __initconst = { - +@@ -385,6 +385,13 @@ bcm47xx_buttons_motorola_wr850gv2v3[] __ /* Netgear */ - -+static const struct gpio_keys_button + + static const struct gpio_keys_button +bcm47xx_buttons_netgear_r6200_v1[] __initconst = { + BCM47XX_GPIO_KEY(2, KEY_RFKILL), + BCM47XX_GPIO_KEY(3, KEY_RESTART), + BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON), +}; + - static const struct gpio_keys_button ++static const struct gpio_keys_button bcm47xx_buttons_netgear_wndr3400v1[] __initconst = { BCM47XX_GPIO_KEY(4, KEY_RESTART), -@@ -664,6 +671,9 @@ int __init bcm47xx_buttons_register(void) + BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON), +@@ -664,6 +671,9 @@ int __init bcm47xx_buttons_register(void err = bcm47xx_copy_bdata(bcm47xx_buttons_motorola_wr850gv2v3); break; - + + case BCM47XX_BOARD_NETGEAR_R6200_V1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6200_v1); + break; @@ -39,7 +39,7 @@ @@ -98,6 +98,7 @@ enum bcm47xx_board { BCM47XX_BOARD_MOTOROLA_WR850GP, BCM47XX_BOARD_MOTOROLA_WR850GV2V3, - + + BCM47XX_BOARD_NETGEAR_R6200_V1, BCM47XX_BOARD_NETGEAR_WGR614V8, BCM47XX_BOARD_NETGEAR_WGR614V9, diff --git a/target/linux/bcm53xx/patches-4.19/700-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch b/target/linux/bcm53xx/patches-4.19/700-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch index 91bb4fae11..a5f13afe02 100644 --- a/target/linux/bcm53xx/patches-4.19/700-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch +++ b/target/linux/bcm53xx/patches-4.19/700-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch @@ -21,7 +21,7 @@ Signed-off-by: Rafał Miłecki #include "b53_regs.h" #include "b53_priv.h" -@@ -1579,6 +1580,28 @@ static int b53_switch_init(struct b53_de +@@ -1587,6 +1588,28 @@ static int b53_switch_init(struct b53_de return ret; } diff --git a/target/linux/bcm63xx/patches-5.4/206-USB-EHCI-allow-limiting-ports-for-ehci-platform.patch b/target/linux/bcm63xx/patches-5.4/206-USB-EHCI-allow-limiting-ports-for-ehci-platform.patch index 6425869dcf..fcb016ecf9 100644 --- a/target/linux/bcm63xx/patches-5.4/206-USB-EHCI-allow-limiting-ports-for-ehci-platform.patch +++ b/target/linux/bcm63xx/patches-5.4/206-USB-EHCI-allow-limiting-ports-for-ehci-platform.patch @@ -34,7 +34,7 @@ Signed-off-by: Jonas Gorski --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c -@@ -57,6 +57,9 @@ static int ehci_platform_reset(struct us +@@ -62,6 +62,9 @@ static int ehci_platform_reset(struct us ehci->has_synopsys_hc_bug = pdata->has_synopsys_hc_bug; diff --git a/target/linux/cns3xxx/patches-4.19/130-Extend-PCIE_BUS_PEER2PEER-to-set-MRSS-128-to-fix-CNS3xxx-BM-DMA..patch b/target/linux/cns3xxx/patches-4.19/130-Extend-PCIE_BUS_PEER2PEER-to-set-MRSS-128-to-fix-CNS3xxx-BM-DMA..patch index 3276000fe4..67aa8df7fe 100644 --- a/target/linux/cns3xxx/patches-4.19/130-Extend-PCIE_BUS_PEER2PEER-to-set-MRSS-128-to-fix-CNS3xxx-BM-DMA..patch +++ b/target/linux/cns3xxx/patches-4.19/130-Extend-PCIE_BUS_PEER2PEER-to-set-MRSS-128-to-fix-CNS3xxx-BM-DMA..patch @@ -1,6 +1,6 @@ --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c -@@ -2634,7 +2634,8 @@ static void pcie_write_mrrs(struct pci_d +@@ -2655,7 +2655,8 @@ static void pcie_write_mrrs(struct pci_d * In the "safe" case, do not configure the MRRS. There appear to be * issues with setting MRRS to 0 on a number of devices. */ diff --git a/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch b/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch index 7939ee46b0..a098c4416c 100644 --- a/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch +++ b/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch @@ -55,7 +55,7 @@ Cc: Kir Kolyshkin rwlock_t sk_callback_lock; --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -2748,6 +2748,7 @@ void sock_init_data(struct socket *sock, +@@ -2750,6 +2750,7 @@ void sock_init_data(struct socket *sock, sk->sk_max_pacing_rate = ~0U; sk->sk_pacing_rate = ~0U; 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 6d6c575ae7..2e08e514b7 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 -@@ -1983,7 +1983,8 @@ static const struct usb_device_id option +@@ -1987,7 +1987,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.14/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch b/target/linux/generic/backport-4.14/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch index e3f77ab9da..e2698dd02e 100644 --- a/target/linux/generic/backport-4.14/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch +++ b/target/linux/generic/backport-4.14/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch @@ -48,7 +48,7 @@ Reviewed-by: John Gilmore #define INADDR_ANY ((unsigned long int) 0x00000000) --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c -@@ -934,7 +934,7 @@ static int inet_abc_len(__be32 addr) +@@ -935,7 +935,7 @@ static int inet_abc_len(__be32 addr) { int rc = -1; /* Something else, probably a multicast. */ @@ -57,7 +57,7 @@ Reviewed-by: John Gilmore rc = 0; else { __u32 haddr = ntohl(addr); -@@ -945,6 +945,8 @@ static int inet_abc_len(__be32 addr) +@@ -946,6 +946,8 @@ static int inet_abc_len(__be32 addr) rc = 16; else if (IN_CLASSC(haddr)) rc = 24; diff --git a/target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch b/target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch index 02edd96d55..8e776383d1 100644 --- a/target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch +++ b/target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch @@ -23,7 +23,7 @@ Signed-off-by: Pablo Neira Ayuso + int ip6_dst_lookup(struct net *net, struct sock *sk, struct dst_entry **dst, struct flowi6 *fl6); - struct dst_entry *ip6_dst_lookup_flow(const struct sock *sk, struct flowi6 *fl6, + struct dst_entry *ip6_dst_lookup_flow(struct net *net, const struct sock *sk, struct flowi6 *fl6, --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -381,7 +381,7 @@ static inline int ip6_forward_finish(str diff --git a/target/linux/generic/backport-4.14/350-v4.18-ipv6-make-ip6_dst_mtu_forward-inline.patch b/target/linux/generic/backport-4.14/350-v4.18-ipv6-make-ip6_dst_mtu_forward-inline.patch index bbc04555f7..1c52cf51c6 100644 --- a/target/linux/generic/backport-4.14/350-v4.18-ipv6-make-ip6_dst_mtu_forward-inline.patch +++ b/target/linux/generic/backport-4.14/350-v4.18-ipv6-make-ip6_dst_mtu_forward-inline.patch @@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau - int ip6_dst_lookup(struct net *net, struct sock *sk, struct dst_entry **dst, struct flowi6 *fl6); - struct dst_entry *ip6_dst_lookup_flow(const struct sock *sk, struct flowi6 *fl6, + struct dst_entry *ip6_dst_lookup_flow(struct net *net, const struct sock *sk, struct flowi6 *fl6, --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -381,28 +381,6 @@ static inline int ip6_forward_finish(str diff --git a/target/linux/generic/backport-4.19/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch b/target/linux/generic/backport-4.19/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch index 24f796dcfa..e473c8918b 100644 --- a/target/linux/generic/backport-4.19/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch +++ b/target/linux/generic/backport-4.19/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch @@ -48,7 +48,7 @@ Reviewed-by: John Gilmore #define INADDR_ANY ((unsigned long int) 0x00000000) --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c -@@ -954,7 +954,7 @@ static int inet_abc_len(__be32 addr) +@@ -955,7 +955,7 @@ static int inet_abc_len(__be32 addr) { int rc = -1; /* Something else, probably a multicast. */ @@ -57,7 +57,7 @@ Reviewed-by: John Gilmore rc = 0; else { __u32 haddr = ntohl(addr); -@@ -965,6 +965,8 @@ static int inet_abc_len(__be32 addr) +@@ -966,6 +966,8 @@ static int inet_abc_len(__be32 addr) rc = 16; else if (IN_CLASSC(haddr)) rc = 24; diff --git a/target/linux/generic/backport-4.19/390-v5.1-sch_cake-Make-the-dual-modes-fairer.patch b/target/linux/generic/backport-4.19/390-v5.1-sch_cake-Make-the-dual-modes-fairer.patch index cd94600152..0454565747 100644 --- a/target/linux/generic/backport-4.19/390-v5.1-sch_cake-Make-the-dual-modes-fairer.patch +++ b/target/linux/generic/backport-4.19/390-v5.1-sch_cake-Make-the-dual-modes-fairer.patch @@ -83,7 +83,7 @@ Signed-off-by: Kevin Darbyshire-Bryant q->flows[reduced_hash].dsthost = dsthost_idx; } } -@@ -1793,20 +1797,30 @@ static s32 cake_enqueue(struct sk_buff * +@@ -1817,20 +1821,30 @@ static s32 cake_enqueue(struct sk_buff * b->sparse_flow_count++; if (cake_dsrc(q->flow_mode)) @@ -116,7 +116,7 @@ Signed-off-by: Kevin Darbyshire-Bryant } if (q->buffer_used > q->buffer_max_used) -@@ -1974,23 +1988,8 @@ retry: +@@ -1998,23 +2012,8 @@ retry: dsthost = &b->hosts[flow->dsthost]; host_load = 1; @@ -140,7 +140,7 @@ Signed-off-by: Kevin Darbyshire-Bryant /* Keep all flows with deficits out of the sparse and decaying * rotations. No non-empty flow can go into the decaying * rotation, so they can't get deficits -@@ -1999,6 +1998,13 @@ retry: +@@ -2023,6 +2022,13 @@ retry: if (flow->head) { b->sparse_flow_count--; b->bulk_flow_count++; @@ -154,7 +154,7 @@ Signed-off-by: Kevin Darbyshire-Bryant flow->set = CAKE_SET_BULK; } else { /* we've moved it to the bulk rotation for -@@ -2008,6 +2014,22 @@ retry: +@@ -2032,6 +2038,22 @@ retry: flow->set = CAKE_SET_SPARSE_WAIT; } } @@ -177,7 +177,7 @@ Signed-off-by: Kevin Darbyshire-Bryant goto retry; } -@@ -2028,6 +2050,13 @@ retry: +@@ -2052,6 +2074,13 @@ retry: &b->decaying_flows); if (flow->set == CAKE_SET_BULK) { b->bulk_flow_count--; @@ -191,7 +191,7 @@ Signed-off-by: Kevin Darbyshire-Bryant b->decaying_flow_count++; } else if (flow->set == CAKE_SET_SPARSE || flow->set == CAKE_SET_SPARSE_WAIT) { -@@ -2041,14 +2070,19 @@ retry: +@@ -2065,14 +2094,19 @@ retry: if (flow->set == CAKE_SET_SPARSE || flow->set == CAKE_SET_SPARSE_WAIT) b->sparse_flow_count--; 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 9ac1388c98..638a2b4529 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 @@ -91,7 +91,7 @@ Signed-off-by: David S. Miller }; /* COBALT operates the Codel and BLUE algorithms in parallel, in order to -@@ -2623,6 +2624,13 @@ static int cake_change(struct Qdisc *sch +@@ -2647,6 +2648,13 @@ static int cake_change(struct Qdisc *sch q->rate_flags &= ~CAKE_FLAG_SPLIT_GSO; } @@ -105,7 +105,7 @@ Signed-off-by: David S. Miller if (q->tins) { sch_tree_lock(sch); cake_reconfigure(sch); -@@ -2782,6 +2790,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 325f5719d7..6ba0897b34 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 @@ -52,24 +52,24 @@ Signed-off-by: Kevin Darbyshire-Bryant }; /* COBALT operates the Codel and BLUE algorithms in parallel, in order to -@@ -1554,7 +1556,7 @@ static struct cake_tin_data *cake_select +@@ -1573,7 +1575,7 @@ static struct cake_tin_data *cake_select struct sk_buff *skb) { struct cake_sched_data *q = qdisc_priv(sch); - u32 tin; + u32 tin, mark; + bool wash; u8 dscp; - /* Tin selection: Default to diffserv-based selection, allow overriding -@@ -1562,6 +1564,7 @@ static struct cake_tin_data *cake_select - */ - dscp = cake_handle_diffserv(skb, - q->rate_flags & CAKE_FLAG_WASH); +@@ -1584,6 +1586,7 @@ static struct cake_tin_data *cake_select + wash = !!(q->rate_flags & CAKE_FLAG_WASH); + if (wash) + dscp = cake_handle_diffserv(skb, wash); + mark = (skb->mark & q->fwmark_mask) >> q->fwmark_shft; if (q->tin_mode == CAKE_DIFFSERV_BESTEFFORT) tin = 0; -@@ -2178,6 +2181,7 @@ static const struct nla_policy cake_poli +@@ -2202,6 +2205,7 @@ static const struct nla_policy cake_poli [TCA_CAKE_MPU] = { .type = NLA_U32 }, [TCA_CAKE_INGRESS] = { .type = NLA_U32 }, [TCA_CAKE_ACK_FILTER] = { .type = NLA_U32 }, @@ -77,7 +77,7 @@ Signed-off-by: Kevin Darbyshire-Bryant }; static void cake_set_rate(struct cake_tin_data *b, u64 rate, u32 mtu, -@@ -2625,10 +2629,8 @@ static int cake_change(struct Qdisc *sch +@@ -2649,10 +2653,8 @@ static int cake_change(struct Qdisc *sch } if (tb[TCA_CAKE_FWMARK]) { @@ -90,7 +90,7 @@ Signed-off-by: Kevin Darbyshire-Bryant } if (q->tins) { -@@ -2790,8 +2792,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.19/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch b/target/linux/generic/backport-4.19/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch index 33e5c54b8c..023844f5e6 100644 --- a/target/linux/generic/backport-4.19/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch +++ b/target/linux/generic/backport-4.19/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch @@ -32,7 +32,7 @@ Signed-off-by: David S. Miller s32 tin_deficit; u32 tin_backlog; u32 tin_dropped; -@@ -1916,7 +1915,7 @@ begin: +@@ -1940,7 +1939,7 @@ begin: while (b->tin_deficit < 0 || !(b->sparse_flow_count + b->bulk_flow_count)) { if (b->tin_deficit <= 0) @@ -41,7 +41,7 @@ Signed-off-by: David S. Miller if (b->sparse_flow_count + b->bulk_flow_count) empty = false; -@@ -2237,8 +2236,7 @@ static int cake_config_besteffort(struct +@@ -2261,8 +2260,7 @@ static int cake_config_besteffort(struct cake_set_rate(b, rate, mtu, us_to_ns(q->target), us_to_ns(q->interval)); @@ -51,7 +51,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -2249,8 +2247,7 @@ static int cake_config_precedence(struct +@@ -2273,8 +2271,7 @@ static int cake_config_precedence(struct struct cake_sched_data *q = qdisc_priv(sch); u32 mtu = psched_mtu(qdisc_dev(sch)); u64 rate = q->rate_bps; @@ -61,7 +61,7 @@ Signed-off-by: David S. Miller u32 i; q->tin_cnt = 8; -@@ -2263,18 +2260,14 @@ static int cake_config_precedence(struct +@@ -2287,18 +2284,14 @@ static int cake_config_precedence(struct cake_set_rate(b, rate, mtu, us_to_ns(q->target), us_to_ns(q->interval)); @@ -83,7 +83,7 @@ Signed-off-by: David S. Miller } return 0; -@@ -2343,8 +2336,7 @@ static int cake_config_diffserv8(struct +@@ -2367,8 +2360,7 @@ static int cake_config_diffserv8(struct struct cake_sched_data *q = qdisc_priv(sch); u32 mtu = psched_mtu(qdisc_dev(sch)); u64 rate = q->rate_bps; @@ -93,7 +93,7 @@ Signed-off-by: David S. Miller u32 i; q->tin_cnt = 8; -@@ -2360,18 +2352,14 @@ static int cake_config_diffserv8(struct +@@ -2384,18 +2376,14 @@ static int cake_config_diffserv8(struct cake_set_rate(b, rate, mtu, us_to_ns(q->target), us_to_ns(q->interval)); @@ -115,7 +115,7 @@ Signed-off-by: David S. Miller } return 0; -@@ -2410,17 +2398,11 @@ static int cake_config_diffserv4(struct +@@ -2434,17 +2422,11 @@ static int cake_config_diffserv4(struct cake_set_rate(&q->tins[3], rate >> 2, mtu, us_to_ns(q->target), us_to_ns(q->interval)); @@ -137,7 +137,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -2451,15 +2433,10 @@ static int cake_config_diffserv3(struct +@@ -2475,15 +2457,10 @@ static int cake_config_diffserv3(struct cake_set_rate(&q->tins[2], rate >> 2, mtu, us_to_ns(q->target), us_to_ns(q->interval)); diff --git a/target/linux/generic/backport-4.19/394-v5.4-sch_cake-Add-missing-NLA-policy-entry-TCA_CAKE_SPLIT.patch b/target/linux/generic/backport-4.19/394-v5.4-sch_cake-Add-missing-NLA-policy-entry-TCA_CAKE_SPLIT.patch index 32f0e1ae89..bc063dccca 100644 --- a/target/linux/generic/backport-4.19/394-v5.4-sch_cake-Add-missing-NLA-policy-entry-TCA_CAKE_SPLIT.patch +++ b/target/linux/generic/backport-4.19/394-v5.4-sch_cake-Add-missing-NLA-policy-entry-TCA_CAKE_SPLIT.patch @@ -20,7 +20,7 @@ Signed-off-by: Kevin Darbyshire-Bryant --- a/net/sched/sch_cake.c +++ b/net/sched/sch_cake.c -@@ -2180,6 +2180,7 @@ static const struct nla_policy cake_poli +@@ -2204,6 +2204,7 @@ static const struct nla_policy cake_poli [TCA_CAKE_MPU] = { .type = NLA_U32 }, [TCA_CAKE_INGRESS] = { .type = NLA_U32 }, [TCA_CAKE_ACK_FILTER] = { .type = NLA_U32 }, diff --git a/target/linux/generic/backport-4.19/396-5.8-sch_cake-don-t-try-to-reallocate-or-unshare-skb-unco.patch b/target/linux/generic/backport-4.19/396-5.8-sch_cake-don-t-try-to-reallocate-or-unshare-skb-unco.patch deleted file mode 100644 index a36095c26c..0000000000 --- a/target/linux/generic/backport-4.19/396-5.8-sch_cake-don-t-try-to-reallocate-or-unshare-skb-unco.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 9208d2863ac689a563b92f2161d8d1e7127d0add Mon Sep 17 00:00:00 2001 -From: Ilya Ponetayev -Date: Thu, 25 Jun 2020 22:12:07 +0200 -Subject: [PATCH] sch_cake: don't try to reallocate or unshare skb - unconditionally -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -cake_handle_diffserv() tries to linearize mac and network header parts of -skb and to make it writable unconditionally. In some cases it leads to full -skb reallocation, which reduces throughput and increases CPU load. Some -measurements of IPv4 forward + NAPT on MIPS router with 580 MHz single-core -CPU was conducted. It appears that on kernel 4.9 skb_try_make_writable() -reallocates skb, if skb was allocated in ethernet driver via so-called -'build skb' method from page cache (it was discovered by strange increase -of kmalloc-2048 slab at first). - -Obtain DSCP value via read-only skb_header_pointer() call, and leave -linearization only for DSCP bleaching or ECN CE setting. And, as an -additional optimisation, skip diffserv parsing entirely if it is not needed -by the current configuration. - -Fixes: c87b4ecdbe8d ("sch_cake: Make sure we can write the IP header before changing DSCP bits") -Signed-off-by: Ilya Ponetayev -[ fix a few style issues, reflow commit message ] -Signed-off-by: Toke Høiland-Jørgensen -Signed-off-by: David S. Miller -Signed-off-by: Kevin Darbyshire-Bryant ---- - net/sched/sch_cake.c | 41 ++++++++++++++++++++++++++++++----------- - 1 file changed, 30 insertions(+), 11 deletions(-) - ---- a/net/sched/sch_cake.c -+++ b/net/sched/sch_cake.c -@@ -1553,30 +1553,49 @@ static unsigned int cake_drop(struct Qdi - - static u8 cake_handle_diffserv(struct sk_buff *skb, u16 wash) - { -- int wlen = skb_network_offset(skb); -+ const int offset = skb_network_offset(skb); -+ u16 *buf, buf_; - u8 dscp; - - switch (tc_skb_protocol(skb)) { - case htons(ETH_P_IP): -- wlen += sizeof(struct iphdr); -- if (!pskb_may_pull(skb, wlen) || -- skb_try_make_writable(skb, wlen)) -+ buf = skb_header_pointer(skb, offset, sizeof(buf_), &buf_); -+ if (unlikely(!buf)) - return 0; - -- dscp = ipv4_get_dsfield(ip_hdr(skb)) >> 2; -- if (wash && dscp) -+ /* ToS is in the second byte of iphdr */ -+ dscp = ipv4_get_dsfield((struct iphdr *)buf) >> 2; -+ -+ if (wash && dscp) { -+ const int wlen = offset + sizeof(struct iphdr); -+ -+ if (!pskb_may_pull(skb, wlen) || -+ skb_try_make_writable(skb, wlen)) -+ return 0; -+ - ipv4_change_dsfield(ip_hdr(skb), INET_ECN_MASK, 0); -+ } -+ - return dscp; - - case htons(ETH_P_IPV6): -- wlen += sizeof(struct ipv6hdr); -- if (!pskb_may_pull(skb, wlen) || -- skb_try_make_writable(skb, wlen)) -+ buf = skb_header_pointer(skb, offset, sizeof(buf_), &buf_); -+ if (unlikely(!buf)) - return 0; - -- dscp = ipv6_get_dsfield(ipv6_hdr(skb)) >> 2; -- if (wash && dscp) -+ /* Traffic class is in the first and second bytes of ipv6hdr */ -+ dscp = ipv6_get_dsfield((struct ipv6hdr *)buf) >> 2; -+ -+ if (wash && dscp) { -+ const int wlen = offset + sizeof(struct ipv6hdr); -+ -+ if (!pskb_may_pull(skb, wlen) || -+ skb_try_make_writable(skb, wlen)) -+ return 0; -+ - ipv6_change_dsfield(ipv6_hdr(skb), INET_ECN_MASK, 0); -+ } -+ - return dscp; - - case htons(ETH_P_ARP): diff --git a/target/linux/generic/backport-4.19/397-5.8-sch_cake-don-t-call-diffserv-parsing-code-when-it-is.patch b/target/linux/generic/backport-4.19/397-5.8-sch_cake-don-t-call-diffserv-parsing-code-when-it-is.patch deleted file mode 100644 index b40bb36c74..0000000000 --- a/target/linux/generic/backport-4.19/397-5.8-sch_cake-don-t-call-diffserv-parsing-code-when-it-is.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 8c95eca0bb8c4bd2231a0d581f1ad0d50c90488c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= -Date: Thu, 25 Jun 2020 22:12:08 +0200 -Subject: [PATCH] sch_cake: don't call diffserv parsing code when it is not - needed -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -As a further optimisation of the diffserv parsing codepath, we can skip it -entirely if CAKE is configured to neither use diffserv-based -classification, nor to zero out the diffserv bits. - -Fixes: c87b4ecdbe8d ("sch_cake: Make sure we can write the IP header before changing DSCP bits") -Signed-off-by: Toke Høiland-Jørgensen -Signed-off-by: David S. Miller -Signed-off-by: Kevin Darbyshire-Bryant ---- - net/sched/sch_cake.c | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - ---- a/net/sched/sch_cake.c -+++ b/net/sched/sch_cake.c -@@ -1551,7 +1551,7 @@ static unsigned int cake_drop(struct Qdi - return idx + (tin << 16); - } - --static u8 cake_handle_diffserv(struct sk_buff *skb, u16 wash) -+static u8 cake_handle_diffserv(struct sk_buff *skb, bool wash) - { - const int offset = skb_network_offset(skb); - u16 *buf, buf_; -@@ -1612,14 +1612,17 @@ static struct cake_tin_data *cake_select - { - struct cake_sched_data *q = qdisc_priv(sch); - u32 tin, mark; -+ bool wash; - u8 dscp; - - /* Tin selection: Default to diffserv-based selection, allow overriding -- * using firewall marks or skb->priority. -+ * using firewall marks or skb->priority. Call DSCP parsing early if -+ * wash is enabled, otherwise defer to below to skip unneeded parsing. - */ -- dscp = cake_handle_diffserv(skb, -- q->rate_flags & CAKE_FLAG_WASH); - mark = (skb->mark & q->fwmark_mask) >> q->fwmark_shft; -+ wash = !!(q->rate_flags & CAKE_FLAG_WASH); -+ if (wash) -+ dscp = cake_handle_diffserv(skb, wash); - - if (q->tin_mode == CAKE_DIFFSERV_BESTEFFORT) - tin = 0; -@@ -1630,6 +1633,8 @@ static struct cake_tin_data *cake_select - tin = q->tin_order[TC_H_MIN(skb->priority) - 1]; - - else { -+ if (!wash) -+ dscp = cake_handle_diffserv(skb, wash); - tin = q->tin_index[dscp]; - - if (unlikely(tin >= q->tin_cnt)) diff --git a/target/linux/generic/backport-4.19/398-5.8-sch_cake-fix-a-few-style-nits.patch b/target/linux/generic/backport-4.19/398-5.8-sch_cake-fix-a-few-style-nits.patch deleted file mode 100644 index a1d72113b7..0000000000 --- a/target/linux/generic/backport-4.19/398-5.8-sch_cake-fix-a-few-style-nits.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 3f608f0c41360b11b04c763f348b712f651c8bac Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= -Date: Thu, 25 Jun 2020 22:12:09 +0200 -Subject: [PATCH] sch_cake: fix a few style nits -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -I spotted a few nits when comparing the in-tree version of sch_cake with -the out-of-tree one: A redundant error variable declaration shadowing an -outer declaration, and an indentation alignment issue. Fix both of these. - -Fixes: 046f6fd5daef ("sched: Add Common Applications Kept Enhanced (cake) qdisc") -Signed-off-by: Toke Høiland-Jørgensen -Signed-off-by: David S. Miller -Signed-off-by: Kevin Darbyshire-Bryant ---- - net/sched/sch_cake.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/net/sched/sch_cake.c -+++ b/net/sched/sch_cake.c -@@ -2713,7 +2713,7 @@ static int cake_init(struct Qdisc *sch, - qdisc_watchdog_init(&q->watchdog, sch); - - if (opt) { -- int err = cake_change(sch, opt, extack); -+ err = cake_change(sch, opt, extack); - - if (err) - return err; -@@ -3030,7 +3030,7 @@ static int cake_dump_class_stats(struct - PUT_STAT_S32(BLUE_TIMER_US, - ktime_to_us( - ktime_sub(now, -- flow->cvars.blue_timer))); -+ flow->cvars.blue_timer))); - } - if (flow->cvars.dropping) { - PUT_STAT_S32(DROP_NEXT_US, diff --git a/target/linux/generic/backport-4.19/702-v4.20-net-ethernet-Add-helper-for-MACs-which-support-asym-.patch b/target/linux/generic/backport-4.19/702-v4.20-net-ethernet-Add-helper-for-MACs-which-support-asym-.patch index 96de83dabc..2f32c59ad2 100644 --- a/target/linux/generic/backport-4.19/702-v4.20-net-ethernet-Add-helper-for-MACs-which-support-asym-.patch +++ b/target/linux/generic/backport-4.19/702-v4.20-net-ethernet-Add-helper-for-MACs-which-support-asym-.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1781,6 +1781,19 @@ int phy_set_max_speed(struct phy_device +@@ -1783,6 +1783,19 @@ int phy_set_max_speed(struct phy_device } EXPORT_SYMBOL(phy_set_max_speed); diff --git a/target/linux/generic/backport-4.19/703-v4.20-net-ethernet-Add-helper-for-set_pauseparam-for-Asym-.patch b/target/linux/generic/backport-4.19/703-v4.20-net-ethernet-Add-helper-for-set_pauseparam-for-Asym-.patch index 070544ea63..99aba28818 100644 --- a/target/linux/generic/backport-4.19/703-v4.20-net-ethernet-Add-helper-for-set_pauseparam-for-Asym-.patch +++ b/target/linux/generic/backport-4.19/703-v4.20-net-ethernet-Add-helper-for-set_pauseparam-for-Asym-.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1794,6 +1794,36 @@ void phy_support_asym_pause(struct phy_d +@@ -1796,6 +1796,36 @@ void phy_support_asym_pause(struct phy_d } EXPORT_SYMBOL(phy_support_asym_pause); diff --git a/target/linux/generic/backport-4.19/704-v4.20-net-phy-Stop-with-excessive-soft-reset.patch b/target/linux/generic/backport-4.19/704-v4.20-net-phy-Stop-with-excessive-soft-reset.patch index d9c4b4ecdd..483815a338 100644 --- a/target/linux/generic/backport-4.19/704-v4.20-net-phy-Stop-with-excessive-soft-reset.patch +++ b/target/linux/generic/backport-4.19/704-v4.20-net-phy-Stop-with-excessive-soft-reset.patch @@ -29,7 +29,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -890,8 +890,6 @@ int phy_init_hw(struct phy_device *phyde +@@ -892,8 +892,6 @@ int phy_init_hw(struct phy_device *phyde if (phydev->drv->soft_reset) ret = phydev->drv->soft_reset(phydev); diff --git a/target/linux/generic/backport-4.19/737-v5.5-net-phy-add-core-phylib-sfp-support.patch b/target/linux/generic/backport-4.19/737-v5.5-net-phy-add-core-phylib-sfp-support.patch index 3bb87ab963..1ffc545ad1 100644 --- a/target/linux/generic/backport-4.19/737-v5.5-net-phy-add-core-phylib-sfp-support.patch +++ b/target/linux/generic/backport-4.19/737-v5.5-net-phy-add-core-phylib-sfp-support.patch @@ -54,7 +54,7 @@ Signed-off-by: Russell King #include #include #include -@@ -948,6 +949,65 @@ void phy_attached_print(struct phy_devic +@@ -950,6 +951,65 @@ void phy_attached_print(struct phy_devic EXPORT_SYMBOL(phy_attached_print); /** @@ -120,7 +120,7 @@ Signed-off-by: Russell King * phy_attach_direct - attach a network device to a given PHY device pointer * @dev: network device to attach * @phydev: Pointer to phy_device to attach -@@ -1020,6 +1080,9 @@ int phy_attach_direct(struct net_device +@@ -1022,6 +1082,9 @@ int phy_attach_direct(struct net_device phydev->attached_dev = dev; dev->phydev = phydev; @@ -130,7 +130,7 @@ Signed-off-by: Russell King /* Some Ethernet drivers try to connect to a PHY device before * calling register_netdevice() -> netdev_register_kobject() and * does the dev->dev.kobj initialization. Here we only check for -@@ -1954,6 +2017,9 @@ static int phy_remove(struct device *dev +@@ -1956,6 +2019,9 @@ static int phy_remove(struct device *dev phydev->state = PHY_DOWN; mutex_unlock(&phydev->lock); diff --git a/target/linux/generic/backport-4.19/740-v5.5-net-phy-avoid-matching-all-ones-clause-45-PHY-IDs.patch b/target/linux/generic/backport-4.19/740-v5.5-net-phy-avoid-matching-all-ones-clause-45-PHY-IDs.patch index 08c7a402f5..56bf507720 100644 --- a/target/linux/generic/backport-4.19/740-v5.5-net-phy-avoid-matching-all-ones-clause-45-PHY-IDs.patch +++ b/target/linux/generic/backport-4.19/740-v5.5-net-phy-avoid-matching-all-ones-clause-45-PHY-IDs.patch @@ -46,7 +46,7 @@ Signed-off-by: Russell King continue; if ((phydrv->phy_id & phydrv->phy_id_mask) == -@@ -627,10 +627,13 @@ static int get_phy_id(struct mii_bus *bu +@@ -629,10 +629,13 @@ static int get_phy_id(struct mii_bus *bu */ struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45) { diff --git a/target/linux/generic/backport-4.19/825-v5.8-spi-rb4xx-null-pointer-bug-fix.patch b/target/linux/generic/backport-4.19/825-v5.8-spi-rb4xx-null-pointer-bug-fix.patch index 5d762c571c..811fe277dd 100644 --- a/target/linux/generic/backport-4.19/825-v5.8-spi-rb4xx-null-pointer-bug-fix.patch +++ b/target/linux/generic/backport-4.19/825-v5.8-spi-rb4xx-null-pointer-bug-fix.patch @@ -20,11 +20,9 @@ Signed-off-by: Christopher Hill drivers/spi/spi-rb4xx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -diff --git a/drivers/spi/spi-rb4xx.c b/drivers/spi/spi-rb4xx.c -index 4c9620e0d18c..17e1a77dc132 100644 --- a/drivers/spi/spi-rb4xx.c +++ b/drivers/spi/spi-rb4xx.c -@@ -158,6 +158,11 @@ static int rb4xx_spi_probe(struct platform_device *pdev) +@@ -164,6 +164,11 @@ static int rb4xx_spi_probe(struct platfo master->transfer_one = rb4xx_transfer_one; master->set_cs = rb4xx_set_cs; @@ -36,7 +34,7 @@ index 4c9620e0d18c..17e1a77dc132 100644 err = devm_spi_register_master(&pdev->dev, master); if (err) { dev_err(&pdev->dev, "failed to register SPI master\n"); -@@ -168,11 +173,6 @@ static int rb4xx_spi_probe(struct platform_device *pdev) +@@ -174,11 +179,6 @@ static int rb4xx_spi_probe(struct platfo if (err) return err; diff --git a/target/linux/generic/backport-4.19/826-v5.8-spi-rb4xx-update-driver-to-be-device-tree-aware.patch b/target/linux/generic/backport-4.19/826-v5.8-spi-rb4xx-update-driver-to-be-device-tree-aware.patch index 0340c934d8..d3e654e974 100644 --- a/target/linux/generic/backport-4.19/826-v5.8-spi-rb4xx-update-driver-to-be-device-tree-aware.patch +++ b/target/linux/generic/backport-4.19/826-v5.8-spi-rb4xx-update-driver-to-be-device-tree-aware.patch @@ -21,11 +21,9 @@ Signed-off-by: Christopher Hill drivers/spi/spi-rb4xx.c | 9 +++++++++ 1 file changed, 9 insertions(+) -diff --git a/drivers/spi/spi-rb4xx.c b/drivers/spi/spi-rb4xx.c -index 17e1a77dc132..8aa51beb4ff3 100644 --- a/drivers/spi/spi-rb4xx.c +++ b/drivers/spi/spi-rb4xx.c -@@ -14,6 +14,7 @@ +@@ -18,6 +18,7 @@ #include #include #include @@ -33,7 +31,7 @@ index 17e1a77dc132..8aa51beb4ff3 100644 #include -@@ -150,6 +151,7 @@ static int rb4xx_spi_probe(struct platform_device *pdev) +@@ -156,6 +157,7 @@ static int rb4xx_spi_probe(struct platfo if (IS_ERR(ahb_clk)) return PTR_ERR(ahb_clk); @@ -41,7 +39,7 @@ index 17e1a77dc132..8aa51beb4ff3 100644 master->bus_num = 0; master->num_chipselect = 3; master->mode_bits = SPI_TX_DUAL; -@@ -188,11 +190,18 @@ static int rb4xx_spi_remove(struct platform_device *pdev) +@@ -194,11 +196,18 @@ static int rb4xx_spi_remove(struct platf return 0; } diff --git a/target/linux/generic/backport-5.4/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch b/target/linux/generic/backport-5.4/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch index 2be0d36392..8f6406c290 100644 --- a/target/linux/generic/backport-5.4/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch +++ b/target/linux/generic/backport-5.4/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch @@ -32,7 +32,7 @@ Signed-off-by: David S. Miller s32 tin_deficit; u32 tin_backlog; u32 tin_dropped; -@@ -1919,7 +1918,7 @@ begin: +@@ -1943,7 +1942,7 @@ begin: while (b->tin_deficit < 0 || !(b->sparse_flow_count + b->bulk_flow_count)) { if (b->tin_deficit <= 0) @@ -41,7 +41,7 @@ Signed-off-by: David S. Miller if (b->sparse_flow_count + b->bulk_flow_count) empty = false; -@@ -2241,8 +2240,7 @@ static int cake_config_besteffort(struct +@@ -2265,8 +2264,7 @@ static int cake_config_besteffort(struct cake_set_rate(b, rate, mtu, us_to_ns(q->target), us_to_ns(q->interval)); @@ -51,7 +51,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -2253,8 +2251,7 @@ static int cake_config_precedence(struct +@@ -2277,8 +2275,7 @@ static int cake_config_precedence(struct struct cake_sched_data *q = qdisc_priv(sch); u32 mtu = psched_mtu(qdisc_dev(sch)); u64 rate = q->rate_bps; @@ -61,7 +61,7 @@ Signed-off-by: David S. Miller u32 i; q->tin_cnt = 8; -@@ -2267,18 +2264,14 @@ static int cake_config_precedence(struct +@@ -2291,18 +2288,14 @@ static int cake_config_precedence(struct cake_set_rate(b, rate, mtu, us_to_ns(q->target), us_to_ns(q->interval)); @@ -83,7 +83,7 @@ Signed-off-by: David S. Miller } return 0; -@@ -2347,8 +2340,7 @@ static int cake_config_diffserv8(struct +@@ -2371,8 +2364,7 @@ static int cake_config_diffserv8(struct struct cake_sched_data *q = qdisc_priv(sch); u32 mtu = psched_mtu(qdisc_dev(sch)); u64 rate = q->rate_bps; @@ -93,7 +93,7 @@ Signed-off-by: David S. Miller u32 i; q->tin_cnt = 8; -@@ -2364,18 +2356,14 @@ static int cake_config_diffserv8(struct +@@ -2388,18 +2380,14 @@ static int cake_config_diffserv8(struct cake_set_rate(b, rate, mtu, us_to_ns(q->target), us_to_ns(q->interval)); @@ -115,7 +115,7 @@ Signed-off-by: David S. Miller } return 0; -@@ -2414,17 +2402,11 @@ static int cake_config_diffserv4(struct +@@ -2438,17 +2426,11 @@ static int cake_config_diffserv4(struct cake_set_rate(&q->tins[3], rate >> 2, mtu, us_to_ns(q->target), us_to_ns(q->interval)); @@ -137,7 +137,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -2455,15 +2437,10 @@ static int cake_config_diffserv3(struct +@@ -2479,15 +2461,10 @@ static int cake_config_diffserv3(struct cake_set_rate(&q->tins[2], rate >> 2, mtu, us_to_ns(q->target), us_to_ns(q->interval)); diff --git a/target/linux/generic/backport-5.4/396-5.8-sch_cake-don-t-try-to-reallocate-or-unshare-skb-unco.patch b/target/linux/generic/backport-5.4/396-5.8-sch_cake-don-t-try-to-reallocate-or-unshare-skb-unco.patch deleted file mode 100644 index a36095c26c..0000000000 --- a/target/linux/generic/backport-5.4/396-5.8-sch_cake-don-t-try-to-reallocate-or-unshare-skb-unco.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 9208d2863ac689a563b92f2161d8d1e7127d0add Mon Sep 17 00:00:00 2001 -From: Ilya Ponetayev -Date: Thu, 25 Jun 2020 22:12:07 +0200 -Subject: [PATCH] sch_cake: don't try to reallocate or unshare skb - unconditionally -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -cake_handle_diffserv() tries to linearize mac and network header parts of -skb and to make it writable unconditionally. In some cases it leads to full -skb reallocation, which reduces throughput and increases CPU load. Some -measurements of IPv4 forward + NAPT on MIPS router with 580 MHz single-core -CPU was conducted. It appears that on kernel 4.9 skb_try_make_writable() -reallocates skb, if skb was allocated in ethernet driver via so-called -'build skb' method from page cache (it was discovered by strange increase -of kmalloc-2048 slab at first). - -Obtain DSCP value via read-only skb_header_pointer() call, and leave -linearization only for DSCP bleaching or ECN CE setting. And, as an -additional optimisation, skip diffserv parsing entirely if it is not needed -by the current configuration. - -Fixes: c87b4ecdbe8d ("sch_cake: Make sure we can write the IP header before changing DSCP bits") -Signed-off-by: Ilya Ponetayev -[ fix a few style issues, reflow commit message ] -Signed-off-by: Toke Høiland-Jørgensen -Signed-off-by: David S. Miller -Signed-off-by: Kevin Darbyshire-Bryant ---- - net/sched/sch_cake.c | 41 ++++++++++++++++++++++++++++++----------- - 1 file changed, 30 insertions(+), 11 deletions(-) - ---- a/net/sched/sch_cake.c -+++ b/net/sched/sch_cake.c -@@ -1553,30 +1553,49 @@ static unsigned int cake_drop(struct Qdi - - static u8 cake_handle_diffserv(struct sk_buff *skb, u16 wash) - { -- int wlen = skb_network_offset(skb); -+ const int offset = skb_network_offset(skb); -+ u16 *buf, buf_; - u8 dscp; - - switch (tc_skb_protocol(skb)) { - case htons(ETH_P_IP): -- wlen += sizeof(struct iphdr); -- if (!pskb_may_pull(skb, wlen) || -- skb_try_make_writable(skb, wlen)) -+ buf = skb_header_pointer(skb, offset, sizeof(buf_), &buf_); -+ if (unlikely(!buf)) - return 0; - -- dscp = ipv4_get_dsfield(ip_hdr(skb)) >> 2; -- if (wash && dscp) -+ /* ToS is in the second byte of iphdr */ -+ dscp = ipv4_get_dsfield((struct iphdr *)buf) >> 2; -+ -+ if (wash && dscp) { -+ const int wlen = offset + sizeof(struct iphdr); -+ -+ if (!pskb_may_pull(skb, wlen) || -+ skb_try_make_writable(skb, wlen)) -+ return 0; -+ - ipv4_change_dsfield(ip_hdr(skb), INET_ECN_MASK, 0); -+ } -+ - return dscp; - - case htons(ETH_P_IPV6): -- wlen += sizeof(struct ipv6hdr); -- if (!pskb_may_pull(skb, wlen) || -- skb_try_make_writable(skb, wlen)) -+ buf = skb_header_pointer(skb, offset, sizeof(buf_), &buf_); -+ if (unlikely(!buf)) - return 0; - -- dscp = ipv6_get_dsfield(ipv6_hdr(skb)) >> 2; -- if (wash && dscp) -+ /* Traffic class is in the first and second bytes of ipv6hdr */ -+ dscp = ipv6_get_dsfield((struct ipv6hdr *)buf) >> 2; -+ -+ if (wash && dscp) { -+ const int wlen = offset + sizeof(struct ipv6hdr); -+ -+ if (!pskb_may_pull(skb, wlen) || -+ skb_try_make_writable(skb, wlen)) -+ return 0; -+ - ipv6_change_dsfield(ipv6_hdr(skb), INET_ECN_MASK, 0); -+ } -+ - return dscp; - - case htons(ETH_P_ARP): diff --git a/target/linux/generic/backport-5.4/397-5.8-sch_cake-don-t-call-diffserv-parsing-code-when-it-is.patch b/target/linux/generic/backport-5.4/397-5.8-sch_cake-don-t-call-diffserv-parsing-code-when-it-is.patch deleted file mode 100644 index 2d9cd29780..0000000000 --- a/target/linux/generic/backport-5.4/397-5.8-sch_cake-don-t-call-diffserv-parsing-code-when-it-is.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 8c95eca0bb8c4bd2231a0d581f1ad0d50c90488c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= -Date: Thu, 25 Jun 2020 22:12:08 +0200 -Subject: [PATCH] sch_cake: don't call diffserv parsing code when it is not - needed -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -As a further optimisation of the diffserv parsing codepath, we can skip it -entirely if CAKE is configured to neither use diffserv-based -classification, nor to zero out the diffserv bits. - -Fixes: c87b4ecdbe8d ("sch_cake: Make sure we can write the IP header before changing DSCP bits") -Signed-off-by: Toke Høiland-Jørgensen -Signed-off-by: David S. Miller -Signed-off-by: Kevin Darbyshire-Bryant ---- - net/sched/sch_cake.c | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - ---- a/net/sched/sch_cake.c -+++ b/net/sched/sch_cake.c -@@ -1551,7 +1551,7 @@ static unsigned int cake_drop(struct Qdi - return idx + (tin << 16); - } - --static u8 cake_handle_diffserv(struct sk_buff *skb, u16 wash) -+static u8 cake_handle_diffserv(struct sk_buff *skb, bool wash) - { - const int offset = skb_network_offset(skb); - u16 *buf, buf_; -@@ -1612,14 +1612,17 @@ static struct cake_tin_data *cake_select - { - struct cake_sched_data *q = qdisc_priv(sch); - u32 tin, mark; -+ bool wash; - u8 dscp; - - /* Tin selection: Default to diffserv-based selection, allow overriding -- * using firewall marks or skb->priority. -+ * using firewall marks or skb->priority. Call DSCP parsing early if -+ * wash is enabled, otherwise defer to below to skip unneeded parsing. - */ -- dscp = cake_handle_diffserv(skb, -- q->rate_flags & CAKE_FLAG_WASH); - mark = (skb->mark & q->fwmark_mask) >> q->fwmark_shft; -+ wash = !!(q->rate_flags & CAKE_FLAG_WASH); -+ if (wash) -+ dscp = cake_handle_diffserv(skb, wash); - - if (q->tin_mode == CAKE_DIFFSERV_BESTEFFORT) - tin = 0; -@@ -1633,6 +1636,8 @@ static struct cake_tin_data *cake_select - tin = q->tin_order[TC_H_MIN(skb->priority) - 1]; - - else { -+ if (!wash) -+ dscp = cake_handle_diffserv(skb, wash); - tin = q->tin_index[dscp]; - - if (unlikely(tin >= q->tin_cnt)) diff --git a/target/linux/generic/backport-5.4/398-5.8-sch_cake-fix-a-few-style-nits.patch b/target/linux/generic/backport-5.4/398-5.8-sch_cake-fix-a-few-style-nits.patch deleted file mode 100644 index 1160489efb..0000000000 --- a/target/linux/generic/backport-5.4/398-5.8-sch_cake-fix-a-few-style-nits.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 3f608f0c41360b11b04c763f348b712f651c8bac Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= -Date: Thu, 25 Jun 2020 22:12:09 +0200 -Subject: [PATCH] sch_cake: fix a few style nits -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -I spotted a few nits when comparing the in-tree version of sch_cake with -the out-of-tree one: A redundant error variable declaration shadowing an -outer declaration, and an indentation alignment issue. Fix both of these. - -Fixes: 046f6fd5daef ("sched: Add Common Applications Kept Enhanced (cake) qdisc") -Signed-off-by: Toke Høiland-Jørgensen -Signed-off-by: David S. Miller -Signed-off-by: Kevin Darbyshire-Bryant ---- - net/sched/sch_cake.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/net/sched/sch_cake.c -+++ b/net/sched/sch_cake.c -@@ -2717,7 +2717,7 @@ static int cake_init(struct Qdisc *sch, - qdisc_watchdog_init(&q->watchdog, sch); - - if (opt) { -- int err = cake_change(sch, opt, extack); -+ err = cake_change(sch, opt, extack); - - if (err) - return err; -@@ -3034,7 +3034,7 @@ static int cake_dump_class_stats(struct - PUT_STAT_S32(BLUE_TIMER_US, - ktime_to_us( - ktime_sub(now, -- flow->cvars.blue_timer))); -+ flow->cvars.blue_timer))); - } - if (flow->cvars.dropping) { - PUT_STAT_S32(DROP_NEXT_US, diff --git a/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch b/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch index 23230abfbb..6ee99b4791 100644 --- a/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch +++ b/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch @@ -54,7 +54,7 @@ Signed-off-by: Russell King #include #include #include -@@ -1183,6 +1184,65 @@ phy_standalone_show(struct device *dev, +@@ -1185,6 +1186,65 @@ phy_standalone_show(struct device *dev, static DEVICE_ATTR_RO(phy_standalone); /** @@ -120,7 +120,7 @@ Signed-off-by: Russell King * phy_attach_direct - attach a network device to a given PHY device pointer * @dev: network device to attach * @phydev: Pointer to phy_device to attach -@@ -1259,6 +1319,9 @@ int phy_attach_direct(struct net_device +@@ -1261,6 +1321,9 @@ int phy_attach_direct(struct net_device dev->phydev = phydev; } @@ -130,7 +130,7 @@ Signed-off-by: Russell King /* Some Ethernet drivers try to connect to a PHY device before * calling register_netdevice() -> netdev_register_kobject() and * does the dev->dev.kobj initialization. Here we only check for -@@ -2287,6 +2350,9 @@ static int phy_remove(struct device *dev +@@ -2289,6 +2352,9 @@ static int phy_remove(struct device *dev phydev->state = PHY_DOWN; mutex_unlock(&phydev->lock); diff --git a/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch b/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch index 855c4d2aac..f03cd2a984 100644 --- a/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch +++ b/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch @@ -20,7 +20,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1679,6 +1679,40 @@ static int genphy_config_advert(struct p +@@ -1681,6 +1681,40 @@ static int genphy_config_advert(struct p } /** @@ -61,7 +61,7 @@ Signed-off-by: David S. Miller * genphy_config_eee_advert - disable unwanted eee mode advertisement * @phydev: target phy_device struct * -@@ -1787,6 +1821,54 @@ int __genphy_config_aneg(struct phy_devi +@@ -1789,6 +1823,54 @@ int __genphy_config_aneg(struct phy_devi EXPORT_SYMBOL(__genphy_config_aneg); /** @@ -116,7 +116,7 @@ Signed-off-by: David S. Miller * genphy_aneg_done - return auto-negotiation status * @phydev: target phy_device struct * -@@ -1958,6 +2040,63 @@ int genphy_read_status(struct phy_device +@@ -1960,6 +2042,63 @@ int genphy_read_status(struct phy_device EXPORT_SYMBOL(genphy_read_status); /** diff --git a/target/linux/generic/backport-5.4/803-v5.8-i2c-pxa-use-official-address-byte-helper.patch b/target/linux/generic/backport-5.4/803-v5.8-i2c-pxa-use-official-address-byte-helper.patch index c20a00c7f4..a937b52d9d 100644 --- a/target/linux/generic/backport-5.4/803-v5.8-i2c-pxa-use-official-address-byte-helper.patch +++ b/target/linux/generic/backport-5.4/803-v5.8-i2c-pxa-use-official-address-byte-helper.patch @@ -18,7 +18,7 @@ Signed-off-by: Russell King --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c -@@ -675,16 +675,6 @@ static void i2c_pxa_slave_stop(struct px +@@ -674,16 +674,6 @@ static void i2c_pxa_slave_stop(struct px * PXA I2C Master mode */ @@ -35,7 +35,7 @@ Signed-off-by: Russell King static inline void i2c_pxa_start_message(struct pxa_i2c *i2c) { u32 icr; -@@ -692,8 +682,8 @@ static inline void i2c_pxa_start_message +@@ -691,8 +681,8 @@ static inline void i2c_pxa_start_message /* * Step 1: target slave address into IDBR */ @@ -46,7 +46,7 @@ Signed-off-by: Russell King /* * Step 2: initiate the write. -@@ -1006,8 +996,8 @@ static void i2c_pxa_irq_txempty(struct p +@@ -1003,8 +993,8 @@ static void i2c_pxa_irq_txempty(struct p /* * Write the next address. */ diff --git a/target/linux/generic/backport-5.4/806-v5.8-i2c-pxa-re-arrange-functions-to-flow-better.patch b/target/linux/generic/backport-5.4/806-v5.8-i2c-pxa-re-arrange-functions-to-flow-better.patch index ff631cf352..9f09f9dacb 100644 --- a/target/linux/generic/backport-5.4/806-v5.8-i2c-pxa-re-arrange-functions-to-flow-better.patch +++ b/target/linux/generic/backport-5.4/806-v5.8-i2c-pxa-re-arrange-functions-to-flow-better.patch @@ -18,7 +18,7 @@ Signed-off-by: Russell King --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c -@@ -327,7 +327,6 @@ static void i2c_pxa_scream_blue_murder(s +@@ -326,7 +326,6 @@ static void i2c_pxa_scream_blue_murder(s #endif /* ifdef DEBUG / else */ static void i2c_pxa_master_complete(struct pxa_i2c *i2c, int ret); @@ -26,7 +26,7 @@ Signed-off-by: Russell King static inline int i2c_pxa_is_slavemode(struct pxa_i2c *i2c) { -@@ -700,34 +699,6 @@ static inline void i2c_pxa_stop_message( +@@ -697,34 +696,6 @@ static inline void i2c_pxa_stop_message( writel(icr, _ICR(i2c)); } @@ -61,7 +61,7 @@ Signed-off-by: Russell King /* * PXA I2C send master code * 1. Load master code to IDBR and send it. -@@ -756,140 +727,6 @@ static int i2c_pxa_send_mastercode(struc +@@ -753,140 +724,6 @@ static int i2c_pxa_send_mastercode(struc return (timeout == 0) ? I2C_RETRY : 0; } @@ -202,7 +202,7 @@ Signed-off-by: Russell King /* * i2c_pxa_master_complete - complete the message and wake up. */ -@@ -1096,6 +933,71 @@ static irqreturn_t i2c_pxa_handler(int t +@@ -1093,6 +930,71 @@ static irqreturn_t i2c_pxa_handler(int t return IRQ_HANDLED; } @@ -274,7 +274,7 @@ Signed-off-by: Russell King static int i2c_pxa_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) { -@@ -1129,6 +1031,103 @@ static const struct i2c_algorithm i2c_px +@@ -1126,6 +1028,103 @@ static const struct i2c_algorithm i2c_px .functionality = i2c_pxa_functionality, }; diff --git a/target/linux/generic/backport-5.4/808-v5.8-i2c-pxa-add-and-use-definitions-for-IBMR-register.patch b/target/linux/generic/backport-5.4/808-v5.8-i2c-pxa-add-and-use-definitions-for-IBMR-register.patch index 16518b0e66..f197808d23 100644 --- a/target/linux/generic/backport-5.4/808-v5.8-i2c-pxa-add-and-use-definitions-for-IBMR-register.patch +++ b/target/linux/generic/backport-5.4/808-v5.8-i2c-pxa-add-and-use-definitions-for-IBMR-register.patch @@ -27,7 +27,7 @@ Signed-off-by: Russell King #define ICR_START (1 << 0) /* start bit */ #define ICR_STOP (1 << 1) /* stop bit */ #define ICR_ACKNAK (1 << 2) /* send ACK(0) or NAK(1) */ -@@ -335,7 +338,7 @@ static void i2c_pxa_abort(struct pxa_i2c +@@ -334,7 +337,7 @@ static void i2c_pxa_abort(struct pxa_i2c return; } @@ -36,7 +36,7 @@ Signed-off-by: Russell King unsigned long icr = readl(_ICR(i2c)); icr &= ~ICR_START; -@@ -390,7 +393,8 @@ static int i2c_pxa_wait_master(struct px +@@ -389,7 +392,8 @@ static int i2c_pxa_wait_master(struct px * quick check of the i2c lines themselves to ensure they've * gone high... */ @@ -46,7 +46,7 @@ Signed-off-by: Russell King if (i2c_debug > 0) dev_dbg(&i2c->adap.dev, "%s: done\n", __func__); return 1; -@@ -575,7 +579,7 @@ static void i2c_pxa_slave_start(struct p +@@ -574,7 +578,7 @@ static void i2c_pxa_slave_start(struct p timeout = 0x10000; while (1) { @@ -55,7 +55,7 @@ Signed-off-by: Russell King break; timeout--; -@@ -638,7 +642,7 @@ static void i2c_pxa_slave_start(struct p +@@ -637,7 +641,7 @@ static void i2c_pxa_slave_start(struct p timeout = 0x10000; while (1) { diff --git a/target/linux/generic/backport-5.4/809-v5.8-i2c-pxa-always-set-fm-and-hs-members-for-each-type.patch b/target/linux/generic/backport-5.4/809-v5.8-i2c-pxa-always-set-fm-and-hs-members-for-each-type.patch index 9809d1dbbb..9b1dee62ce 100644 --- a/target/linux/generic/backport-5.4/809-v5.8-i2c-pxa-always-set-fm-and-hs-members-for-each-type.patch +++ b/target/linux/generic/backport-5.4/809-v5.8-i2c-pxa-always-set-fm-and-hs-members-for-each-type.patch @@ -53,7 +53,7 @@ Signed-off-by: Russell King }, [REGS_A3700] = { .ibmr = 0x00, -@@ -1232,8 +1240,8 @@ static int i2c_pxa_probe(struct platform +@@ -1229,8 +1237,8 @@ static int i2c_pxa_probe(struct platform i2c->reg_idbr = i2c->reg_base + pxa_reg_layout[i2c_type].idbr; i2c->reg_icr = i2c->reg_base + pxa_reg_layout[i2c_type].icr; i2c->reg_isr = i2c->reg_base + pxa_reg_layout[i2c_type].isr; diff --git a/target/linux/generic/backport-5.4/811-v5.8-i2c-pxa-move-DT-IDs-along-side-platform-IDs.patch b/target/linux/generic/backport-5.4/811-v5.8-i2c-pxa-move-DT-IDs-along-side-platform-IDs.patch index 70ef8f35ab..02565229d8 100644 --- a/target/linux/generic/backport-5.4/811-v5.8-i2c-pxa-move-DT-IDs-along-side-platform-IDs.patch +++ b/target/linux/generic/backport-5.4/811-v5.8-i2c-pxa-move-DT-IDs-along-side-platform-IDs.patch @@ -32,7 +32,7 @@ Signed-off-by: Russell King static const struct platform_device_id i2c_pxa_id_table[] = { { "pxa2xx-i2c", REGS_PXA2XX }, { "pxa3xx-pwri2c", REGS_PXA3XX }, -@@ -1181,15 +1190,6 @@ static const struct i2c_algorithm i2c_px +@@ -1178,15 +1187,6 @@ static const struct i2c_algorithm i2c_px .functionality = i2c_pxa_functionality, }; diff --git a/target/linux/generic/backport-5.4/812-v5.8-i2c-pxa-fix-i2c_pxa_scream_blue_murder-debug-output.patch b/target/linux/generic/backport-5.4/812-v5.8-i2c-pxa-fix-i2c_pxa_scream_blue_murder-debug-output.patch deleted file mode 100644 index 0afb29472b..0000000000 --- a/target/linux/generic/backport-5.4/812-v5.8-i2c-pxa-fix-i2c_pxa_scream_blue_murder-debug-output.patch +++ /dev/null @@ -1,47 +0,0 @@ -From: Russell King -Bcc: linux@mail.armlinux.org.uk -Cc: linux-i2c@vger.kernel.org -Subject: [PATCH 10/17] i2c: pxa: fix i2c_pxa_scream_blue_murder() debug output -MIME-Version: 1.0 -Content-Disposition: inline -Content-Transfer-Encoding: 8bit -Content-Type: text/plain; charset="utf-8" - -The IRQ log output is supposed to appear on a single line. However, -commit 3a2dc1677b60 ("i2c: pxa: Update debug function to dump more info -on error") resulted in it being printed one-entry-per-line, which is -excessively long. - -Fixing this is not a trivial matter; using pr_cont() doesn't work as -the previous dev_dbg() may not have been compiled in, or may be -dynamic. - -Since the rest of this function output is at error level, and is also -debug output, promote this to error level as well to avoid this -problem. - -Reduce the number of always zero prefix digits to save screen real- -estate. - -Signed-off-by: Russell King ---- - drivers/i2c/busses/i2c-pxa.c | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - ---- a/drivers/i2c/busses/i2c-pxa.c -+++ b/drivers/i2c/busses/i2c-pxa.c -@@ -364,11 +364,10 @@ static void i2c_pxa_scream_blue_murder(s - dev_err(dev, "IBMR: %08x IDBR: %08x ICR: %08x ISR: %08x\n", - readl(_IBMR(i2c)), readl(_IDBR(i2c)), readl(_ICR(i2c)), - readl(_ISR(i2c))); -- dev_dbg(dev, "log: "); -+ dev_err(dev, "log:"); - for (i = 0; i < i2c->irqlogidx; i++) -- pr_debug("[%08x:%08x] ", i2c->isrlog[i], i2c->icrlog[i]); -- -- pr_debug("\n"); -+ pr_cont(" [%03x:%05x]", i2c->isrlog[i], i2c->icrlog[i]); -+ pr_cont("\n"); - } - - #else /* ifdef DEBUG */ diff --git a/target/linux/generic/backport-5.4/815-v5.8-i2c-pxa-consolidate-i2c_pxa_-xfer-implementations.patch b/target/linux/generic/backport-5.4/815-v5.8-i2c-pxa-consolidate-i2c_pxa_-xfer-implementations.patch index d5fb1d2cbe..2debd4c86b 100644 --- a/target/linux/generic/backport-5.4/815-v5.8-i2c-pxa-consolidate-i2c_pxa_-xfer-implementations.patch +++ b/target/linux/generic/backport-5.4/815-v5.8-i2c-pxa-consolidate-i2c_pxa_-xfer-implementations.patch @@ -18,7 +18,7 @@ Signed-off-by: Russell King --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c -@@ -1061,18 +1061,20 @@ static int i2c_pxa_do_xfer(struct pxa_i2 +@@ -1059,18 +1059,20 @@ static int i2c_pxa_do_xfer(struct pxa_i2 return ret; } @@ -44,7 +44,7 @@ Signed-off-by: Russell King udelay(100); } i2c_pxa_scream_blue_murder(i2c, "exhausted retries"); -@@ -1082,6 +1084,14 @@ static int i2c_pxa_xfer(struct i2c_adapt +@@ -1080,6 +1082,14 @@ static int i2c_pxa_xfer(struct i2c_adapt return ret; } @@ -59,7 +59,7 @@ Signed-off-by: Russell King static u32 i2c_pxa_functionality(struct i2c_adapter *adap) { return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | -@@ -1165,7 +1175,6 @@ static int i2c_pxa_pio_xfer(struct i2c_a +@@ -1163,7 +1173,6 @@ static int i2c_pxa_pio_xfer(struct i2c_a struct i2c_msg msgs[], int num) { struct pxa_i2c *i2c = adap->algo_data; @@ -67,7 +67,7 @@ Signed-off-by: Russell King /* If the I2C controller is disabled we need to reset it (probably due to a suspend/resume destroying state). We do -@@ -1174,20 +1183,7 @@ static int i2c_pxa_pio_xfer(struct i2c_a +@@ -1172,20 +1181,7 @@ static int i2c_pxa_pio_xfer(struct i2c_a if (!(readl(_ICR(i2c)) & ICR_IUE)) i2c_pxa_reset(i2c); diff --git a/target/linux/generic/backport-5.4/816-v5.8-i2c-pxa-avoid-complaints-with-non-responsive-slaves.patch b/target/linux/generic/backport-5.4/816-v5.8-i2c-pxa-avoid-complaints-with-non-responsive-slaves.patch index f56e5b647f..63e6db80ad 100644 --- a/target/linux/generic/backport-5.4/816-v5.8-i2c-pxa-avoid-complaints-with-non-responsive-slaves.patch +++ b/target/linux/generic/backport-5.4/816-v5.8-i2c-pxa-avoid-complaints-with-non-responsive-slaves.patch @@ -33,7 +33,7 @@ Signed-off-by: Russell King #define BUS_ERROR (-EREMOTEIO) #define XFER_NAKED (-ECONNREFUSED) #define I2C_RETRY (-2000) /* an error has occurred retry transmit */ -@@ -840,7 +841,7 @@ static void i2c_pxa_irq_txempty(struct p +@@ -838,7 +839,7 @@ static void i2c_pxa_irq_txempty(struct p */ if (isr & ISR_ACKNAK) { if (i2c->msg_ptr == 0 && i2c->msg_idx == 0) @@ -42,7 +42,7 @@ Signed-off-by: Russell King else ret = XFER_NAKED; } -@@ -1068,16 +1069,19 @@ static int i2c_pxa_internal_xfer(struct +@@ -1066,16 +1067,19 @@ static int i2c_pxa_internal_xfer(struct { int ret, i; diff --git a/target/linux/generic/backport-5.4/817-v5.8-i2c-pxa-ensure-timeout-messages-are-unique.patch b/target/linux/generic/backport-5.4/817-v5.8-i2c-pxa-ensure-timeout-messages-are-unique.patch index 24cda47789..37a77b6c5c 100644 --- a/target/linux/generic/backport-5.4/817-v5.8-i2c-pxa-ensure-timeout-messages-are-unique.patch +++ b/target/linux/generic/backport-5.4/817-v5.8-i2c-pxa-ensure-timeout-messages-are-unique.patch @@ -16,7 +16,7 @@ Signed-off-by: Russell King --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c -@@ -1054,7 +1054,7 @@ static int i2c_pxa_do_xfer(struct pxa_i2 +@@ -1052,7 +1052,7 @@ static int i2c_pxa_do_xfer(struct pxa_i2 ret = i2c->msg_idx; if (!timeout && i2c->msg_num) { @@ -25,7 +25,7 @@ Signed-off-by: Russell King ret = I2C_RETRY; } -@@ -1124,7 +1124,7 @@ static int i2c_pxa_pio_set_master(struct +@@ -1122,7 +1122,7 @@ static int i2c_pxa_pio_set_master(struct if (timeout < 0) { show_state(i2c); dev_err(&i2c->adap.dev, @@ -34,7 +34,7 @@ Signed-off-by: Russell King return I2C_RETRY; } -@@ -1168,7 +1168,7 @@ static int i2c_pxa_do_pio_xfer(struct px +@@ -1166,7 +1166,7 @@ static int i2c_pxa_do_pio_xfer(struct px out: if (timeout == 0) { diff --git a/target/linux/generic/backport-5.4/818-v5.8-i2c-pxa-remove-some-unnecessary-debug.patch b/target/linux/generic/backport-5.4/818-v5.8-i2c-pxa-remove-some-unnecessary-debug.patch index f14bb30e38..5438588ded 100644 --- a/target/linux/generic/backport-5.4/818-v5.8-i2c-pxa-remove-some-unnecessary-debug.patch +++ b/target/linux/generic/backport-5.4/818-v5.8-i2c-pxa-remove-some-unnecessary-debug.patch @@ -20,7 +20,7 @@ Signed-off-by: Russell King --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c -@@ -1116,10 +1116,8 @@ static int i2c_pxa_pio_set_master(struct +@@ -1114,10 +1114,8 @@ static int i2c_pxa_pio_set_master(struct /* * Wait for the bus to become free. */ diff --git a/target/linux/generic/backport-5.4/819-v5.8-i2c-pxa-clear-all-master-action-bits-in-i2c_pxa_stop.patch b/target/linux/generic/backport-5.4/819-v5.8-i2c-pxa-clear-all-master-action-bits-in-i2c_pxa_stop.patch deleted file mode 100644 index 70fbffc47f..0000000000 --- a/target/linux/generic/backport-5.4/819-v5.8-i2c-pxa-clear-all-master-action-bits-in-i2c_pxa_stop.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Russell King -Bcc: linux@mail.armlinux.org.uk -Subject: [PATCH 5/7] i2c: pxa: clear all master action bits in - i2c_pxa_stop_message() -MIME-Version: 1.0 -Content-Disposition: inline -Content-Transfer-Encoding: 8bit -Content-Type: text/plain; charset="utf-8" - -If we timeout during a message transfer, the control register may -contain bits that cause an action to be set. Read-modify-writing the -register leaving these bits set may trigger the hardware to attempt -one of these actions unintentionally. - -Always clear these bits when cleaning up after a message or after -a timeout. - -Signed-off-by: Russell King ---- - drivers/i2c/busses/i2c-pxa.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - ---- a/drivers/i2c/busses/i2c-pxa.c -+++ b/drivers/i2c/busses/i2c-pxa.c -@@ -754,11 +754,9 @@ static inline void i2c_pxa_stop_message( - { - u32 icr; - -- /* -- * Clear the STOP and ACK flags -- */ -+ /* Clear the START, STOP, ACK, TB and MA flags */ - icr = readl(_ICR(i2c)); -- icr &= ~(ICR_STOP | ICR_ACKNAK); -+ icr &= ~(ICR_START | ICR_STOP | ICR_ACKNAK | ICR_TB | ICR_MA); - writel(icr, _ICR(i2c)); - } - diff --git a/target/linux/generic/hack-4.14/207-disable-modorder.patch b/target/linux/generic/hack-4.14/207-disable-modorder.patch index 35834291cc..0cfb4d33ec 100644 --- a/target/linux/generic/hack-4.14/207-disable-modorder.patch +++ b/target/linux/generic/hack-4.14/207-disable-modorder.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -1252,7 +1252,6 @@ all: modules +@@ -1260,7 +1260,6 @@ endif PHONY += modules modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau @$(kecho) ' Building modules, stage 2.'; $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost -@@ -1281,7 +1280,6 @@ _modinst_: +@@ -1289,7 +1288,6 @@ _modinst_: rm -f $(MODLIB)/build ; \ ln -s $(CURDIR) $(MODLIB)/build ; \ fi diff --git a/target/linux/generic/hack-4.14/220-gc_sections.patch b/target/linux/generic/hack-4.14/220-gc_sections.patch index 7d791eb451..b69d8a01d6 100644 --- a/target/linux/generic/hack-4.14/220-gc_sections.patch +++ b/target/linux/generic/hack-4.14/220-gc_sections.patch @@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos # Read KERNELRELEASE from include/config/kernel.release (if it exists) KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) -@@ -789,11 +794,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH +@@ -779,11 +784,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once) endif diff --git a/target/linux/generic/hack-4.14/260-crypto_test_dependencies.patch b/target/linux/generic/hack-4.14/260-crypto_test_dependencies.patch index 8523fc5374..3cdc0973ec 100644 --- a/target/linux/generic/hack-4.14/260-crypto_test_dependencies.patch +++ b/target/linux/generic/hack-4.14/260-crypto_test_dependencies.patch @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau algorithm registration. --- a/crypto/algboss.c +++ b/crypto/algboss.c -@@ -248,8 +248,12 @@ static int cryptomgr_schedule_test(struc +@@ -246,8 +246,12 @@ static int cryptomgr_schedule_test(struc type = alg->cra_flags; /* Do not test internal algorithms. */ diff --git a/target/linux/generic/hack-4.14/661-use_fq_codel_by_default.patch b/target/linux/generic/hack-4.14/661-use_fq_codel_by_default.patch index cf03b00f82..6a7d554c20 100644 --- a/target/linux/generic/hack-4.14/661-use_fq_codel_by_default.patch +++ b/target/linux/generic/hack-4.14/661-use_fq_codel_by_default.patch @@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau EXPORT_SYMBOL(default_qdisc_ops); /* Main transmission queue. */ -@@ -764,7 +764,7 @@ static void attach_one_default_qdisc(str +@@ -765,7 +765,7 @@ static void attach_one_default_qdisc(str void *_unused) { struct Qdisc *qdisc; diff --git a/target/linux/generic/hack-4.14/662-remove_pfifo_fast.patch b/target/linux/generic/hack-4.14/662-remove_pfifo_fast.patch index 7b6e38da29..d1a17a4bac 100644 --- a/target/linux/generic/hack-4.14/662-remove_pfifo_fast.patch +++ b/target/linux/generic/hack-4.14/662-remove_pfifo_fast.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c -@@ -453,146 +453,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea +@@ -454,146 +454,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea .owner = THIS_MODULE, }; diff --git a/target/linux/generic/hack-4.14/721-phy_packets.patch b/target/linux/generic/hack-4.14/721-phy_packets.patch index 52910fceeb..e6e06554de 100644 --- a/target/linux/generic/hack-4.14/721-phy_packets.patch +++ b/target/linux/generic/hack-4.14/721-phy_packets.patch @@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau help --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3004,10 +3004,20 @@ static int xmit_one(struct sk_buff *skb, +@@ -3000,10 +3000,20 @@ static int xmit_one(struct sk_buff *skb, if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all)) dev_queue_xmit_nit(skb, dev); diff --git a/target/linux/generic/hack-4.14/901-debloat_sock_diag.patch b/target/linux/generic/hack-4.14/901-debloat_sock_diag.patch index a4ca573569..2f2b8eb705 100644 --- a/target/linux/generic/hack-4.14/901-debloat_sock_diag.patch +++ b/target/linux/generic/hack-4.14/901-debloat_sock_diag.patch @@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie) { struct dst_entry *dst = __sk_dst_get(sk); -@@ -1598,9 +1610,11 @@ void sk_destruct(struct sock *sk) +@@ -1599,9 +1611,11 @@ void sk_destruct(struct sock *sk) static void __sk_free(struct sock *sk) { 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 54c6b4d265..3cf89b7421 100644 --- a/target/linux/generic/hack-4.14/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.14/902-debloat_proc.patch @@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -3387,6 +3387,8 @@ static __net_initdata struct pernet_oper +@@ -3389,6 +3389,8 @@ static __net_initdata struct pernet_oper static int __init proto_init(void) { diff --git a/target/linux/generic/hack-4.19/207-disable-modorder.patch b/target/linux/generic/hack-4.19/207-disable-modorder.patch index f47da3f24e..cf38cd3245 100644 --- a/target/linux/generic/hack-4.19/207-disable-modorder.patch +++ b/target/linux/generic/hack-4.19/207-disable-modorder.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -1232,7 +1232,6 @@ all: modules +@@ -1240,7 +1240,6 @@ endif PHONY += modules modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau @$(kecho) ' Building modules, stage 2.'; $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost -@@ -1261,7 +1260,6 @@ _modinst_: +@@ -1269,7 +1268,6 @@ _modinst_: rm -f $(MODLIB)/build ; \ ln -s $(CURDIR) $(MODLIB)/build ; \ fi diff --git a/target/linux/generic/hack-4.19/220-gc_sections.patch b/target/linux/generic/hack-4.19/220-gc_sections.patch index 77422e821b..36deac48b7 100644 --- a/target/linux/generic/hack-4.19/220-gc_sections.patch +++ b/target/linux/generic/hack-4.19/220-gc_sections.patch @@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos # Read KERNELRELEASE from include/config/kernel.release (if it exists) KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) -@@ -782,11 +787,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH +@@ -772,11 +777,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once) endif diff --git a/target/linux/generic/hack-4.19/259-regmap_dynamic.patch b/target/linux/generic/hack-4.19/259-regmap_dynamic.patch index ec4636dbee..af9431e189 100644 --- a/target/linux/generic/hack-4.19/259-regmap_dynamic.patch +++ b/target/linux/generic/hack-4.19/259-regmap_dynamic.patch @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau #include #include #include -@@ -3039,3 +3040,5 @@ static int __init regmap_initcall(void) +@@ -3040,3 +3041,5 @@ static int __init regmap_initcall(void) return 0; } postcore_initcall(regmap_initcall); diff --git a/target/linux/generic/hack-4.19/260-crypto_test_dependencies.patch b/target/linux/generic/hack-4.19/260-crypto_test_dependencies.patch index f11f45437f..10eb7f1c6e 100644 --- a/target/linux/generic/hack-4.19/260-crypto_test_dependencies.patch +++ b/target/linux/generic/hack-4.19/260-crypto_test_dependencies.patch @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau algorithm registration. --- a/crypto/algboss.c +++ b/crypto/algboss.c -@@ -247,8 +247,12 @@ static int cryptomgr_schedule_test(struc +@@ -245,8 +245,12 @@ static int cryptomgr_schedule_test(struc type = alg->cra_flags; /* Do not test internal algorithms. */ 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 2778377de7..1710c13b15 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 @@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau EXPORT_SYMBOL(default_qdisc_ops); /* Main transmission queue. */ -@@ -1025,7 +1025,7 @@ static void attach_one_default_qdisc(str +@@ -1026,7 +1026,7 @@ static void attach_one_default_qdisc(str void *_unused) { struct Qdisc *qdisc; diff --git a/target/linux/generic/hack-4.19/662-remove_pfifo_fast.patch b/target/linux/generic/hack-4.19/662-remove_pfifo_fast.patch index e49507a590..c89329c1cc 100644 --- a/target/linux/generic/hack-4.19/662-remove_pfifo_fast.patch +++ b/target/linux/generic/hack-4.19/662-remove_pfifo_fast.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c -@@ -612,207 +612,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea +@@ -613,207 +613,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea .owner = THIS_MODULE, }; diff --git a/target/linux/generic/hack-4.19/702-phy_add_aneg_done_function.patch b/target/linux/generic/hack-4.19/702-phy_add_aneg_done_function.patch index 56124f305c..6d6b86ef64 100644 --- a/target/linux/generic/hack-4.19/702-phy_add_aneg_done_function.patch +++ b/target/linux/generic/hack-4.19/702-phy_add_aneg_done_function.patch @@ -15,7 +15,7 @@ --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1581,6 +1581,9 @@ int genphy_update_link(struct phy_device +@@ -1583,6 +1583,9 @@ int genphy_update_link(struct phy_device { int status; diff --git a/target/linux/generic/hack-4.19/721-phy_packets.patch b/target/linux/generic/hack-4.19/721-phy_packets.patch index 33ae7043b7..2bb01718ad 100644 --- a/target/linux/generic/hack-4.19/721-phy_packets.patch +++ b/target/linux/generic/hack-4.19/721-phy_packets.patch @@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau help --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3255,10 +3255,20 @@ static int xmit_one(struct sk_buff *skb, +@@ -3251,10 +3251,20 @@ static int xmit_one(struct sk_buff *skb, if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all)) dev_queue_xmit_nit(skb, dev); diff --git a/target/linux/generic/hack-4.19/901-debloat_sock_diag.patch b/target/linux/generic/hack-4.19/901-debloat_sock_diag.patch index f0ea558c4d..25509ad9c0 100644 --- a/target/linux/generic/hack-4.19/901-debloat_sock_diag.patch +++ b/target/linux/generic/hack-4.19/901-debloat_sock_diag.patch @@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie) { struct dst_entry *dst = __sk_dst_get(sk); -@@ -1603,9 +1615,11 @@ static void __sk_free(struct sock *sk) +@@ -1604,9 +1616,11 @@ static void __sk_free(struct sock *sk) if (likely(sk->sk_net_refcnt)) sock_inuse_add(sock_net(sk), -1); 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 800c32e10c..33b954337f 100644 --- a/target/linux/generic/hack-4.19/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.19/902-debloat_proc.patch @@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -3489,6 +3489,8 @@ static __net_initdata struct pernet_oper +@@ -3491,6 +3491,8 @@ static __net_initdata struct pernet_oper static int __init proto_init(void) { diff --git a/target/linux/generic/hack-5.4/259-regmap_dynamic.patch b/target/linux/generic/hack-5.4/259-regmap_dynamic.patch index 9950f156d3..0dca235193 100644 --- a/target/linux/generic/hack-5.4/259-regmap_dynamic.patch +++ b/target/linux/generic/hack-5.4/259-regmap_dynamic.patch @@ -106,7 +106,7 @@ Signed-off-by: Felix Fietkau #include #include #include -@@ -3124,3 +3125,5 @@ static int __init regmap_initcall(void) +@@ -3125,3 +3126,5 @@ static int __init regmap_initcall(void) return 0; } postcore_initcall(regmap_initcall); diff --git a/target/linux/generic/hack-5.4/260-crypto_test_dependencies.patch b/target/linux/generic/hack-5.4/260-crypto_test_dependencies.patch index c9caa2733a..af96599ce8 100644 --- a/target/linux/generic/hack-5.4/260-crypto_test_dependencies.patch +++ b/target/linux/generic/hack-5.4/260-crypto_test_dependencies.patch @@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau depends on DEBUG_KERNEL && !CRYPTO_MANAGER_DISABLE_TESTS --- a/crypto/algboss.c +++ b/crypto/algboss.c -@@ -242,8 +242,12 @@ static int cryptomgr_schedule_test(struc +@@ -240,8 +240,12 @@ static int cryptomgr_schedule_test(struc type = alg->cra_flags; /* Do not test internal algorithms. */ diff --git a/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch b/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch index a4a805fbe0..ccedf561e2 100644 --- a/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch +++ b/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch @@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau EXPORT_SYMBOL(default_qdisc_ops); /* Main transmission queue. */ -@@ -1034,12 +1034,12 @@ static void attach_one_default_qdisc(str +@@ -1035,12 +1035,12 @@ static void attach_one_default_qdisc(str void *_unused) { struct Qdisc *qdisc; diff --git a/target/linux/generic/hack-5.4/662-remove_pfifo_fast.patch b/target/linux/generic/hack-5.4/662-remove_pfifo_fast.patch index 149a923dcb..27946f8cec 100644 --- a/target/linux/generic/hack-5.4/662-remove_pfifo_fast.patch +++ b/target/linux/generic/hack-5.4/662-remove_pfifo_fast.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c -@@ -594,211 +594,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea +@@ -595,211 +595,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea .owner = THIS_MODULE, }; diff --git a/target/linux/generic/hack-5.4/702-phy_add_aneg_done_function.patch b/target/linux/generic/hack-5.4/702-phy_add_aneg_done_function.patch index f58b190025..4201dfe7fc 100644 --- a/target/linux/generic/hack-5.4/702-phy_add_aneg_done_function.patch +++ b/target/linux/generic/hack-5.4/702-phy_add_aneg_done_function.patch @@ -15,7 +15,7 @@ --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1909,6 +1909,9 @@ int genphy_update_link(struct phy_device +@@ -1911,6 +1911,9 @@ int genphy_update_link(struct phy_device if (bmcr & BMCR_ANRESTART) goto done; diff --git a/target/linux/generic/hack-5.4/721-phy_packets.patch b/target/linux/generic/hack-5.4/721-phy_packets.patch index 07845da1ef..b3008cbbcf 100644 --- a/target/linux/generic/hack-5.4/721-phy_packets.patch +++ b/target/linux/generic/hack-5.4/721-phy_packets.patch @@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau help --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3195,10 +3195,20 @@ static int xmit_one(struct sk_buff *skb, +@@ -3191,10 +3191,20 @@ static int xmit_one(struct sk_buff *skb, if (dev_nit_active(dev)) dev_queue_xmit_nit(skb, dev); diff --git a/target/linux/generic/hack-5.4/901-debloat_sock_diag.patch b/target/linux/generic/hack-5.4/901-debloat_sock_diag.patch index 3a1e23480c..12ad4c684a 100644 --- a/target/linux/generic/hack-5.4/901-debloat_sock_diag.patch +++ b/target/linux/generic/hack-5.4/901-debloat_sock_diag.patch @@ -69,7 +69,7 @@ Signed-off-by: Felix Fietkau struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie) { struct dst_entry *dst = __sk_dst_get(sk); -@@ -1746,9 +1759,11 @@ static void __sk_free(struct sock *sk) +@@ -1747,9 +1760,11 @@ static void __sk_free(struct sock *sk) if (likely(sk->sk_net_refcnt)) sock_inuse_add(sock_net(sk), -1); diff --git a/target/linux/generic/hack-5.4/902-debloat_proc.patch b/target/linux/generic/hack-5.4/902-debloat_proc.patch index 2a1106e2a9..07ee52af44 100644 --- a/target/linux/generic/hack-5.4/902-debloat_proc.patch +++ b/target/linux/generic/hack-5.4/902-debloat_proc.patch @@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -3606,6 +3606,8 @@ static __net_initdata struct pernet_oper +@@ -3608,6 +3608,8 @@ static __net_initdata struct pernet_oper static int __init proto_init(void) { diff --git a/target/linux/generic/pending-4.14/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-4.14/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch index 3308b1d71f..44e7fa70a3 100644 --- a/target/linux/generic/pending-4.14/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch +++ b/target/linux/generic/pending-4.14/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch @@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -6145,7 +6145,7 @@ static void __ref alloc_node_mem_map(str +@@ -6146,7 +6146,7 @@ static void __ref alloc_node_mem_map(str mem_map = NODE_DATA(0)->node_mem_map; #if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM) if (page_to_pfn(mem_map) != pgdat->node_start_pfn) diff --git a/target/linux/generic/pending-4.14/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch b/target/linux/generic/pending-4.14/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch index 54858657cb..aaf21f075f 100644 --- a/target/linux/generic/pending-4.14/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch +++ b/target/linux/generic/pending-4.14/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch @@ -23,7 +23,7 @@ Tested-by: Aaron Brown --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c -@@ -5082,7 +5082,7 @@ static bool e1000e_has_link(struct e1000 +@@ -5080,7 +5080,7 @@ static bool e1000e_has_link(struct e1000 /* get_link_status is set on LSC (link status) interrupt or * Rx sequence error interrupt. get_link_status will stay @@ -32,7 +32,7 @@ Tested-by: Aaron Brown * for copper adapters ONLY */ switch (hw->phy.media_type) { -@@ -5100,7 +5100,7 @@ static bool e1000e_has_link(struct e1000 +@@ -5098,7 +5098,7 @@ static bool e1000e_has_link(struct e1000 break; case e1000_media_type_internal_serdes: ret_val = hw->mac.ops.check_for_link(hw); diff --git a/target/linux/generic/pending-4.14/201-extra_optimization.patch b/target/linux/generic/pending-4.14/201-extra_optimization.patch index 305ba3aad2..aef36a8c11 100644 --- a/target/linux/generic/pending-4.14/201-extra_optimization.patch +++ b/target/linux/generic/pending-4.14/201-extra_optimization.patch @@ -14,19 +14,15 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -656,12 +656,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni +@@ -652,9 +652,9 @@ KBUILD_CFLAGS += $(call cc-disable-warni KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias) ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE --KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) -+KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION) - else - ifdef CONFIG_PROFILE_ALL_BRANCHES --KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,) -+KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION) +-KBUILD_CFLAGS += -Os ++KBUILD_CFLAGS += -Os $(EXTRA_OPTIMIZATION) else -KBUILD_CFLAGS += -O2 +KBUILD_CFLAGS += -O2 -fno-reorder-blocks -fno-tree-ch $(EXTRA_OPTIMIZATION) endif - endif + # Tell gcc to never replace conditional load with a non-conditional one diff --git a/target/linux/generic/pending-4.14/304-mips_disable_fpu.patch b/target/linux/generic/pending-4.14/304-mips_disable_fpu.patch index 0b5852dff8..47983df948 100644 --- a/target/linux/generic/pending-4.14/304-mips_disable_fpu.patch +++ b/target/linux/generic/pending-4.14/304-mips_disable_fpu.patch @@ -47,7 +47,7 @@ v2: incorporated changes suggested by Jonas Gorski select OF --- a/arch/mips/Makefile +++ b/arch/mips/Makefile -@@ -315,7 +315,7 @@ OBJCOPYFLAGS += --remove-section=.regin +@@ -326,7 +326,7 @@ OBJCOPYFLAGS += --remove-section=.regin head-y := arch/mips/kernel/head.o libs-y += arch/mips/lib/ diff --git a/target/linux/generic/pending-4.14/332-arc-add-OWRTDTB-section.patch b/target/linux/generic/pending-4.14/332-arc-add-OWRTDTB-section.patch index 4c8d6e9d37..1b75bf2a06 100644 --- a/target/linux/generic/pending-4.14/332-arc-add-OWRTDTB-section.patch +++ b/target/linux/generic/pending-4.14/332-arc-add-OWRTDTB-section.patch @@ -42,7 +42,7 @@ Signed-off-by: Evgeniy Didin ;---------------------------------------------------------------- --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c -@@ -437,6 +437,8 @@ static inline bool uboot_arg_invalid(uns +@@ -438,6 +438,8 @@ static inline bool uboot_arg_invalid(uns /* We always pass 0 as magic from U-boot */ #define UBOOT_MAGIC_VALUE 0 @@ -51,7 +51,7 @@ Signed-off-by: Evgeniy Didin void __init handle_uboot_args(void) { bool use_embedded_dtb = true; -@@ -477,7 +479,7 @@ ignore_uboot_args: +@@ -478,7 +480,7 @@ ignore_uboot_args: #endif if (use_embedded_dtb) { diff --git a/target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch b/target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch index ae8c4ca921..191cbcfb82 100644 --- a/target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch +++ b/target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch @@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau #include #include #include -@@ -978,8 +983,36 @@ static int pppoe_xmit(struct ppp_channel +@@ -981,8 +986,36 @@ static int pppoe_xmit(struct ppp_channel return __pppoe_xmit(sk, skb); } diff --git a/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 57ba68f4b6..3839865712 100644 --- a/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -141,7 +141,7 @@ Signed-off-by: Jonas Gorski static const struct rt6_info ip6_blk_hole_entry_template = { .dst = { .__refcnt = ATOMIC_INIT(1), -@@ -2054,6 +2071,11 @@ static struct rt6_info *ip6_route_info_c +@@ -2056,6 +2073,11 @@ static struct rt6_info *ip6_route_info_c rt->dst.output = ip6_pkt_prohibit_out; rt->dst.input = ip6_pkt_prohibit; break; @@ -153,7 +153,7 @@ Signed-off-by: Jonas Gorski case RTN_THROW: case RTN_UNREACHABLE: default: -@@ -2779,6 +2801,17 @@ static int ip6_pkt_prohibit_out(struct n +@@ -2781,6 +2803,17 @@ static int ip6_pkt_prohibit_out(struct n return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); } @@ -171,7 +171,7 @@ Signed-off-by: Jonas Gorski /* * Allocate a dst for local (unicast / anycast) address. */ -@@ -3015,7 +3048,8 @@ static int rtm_to_fib6_config(struct sk_ +@@ -3017,7 +3050,8 @@ static int rtm_to_fib6_config(struct sk_ if (rtm->rtm_type == RTN_UNREACHABLE || rtm->rtm_type == RTN_BLACKHOLE || rtm->rtm_type == RTN_PROHIBIT || @@ -181,7 +181,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -3515,6 +3549,9 @@ static int rt6_fill_node(struct net *net +@@ -3517,6 +3551,9 @@ static int rt6_fill_node(struct net *net case -EACCES: rtm->rtm_type = RTN_PROHIBIT; break; @@ -191,7 +191,7 @@ Signed-off-by: Jonas Gorski case -EAGAIN: rtm->rtm_type = RTN_THROW; break; -@@ -3833,6 +3870,8 @@ static int ip6_route_dev_notify(struct n +@@ -3835,6 +3872,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -200,7 +200,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -3844,6 +3883,7 @@ static int ip6_route_dev_notify(struct n +@@ -3846,6 +3885,7 @@ static int ip6_route_dev_notify(struct n in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev); #ifdef CONFIG_IPV6_MULTIPLE_TABLES in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev); @@ -208,7 +208,7 @@ Signed-off-by: Jonas Gorski in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev); #endif } -@@ -4060,6 +4100,17 @@ static int __net_init ip6_route_net_init +@@ -4062,6 +4102,17 @@ static int __net_init ip6_route_net_init net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, ip6_template_metrics, true); @@ -226,7 +226,7 @@ Signed-off-by: Jonas Gorski #endif net->ipv6.sysctl.flush_delay = 0; -@@ -4078,6 +4129,8 @@ out: +@@ -4080,6 +4131,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -235,7 +235,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -4095,6 +4148,7 @@ static void __net_exit ip6_route_net_exi +@@ -4097,6 +4150,7 @@ static void __net_exit ip6_route_net_exi #ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree(net->ipv6.ip6_prohibit_entry); kfree(net->ipv6.ip6_blk_hole_entry); @@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); } -@@ -4168,6 +4222,9 @@ void __init ip6_route_init_special_entri +@@ -4170,6 +4224,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); diff --git a/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 286e98f5d5..cf0e50f2d9 100644 --- a/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-4.14/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 -@@ -4806,6 +4806,9 @@ static enum gro_result dev_gro_receive(s +@@ -4802,6 +4802,9 @@ static enum gro_result dev_gro_receive(s enum gro_result ret; int grow; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau if (netif_elide_gro(skb->dev)) goto normal; -@@ -6283,6 +6286,48 @@ static void __netdev_adjacent_dev_unlink +@@ -6279,6 +6282,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) -@@ -6321,6 +6366,7 @@ static int __netdev_upper_dev_link(struc +@@ -6317,6 +6362,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, dev, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -6398,6 +6444,7 @@ void netdev_upper_dev_unlink(struct net_ +@@ -6394,6 +6440,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, dev, &changeupper_info.info); } -@@ -6962,6 +7009,7 @@ int dev_set_mac_address(struct net_devic +@@ -6958,6 +7005,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.14/810-pci_disable_common_quirks.patch b/target/linux/generic/pending-4.14/810-pci_disable_common_quirks.patch index 949dbecfb6..718b8addd4 100644 --- a/target/linux/generic/pending-4.14/810-pci_disable_common_quirks.patch +++ b/target/linux/generic/pending-4.14/810-pci_disable_common_quirks.patch @@ -24,7 +24,7 @@ Signed-off-by: Gabor Juhos default y --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c -@@ -43,6 +43,7 @@ static void quirk_mmio_always_on(struct +@@ -44,6 +44,7 @@ static void quirk_mmio_always_on(struct DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_BRIDGE_HOST, 8, quirk_mmio_always_on); @@ -32,7 +32,7 @@ Signed-off-by: Gabor Juhos /* The Mellanox Tavor device gives false positive parity errors * Mark this device with a broken_parity_status, to allow * PCI scanning code to "skip" this now blacklisted device. -@@ -3094,6 +3095,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I +@@ -3095,6 +3096,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata); @@ -40,7 +40,7 @@ Signed-off-by: Gabor Juhos /* * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum. To -@@ -3150,6 +3152,8 @@ static void fixup_debug_report(struct pc +@@ -3151,6 +3153,8 @@ static void fixup_debug_report(struct pc } } @@ -49,7 +49,7 @@ Signed-off-by: Gabor Juhos /* * Some BIOS implementations leave the Intel GPU interrupts enabled, * even though no one is handling them (f.e. i915 driver is never loaded). -@@ -3188,6 +3192,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN +@@ -3189,6 +3193,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq); 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 f59085b51c..8a15efdc0e 100644 --- a/target/linux/generic/pending-4.14/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-4.14/834-ledtrig-libata.patch @@ -45,7 +45,7 @@ Signed-off-by: Daniel Golle depends on ACPI --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c -@@ -731,6 +731,19 @@ u64 ata_tf_read_block(const struct ata_t +@@ -730,6 +730,19 @@ u64 ata_tf_read_block(const struct ata_t return block; } @@ -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 -@@ -5124,6 +5137,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5123,6 +5136,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; -@@ -6025,6 +6041,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -6024,6 +6040,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; -@@ -6046,6 +6065,12 @@ static void ata_host_release(struct devi +@@ -6045,6 +6064,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; } -@@ -6492,7 +6517,23 @@ int ata_host_register(struct ata_host *h +@@ -6491,7 +6516,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; } @@ -124,17 +124,17 @@ Signed-off-by: Daniel Golle rc = ata_tport_add(host->dev,host->ports[i]); --- a/include/linux/libata.h +++ b/include/linux/libata.h -@@ -38,6 +38,9 @@ - #include +@@ -39,6 +39,9 @@ #include #include + #include +#ifdef CONFIG_ATA_LEDS +#include +#endif /* * Define if arch has non-standard setup. This is a _PCI_ standard -@@ -890,6 +893,12 @@ struct ata_port { +@@ -893,6 +896,12 @@ struct ata_port { #ifdef CONFIG_ATA_ACPI struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ #endif diff --git a/target/linux/generic/pending-4.19/110-ehci_hcd_ignore_oc.patch b/target/linux/generic/pending-4.19/110-ehci_hcd_ignore_oc.patch index cad00b5527..db7b7ff177 100644 --- a/target/linux/generic/pending-4.19/110-ehci_hcd_ignore_oc.patch +++ b/target/linux/generic/pending-4.19/110-ehci_hcd_ignore_oc.patch @@ -48,7 +48,7 @@ Signed-off-by: Florian Fainelli /* --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c -@@ -208,6 +208,8 @@ static int ehci_platform_probe(struct pl +@@ -321,6 +321,8 @@ static int ehci_platform_probe(struct pl hcd->has_tt = 1; if (pdata->reset_on_resume) priv->reset_on_resume = true; diff --git a/target/linux/generic/pending-4.19/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-4.19/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch index 54ae1829ee..3467905e65 100644 --- a/target/linux/generic/pending-4.19/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch +++ b/target/linux/generic/pending-4.19/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch @@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -6401,7 +6401,7 @@ static void __ref alloc_node_mem_map(str +@@ -6396,7 +6396,7 @@ static void __ref alloc_node_mem_map(str mem_map = NODE_DATA(0)->node_mem_map; #if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM) if (page_to_pfn(mem_map) != pgdat->node_start_pfn) diff --git a/target/linux/generic/pending-4.19/201-extra_optimization.patch b/target/linux/generic/pending-4.19/201-extra_optimization.patch index cafccd42c9..e056598047 100644 --- a/target/linux/generic/pending-4.19/201-extra_optimization.patch +++ b/target/linux/generic/pending-4.19/201-extra_optimization.patch @@ -14,19 +14,15 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -657,12 +657,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni +@@ -653,9 +653,9 @@ KBUILD_CFLAGS += $(call cc-disable-warni KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE --KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) -+KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION) - else - ifdef CONFIG_PROFILE_ALL_BRANCHES --KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,) -+KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION) +-KBUILD_CFLAGS += -Os ++KBUILD_CFLAGS += -Os $(EXTRA_OPTIMIZATION) else -KBUILD_CFLAGS += -O2 +KBUILD_CFLAGS += -O2 -fno-reorder-blocks -fno-tree-ch $(EXTRA_OPTIMIZATION) endif - endif + # Tell gcc to never replace conditional load with a non-conditional one diff --git a/target/linux/generic/pending-4.19/304-mips_disable_fpu.patch b/target/linux/generic/pending-4.19/304-mips_disable_fpu.patch index 332bb71e22..26bc5e80cd 100644 --- a/target/linux/generic/pending-4.19/304-mips_disable_fpu.patch +++ b/target/linux/generic/pending-4.19/304-mips_disable_fpu.patch @@ -47,7 +47,7 @@ v2: incorporated changes suggested by Jonas Gorski select OF --- a/arch/mips/Makefile +++ b/arch/mips/Makefile -@@ -323,7 +323,7 @@ OBJCOPYFLAGS += --remove-section=.regin +@@ -334,7 +334,7 @@ OBJCOPYFLAGS += --remove-section=.regin head-y := arch/mips/kernel/head.o libs-y += arch/mips/lib/ diff --git a/target/linux/generic/pending-4.19/332-arc-add-OWRTDTB-section.patch b/target/linux/generic/pending-4.19/332-arc-add-OWRTDTB-section.patch index ec89547726..2f7c7b4588 100644 --- a/target/linux/generic/pending-4.19/332-arc-add-OWRTDTB-section.patch +++ b/target/linux/generic/pending-4.19/332-arc-add-OWRTDTB-section.patch @@ -42,7 +42,7 @@ Signed-off-by: Evgeniy Didin ;---------------------------------------------------------------- --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c -@@ -526,7 +526,7 @@ void __init handle_uboot_args(void) +@@ -527,7 +527,7 @@ void __init handle_uboot_args(void) ignore_uboot_args: if (use_embedded_dtb) { @@ -51,7 +51,7 @@ Signed-off-by: Evgeniy Didin if (!machine_desc) panic("Embedded DT invalid\n"); } -@@ -542,6 +542,8 @@ ignore_uboot_args: +@@ -543,6 +543,8 @@ ignore_uboot_args: } } diff --git a/target/linux/generic/pending-4.19/350-MIPS-Add-missing-EHB-in-mtc0-mfc0-sequence-for-DSPen.patch b/target/linux/generic/pending-4.19/350-MIPS-Add-missing-EHB-in-mtc0-mfc0-sequence-for-DSPen.patch new file mode 100644 index 0000000000..92a22bc655 --- /dev/null +++ b/target/linux/generic/pending-4.19/350-MIPS-Add-missing-EHB-in-mtc0-mfc0-sequence-for-DSPen.patch @@ -0,0 +1,61 @@ +From db4603e30effd74d4adb6bcdf73072b2c06fafcd Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Fri, 3 Jul 2020 00:07:15 +0200 +Subject: [PATCH] MIPS: Add missing EHB in mtc0 -> mfc0 sequence for DSPen + +This resolves the hazard between the mtc0 in the change_c0_status() and +the mfc0 in configure_exception_vector(). Without resolving this hazard +configure_exception_vector() could read an old value and would restore +this old value again. This would revert the changes change_c0_status() +did. I checked this by printing out the read_c0_status() at the end of +per_cpu_trap_init() and the ST0_MX is not set without this patch. + +The hazard is documented in the MIPS Architecture Reference Manual Vol. +III: MIPS32/microMIPS32 Privileged Resource Architecture (MD00088), rev +6.03 table 8.1 which includes: + + Producer | Consumer | Hazard + ----------|----------|---------------------------- + mtc0 | mfc0 | any coprocessor 0 register + +I saw this hazard on an Atheros AR9344 rev 2 SoC with a MIPS 74Kc CPU. +There the change_c0_status() function would activate the DSPen by +setting ST0_MX in the c0_status register. This was reverted and then the +system got a DSP exception when the DSP registers were saved in +save_dsp() in the first process switch. The crash looks like this: + +[ 0.089999] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) +[ 0.097796] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) +[ 0.107070] Kernel panic - not syncing: Unexpected DSP exception +[ 0.113470] Rebooting in 1 seconds.. + +We saw this problem in OpenWrt only on the MIPS 74Kc based Atheros SoCs, +not on the 24Kc based SoCs. We only saw it with kernel 5.4 not with +kernel 4.19, in addition we had to use GCC 8.4 or 9.X, with GCC 8.3 it +did not happen. + +In the kernel I bisected this problem to commit 9012d011660e ("compiler: +allow all arches to enable CONFIG_OPTIMIZE_INLINING"), but when this was +reverted it also happened after commit 172dcd935c34b ("MIPS: Always +allocate exception vector for MIPSr2+"). + +Commit 0b24cae4d535 ("MIPS: Add missing EHB in mtc0 -> mfc0 sequence.") +does similar changes to a different file. I am not sure if there are +more places affected by this problem. + +Signed-off-by: Hauke Mehrtens +Cc: +--- + arch/mips/kernel/traps.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/mips/kernel/traps.c ++++ b/arch/mips/kernel/traps.c +@@ -2096,6 +2096,7 @@ static void configure_status(void) + + change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX, + status_set); ++ back_to_back_c0_hazard(); + } + + unsigned int hwrena; diff --git a/target/linux/generic/pending-4.19/644-net-pppoe-support-hardware-flow-table-offload.patch b/target/linux/generic/pending-4.19/644-net-pppoe-support-hardware-flow-table-offload.patch index 26d46ec005..89fa863aab 100644 --- a/target/linux/generic/pending-4.19/644-net-pppoe-support-hardware-flow-table-offload.patch +++ b/target/linux/generic/pending-4.19/644-net-pppoe-support-hardware-flow-table-offload.patch @@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau #include #include #include -@@ -976,8 +981,36 @@ static int pppoe_xmit(struct ppp_channel +@@ -979,8 +984,36 @@ static int pppoe_xmit(struct ppp_channel return __pppoe_xmit(sk, skb); } diff --git a/target/linux/generic/pending-4.19/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-4.19/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 9fd05107c4..d8c439b993 100644 --- a/target/linux/generic/pending-4.19/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-4.19/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski case RTN_THROW: case RTN_UNREACHABLE: default: -@@ -3789,6 +3808,17 @@ static int ip6_pkt_prohibit_out(struct n +@@ -3791,6 +3810,17 @@ static int ip6_pkt_prohibit_out(struct n return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); } @@ -175,7 +175,7 @@ Signed-off-by: Jonas Gorski /* * Allocate a dst for local (unicast / anycast) address. */ -@@ -4236,7 +4266,8 @@ static int rtm_to_fib6_config(struct sk_ +@@ -4238,7 +4268,8 @@ static int rtm_to_fib6_config(struct sk_ if (rtm->rtm_type == RTN_UNREACHABLE || rtm->rtm_type == RTN_BLACKHOLE || rtm->rtm_type == RTN_PROHIBIT || @@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -5085,6 +5116,8 @@ static int ip6_route_dev_notify(struct n +@@ -5087,6 +5118,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -5096,6 +5129,7 @@ static int ip6_route_dev_notify(struct n +@@ -5098,6 +5131,7 @@ static int ip6_route_dev_notify(struct n in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev); #ifdef CONFIG_IPV6_MULTIPLE_TABLES in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev); @@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev); #endif } -@@ -5290,6 +5324,15 @@ static int __net_init ip6_route_net_init +@@ -5292,6 +5326,15 @@ static int __net_init ip6_route_net_init net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, ip6_template_metrics, true); @@ -218,7 +218,7 @@ Signed-off-by: Jonas Gorski #endif net->ipv6.sysctl.flush_delay = 0; -@@ -5308,6 +5351,8 @@ out: +@@ -5310,6 +5353,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -227,7 +227,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -5328,6 +5373,7 @@ static void __net_exit ip6_route_net_exi +@@ -5330,6 +5375,7 @@ static void __net_exit ip6_route_net_exi #ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree(net->ipv6.ip6_prohibit_entry); kfree(net->ipv6.ip6_blk_hole_entry); @@ -235,7 +235,7 @@ Signed-off-by: Jonas Gorski #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); } -@@ -5404,6 +5450,9 @@ void __init ip6_route_init_special_entri +@@ -5406,6 +5452,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); 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 ccfd89f703..c01a090b73 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 -@@ -5457,6 +5457,9 @@ static enum gro_result dev_gro_receive(s +@@ -5461,6 +5461,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; -@@ -7115,6 +7118,48 @@ static void __netdev_adjacent_dev_unlink +@@ -7119,6 +7122,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, -@@ -7165,6 +7210,7 @@ static int __netdev_upper_dev_link(struc +@@ -7169,6 +7214,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); -@@ -7257,6 +7303,7 @@ void netdev_upper_dev_unlink(struct net_ +@@ -7261,6 +7307,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); -@@ -7896,6 +7943,7 @@ int dev_set_mac_address(struct net_devic +@@ -7900,6 +7947,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/703-phy-add-detach-callback-to-struct-phy_driver.patch b/target/linux/generic/pending-4.19/703-phy-add-detach-callback-to-struct-phy_driver.patch index c8847a0234..d655d2fc75 100644 --- a/target/linux/generic/pending-4.19/703-phy-add-detach-callback-to-struct-phy_driver.patch +++ b/target/linux/generic/pending-4.19/703-phy-add-detach-callback-to-struct-phy_driver.patch @@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1205,6 +1205,9 @@ void phy_detach(struct phy_device *phyde +@@ -1207,6 +1207,9 @@ void phy_detach(struct phy_device *phyde struct module *ndev_owner = dev->dev.parent->driver->owner; struct mii_bus *bus; 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 f1dc0e5995..560bbe8364 100644 --- a/target/linux/generic/pending-4.19/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-4.19/834-ledtrig-libata.patch @@ -45,7 +45,7 @@ Signed-off-by: Daniel Golle depends on ACPI --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c -@@ -731,6 +731,19 @@ u64 ata_tf_read_block(const struct ata_t +@@ -730,6 +730,19 @@ u64 ata_tf_read_block(const struct ata_t return block; } @@ -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 -@@ -5134,6 +5147,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5133,6 +5146,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; -@@ -6068,6 +6084,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -6067,6 +6083,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; -@@ -6103,6 +6122,12 @@ static void ata_host_release(struct kref +@@ -6102,6 +6121,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; } -@@ -6566,7 +6591,23 @@ int ata_host_register(struct ata_host *h +@@ -6565,7 +6590,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; } @@ -124,17 +124,17 @@ Signed-off-by: Daniel Golle rc = ata_tport_add(host->dev,host->ports[i]); --- a/include/linux/libata.h +++ b/include/linux/libata.h -@@ -38,6 +38,9 @@ - #include +@@ -39,6 +39,9 @@ #include #include + #include +#ifdef CONFIG_ATA_LEDS +#include +#endif /* * Define if arch has non-standard setup. This is a _PCI_ standard -@@ -893,6 +896,12 @@ struct ata_port { +@@ -896,6 +899,12 @@ struct ata_port { #ifdef CONFIG_ATA_ACPI struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ #endif diff --git a/target/linux/generic/pending-5.4/110-ehci_hcd_ignore_oc.patch b/target/linux/generic/pending-5.4/110-ehci_hcd_ignore_oc.patch index 3e48a3b597..3fe1bb5d17 100644 --- a/target/linux/generic/pending-5.4/110-ehci_hcd_ignore_oc.patch +++ b/target/linux/generic/pending-5.4/110-ehci_hcd_ignore_oc.patch @@ -48,7 +48,7 @@ Signed-off-by: Florian Fainelli /* --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c -@@ -206,6 +206,8 @@ static int ehci_platform_probe(struct pl +@@ -319,6 +319,8 @@ static int ehci_platform_probe(struct pl hcd->has_tt = 1; if (pdata->reset_on_resume) priv->reset_on_resume = true; diff --git a/target/linux/generic/pending-5.4/350-MIPS-Add-missing-EHB-in-mtc0-mfc0-sequence-for-DSPen.patch b/target/linux/generic/pending-5.4/350-MIPS-Add-missing-EHB-in-mtc0-mfc0-sequence-for-DSPen.patch new file mode 100644 index 0000000000..063ec0e9fb --- /dev/null +++ b/target/linux/generic/pending-5.4/350-MIPS-Add-missing-EHB-in-mtc0-mfc0-sequence-for-DSPen.patch @@ -0,0 +1,61 @@ +From db4603e30effd74d4adb6bcdf73072b2c06fafcd Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Fri, 3 Jul 2020 00:07:15 +0200 +Subject: [PATCH] MIPS: Add missing EHB in mtc0 -> mfc0 sequence for DSPen + +This resolves the hazard between the mtc0 in the change_c0_status() and +the mfc0 in configure_exception_vector(). Without resolving this hazard +configure_exception_vector() could read an old value and would restore +this old value again. This would revert the changes change_c0_status() +did. I checked this by printing out the read_c0_status() at the end of +per_cpu_trap_init() and the ST0_MX is not set without this patch. + +The hazard is documented in the MIPS Architecture Reference Manual Vol. +III: MIPS32/microMIPS32 Privileged Resource Architecture (MD00088), rev +6.03 table 8.1 which includes: + + Producer | Consumer | Hazard + ----------|----------|---------------------------- + mtc0 | mfc0 | any coprocessor 0 register + +I saw this hazard on an Atheros AR9344 rev 2 SoC with a MIPS 74Kc CPU. +There the change_c0_status() function would activate the DSPen by +setting ST0_MX in the c0_status register. This was reverted and then the +system got a DSP exception when the DSP registers were saved in +save_dsp() in the first process switch. The crash looks like this: + +[ 0.089999] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) +[ 0.097796] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) +[ 0.107070] Kernel panic - not syncing: Unexpected DSP exception +[ 0.113470] Rebooting in 1 seconds.. + +We saw this problem in OpenWrt only on the MIPS 74Kc based Atheros SoCs, +not on the 24Kc based SoCs. We only saw it with kernel 5.4 not with +kernel 4.19, in addition we had to use GCC 8.4 or 9.X, with GCC 8.3 it +did not happen. + +In the kernel I bisected this problem to commit 9012d011660e ("compiler: +allow all arches to enable CONFIG_OPTIMIZE_INLINING"), but when this was +reverted it also happened after commit 172dcd935c34b ("MIPS: Always +allocate exception vector for MIPSr2+"). + +Commit 0b24cae4d535 ("MIPS: Add missing EHB in mtc0 -> mfc0 sequence.") +does similar changes to a different file. I am not sure if there are +more places affected by this problem. + +Signed-off-by: Hauke Mehrtens +Cc: +--- + arch/mips/kernel/traps.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/mips/kernel/traps.c ++++ b/arch/mips/kernel/traps.c +@@ -2126,6 +2126,7 @@ static void configure_status(void) + + change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX, + status_set); ++ back_to_back_c0_hazard(); + } + + unsigned int hwrena; diff --git a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index aae3d35f46..5acadeceb1 100644 --- a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-5.4/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 -@@ -5471,6 +5471,9 @@ static enum gro_result dev_gro_receive(s +@@ -5469,6 +5469,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; -@@ -7264,6 +7267,48 @@ static void __netdev_adjacent_dev_unlink +@@ -7262,6 +7265,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, -@@ -7314,6 +7359,7 @@ static int __netdev_upper_dev_link(struc +@@ -7312,6 +7357,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); -@@ -7407,6 +7453,7 @@ void netdev_upper_dev_unlink(struct net_ +@@ -7405,6 +7451,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); -@@ -8137,6 +8184,7 @@ int dev_set_mac_address(struct net_devic +@@ -8135,6 +8182,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-5.4/703-phy-add-detach-callback-to-struct-phy_driver.patch b/target/linux/generic/pending-5.4/703-phy-add-detach-callback-to-struct-phy_driver.patch index 246bb8f94e..b74b04ca59 100644 --- a/target/linux/generic/pending-5.4/703-phy-add-detach-callback-to-struct-phy_driver.patch +++ b/target/linux/generic/pending-5.4/703-phy-add-detach-callback-to-struct-phy_driver.patch @@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1463,6 +1463,9 @@ void phy_detach(struct phy_device *phyde +@@ -1465,6 +1465,9 @@ void phy_detach(struct phy_device *phyde struct module *ndev_owner = NULL; struct mii_bus *bus; diff --git a/target/linux/generic/pending-5.4/820-libata-Assign-OF-node-to-the-SCSI-device.patch b/target/linux/generic/pending-5.4/820-libata-Assign-OF-node-to-the-SCSI-device.patch index e993b61eae..9e72313ec9 100644 --- a/target/linux/generic/pending-5.4/820-libata-Assign-OF-node-to-the-SCSI-device.patch +++ b/target/linux/generic/pending-5.4/820-libata-Assign-OF-node-to-the-SCSI-device.patch @@ -41,7 +41,7 @@ ChangeLog v1->v2: #include "libata.h" #include "libata-transport.h" -@@ -4570,6 +4571,34 @@ int ata_scsi_add_hosts(struct ata_host * +@@ -4573,6 +4574,34 @@ int ata_scsi_add_hosts(struct ata_host * return rc; } @@ -76,7 +76,7 @@ ChangeLog v1->v2: void ata_scsi_scan_host(struct ata_port *ap, int sync) { int tries = 5; -@@ -4595,6 +4624,7 @@ void ata_scsi_scan_host(struct ata_port +@@ -4598,6 +4627,7 @@ void ata_scsi_scan_host(struct ata_port NULL); if (!IS_ERR(sdev)) { dev->sdev = sdev; diff --git a/target/linux/generic/pending-5.4/834-ledtrig-libata.patch b/target/linux/generic/pending-5.4/834-ledtrig-libata.patch index 1d4334e5f9..783f8ea847 100644 --- a/target/linux/generic/pending-5.4/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-5.4/834-ledtrig-libata.patch @@ -45,7 +45,7 @@ Signed-off-by: Daniel Golle depends on ACPI --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c -@@ -715,6 +715,19 @@ u64 ata_tf_read_block(const struct ata_t +@@ -714,6 +714,19 @@ u64 ata_tf_read_block(const struct ata_t return block; } @@ -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 -@@ -5116,6 +5129,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5115,6 +5128,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; -@@ -6050,6 +6066,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -6049,6 +6065,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; -@@ -6085,6 +6104,12 @@ static void ata_host_release(struct kref +@@ -6084,6 +6103,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; } -@@ -6548,7 +6573,23 @@ int ata_host_register(struct ata_host *h +@@ -6547,7 +6572,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; } @@ -124,17 +124,17 @@ Signed-off-by: Daniel Golle rc = ata_tport_add(host->dev,host->ports[i]); --- a/include/linux/libata.h +++ b/include/linux/libata.h -@@ -22,6 +22,9 @@ - #include +@@ -23,6 +23,9 @@ #include #include + #include +#ifdef CONFIG_ATA_LEDS +#include +#endif /* * Define if arch has non-standard setup. This is a _PCI_ standard -@@ -876,6 +879,12 @@ struct ata_port { +@@ -879,6 +882,12 @@ struct ata_port { #ifdef CONFIG_ATA_ACPI struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ #endif diff --git a/target/linux/ipq40xx/patches-4.19/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch b/target/linux/ipq40xx/patches-4.19/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch index 40c4792136..3ec6f4a0e8 100644 --- a/target/linux/ipq40xx/patches-4.19/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch +++ b/target/linux/ipq40xx/patches-4.19/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch @@ -14,7 +14,7 @@ Signed-off-by: Robert Marko --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c -@@ -1688,7 +1688,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat +@@ -1694,7 +1694,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat static const struct sdhci_ops sdhci_msm_ops = { .reset = sdhci_reset, diff --git a/target/linux/ipq806x/config-5.4 b/target/linux/ipq806x/config-5.4 index c9668da356..f2120e6935 100644 --- a/target/linux/ipq806x/config-5.4 +++ b/target/linux/ipq806x/config-5.4 @@ -49,7 +49,6 @@ CONFIG_ARM_APPENDED_DTB=y CONFIG_ARM_ARCH_TIMER=y CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y CONFIG_ARM_ATAG_DTB_COMPAT=y -# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set # CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER is not set CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE=y CONFIG_ARM_CPUIDLE=y @@ -59,7 +58,6 @@ CONFIG_ARM_GIC=y CONFIG_ARM_HAS_SG_CHAIN=y CONFIG_ARM_L1_CACHE_SHIFT=6 CONFIG_ARM_L1_CACHE_SHIFT_6=y -# CONFIG_ARM_LPAE is not set CONFIG_ARM_MODULE_PLTS=y CONFIG_ARM_PATCH_IDIV=y CONFIG_ARM_PATCH_PHYS_VIRT=y @@ -67,9 +65,7 @@ CONFIG_ARM_PATCH_PHYS_VIRT=y CONFIG_ARM_QCOM_CPUFREQ_NVMEM=y CONFIG_ARM_QCOM_CPUIDLE=y # CONFIG_ARM_SMMU is not set -# CONFIG_ARM_SP805_WATCHDOG is not set CONFIG_ARM_THUMB=y -# CONFIG_ARM_THUMBEE is not set CONFIG_ARM_UNWIND=y CONFIG_ARM_VIRT_EXT=y CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y @@ -89,8 +85,6 @@ CONFIG_CPUFREQ_DT_PLATDEV=y CONFIG_CPU_32v6K=y CONFIG_CPU_32v7=y CONFIG_CPU_ABRT_EV7=y -# CONFIG_CPU_BIG_ENDIAN is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set CONFIG_CPU_CACHE_V7=y CONFIG_CPU_CACHE_VIPT=y CONFIG_CPU_COPY_V6=y @@ -108,8 +102,6 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_GOV_USERSPACE is not set CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_HAS_ASID=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND is not set CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y @@ -151,7 +143,6 @@ CONFIG_CRYPTO_ZSTD=y CONFIG_DCACHE_WORD_ACCESS=y CONFIG_DEBUG_GPIO=y CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -# CONFIG_DEBUG_USER is not set CONFIG_DMADEVICES=y CONFIG_DMA_ENGINE=y CONFIG_DMA_OF=y @@ -159,13 +150,13 @@ CONFIG_DMA_REMAP=y CONFIG_DMA_VIRTUAL_CHANNELS=y CONFIG_DTC=y CONFIG_DT_IDLE_STATES=y -# CONFIG_DWMAC_DWC_QOS_ETH is not set # CONFIG_DWMAC_GENERIC is not set CONFIG_DWMAC_IPQ806X=y # CONFIG_DWMAC_QCOM_ETHQOS is not set CONFIG_DYNAMIC_DEBUG=y CONFIG_EDAC_ATOMIC_SCRUB=y CONFIG_EDAC_SUPPORT=y +CONFIG_ETHERNET_PACKET_MANGLE=y CONFIG_FIXED_PHY=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_FW_LOADER_PAGED_BUF=y @@ -195,6 +186,7 @@ CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_SYSFS=y +CONFIG_GRO_CELLS=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=y CONFIG_HARDIRQS_SW_RESEND=y @@ -249,6 +241,8 @@ CONFIG_HWMON=y CONFIG_HWSPINLOCK=y CONFIG_HWSPINLOCK_QCOM=y CONFIG_HW_RANDOM=y +CONFIG_HZ=100 +CONFIG_HZ_100=y CONFIG_HZ_FIXED=0 CONFIG_I2C=y CONFIG_I2C_BOARDINFO=y @@ -365,7 +359,6 @@ CONFIG_PAGE_POOL=y CONFIG_PCI=y CONFIG_PCIEAER=y CONFIG_PCIEPORTBUS=y -# CONFIG_PCIE_BW is not set CONFIG_PCIE_DW=y CONFIG_PCIE_DW_HOST=y CONFIG_PCIE_QCOM=y @@ -460,6 +453,7 @@ CONFIG_RFS_ACCEL=y CONFIG_RPS=y CONFIG_RTC_CLASS=y CONFIG_RTC_I2C_AND_SPI=y +CONFIG_RTC_MC146818_LIB=y CONFIG_RWSEM_SPIN_ON_OWNER=y # CONFIG_SDM_CAMCC_845 is not set # CONFIG_SDM_DISPCC_845 is not set @@ -469,7 +463,6 @@ CONFIG_RWSEM_SPIN_ON_OWNER=y # CONFIG_SDM_LPASSCC_845 is not set # CONFIG_SDM_VIDEOCC_845 is not set CONFIG_SERIAL_8250_FSL=y -# CONFIG_SERIAL_AMBA_PL011 is not set CONFIG_SERIAL_MCTRL_GPIO=y CONFIG_SERIAL_MSM=y CONFIG_SERIAL_MSM_CONSOLE=y @@ -500,7 +493,6 @@ CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 CONFIG_THERMAL_GOV_STEP_WISE=y CONFIG_THERMAL_HWMON=y CONFIG_THERMAL_OF=y -# CONFIG_THUMB2_KERNEL is not set CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_TIMER_OF=y CONFIG_TIMER_PROBE=y @@ -514,10 +506,8 @@ CONFIG_UBIFS_FS_ZSTD=y CONFIG_UEVENT_HELPER_PATH="" CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" CONFIG_UNWINDER_ARM=y -# CONFIG_UNWINDER_FRAME_POINTER is not set CONFIG_USB=y CONFIG_USB_COMMON=y -# CONFIG_USB_EHCI_HCD is not set CONFIG_USB_SUPPORT=y CONFIG_USE_OF=y CONFIG_VDSO=y diff --git a/target/linux/ipq806x/patches-4.19/0072-add-ipq806x-with-no-clocks.patch b/target/linux/ipq806x/patches-4.19/0072-add-ipq806x-with-no-clocks.patch index 76c7cfd568..ecd9672d1b 100644 --- a/target/linux/ipq806x/patches-4.19/0072-add-ipq806x-with-no-clocks.patch +++ b/target/linux/ipq806x/patches-4.19/0072-add-ipq806x-with-no-clocks.patch @@ -1,6 +1,6 @@ --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c -@@ -609,6 +609,9 @@ static const struct of_device_id qcom_sc +@@ -606,6 +606,9 @@ static const struct of_device_id qcom_sc { .compatible = "qcom,scm-ipq4019", .data = NULL, /* no clocks */ }, diff --git a/target/linux/ipq806x/patches-5.4/0072-add-ipq806x-with-no-clocks.patch b/target/linux/ipq806x/patches-5.4/0072-add-ipq806x-with-no-clocks.patch index 5d6d5316c7..b7cebd9d39 100644 --- a/target/linux/ipq806x/patches-5.4/0072-add-ipq806x-with-no-clocks.patch +++ b/target/linux/ipq806x/patches-5.4/0072-add-ipq806x-with-no-clocks.patch @@ -1,6 +1,6 @@ --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c -@@ -601,6 +601,7 @@ static const struct of_device_id qcom_sc +@@ -598,6 +598,7 @@ static const struct of_device_id qcom_sc SCM_HAS_BUS_CLK) }, { .compatible = "qcom,scm-ipq4019" }, diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile index b8cc92760d..87e0627a63 100644 --- a/target/linux/kirkwood/image/Makefile +++ b/target/linux/kirkwood/image/Makefile @@ -51,7 +51,8 @@ define Device/cloudengines_pogoplugv4 DEVICE_VENDOR := Cloud Engines DEVICE_MODEL := Pogoplug V4 DEVICE_DTS := kirkwood-pogoplug-series-4 - DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 kmod-mvsdio kmod-usb3 + DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 kmod-mvsdio kmod-usb3 \ + kmod-gpio-button-hotplug endef TARGET_DEVICES += cloudengines_pogoplugv4 diff --git a/target/linux/lantiq/patches-4.19/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-4.19/0001-MIPS-lantiq-add-pcie-driver.patch index 4cea5547c2..44959af0c3 100644 --- a/target/linux/lantiq/patches-4.19/0001-MIPS-lantiq-add-pcie-driver.patch +++ b/target/linux/lantiq/patches-4.19/0001-MIPS-lantiq-add-pcie-driver.patch @@ -5505,7 +5505,7 @@ Signed-off-by: John Crispin unsigned long type); --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h -@@ -1065,6 +1065,12 @@ +@@ -1076,6 +1076,12 @@ #define PCI_DEVICE_ID_SGI_LITHIUM 0x1002 #define PCI_DEVICE_ID_SGI_IOC4 0x100a diff --git a/target/linux/layerscape/patches-5.4/701-net-0234-enetc-WA-for-MDIO-register-access-issue.patch b/target/linux/layerscape/patches-5.4/701-net-0234-enetc-WA-for-MDIO-register-access-issue.patch index e3925cce87..b754389f6a 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0234-enetc-WA-for-MDIO-register-access-issue.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0234-enetc-WA-for-MDIO-register-access-issue.patch @@ -74,7 +74,7 @@ Signed-off-by: Alex Marginean - enetc_wr_reg(v->rbier, 0); + enetc_wr_reg_hot(v->rbier, 0); - for_each_set_bit(i, &v->tx_rings_map, v->count_tx_rings) + for_each_set_bit(i, &v->tx_rings_map, ENETC_MAX_NUM_TXQS) - enetc_wr_reg(v->tbier_base + ENETC_BDR_OFF(i), 0); + enetc_wr_reg_hot(v->tbier_base + ENETC_BDR_OFF(i), 0); + @@ -103,7 +103,7 @@ Signed-off-by: Alex Marginean - enetc_wr_reg(v->rbier, ENETC_RBIER_RXTIE); + enetc_wr_reg_hot(v->rbier, ENETC_RBIER_RXTIE); - for_each_set_bit(i, &v->tx_rings_map, v->count_tx_rings) + for_each_set_bit(i, &v->tx_rings_map, ENETC_MAX_NUM_TXQS) - enetc_wr_reg(v->tbier_base + ENETC_BDR_OFF(i), - ENETC_TBIER_TXTIE); + enetc_wr_reg_hot(v->tbier_base + ENETC_BDR_OFF(i), diff --git a/target/linux/layerscape/patches-5.4/701-net-0236-enetc-Replace-enetc_gregs-with-a-readers-writer-lock.patch b/target/linux/layerscape/patches-5.4/701-net-0236-enetc-Replace-enetc_gregs-with-a-readers-writer-lock.patch index 979c2da5c3..d5a18f6c2a 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0236-enetc-Replace-enetc_gregs-with-a-readers-writer-lock.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0236-enetc-Replace-enetc_gregs-with-a-readers-writer-lock.patch @@ -114,7 +114,7 @@ Signed-off-by: Claudiu Manoil /* disable interrupts */ enetc_wr_reg_hot(v->rbier, 0); @@ -273,7 +262,7 @@ static irqreturn_t enetc_msix(int irq, v - for_each_set_bit(i, &v->tx_rings_map, v->count_tx_rings) + for_each_set_bit(i, &v->tx_rings_map, ENETC_MAX_NUM_TXQS) enetc_wr_reg_hot(v->tbier_base + ENETC_BDR_OFF(i), 0); - spin_unlock_irqrestore(lock, flags); diff --git a/target/linux/layerscape/patches-5.4/801-audio-0008-Revert-ASoC-Remove-dev_err-usage-after-platform_get_.patch b/target/linux/layerscape/patches-5.4/801-audio-0008-Revert-ASoC-Remove-dev_err-usage-after-platform_get_.patch index 4b61c0ed5b..8d86b4e258 100644 --- a/target/linux/layerscape/patches-5.4/801-audio-0008-Revert-ASoC-Remove-dev_err-usage-after-platform_get_.patch +++ b/target/linux/layerscape/patches-5.4/801-audio-0008-Revert-ASoC-Remove-dev_err-usage-after-platform_get_.patch @@ -152,7 +152,7 @@ This reverts commit cf9441adb1a35506d7606866c382b9d8614169b5. dev_name(&pdev->dev), asrc_priv); --- a/sound/soc/fsl/fsl_esai.c +++ b/sound/soc/fsl/fsl_esai.c -@@ -973,8 +973,10 @@ static int fsl_esai_probe(struct platfor +@@ -977,8 +977,10 @@ static int fsl_esai_probe(struct platfor PTR_ERR(esai_priv->spbaclk)); irq = platform_get_irq(pdev, 0); @@ -194,7 +194,7 @@ This reverts commit cf9441adb1a35506d7606866c382b9d8614169b5. dev_name(&pdev->dev), spdif_priv); --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c -@@ -1510,8 +1510,10 @@ static int fsl_ssi_probe(struct platform +@@ -1515,8 +1515,10 @@ static int fsl_ssi_probe(struct platform } ssi->irq = platform_get_irq(pdev, 0); diff --git a/target/linux/layerscape/patches-5.4/812-pcie-0002-PCI-dwc-Use-interrupt-disabling-instead-of-masking.patch b/target/linux/layerscape/patches-5.4/812-pcie-0002-PCI-dwc-Use-interrupt-disabling-instead-of-masking.patch index e82b83aef1..3990c1597b 100644 --- a/target/linux/layerscape/patches-5.4/812-pcie-0002-PCI-dwc-Use-interrupt-disabling-instead-of-masking.patch +++ b/target/linux/layerscape/patches-5.4/812-pcie-0002-PCI-dwc-Use-interrupt-disabling-instead-of-masking.patch @@ -39,7 +39,7 @@ Signed-off-by: Fugang Duan raw_spin_unlock_irqrestore(&pp->lock, flags); } -@@ -657,15 +657,10 @@ void dw_pcie_setup_rc(struct pcie_port * +@@ -659,15 +659,10 @@ void dw_pcie_setup_rc(struct pcie_port * num_ctrls = pp->num_vectors / MAX_MSI_IRQS_PER_CTRL; /* Initialize IRQ Status array */ diff --git a/target/linux/layerscape/patches-5.4/812-pcie-0003-PCI-dwc-fix-the-msi-failure-after-pm-operations.patch b/target/linux/layerscape/patches-5.4/812-pcie-0003-PCI-dwc-fix-the-msi-failure-after-pm-operations.patch index 235daca71c..91b2a34b3f 100644 --- a/target/linux/layerscape/patches-5.4/812-pcie-0003-PCI-dwc-fix-the-msi-failure-after-pm-operations.patch +++ b/target/linux/layerscape/patches-5.4/812-pcie-0003-PCI-dwc-fix-the-msi-failure-after-pm-operations.patch @@ -17,7 +17,7 @@ Acked-by: Hou Zhiqiang --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c -@@ -654,6 +654,12 @@ void dw_pcie_setup_rc(struct pcie_port * +@@ -656,6 +656,12 @@ void dw_pcie_setup_rc(struct pcie_port * dw_pcie_setup(pci); if (!pp->ops->msi_host_init) { diff --git a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch index d1bde7c181..c4dc00a916 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch @@ -54,7 +54,7 @@ Signed-off-by: Peter Chen * All 3.1 IP version constants are greater than the 3.0 IP --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c -@@ -3389,6 +3389,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) +@@ -3427,6 +3427,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) dwc->gadget.sg_supported = true; dwc->gadget.name = "dwc3-gadget"; dwc->gadget.lpm_capable = true; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch index f140f9d789..635850ec7b 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch @@ -174,7 +174,7 @@ Signed-off-by: Peter Chen * bursts that are required to move all packets in this TD. Only SuperSpeed --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -5354,6 +5354,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5361,6 +5361,7 @@ static const struct hc_driver xhci_hc_dr .disable_usb3_lpm_timeout = xhci_disable_usb3_lpm_timeout, .find_raw_port_number = xhci_find_raw_port_number, .clear_tt_buffer_complete = xhci_clear_tt_buffer_complete, diff --git a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch index c54b780cb1..57818b1136 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch @@ -24,7 +24,7 @@ Signed-off-by: Peter Chen --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -5371,6 +5371,8 @@ void xhci_init_driver(struct hc_driver * +@@ -5378,6 +5378,8 @@ void xhci_init_driver(struct hc_driver * drv->reset = over->reset; if (over->start) drv->start = over->start; diff --git a/target/linux/mediatek/patches-4.19/0101-pci-mediatek-backport-fix-pcie.patch b/target/linux/mediatek/patches-4.19/0101-pci-mediatek-backport-fix-pcie.patch index d4c4ea7738..f350564977 100644 --- a/target/linux/mediatek/patches-4.19/0101-pci-mediatek-backport-fix-pcie.patch +++ b/target/linux/mediatek/patches-4.19/0101-pci-mediatek-backport-fix-pcie.patch @@ -28,7 +28,7 @@ #include #include #include -@@ -162,6 +163,7 @@ struct mtk_pcie_soc { +@@ -167,6 +168,7 @@ struct mtk_pcie_soc { * @phy: pointer to PHY control block * @lane: lane count * @slot: port slot @@ -36,7 +36,7 @@ * @irq_domain: legacy INTx IRQ domain * @inner_domain: inner IRQ domain * @msi_domain: MSI IRQ domain -@@ -182,6 +184,7 @@ struct mtk_pcie_port { +@@ -187,6 +189,7 @@ struct mtk_pcie_port { struct phy *phy; u32 lane; u32 slot; @@ -44,7 +44,7 @@ struct irq_domain *irq_domain; struct irq_domain *inner_domain; struct irq_domain *msi_domain; -@@ -225,10 +228,8 @@ static void mtk_pcie_subsys_powerdown(st +@@ -230,10 +233,8 @@ static void mtk_pcie_subsys_powerdown(st clk_disable_unprepare(pcie->free_ck); @@ -57,7 +57,7 @@ } static void mtk_pcie_port_free(struct mtk_pcie_port *port) -@@ -532,6 +533,27 @@ static void mtk_pcie_enable_msi(struct m +@@ -537,6 +538,27 @@ static void mtk_pcie_enable_msi(struct m writel(val, port->base + PCIE_INT_MASK); } @@ -85,7 +85,7 @@ static int mtk_pcie_intx_map(struct irq_domain *domain, unsigned int irq, irq_hw_number_t hwirq) { -@@ -561,6 +583,7 @@ static int mtk_pcie_init_irq_domain(stru +@@ -566,6 +588,7 @@ static int mtk_pcie_init_irq_domain(stru port->irq_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, &intx_domain_ops, port); @@ -93,7 +93,7 @@ if (!port->irq_domain) { dev_err(dev, "failed to get INTx IRQ domain\n"); return -ENODEV; -@@ -622,7 +645,7 @@ static int mtk_pcie_setup_irq(struct mtk +@@ -627,7 +650,7 @@ static int mtk_pcie_setup_irq(struct mtk struct mtk_pcie *pcie = port->pcie; struct device *dev = pcie->dev; struct platform_device *pdev = to_platform_device(dev); @@ -102,7 +102,7 @@ err = mtk_pcie_init_irq_domain(port, node); if (err) { -@@ -630,8 +653,9 @@ static int mtk_pcie_setup_irq(struct mtk +@@ -635,8 +658,9 @@ static int mtk_pcie_setup_irq(struct mtk return err; } @@ -114,7 +114,7 @@ return 0; } -@@ -904,49 +928,29 @@ static int mtk_pcie_parse_port(struct mt +@@ -912,49 +936,29 @@ static int mtk_pcie_parse_port(struct mt /* sys_ck might be divided into the following parts in some chips */ snprintf(name, sizeof(name), "ahb_ck%d", slot); @@ -179,7 +179,7 @@ snprintf(name, sizeof(name), "pcie-rst%d", slot); port->reset = devm_reset_control_get_optional_exclusive(dev, name); -@@ -999,10 +1003,8 @@ static int mtk_pcie_subsys_powerup(struc +@@ -1007,10 +1011,8 @@ static int mtk_pcie_subsys_powerup(struc pcie->free_ck = NULL; } @@ -192,7 +192,7 @@ /* enable top level clock */ err = clk_prepare_enable(pcie->free_ck); -@@ -1014,10 +1016,8 @@ static int mtk_pcie_subsys_powerup(struc +@@ -1022,10 +1024,8 @@ static int mtk_pcie_subsys_powerup(struc return 0; err_free_ck: @@ -205,7 +205,7 @@ return err; } -@@ -1122,36 +1122,6 @@ static int mtk_pcie_request_resources(st +@@ -1130,36 +1130,6 @@ static int mtk_pcie_request_resources(st return err; err = devm_pci_remap_iospace(dev, &pcie->pio, pcie->io.start); @@ -242,7 +242,7 @@ return 0; } -@@ -1182,7 +1152,14 @@ static int mtk_pcie_probe(struct platfor +@@ -1190,7 +1160,14 @@ static int mtk_pcie_probe(struct platfor if (err) goto put_resources; @@ -258,7 +258,7 @@ if (err) goto put_resources; -@@ -1195,6 +1172,80 @@ put_resources: +@@ -1203,6 +1180,80 @@ put_resources: return err; } @@ -339,7 +339,7 @@ static const struct mtk_pcie_soc mtk_pcie_soc_v1 = { .ops = &mtk_pcie_ops, .startup = mtk_pcie_startup_port, -@@ -1223,10 +1274,13 @@ static const struct of_device_id mtk_pci +@@ -1241,10 +1292,13 @@ static const struct of_device_id mtk_pci static struct platform_driver mtk_pcie_driver = { .probe = mtk_pcie_probe, diff --git a/target/linux/mediatek/patches-4.19/0900-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-4.19/0900-bt-mtk-serial-fix.patch index 6d4cce276b..1c3c1d9497 100644 --- a/target/linux/mediatek/patches-4.19/0900-bt-mtk-serial-fix.patch +++ b/target/linux/mediatek/patches-4.19/0900-bt-mtk-serial-fix.patch @@ -19,7 +19,7 @@ }, [PORT_NPCM] = { .name = "Nuvoton 16550", -@@ -2648,6 +2648,11 @@ serial8250_do_set_termios(struct uart_po +@@ -2650,6 +2650,11 @@ serial8250_do_set_termios(struct uart_po unsigned long flags; unsigned int baud, quot, frac = 0; diff --git a/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch index f68f52c12a..473fb688ec 100644 --- a/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch +++ b/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch @@ -19,7 +19,7 @@ }, [PORT_NPCM] = { .name = "Nuvoton 16550", -@@ -2559,6 +2559,11 @@ serial8250_do_set_termios(struct uart_po +@@ -2561,6 +2561,11 @@ serial8250_do_set_termios(struct uart_po unsigned long flags; unsigned int baud, quot, frac = 0; diff --git a/target/linux/mpc85xx/patches-5.4/102-powerpc-add-cmdline-override.patch b/target/linux/mpc85xx/patches-5.4/102-powerpc-add-cmdline-override.patch index b76793421a..19bbf9f2f4 100644 --- a/target/linux/mpc85xx/patches-5.4/102-powerpc-add-cmdline-override.patch +++ b/target/linux/mpc85xx/patches-5.4/102-powerpc-add-cmdline-override.patch @@ -1,6 +1,6 @@ --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig -@@ -883,6 +883,14 @@ config CMDLINE_FORCE +@@ -884,6 +884,14 @@ config CMDLINE_FORCE This is useful if you cannot or don't want to change the command-line options your boot loader passes to the kernel. diff --git a/target/linux/mvebu/config-5.4 b/target/linux/mvebu/config-5.4 index ac3e73c7f0..69c7ea3da8 100644 --- a/target/linux/mvebu/config-5.4 +++ b/target/linux/mvebu/config-5.4 @@ -280,6 +280,7 @@ CONFIG_I2C_BOARDINFO=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_MV64XXX=y # CONFIG_I2C_PXA is not set +# CONFIG_I2C_PXA_SLAVE is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts b/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts index 4d2760eb72..ea392f9e41 100644 --- a/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts +++ b/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts @@ -11,6 +11,7 @@ #include "mvebu-linkstation-fan.dtsi" #include #include +#include / { model = "Buffalo LinkStation LS421DE"; @@ -40,10 +41,60 @@ MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>; }; - gpio_fan { + system_fan: gpio_fan { gpios = <&gpio0 13 GPIO_ACTIVE_HIGH &gpio0 14 GPIO_ACTIVE_HIGH>; alarm-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; + + #cooling-cells = <2>; + }; + + thermal-zones { + chassis-thermal { + polling-delay = <20000>; + polling-delay-passive = <2000>; + + thermal-sensors = <&hdd0_temp>, <&hdd1_temp>; + coefficients = <1 1>; + + trips { + chassis_alert1: chassis-alert1 { + temperature = <36000>; + hysteresis = <2000>; + type = "active"; + }; + chassis_alert2: chassis-alert2 { + temperature = <46000>; + hysteresis = <2000>; + type = "active"; + }; + chassis_alert3: chassis-alert3 { + temperature = <56000>; + hysteresis = <2000>; + type = "passive"; + }; + chassis_crit: chassis-crit { + temperature = <66000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map1 { + trip = <&chassis_alert1>; + cooling-device = <&system_fan THERMAL_NO_LIMIT 1>; + }; + map2 { + trip = <&chassis_alert2>; + cooling-device = <&system_fan 2 2>; + }; + map3 { + trip = <&chassis_alert3>; + cooling-device = <&system_fan 3 THERMAL_NO_LIMIT>; + }; + }; + }; }; gpio_keys { @@ -225,6 +276,18 @@ &sata { nr-ports = <2>; status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + hdd0_temp: sata-port@0 { + reg = <0>; + #thermal-sensor-cells = <0>; + }; + + hdd1_temp: sata-port@1 { + reg = <1>; + #thermal-sensor-cells = <0>; + }; }; &sdio { diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk index f01a76a9d3..7f0a2fe697 100644 --- a/target/linux/mvebu/image/cortexa9.mk +++ b/target/linux/mvebu/image/cortexa9.mk @@ -17,8 +17,9 @@ define Device/buffalo_ls421de KERNEL_INITRAMFS := kernel-bin | append-dtb | uImage none DEVICE_DTS := armada-370-buffalo-ls421de DEVICE_PACKAGES := \ - kmod-rtc-rs5c372a kmod-hwmon-gpiofan kmod-usb3 kmod-md-raid0 \ - kmod-md-raid1 kmod-md-mod kmod-fs-xfs mkf2fs e2fsprogs partx-utils + kmod-rtc-rs5c372a kmod-hwmon-gpiofan kmod-hwmon-drivetemp kmod-usb3 \ + kmod-md-raid0 kmod-md-raid1 kmod-md-mod kmod-fs-xfs mkf2fs e2fsprogs \ + partx-utils endef TARGET_DEVICES += buffalo_ls421de 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 3fd561db3a..4cadd791ea 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,7 +10,7 @@ This reverts commit c8e144f8ab00e6c4a070a932ef9c57db09aa41cf. --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c -@@ -843,6 +843,7 @@ static int advk_pcie_probe(struct platfo +@@ -839,6 +839,7 @@ static int advk_pcie_probe(struct platfo struct device *dev = &pdev->dev; struct advk_pcie *pcie; struct resource *res; @@ -18,7 +18,7 @@ This reverts commit c8e144f8ab00e6c4a070a932ef9c57db09aa41cf. struct pci_host_bridge *bridge; int ret, irq; -@@ -896,13 +897,22 @@ static int advk_pcie_probe(struct platfo +@@ -892,13 +893,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 index 204d6e2aec..af221499a8 100644 --- 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 @@ -67,7 +67,7 @@ Signed-off-by: Thomas Petazzoni 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); -@@ -838,6 +841,58 @@ out_release_res: +@@ -834,6 +837,58 @@ out_release_res: return err; } @@ -126,7 +126,7 @@ Signed-off-by: Thomas Petazzoni static int advk_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; -@@ -912,6 +967,9 @@ static int advk_pcie_probe(struct platfo +@@ -908,6 +963,9 @@ static int advk_pcie_probe(struct platfo list_for_each_entry(child, &bus->children, node) pcie_bus_configure_settings(child); diff --git a/target/linux/mvebu/patches-4.19/526-PCI-aardvark-disable-LOS-state-by-default.patch b/target/linux/mvebu/patches-4.19/526-PCI-aardvark-disable-LOS-state-by-default.patch deleted file mode 100644 index b6fcec81f8..0000000000 --- a/target/linux/mvebu/patches-4.19/526-PCI-aardvark-disable-LOS-state-by-default.patch +++ /dev/null @@ -1,55 +0,0 @@ -From patchwork Thu Sep 28 12:58:36 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [v2,5/7] PCI: aardvark: disable LOS state by default -X-Patchwork-Submitter: Thomas Petazzoni -X-Patchwork-Id: 819590 -Message-Id: <20170928125838.11887-6-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:36 +0200 -From: Thomas Petazzoni -List-Id: - -From: Victor Gu - -Some PCIe devices do not support LOS, and will cause timeouts if the -root complex forces the LOS state. This patch disables the LOS state -by default. - -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: 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 | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - ---- a/drivers/pci/controller/pci-aardvark.c -+++ b/drivers/pci/controller/pci-aardvark.c -@@ -324,8 +324,7 @@ static void advk_pcie_setup_hw(struct ad - - advk_pcie_wait_for_link(pcie); - -- reg = PCIE_CORE_LINK_L0S_ENTRY | -- (1 << PCIE_CORE_LINK_WIDTH_SHIFT); -+ reg = (1 << PCIE_CORE_LINK_WIDTH_SHIFT); - advk_writel(pcie, reg, PCIE_CORE_LINK_CTRL_STAT_REG); - - reg = advk_readl(pcie, PCIE_CORE_CMD_STATUS_REG); diff --git a/target/linux/oxnas/patches-5.4/999-libata-hacks.patch b/target/linux/oxnas/patches-5.4/999-libata-hacks.patch index 7c70a597d0..f846c3fee3 100644 --- a/target/linux/oxnas/patches-5.4/999-libata-hacks.patch +++ b/target/linux/oxnas/patches-5.4/999-libata-hacks.patch @@ -1,6 +1,6 @@ --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c -@@ -1584,6 +1584,14 @@ unsigned ata_exec_internal_sg(struct ata +@@ -1583,6 +1583,14 @@ unsigned ata_exec_internal_sg(struct ata return AC_ERR_SYSTEM; } @@ -15,7 +15,7 @@ /* initialize internal qc */ qc = __ata_qc_from_tag(ap, ATA_TAG_INTERNAL); -@@ -5123,6 +5131,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5122,6 +5130,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); -@@ -5168,6 +5179,8 @@ void ata_qc_free(struct ata_queued_cmd * +@@ -5167,6 +5178,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); @@ -36,7 +36,7 @@ --- a/include/linux/libata.h +++ b/include/linux/libata.h -@@ -905,6 +905,8 @@ struct ata_port_operations { +@@ -908,6 +908,8 @@ struct ata_port_operations { void (*qc_prep)(struct ata_queued_cmd *qc); unsigned int (*qc_issue)(struct ata_queued_cmd *qc); bool (*qc_fill_rtf)(struct ata_queued_cmd *qc); @@ -45,7 +45,7 @@ /* * Configuration and exception handling -@@ -995,6 +997,9 @@ struct ata_port_operations { +@@ -998,6 +1000,9 @@ struct ata_port_operations { void (*phy_reset)(struct ata_port *ap); void (*eng_timeout)(struct ata_port *ap); diff --git a/target/linux/pistachio/patches-4.14/412-mtd-nand-Add-JEDEC-manufacturer-ID-for-Gigadevice.patch b/target/linux/pistachio/patches-4.14/412-mtd-nand-Add-JEDEC-manufacturer-ID-for-Gigadevice.patch index cb629a4122..a967124c81 100644 --- a/target/linux/pistachio/patches-4.14/412-mtd-nand-Add-JEDEC-manufacturer-ID-for-Gigadevice.patch +++ b/target/linux/pistachio/patches-4.14/412-mtd-nand-Add-JEDEC-manufacturer-ID-for-Gigadevice.patch @@ -25,7 +25,7 @@ Signed-off-by: Ezequiel Garcia --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h -@@ -1016,6 +1016,7 @@ static inline void *nand_get_manufacture +@@ -1014,6 +1014,7 @@ static inline void *nand_get_manufacture #define NAND_MFR_SANDISK 0x45 #define NAND_MFR_INTEL 0x89 #define NAND_MFR_ATO 0x9b diff --git a/target/linux/ramips/patches-4.14/0013-owrt-hack-fix-mt7688-cache-issue.patch b/target/linux/ramips/patches-4.14/0013-owrt-hack-fix-mt7688-cache-issue.patch index 442f3180a3..47de8a5f17 100644 --- a/target/linux/ramips/patches-4.14/0013-owrt-hack-fix-mt7688-cache-issue.patch +++ b/target/linux/ramips/patches-4.14/0013-owrt-hack-fix-mt7688-cache-issue.patch @@ -15,10 +15,10 @@ Signed-off-by: John Crispin BOOTMEM_DEFAULT); #endif - device_tree_init(); - sparse_init(); - plat_swiotlb_setup(); -@@ -1026,6 +1025,7 @@ void __init setup_arch(char **cmdline_p) + /* + * In order to reduce the possibility of kernel panic when failed to +@@ -1036,6 +1035,7 @@ void __init setup_arch(char **cmdline_p) cpu_cache_init(); paging_init(); diff --git a/target/linux/ramips/patches-4.14/0038-Revert-mtd-nand-Remove-unused-chip-write_page-hook.patch b/target/linux/ramips/patches-4.14/0038-Revert-mtd-nand-Remove-unused-chip-write_page-hook.patch index 4758f18558..8d20c45c7c 100644 --- a/target/linux/ramips/patches-4.14/0038-Revert-mtd-nand-Remove-unused-chip-write_page-hook.patch +++ b/target/linux/ramips/patches-4.14/0038-Revert-mtd-nand-Remove-unused-chip-write_page-hook.patch @@ -47,7 +47,7 @@ Signed-off-by: Rafał Miłecki * selected and we have 256 byte pagesize fallback to software ECC --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h -@@ -862,6 +862,7 @@ struct nand_manufacturer_ops { +@@ -860,6 +860,7 @@ struct nand_manufacturer_ops { * structure which is shared among multiple independent * devices. * @priv: [OPTIONAL] pointer to private chip data @@ -55,7 +55,7 @@ Signed-off-by: Rafał Miłecki * @manufacturer: [INTERN] Contains manufacturer information */ -@@ -885,6 +886,9 @@ struct nand_chip { +@@ -883,6 +884,9 @@ struct nand_chip { int(*waitfunc)(struct mtd_info *mtd, struct nand_chip *this); int (*erase)(struct mtd_info *mtd, int page); int (*scan_bbt)(struct mtd_info *mtd); diff --git a/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch b/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch index 3c6a59b863..3b82347dbb 100644 --- a/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch +++ b/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch @@ -3590,7 +3590,7 @@ Signed-off-by: John Crispin + +out: + MSG(INIT, "[NFI] mtk_nand_probe fail, err = %d!\n", err); -+ nand_release(mtd); ++ nand_release(nand_chip); + platform_set_drvdata(pdev, NULL); + kfree(host); + nand_disable_clock(); @@ -3604,7 +3604,7 @@ Signed-off-by: John Crispin + struct mtd_info *mtd = host->mtd; + struct nand_chip *nand_chip = &host->nand_chip; + -+ nand_release(mtd); ++ nand_release(nand_chip); + kfree(host); + nand_disable_clock(); + diff --git a/target/linux/ramips/patches-4.14/0040-nand-hack.patch b/target/linux/ramips/patches-4.14/0040-nand-hack.patch index 58cdf1bce7..b708b3b9cb 100644 --- a/target/linux/ramips/patches-4.14/0040-nand-hack.patch +++ b/target/linux/ramips/patches-4.14/0040-nand-hack.patch @@ -20,7 +20,7 @@ /* Invalidate page cache */ --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h -@@ -897,6 +897,9 @@ struct nand_chip { +@@ -895,6 +895,9 @@ struct nand_chip { int (*setup_data_interface)(struct mtd_info *mtd, int chipnr, const struct nand_data_interface *conf); diff --git a/target/linux/samsung/files-4.14/drivers/mtd/nand/s5pxx_nand.c b/target/linux/samsung/files-4.14/drivers/mtd/nand/s5pxx_nand.c index 26ec75dd19..2ac305639d 100644 --- a/target/linux/samsung/files-4.14/drivers/mtd/nand/s5pxx_nand.c +++ b/target/linux/samsung/files-4.14/drivers/mtd/nand/s5pxx_nand.c @@ -468,9 +468,8 @@ static int s5p_nand_probe(struct platform_device *pdev) static int s5p_nand_remove(struct platform_device *pdev) { struct s5p_nand_host *host = platform_get_drvdata(pdev); - struct mtd_info *mtd = nand_to_mtd(&host->nand_chip); - nand_release(mtd); + nand_release(&host->nand_chip); clk_disable_unprepare(host->clk[0]); /* nandxl */ clk_disable_unprepare(host->clk[1]); /* nand */ diff --git a/target/linux/x86/patches-4.19/200-pcengines-apu2-reboot.patch b/target/linux/x86/patches-4.19/200-pcengines-apu2-reboot.patch index 1426140183..bc57806c74 100644 --- a/target/linux/x86/patches-4.19/200-pcengines-apu2-reboot.patch +++ b/target/linux/x86/patches-4.19/200-pcengines-apu2-reboot.patch @@ -1,6 +1,6 @@ --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c -@@ -469,6 +469,16 @@ static const struct dmi_system_id reboot +@@ -477,6 +477,16 @@ static const struct dmi_system_id reboot }, },