From d89427662db940c1c441fe22b35b2a6504c9f172 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 18 Nov 2019 12:57:54 +0100 Subject: [PATCH 01/12] base-files: include 'reconf' in help output of 'wifi' command Reported-by: Dirk Brenken Signed-off-by: Daniel Golle --- package/base-files/files/sbin/wifi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi index 261d2fb500..a8b4451c60 100755 --- a/package/base-files/files/sbin/wifi +++ b/package/base-files/files/sbin/wifi @@ -6,7 +6,7 @@ usage() { cat < Date: Mon, 18 Nov 2019 14:45:59 +0100 Subject: [PATCH 02/12] mac80211: brcmfmac: fix PCIe reset crash and WARNING MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki --- ...ble-PCIe-interrupts-before-bus-reset.patch | 54 +++++++++++++++++++ ...ove-monitor-interface-when-detaching.patch | 30 +++++++++++ ...-register-wiphy-s-during-module_init.patch | 2 +- 3 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 package/kernel/mac80211/patches/brcm/100-brcmfmac-disable-PCIe-interrupts-before-bus-reset.patch create mode 100644 package/kernel/mac80211/patches/brcm/101-brcmfmac-remove-monitor-interface-when-detaching.patch diff --git a/package/kernel/mac80211/patches/brcm/100-brcmfmac-disable-PCIe-interrupts-before-bus-reset.patch b/package/kernel/mac80211/patches/brcm/100-brcmfmac-disable-PCIe-interrupts-before-bus-reset.patch new file mode 100644 index 0000000000..a92118a19a --- /dev/null +++ b/package/kernel/mac80211/patches/brcm/100-brcmfmac-disable-PCIe-interrupts-before-bus-reset.patch @@ -0,0 +1,54 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 18 Nov 2019 11:52:41 +0100 +Subject: [PATCH FIX] brcmfmac: disable PCIe interrupts before bus reset +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Keeping interrupts on could result in brcmfmac freeing some resources +and then IRQ handlers trying to use them. That was obviously a straight +path for crashing a kernel. + +Example: +CPU0 CPU1 +---- ---- +brcmf_pcie_reset + brcmf_pcie_bus_console_read + brcmf_detach + ... + brcmf_fweh_detach + brcmf_proto_detach + brcmf_pcie_isr_thread + ... + brcmf_proto_msgbuf_rx_trigger + ... + drvr->proto->pd + brcmf_pcie_release_irq + +[ 363.789218] Unable to handle kernel NULL pointer dereference at virtual address 00000038 +[ 363.797339] pgd = c0004000 +[ 363.800050] [00000038] *pgd=00000000 +[ 363.803635] Internal error: Oops: 17 [#1] SMP ARM +(...) +[ 364.029209] Backtrace: +[ 364.031725] [] (brcmf_proto_msgbuf_rx_trigger [brcmfmac]) from [] (brcmf_pcie_isr_thread+0x228/0x274 [brcmfmac]) +[ 364.043662] r7:00000001 r6:c8ca0000 r5:00010000 r4:c7b4f800 + +Fixes: 4684997d9eea ("brcmfmac: reset PCIe bus on a firmware crash") +Cc: stable@vger.kernel.org # v5.2+ +Signed-off-by: Rafał Miłecki +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -1427,6 +1427,8 @@ static int brcmf_pcie_reset(struct devic + struct brcmf_fw_request *fwreq; + int err; + ++ brcmf_pcie_intr_disable(devinfo); ++ + brcmf_pcie_bus_console_read(devinfo, true); + + brcmf_detach(dev); diff --git a/package/kernel/mac80211/patches/brcm/101-brcmfmac-remove-monitor-interface-when-detaching.patch b/package/kernel/mac80211/patches/brcm/101-brcmfmac-remove-monitor-interface-when-detaching.patch new file mode 100644 index 0000000000..6c325ee844 --- /dev/null +++ b/package/kernel/mac80211/patches/brcm/101-brcmfmac-remove-monitor-interface-when-detaching.patch @@ -0,0 +1,30 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 18 Nov 2019 13:35:20 +0100 +Subject: [PATCH 5.5] brcmfmac: remove monitor interface when detaching +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This fixes a minor WARNING in the cfg80211: +[ 130.658034] ------------[ cut here ]------------ +[ 130.662805] WARNING: CPU: 1 PID: 610 at net/wireless/core.c:954 wiphy_unregister+0xb4/0x198 [cfg80211] + +Signed-off-by: Rafał Miłecki +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +@@ -1371,6 +1371,11 @@ void brcmf_detach(struct device *dev) + brcmf_fweh_detach(drvr); + brcmf_proto_detach(drvr); + ++ if (drvr->mon_if) { ++ brcmf_net_detach(drvr->mon_if->ndev, false); ++ drvr->mon_if = NULL; ++ } ++ + /* make sure primary interface removed last */ + for (i = BRCMF_MAX_IFS - 1; i > -1; i--) { + if (drvr->iflist[i]) diff --git a/package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch b/package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch index 000333c928..8194c07695 100644 --- a/package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch +++ b/package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch @@ -13,7 +13,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c -@@ -1472,6 +1472,7 @@ int __init brcmf_core_init(void) +@@ -1477,6 +1477,7 @@ int __init brcmf_core_init(void) { if (!schedule_work(&brcmf_driver_work)) return -EBUSY; From eaa047179ad30d156d0c3da7ec225acfae7a9f00 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 18 Nov 2019 07:05:41 +0100 Subject: [PATCH 03/12] mac80211: Adapt to changes to skb_get_hash_perturb() The skb_get_hash_perturb() function now takes a siphash_key_t instead of an u32. This was changed in commit 55667441c84f ("net/flow_dissector: switch to siphash"). Use the correct type in the fq header file depending on the kernel version. Signed-off-by: Hauke Mehrtens Signed-off-by: Stefan Lippers-Hollmann --- ...t-to-changes-to-skb_get_hash_perturb.patch | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 package/kernel/mac80211/patches/build/102-backports-Adapt-to-changes-to-skb_get_hash_perturb.patch diff --git a/package/kernel/mac80211/patches/build/102-backports-Adapt-to-changes-to-skb_get_hash_perturb.patch b/package/kernel/mac80211/patches/build/102-backports-Adapt-to-changes-to-skb_get_hash_perturb.patch new file mode 100644 index 0000000000..7e40180b93 --- /dev/null +++ b/package/kernel/mac80211/patches/build/102-backports-Adapt-to-changes-to-skb_get_hash_perturb.patch @@ -0,0 +1,68 @@ +From e3c57dd949835419cee8d3b45db38de58bf6ebd5 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Mon, 18 Nov 2019 01:13:37 +0100 +Subject: [PATCH] backports: Adapt to changes to skb_get_hash_perturb() + +The skb_get_hash_perturb() function now takes a siphash_key_t instead of +an u32. This was changed in commit 55667441c84f ("net/flow_dissector: +switch to siphash"). Use the correct type in the fq header file +depending on the kernel version. + +Signed-off-by: Hauke Mehrtens +--- + include/net/fq.h | 8 ++++++++ + include/net/fq_impl.h | 8 ++++++++ + 2 files changed, 16 insertions(+) + +--- a/include/net/fq.h ++++ b/include/net/fq.h +@@ -69,7 +69,15 @@ struct fq { + struct list_head backlogs; + spinlock_t lock; + u32 flows_cnt; ++#if LINUX_VERSION_IS_GEQ(5,3,10) || \ ++ LINUX_VERSION_IN_RANGE(4,19,83, 4,20,0) || \ ++ LINUX_VERSION_IN_RANGE(4,14,153, 4,15,0) || \ ++ LINUX_VERSION_IN_RANGE(4,9,200, 4,10,0) || \ ++ LINUX_VERSION_IN_RANGE(4,4,200, 4,5,0) ++ siphash_key_t perturbation; ++#else + u32 perturbation; ++#endif + u32 limit; + u32 memory_limit; + u32 memory_usage; +--- a/include/net/fq_impl.h ++++ b/include/net/fq_impl.h +@@ -108,7 +108,15 @@ begin: + + static u32 fq_flow_idx(struct fq *fq, struct sk_buff *skb) + { ++#if LINUX_VERSION_IS_GEQ(5,3,10) || \ ++ LINUX_VERSION_IN_RANGE(4,19,83, 4,20,0) || \ ++ LINUX_VERSION_IN_RANGE(4,14,153, 4,15,0) || \ ++ LINUX_VERSION_IN_RANGE(4,9,200, 4,10,0) || \ ++ LINUX_VERSION_IN_RANGE(4,4,200, 4,5,0) ++ u32 hash = skb_get_hash_perturb(skb, &fq->perturbation); ++#else + u32 hash = skb_get_hash_perturb(skb, fq->perturbation); ++#endif + + return reciprocal_scale(hash, fq->flows_cnt); + } +@@ -308,7 +316,15 @@ static int fq_init(struct fq *fq, int fl + INIT_LIST_HEAD(&fq->backlogs); + spin_lock_init(&fq->lock); + fq->flows_cnt = max_t(u32, flows_cnt, 1); ++#if LINUX_VERSION_IS_GEQ(5,3,10) || \ ++ LINUX_VERSION_IN_RANGE(4,19,83, 4,20,0) || \ ++ LINUX_VERSION_IN_RANGE(4,14,153, 4,15,0) || \ ++ LINUX_VERSION_IN_RANGE(4,9,200, 4,10,0) || \ ++ LINUX_VERSION_IN_RANGE(4,4,200, 4,5,0) ++ get_random_bytes(&fq->perturbation, sizeof(fq->perturbation)); ++#else + fq->perturbation = prandom_u32(); ++#endif + fq->quantum = 300; + fq->limit = 8192; + fq->memory_limit = 16 << 20; /* 16 MBytes */ From 1a0d6e1eba57d38c5ab6b0e8468188f09e45079d Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Tue, 19 Nov 2019 00:14:38 +0100 Subject: [PATCH 04/12] ath79: fix DTS node names for Ubiquiti XM partitions Some node names were inconsistent with the reg property. Fix it. Signed-off-by: Adrian Schmutzler --- target/linux/ath79/dts/ar9342_ubnt_xw.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi index 3232db981b..ee42498af1 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi +++ b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi @@ -97,13 +97,13 @@ reg = <0x050000 0x760000>; }; - partition@fb0000 { + partition@7b0000 { label = "cfg"; reg = <0x7b0000 0x040000>; read-only; }; - eeprom: partition@ff0000 { + eeprom: partition@7f0000 { label = "EEPROM"; reg = <0x7f0000 0x010000>; read-only; From 93f2bcc35e371ec0c4ceb76c06f90b898c726ba5 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 14 Nov 2019 12:45:15 +0100 Subject: [PATCH 05/12] ar71xx: fix LED setup for TL-WDR4900 v2 In ar71xx there is only one combined mach file for Archer C5/C7 and TL-WDR4900 v2. This one uses the same LED struct for all devices, defining "green" LEDs for them. However, WDR4900 uses blue front LEDs, while only C5/C7 uses green ones. Despite, in base-files WDR4900 is actually set up with "blue" for the mentioned LEDs. Thus, this patch creates a separate LED struct for WDR4900, so the LEDs can be set up correctly. Despite, the wlan5g LED is removed as it is controlled by ath9k chip for WDR4900 (in contrast to C5/C7). Note: While front LEDs are blue, USB LEDs (on the back) are green, so colors are mixed intentionally for the WDR4900 v2. Signed-off-by: Adrian Schmutzler --- .../files/arch/mips/ath79/mach-archer-c7.c | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c index 304a8c7057..d86cc385f5 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c @@ -105,6 +105,34 @@ static struct gpio_led archer_c7_leds_gpio[] __initdata = { }, }; +static struct gpio_led wdr4900_leds_gpio[] __initdata = { + { + .name = "tp-link:blue:qss", + .gpio = ARCHER_C7_GPIO_LED_QSS, + .active_low = 1, + }, + { + .name = "tp-link:blue:system", + .gpio = ARCHER_C7_GPIO_LED_SYSTEM, + .active_low = 1, + }, + { + .name = "tp-link:blue:wlan2g", + .gpio = ARCHER_C7_GPIO_LED_WLAN2G, + .active_low = 1, + }, + { + .name = "tp-link:green:usb1", + .gpio = ARCHER_C7_GPIO_LED_USB1, + .active_low = 1, + }, + { + .name = "tp-link:green:usb2", + .gpio = ARCHER_C7_GPIO_LED_USB2, + .active_low = 1, + }, +}; + static struct gpio_keys_button archer_c7_gpio_keys[] __initdata = { { .desc = "Reset button", @@ -210,8 +238,6 @@ static void __init common_setup(bool pcie_slot) u8 tmpmac2[ETH_ALEN]; ath79_register_m25p80(&archer_c7_flash_data); - ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c7_leds_gpio), - archer_c7_leds_gpio); if (pcie_slot) { ath79_register_wmac(art + ARCHER_C7_WMAC_CALDATA_OFFSET, mac); @@ -263,6 +289,8 @@ static void __init archer_c5_setup(void) ath79_register_gpio_keys_polled(-1, ARCHER_C7_KEYS_POLL_INTERVAL, ARRAY_SIZE(archer_c7_gpio_keys), archer_c7_gpio_keys); + ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c7_leds_gpio), + archer_c7_leds_gpio); common_setup(true); } @@ -274,6 +302,8 @@ static void __init archer_c7_setup(void) ath79_register_gpio_keys_polled(-1, ARCHER_C7_KEYS_POLL_INTERVAL, ARRAY_SIZE(archer_c7_gpio_keys), archer_c7_gpio_keys); + ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c7_leds_gpio), + archer_c7_leds_gpio); common_setup(true); } @@ -285,6 +315,8 @@ static void __init archer_c7_v2_setup(void) ath79_register_gpio_keys_polled(-1, ARCHER_C7_KEYS_POLL_INTERVAL, ARRAY_SIZE(archer_c7_v2_gpio_keys), archer_c7_v2_gpio_keys); + ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c7_leds_gpio), + archer_c7_leds_gpio); common_setup(true); } @@ -296,6 +328,8 @@ static void __init tl_wdr4900_v2_setup(void) ath79_register_gpio_keys_polled(-1, ARCHER_C7_KEYS_POLL_INTERVAL, ARRAY_SIZE(archer_c7_gpio_keys), archer_c7_gpio_keys); + ath79_register_leds_gpio(-1, ARRAY_SIZE(wdr4900_leds_gpio), + wdr4900_leds_gpio); common_setup(false); } From 25127f58b42d794bd47d56ea107f3dfc9cc4816c Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 14 Nov 2019 13:01:39 +0100 Subject: [PATCH 06/12] ar71xx: fix buttons for TP-Link TL-WDR4900 v2 TP-Link TL-WDR4900 v2 only has one combined WPS/Reset button, so don't set up an RFKILL for this device. Signed-off-by: Adrian Schmutzler --- .../ar71xx/files/arch/mips/ath79/mach-archer-c7.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c index d86cc385f5..53c539f85a 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c @@ -169,6 +169,17 @@ static struct gpio_keys_button archer_c7_v2_gpio_keys[] __initdata = { }, }; +static struct gpio_keys_button wdr4900_gpio_keys[] __initdata = { + { + .desc = "Reset button", + .type = EV_KEY, + .code = KEY_WPS_BUTTON, + .debounce_interval = ARCHER_C7_KEYS_DEBOUNCE_INTERVAL, + .gpio = ARCHER_C7_GPIO_BTN_RESET, + .active_low = 1, + }, +}; + static const struct ar8327_led_info archer_c7_leds_ar8327[] = { AR8327_LED_INFO(PHY0_0, HW, "tp-link:green:wan"), AR8327_LED_INFO(PHY1_0, HW, "tp-link:green:lan1"), @@ -326,8 +337,8 @@ MIPS_MACHINE(ATH79_MACH_ARCHER_C7_V2, "ARCHER-C7-V2", "TP-LINK Archer C7", static void __init tl_wdr4900_v2_setup(void) { ath79_register_gpio_keys_polled(-1, ARCHER_C7_KEYS_POLL_INTERVAL, - ARRAY_SIZE(archer_c7_gpio_keys), - archer_c7_gpio_keys); + ARRAY_SIZE(wdr4900_gpio_keys), + wdr4900_gpio_keys); ath79_register_leds_gpio(-1, ARRAY_SIZE(wdr4900_leds_gpio), wdr4900_leds_gpio); common_setup(false); From d2ee9220515d0bbfe74414c84ef55cff640726ba Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Mon, 18 Nov 2019 10:08:18 +0100 Subject: [PATCH 07/12] kernel: bump 4.9 to 4.9.202 Refreshed all patches. Altered patches: - 902-debloat_proc.patch Compile-tested on: none Runtime-tested on: none Signed-off-by: Koen Vandeputte --- include/kernel-version.mk | 4 ++-- ...mm-add-support-for-releasing-multiple-instances-of-a.patch | 2 +- .../backport-4.9/090-net-generalize-napi_complete_done.patch | 4 ++-- target/linux/generic/hack-4.9/207-disable-modorder.patch | 4 ++-- target/linux/generic/hack-4.9/660-fq_codel_defaults.patch | 2 +- target/linux/generic/hack-4.9/721-phy_packets.patch | 4 ++-- target/linux/generic/hack-4.9/902-debloat_proc.patch | 4 ++-- target/linux/generic/pending-4.9/655-increase_skb_pad.patch | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 511d6680b6..c826b45c51 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,11 +6,11 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-4.9 = .199 +LINUX_VERSION-4.9 = .202 LINUX_VERSION-4.14 = .152 LINUX_VERSION-4.19 = .82 -LINUX_KERNEL_HASH-4.9.199 = 0f2531f0908e320ee49954e8d84406db659073b202abc514bcc999ceaa3f7ed5 +LINUX_KERNEL_HASH-4.9.202 = 8108ec1cd10fc40821c84e9f087dba10b1767aad66596f4a36925faef55e4ebf LINUX_KERNEL_HASH-4.14.152 = a9239fd9d341aae07b48a8e7a2afd528fe5cde2617d783454c71e6f3dae2b0aa LINUX_KERNEL_HASH-4.19.82 = 58d96d6c2c5ee8288fe9714891e4037a18f457b008e369e33fc744afc2cb595d diff --git a/target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch b/target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch index d4b60d4559..4656bb1db3 100644 --- a/target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch +++ b/target/linux/generic/backport-4.9/040-mm-add-support-for-releasing-multiple-instances-of-a.patch @@ -41,7 +41,7 @@ Signed-off-by: Linus Torvalds --- a/include/linux/gfp.h +++ b/include/linux/gfp.h -@@ -506,6 +506,8 @@ extern void free_hot_cold_page(struct pa +@@ -529,6 +529,8 @@ extern void free_hot_cold_page(struct pa extern void free_hot_cold_page_list(struct list_head *list, bool cold); struct page_frag_cache; diff --git a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch index 3eae2ef0bd..4fd101db27 100644 --- a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch +++ b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch @@ -137,7 +137,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/can/c_can/c_can.c +++ b/drivers/net/can/c_can/c_can.c -@@ -1070,7 +1070,7 @@ static int c_can_poll(struct napi_struct +@@ -1079,7 +1079,7 @@ static int c_can_poll(struct napi_struct end: if (work_done < quota) { @@ -668,7 +668,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/hisilicon/hip04_eth.c +++ b/drivers/net/ethernet/hisilicon/hip04_eth.c -@@ -559,7 +559,7 @@ refill: +@@ -561,7 +561,7 @@ refill: priv->reg_inten |= RCV_INT; writel_relaxed(priv->reg_inten, priv->base + PPE_INTEN); } diff --git a/target/linux/generic/hack-4.9/207-disable-modorder.patch b/target/linux/generic/hack-4.9/207-disable-modorder.patch index f03c62e025..62f67ac95d 100644 --- a/target/linux/generic/hack-4.9/207-disable-modorder.patch +++ b/target/linux/generic/hack-4.9/207-disable-modorder.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -1228,7 +1228,6 @@ all: modules +@@ -1240,7 +1240,6 @@ all: modules 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 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild -@@ -1258,7 +1257,6 @@ _modinst_: +@@ -1270,7 +1269,6 @@ _modinst_: rm -f $(MODLIB)/build ; \ ln -s $(CURDIR) $(MODLIB)/build ; \ fi diff --git a/target/linux/generic/hack-4.9/660-fq_codel_defaults.patch b/target/linux/generic/hack-4.9/660-fq_codel_defaults.patch index ea461e189d..db77f691e7 100644 --- a/target/linux/generic/hack-4.9/660-fq_codel_defaults.patch +++ b/target/linux/generic/hack-4.9/660-fq_codel_defaults.patch @@ -24,4 +24,4 @@ Signed-off-by: Felix Fietkau +#endif q->drop_batch_size = 64; q->quantum = psched_mtu(qdisc_dev(sch)); - q->perturbation = prandom_u32(); + get_random_bytes(&q->perturbation, sizeof(q->perturbation)); diff --git a/target/linux/generic/hack-4.9/721-phy_packets.patch b/target/linux/generic/hack-4.9/721-phy_packets.patch index d22c873032..feb3569f04 100644 --- a/target/linux/generic/hack-4.9/721-phy_packets.patch +++ b/target/linux/generic/hack-4.9/721-phy_packets.patch @@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau */ --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2339,6 +2339,10 @@ static inline int pskb_trim(struct sk_bu +@@ -2340,6 +2340,10 @@ static inline int pskb_trim(struct sk_bu return (len < skb->len) ? __pskb_trim(skb, len) : 0; } @@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau /** * pskb_trim_unique - remove end from a paged unique (not cloned) buffer * @skb: buffer to alter -@@ -2459,16 +2463,6 @@ static inline struct sk_buff *dev_alloc_ +@@ -2460,16 +2464,6 @@ static inline struct sk_buff *dev_alloc_ } diff --git a/target/linux/generic/hack-4.9/902-debloat_proc.patch b/target/linux/generic/hack-4.9/902-debloat_proc.patch index 8bed139d1b..cb13f0ff02 100644 --- a/target/linux/generic/hack-4.9/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.9/902-debloat_proc.patch @@ -249,10 +249,10 @@ Signed-off-by: Felix Fietkau #endif #ifdef CONFIG_PROC_FS - proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations); -- proc_create("pagetypeinfo", S_IRUGO, NULL, &pagetypeinfo_file_ops); +- proc_create("pagetypeinfo", 0400, NULL, &pagetypeinfo_file_ops); + if (!IS_ENABLED(CONFIG_PROC_STRIPPED)) { + proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations); -+ proc_create("pagetypeinfo", S_IRUGO, NULL, &pagetypeinfo_file_ops); ++ proc_create("pagetypeinfo", 0400, NULL, &pagetypeinfo_file_ops); + proc_create("zoneinfo", S_IRUGO, NULL, &proc_zoneinfo_file_operations); + } proc_create("vmstat", S_IRUGO, NULL, &proc_vmstat_file_operations); diff --git a/target/linux/generic/pending-4.9/655-increase_skb_pad.patch b/target/linux/generic/pending-4.9/655-increase_skb_pad.patch index de96d9a41d..87f9bb6a95 100644 --- a/target/linux/generic/pending-4.9/655-increase_skb_pad.patch +++ b/target/linux/generic/pending-4.9/655-increase_skb_pad.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2303,7 +2303,7 @@ static inline int pskb_network_may_pull( +@@ -2304,7 +2304,7 @@ static inline int pskb_network_may_pull( * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) */ #ifndef NET_SKB_PAD From d6aea46a50d976745df30b550ed76357363e7ca8 Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Mon, 18 Nov 2019 10:17:24 +0100 Subject: [PATCH 08/12] kernel: bump 4.14 to 4.14.154 Refreshed all patches. Altered patches: - 902-debloat_proc.patch - 040-dmaengine-qcom-bam-Process-multiple-pending-descript.patch - 807-usb-support-layerscape.patch - 809-flexcan-support-layerscape.patch - 816-pcie-support-layerscape.patch Remove upstreamed: - 150-MIPS-bmips-mark-exception-vectors-as-char-arrays.patch - 303-spi-nor-enable-4B-opcodes-for-mx66l51235l.patch New symbols: X86_INTEL_MPX X86_INTEL_MEMORY_PROTECTION_KEYS X86_INTEL_TSX_MODE_OFF X86_INTEL_TSX_MODE_ON X86_INTEL_TSX_MODE_AUTO SGL_ALLOC Compile-tested on: cns3xxx, x86_64 Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte --- include/kernel-version.mk | 4 +- ...ark-exception-vectors-as-char-arrays.patch | 93 ------------------- ...les-remove-multihook-chains-and-fami.patch | 8 +- ...les-remove-hooks-from-family-definit.patch | 6 +- ...bles-add-flow-table-netlink-frontend.patch | 8 +- ...les-remove-nhooks-field-from-struct-.patch | 4 +- ...les-remove-flag-field-from-struct-nf.patch | 4 +- ...les-add-single-table-list-for-all-fa.patch | 6 +- ...nf_tables-get-rid-of-pernet-families.patch | 2 +- ...les-get-rid-of-struct-nft_af_info-ab.patch | 4 +- ...les-allocate-handle-and-delete-objec.patch | 12 +-- ...w_table-track-flow-tables-in-nf_flow.patch | 2 +- ...dev-fix-handling-on-interface-rename.patch | 11 +-- target/linux/generic/config-4.14 | 1 + .../hack-4.14/207-disable-modorder.patch | 4 +- .../generic/hack-4.14/721-phy_packets.patch | 4 +- .../generic/hack-4.14/902-debloat_proc.patch | 4 +- .../hack-4.14/904-debloat_dma_buf.patch | 2 +- .../pending-4.14/655-increase_skb_pad.patch | 2 +- ...am-Process-multiple-pending-descript.patch | 47 ++++++---- ...or-enable-4B-opcodes-for-mx25l25635f.patch | 2 +- .../105-mtd-nor-add-mx25l25635f.patch | 2 +- .../202-core-linux-support-layerscape.patch | 2 +- .../301-arch-support-layerscape.patch | 2 +- .../807-usb-support-layerscape.patch | 55 ++++------- .../809-flexcan-support-layerscape.patch | 13 +-- .../816-pcie-support-layerscape.patch | 75 +++++++-------- ...eeprom-ethtool-access-into-netdev-co.patch | 4 +- ...or-enable-4B-opcodes-for-mx66l51235l.patch | 11 --- target/linux/x86/config-4.14 | 5 + 30 files changed, 143 insertions(+), 256 deletions(-) delete mode 100644 target/linux/brcm63xx/patches-4.14/150-MIPS-bmips-mark-exception-vectors-as-char-arrays.patch delete mode 100644 target/linux/ramips/patches-4.14/303-spi-nor-enable-4B-opcodes-for-mx66l51235l.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index c826b45c51..3602da999f 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -7,11 +7,11 @@ ifdef CONFIG_TESTING_KERNEL endif LINUX_VERSION-4.9 = .202 -LINUX_VERSION-4.14 = .152 +LINUX_VERSION-4.14 = .154 LINUX_VERSION-4.19 = .82 LINUX_KERNEL_HASH-4.9.202 = 8108ec1cd10fc40821c84e9f087dba10b1767aad66596f4a36925faef55e4ebf -LINUX_KERNEL_HASH-4.14.152 = a9239fd9d341aae07b48a8e7a2afd528fe5cde2617d783454c71e6f3dae2b0aa +LINUX_KERNEL_HASH-4.14.154 = 86de4a24379a78d67fc08b2e249ccf7b689eb6c37fbe329fc3dfbe8ab4300603 LINUX_KERNEL_HASH-4.19.82 = 58d96d6c2c5ee8288fe9714891e4037a18f457b008e369e33fc744afc2cb595d remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) diff --git a/target/linux/brcm63xx/patches-4.14/150-MIPS-bmips-mark-exception-vectors-as-char-arrays.patch b/target/linux/brcm63xx/patches-4.14/150-MIPS-bmips-mark-exception-vectors-as-char-arrays.patch deleted file mode 100644 index 11d79ea21c..0000000000 --- a/target/linux/brcm63xx/patches-4.14/150-MIPS-bmips-mark-exception-vectors-as-char-arrays.patch +++ /dev/null @@ -1,93 +0,0 @@ -From badf0fc9f7dc72d06a47357123c7d97dc45792f5 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Tue, 15 Oct 2019 23:27:10 +0200 -Subject: [PATCH v2] MIPS: bmips: mark exception vectors as char arrays - -The vectors span more than one byte, so mark them as arrays. - -Fixes the following build error when building when using GCC 8.3: - -In file included from ./include/linux/string.h:19, - from ./include/linux/bitmap.h:9, - from ./include/linux/cpumask.h:12, - from ./arch/mips/include/asm/processor.h:15, - from ./arch/mips/include/asm/thread_info.h:16, - from ./include/linux/thread_info.h:38, - from ./include/asm-generic/preempt.h:5, - from ./arch/mips/include/generated/asm/preempt.h:1, - from ./include/linux/preempt.h:81, - from ./include/linux/spinlock.h:51, - from ./include/linux/mmzone.h:8, - from ./include/linux/bootmem.h:8, - from arch/mips/bcm63xx/prom.c:10: -arch/mips/bcm63xx/prom.c: In function 'prom_init': -./arch/mips/include/asm/string.h:162:11: error: '__builtin_memcpy' forming offset [2, 32] is out of the bounds [0, 1] of object 'bmips_smp_movevec' with type 'char' [-Werror=array-bounds] - __ret = __builtin_memcpy((dst), (src), __len); \ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -arch/mips/bcm63xx/prom.c:97:3: note: in expansion of macro 'memcpy' - memcpy((void *)0xa0000200, &bmips_smp_movevec, 0x20); - ^~~~~~ -In file included from arch/mips/bcm63xx/prom.c:14: -./arch/mips/include/asm/bmips.h:80:13: note: 'bmips_smp_movevec' declared here - extern char bmips_smp_movevec; - -Fixes: 18a1eef92dcd ("MIPS: BMIPS: Introduce bmips.h") -Signed-off-by: Jonas Gorski ---- - -v1 -> v2: - * Actually update the callers as well, to not break the build in a - different way. - - arch/mips/bcm63xx/prom.c | 2 +- - arch/mips/include/asm/bmips.h | 10 +++++----- - arch/mips/kernel/smp-bmips.c | 8 ++++---- - 3 files changed, 10 insertions(+), 10 deletions(-) - ---- a/arch/mips/bcm63xx/prom.c -+++ b/arch/mips/bcm63xx/prom.c -@@ -84,7 +84,7 @@ void __init prom_init(void) - * Here we will start up CPU1 in the background and ask it to - * reconfigure itself then go back to sleep. - */ -- memcpy((void *)0xa0000200, &bmips_smp_movevec, 0x20); -+ memcpy((void *)0xa0000200, bmips_smp_movevec, 0x20); - __sync(); - set_c0_cause(C_SW0); - cpumask_set_cpu(1, &bmips_booted_mask); ---- a/arch/mips/include/asm/bmips.h -+++ b/arch/mips/include/asm/bmips.h -@@ -75,11 +75,11 @@ static inline int register_bmips_smp_ops - #endif - } - --extern char bmips_reset_nmi_vec; --extern char bmips_reset_nmi_vec_end; --extern char bmips_smp_movevec; --extern char bmips_smp_int_vec; --extern char bmips_smp_int_vec_end; -+extern char bmips_reset_nmi_vec[]; -+extern char bmips_reset_nmi_vec_end[]; -+extern char bmips_smp_movevec[]; -+extern char bmips_smp_int_vec[]; -+extern char bmips_smp_int_vec_end[]; - - extern int bmips_smp_enabled; - extern int bmips_cpu_offset; ---- a/arch/mips/kernel/smp-bmips.c -+++ b/arch/mips/kernel/smp-bmips.c -@@ -457,10 +457,10 @@ static void bmips_wr_vec(unsigned long d - - static inline void bmips_nmi_handler_setup(void) - { -- bmips_wr_vec(BMIPS_NMI_RESET_VEC, &bmips_reset_nmi_vec, -- &bmips_reset_nmi_vec_end); -- bmips_wr_vec(BMIPS_WARM_RESTART_VEC, &bmips_smp_int_vec, -- &bmips_smp_int_vec_end); -+ bmips_wr_vec(BMIPS_NMI_RESET_VEC, bmips_reset_nmi_vec, -+ bmips_reset_nmi_vec_end); -+ bmips_wr_vec(BMIPS_WARM_RESTART_VEC, bmips_smp_int_vec, -+ bmips_smp_int_vec_end); - } - - struct reset_vec_info { diff --git a/target/linux/generic/backport-4.14/303-v4.16-netfilter-nf_tables-remove-multihook-chains-and-fami.patch b/target/linux/generic/backport-4.14/303-v4.16-netfilter-nf_tables-remove-multihook-chains-and-fami.patch index a8991e3607..ed33b2fc5f 100644 --- a/target/linux/generic/backport-4.14/303-v4.16-netfilter-nf_tables-remove-multihook-chains-and-fami.patch +++ b/target/linux/generic/backport-4.14/303-v4.16-netfilter-nf_tables-remove-multihook-chains-and-fami.patch @@ -11,7 +11,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h -@@ -897,8 +897,6 @@ struct nft_stats { +@@ -898,8 +898,6 @@ struct nft_stats { struct u64_stats_sync syncp; }; @@ -20,7 +20,7 @@ Signed-off-by: Pablo Neira Ayuso /** * struct nft_base_chain - nf_tables base chain * -@@ -910,7 +908,7 @@ struct nft_stats { +@@ -911,7 +909,7 @@ struct nft_stats { * @dev_name: device name that this base chain is attached to (if any) */ struct nft_base_chain { @@ -29,7 +29,7 @@ Signed-off-by: Pablo Neira Ayuso const struct nf_chain_type *type; u8 policy; u8 flags; -@@ -971,8 +969,6 @@ enum nft_af_flags { +@@ -972,8 +970,6 @@ enum nft_af_flags { * @owner: module owner * @tables: used internally * @flags: family flags @@ -38,7 +38,7 @@ Signed-off-by: Pablo Neira Ayuso * @hooks: hookfn overrides for packet validation */ struct nft_af_info { -@@ -982,9 +978,6 @@ struct nft_af_info { +@@ -983,9 +979,6 @@ struct nft_af_info { struct module *owner; struct list_head tables; u32 flags; diff --git a/target/linux/generic/backport-4.14/312-v4.16-netfilter-nf_tables-remove-hooks-from-family-definit.patch b/target/linux/generic/backport-4.14/312-v4.16-netfilter-nf_tables-remove-hooks-from-family-definit.patch index 8f7d11bd67..a12679db43 100644 --- a/target/linux/generic/backport-4.14/312-v4.16-netfilter-nf_tables-remove-hooks-from-family-definit.patch +++ b/target/linux/generic/backport-4.14/312-v4.16-netfilter-nf_tables-remove-hooks-from-family-definit.patch @@ -10,7 +10,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h -@@ -875,7 +875,7 @@ enum nft_chain_type { +@@ -876,7 +876,7 @@ enum nft_chain_type { * @family: address family * @owner: module owner * @hook_mask: mask of valid hooks @@ -19,7 +19,7 @@ Signed-off-by: Pablo Neira Ayuso */ struct nf_chain_type { const char *name; -@@ -969,7 +969,6 @@ enum nft_af_flags { +@@ -970,7 +970,6 @@ enum nft_af_flags { * @owner: module owner * @tables: used internally * @flags: family flags @@ -27,7 +27,7 @@ Signed-off-by: Pablo Neira Ayuso */ struct nft_af_info { struct list_head list; -@@ -978,7 +977,6 @@ struct nft_af_info { +@@ -979,7 +978,6 @@ struct nft_af_info { struct module *owner; struct list_head tables; u32 flags; diff --git a/target/linux/generic/backport-4.14/321-v4.16-netfilter-nf_tables-add-flow-table-netlink-frontend.patch b/target/linux/generic/backport-4.14/321-v4.16-netfilter-nf_tables-add-flow-table-netlink-frontend.patch index 39aadb507b..3b090a6f19 100644 --- a/target/linux/generic/backport-4.14/321-v4.16-netfilter-nf_tables-add-flow-table-netlink-frontend.patch +++ b/target/linux/generic/backport-4.14/321-v4.16-netfilter-nf_tables-add-flow-table-netlink-frontend.patch @@ -50,7 +50,7 @@ Signed-off-by: Pablo Neira Ayuso #include #define NFT_JUMP_STACK_SIZE 16 -@@ -938,6 +939,7 @@ unsigned int nft_do_chain(struct nft_pkt +@@ -939,6 +940,7 @@ unsigned int nft_do_chain(struct nft_pkt * @chains: chains in the table * @sets: sets in the table * @objects: stateful objects in the table @@ -58,7 +58,7 @@ Signed-off-by: Pablo Neira Ayuso * @hgenerator: handle generator state * @use: number of chain references to this table * @flags: table flag (see enum nft_table_flags) -@@ -949,6 +951,7 @@ struct nft_table { +@@ -950,6 +952,7 @@ struct nft_table { struct list_head chains; struct list_head sets; struct list_head objects; @@ -66,7 +66,7 @@ Signed-off-by: Pablo Neira Ayuso u64 hgenerator; u32 use; u16 flags:14, -@@ -1080,6 +1083,44 @@ int nft_register_obj(struct nft_object_t +@@ -1081,6 +1084,44 @@ int nft_register_obj(struct nft_object_t void nft_unregister_obj(struct nft_object_type *obj_type); /** @@ -111,7 +111,7 @@ Signed-off-by: Pablo Neira Ayuso * struct nft_traceinfo - nft tracing information and state * * @pkt: pktinfo currently processed -@@ -1315,4 +1356,11 @@ struct nft_trans_obj { +@@ -1316,4 +1357,11 @@ struct nft_trans_obj { #define nft_trans_obj(trans) \ (((struct nft_trans_obj *)trans->data)->obj) diff --git a/target/linux/generic/backport-4.14/327-v4.16-netfilter-nf_tables-remove-nhooks-field-from-struct-.patch b/target/linux/generic/backport-4.14/327-v4.16-netfilter-nf_tables-remove-nhooks-field-from-struct-.patch index 632acc8a79..ec14929992 100644 --- a/target/linux/generic/backport-4.14/327-v4.16-netfilter-nf_tables-remove-nhooks-field-from-struct-.patch +++ b/target/linux/generic/backport-4.14/327-v4.16-netfilter-nf_tables-remove-nhooks-field-from-struct-.patch @@ -14,7 +14,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h -@@ -968,7 +968,6 @@ enum nft_af_flags { +@@ -969,7 +969,6 @@ enum nft_af_flags { * * @list: used internally * @family: address family @@ -22,7 +22,7 @@ Signed-off-by: Pablo Neira Ayuso * @owner: module owner * @tables: used internally * @flags: family flags -@@ -976,7 +975,6 @@ enum nft_af_flags { +@@ -977,7 +976,6 @@ enum nft_af_flags { struct nft_af_info { struct list_head list; int family; diff --git a/target/linux/generic/backport-4.14/330-v4.16-netfilter-nf_tables-remove-flag-field-from-struct-nf.patch b/target/linux/generic/backport-4.14/330-v4.16-netfilter-nf_tables-remove-flag-field-from-struct-nf.patch index 32d5d2b4ef..8f82effa79 100644 --- a/target/linux/generic/backport-4.14/330-v4.16-netfilter-nf_tables-remove-flag-field-from-struct-nf.patch +++ b/target/linux/generic/backport-4.14/330-v4.16-netfilter-nf_tables-remove-flag-field-from-struct-nf.patch @@ -10,7 +10,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h -@@ -959,10 +959,6 @@ struct nft_table { +@@ -960,10 +960,6 @@ struct nft_table { char *name; }; @@ -21,7 +21,7 @@ Signed-off-by: Pablo Neira Ayuso /** * struct nft_af_info - nf_tables address family info * -@@ -970,14 +966,12 @@ enum nft_af_flags { +@@ -971,14 +967,12 @@ enum nft_af_flags { * @family: address family * @owner: module owner * @tables: used internally diff --git a/target/linux/generic/backport-4.14/335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch b/target/linux/generic/backport-4.14/335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch index 6f85402c5d..a577e621bd 100644 --- a/target/linux/generic/backport-4.14/335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch +++ b/target/linux/generic/backport-4.14/335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch @@ -42,7 +42,7 @@ Signed-off-by: Pablo Neira Ayuso bool report; }; -@@ -944,6 +944,7 @@ unsigned int nft_do_chain(struct nft_pkt +@@ -945,6 +945,7 @@ unsigned int nft_do_chain(struct nft_pkt * @use: number of chain references to this table * @flags: table flag (see enum nft_table_flags) * @genmask: generation mask @@ -50,7 +50,7 @@ Signed-off-by: Pablo Neira Ayuso * @name: name of the table */ struct nft_table { -@@ -956,6 +957,7 @@ struct nft_table { +@@ -957,6 +958,7 @@ struct nft_table { u32 use; u16 flags:14, genmask:2; @@ -58,7 +58,7 @@ Signed-off-by: Pablo Neira Ayuso char *name; }; -@@ -965,13 +967,11 @@ struct nft_table { +@@ -966,13 +968,11 @@ struct nft_table { * @list: used internally * @family: address family * @owner: module owner diff --git a/target/linux/generic/backport-4.14/337-v4.16-netfilter-nf_tables-get-rid-of-pernet-families.patch b/target/linux/generic/backport-4.14/337-v4.16-netfilter-nf_tables-get-rid-of-pernet-families.patch index 9e1783ebd6..da9d4ffd03 100644 --- a/target/linux/generic/backport-4.14/337-v4.16-netfilter-nf_tables-get-rid-of-pernet-families.patch +++ b/target/linux/generic/backport-4.14/337-v4.16-netfilter-nf_tables-get-rid-of-pernet-families.patch @@ -14,7 +14,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h -@@ -974,8 +974,8 @@ struct nft_af_info { +@@ -975,8 +975,8 @@ struct nft_af_info { struct module *owner; }; diff --git a/target/linux/generic/backport-4.14/338-v4.16-netfilter-nf_tables-get-rid-of-struct-nft_af_info-ab.patch b/target/linux/generic/backport-4.14/338-v4.16-netfilter-nf_tables-get-rid-of-struct-nft_af_info-ab.patch index a2a9d478dd..ed159d5208 100644 --- a/target/linux/generic/backport-4.14/338-v4.16-netfilter-nf_tables-get-rid-of-struct-nft_af_info-ab.patch +++ b/target/linux/generic/backport-4.14/338-v4.16-netfilter-nf_tables-get-rid-of-struct-nft_af_info-ab.patch @@ -11,7 +11,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h -@@ -955,28 +955,12 @@ struct nft_table { +@@ -956,28 +956,12 @@ struct nft_table { struct list_head flowtables; u64 hgenerator; u32 use; @@ -42,7 +42,7 @@ Signed-off-by: Pablo Neira Ayuso int nft_register_chain_type(const struct nf_chain_type *); void nft_unregister_chain_type(const struct nf_chain_type *); -@@ -1144,9 +1128,6 @@ void nft_trace_notify(struct nft_tracein +@@ -1145,9 +1129,6 @@ void nft_trace_notify(struct nft_tracein #define nft_dereference(p) \ nfnl_dereference(p, NFNL_SUBSYS_NFTABLES) diff --git a/target/linux/generic/backport-4.14/344-v4.16-netfilter-nf_tables-allocate-handle-and-delete-objec.patch b/target/linux/generic/backport-4.14/344-v4.16-netfilter-nf_tables-allocate-handle-and-delete-objec.patch index 6daa6cbf7e..3356781cc6 100644 --- a/target/linux/generic/backport-4.14/344-v4.16-netfilter-nf_tables-allocate-handle-and-delete-objec.patch +++ b/target/linux/generic/backport-4.14/344-v4.16-netfilter-nf_tables-allocate-handle-and-delete-objec.patch @@ -28,7 +28,7 @@ Signed-off-by: Pablo Neira Ayuso u32 ktype; u32 dtype; u32 objtype; -@@ -941,6 +943,7 @@ unsigned int nft_do_chain(struct nft_pkt +@@ -942,6 +944,7 @@ unsigned int nft_do_chain(struct nft_pkt * @objects: stateful objects in the table * @flowtables: flow tables in the table * @hgenerator: handle generator state @@ -36,7 +36,7 @@ Signed-off-by: Pablo Neira Ayuso * @use: number of chain references to this table * @flags: table flag (see enum nft_table_flags) * @genmask: generation mask -@@ -954,6 +957,7 @@ struct nft_table { +@@ -955,6 +958,7 @@ struct nft_table { struct list_head objects; struct list_head flowtables; u64 hgenerator; @@ -44,7 +44,7 @@ Signed-off-by: Pablo Neira Ayuso u32 use; u16 family:6, flags:8, -@@ -978,9 +982,9 @@ int nft_verdict_dump(struct sk_buff *skb +@@ -979,9 +983,9 @@ int nft_verdict_dump(struct sk_buff *skb * @name: name of this stateful object * @genmask: generation mask * @use: number of references to this stateful object @@ -56,7 +56,7 @@ Signed-off-by: Pablo Neira Ayuso */ struct nft_object { struct list_head list; -@@ -988,6 +992,7 @@ struct nft_object { +@@ -989,6 +993,7 @@ struct nft_object { struct nft_table *table; u32 genmask:2, use:30; @@ -64,7 +64,7 @@ Signed-off-by: Pablo Neira Ayuso /* runtime data below here */ const struct nft_object_ops *ops ____cacheline_aligned; unsigned char data[] -@@ -1069,6 +1074,7 @@ void nft_unregister_obj(struct nft_objec +@@ -1070,6 +1075,7 @@ void nft_unregister_obj(struct nft_objec * @ops_len: number of hooks in array * @genmask: generation mask * @use: number of references to this flow table @@ -72,7 +72,7 @@ Signed-off-by: Pablo Neira Ayuso * @data: rhashtable and garbage collector * @ops: array of hooks */ -@@ -1081,6 +1087,7 @@ struct nft_flowtable { +@@ -1082,6 +1088,7 @@ struct nft_flowtable { int ops_len; u32 genmask:2, use:30; diff --git a/target/linux/generic/backport-4.14/359-v4.18-netfilter-nf_flow_table-track-flow-tables-in-nf_flow.patch b/target/linux/generic/backport-4.14/359-v4.18-netfilter-nf_flow_table-track-flow-tables-in-nf_flow.patch index 1ab1342b5b..e39daf8927 100644 --- a/target/linux/generic/backport-4.14/359-v4.18-netfilter-nf_flow_table-track-flow-tables-in-nf_flow.patch +++ b/target/linux/generic/backport-4.14/359-v4.18-netfilter-nf_flow_table-track-flow-tables-in-nf_flow.patch @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau struct delayed_work gc_work; --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h -@@ -1096,9 +1096,6 @@ struct nft_flowtable { +@@ -1097,9 +1097,6 @@ struct nft_flowtable { struct nft_flowtable *nf_tables_flowtable_lookup(const struct nft_table *table, const struct nlattr *nla, u8 genmask); diff --git a/target/linux/generic/backport-4.14/402-leds-trigger-netdev-fix-handling-on-interface-rename.patch b/target/linux/generic/backport-4.14/402-leds-trigger-netdev-fix-handling-on-interface-rename.patch index baae3b7cb4..ae7d6e8bcb 100644 --- a/target/linux/generic/backport-4.14/402-leds-trigger-netdev-fix-handling-on-interface-rename.patch +++ b/target/linux/generic/backport-4.14/402-leds-trigger-netdev-fix-handling-on-interface-rename.patch @@ -23,12 +23,10 @@ Signed-off-by: Martin Schiller drivers/leds/trigger/ledtrig-netdev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -diff --git a/drivers/leds/trigger/ledtrig-netdev.c b/drivers/leds/trigger/ledtrig-netdev.c -index 136f86a1627d..d5e774d83021 100644 --- a/drivers/leds/trigger/ledtrig-netdev.c +++ b/drivers/leds/trigger/ledtrig-netdev.c -@@ -302,10 +302,12 @@ static int netdev_trig_notify(struct notifier_block *nb, - container_of(nb, struct led_netdev_data, notifier); +@@ -299,10 +299,12 @@ static int netdev_trig_notify(struct not + notifier); if (evt != NETDEV_UP && evt != NETDEV_DOWN && evt != NETDEV_CHANGE - && evt != NETDEV_REGISTER && evt != NETDEV_UNREGISTER) @@ -41,7 +39,7 @@ index 136f86a1627d..d5e774d83021 100644 (evt == NETDEV_REGISTER && !strcmp(dev->name, trigger_data->device_name)))) return NOTIFY_DONE; -@@ -315,6 +317,7 @@ static int netdev_trig_notify(struct notifier_block *nb, +@@ -312,6 +314,7 @@ static int netdev_trig_notify(struct not clear_bit(NETDEV_LED_MODE_LINKUP, &trigger_data->mode); switch (evt) { @@ -49,6 +47,3 @@ index 136f86a1627d..d5e774d83021 100644 case NETDEV_REGISTER: if (trigger_data->net_dev) dev_put(trigger_data->net_dev); --- -2.20.1 - diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14 index ad03fd8994..8455249e96 100644 --- a/target/linux/generic/config-4.14 +++ b/target/linux/generic/config-4.14 @@ -4336,6 +4336,7 @@ CONFIG_SERIAL_EARLYCON=y # CONFIG_SGI_IP28 is not set # CONFIG_SGI_IP32 is not set # CONFIG_SGI_PARTITION is not set +# CONFIG_SGL_ALLOC is not set # CONFIG_SG_POOL is not set # CONFIG_SG_SPLIT is not set CONFIG_SHMEM=y 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 e67393aa5f..35834291cc 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 -@@ -1243,7 +1243,6 @@ all: modules +@@ -1252,7 +1252,6 @@ all: modules 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 -@@ -1272,7 +1271,6 @@ _modinst_: +@@ -1281,7 +1280,6 @@ _modinst_: rm -f $(MODLIB)/build ; \ ln -s $(CURDIR) $(MODLIB)/build ; \ fi 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 6cbb25429f..9e1c57d92d 100644 --- a/target/linux/generic/hack-4.14/721-phy_packets.patch +++ b/target/linux/generic/hack-4.14/721-phy_packets.patch @@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau */ --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2514,6 +2514,10 @@ static inline int pskb_trim(struct sk_bu +@@ -2530,6 +2530,10 @@ static inline int pskb_trim(struct sk_bu return (len < skb->len) ? __pskb_trim(skb, len) : 0; } @@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau /** * pskb_trim_unique - remove end from a paged unique (not cloned) buffer * @skb: buffer to alter -@@ -2645,16 +2649,6 @@ static inline struct sk_buff *dev_alloc_ +@@ -2661,16 +2665,6 @@ static inline struct sk_buff *dev_alloc_ } 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 6a2e6175a7..a776997faf 100644 --- a/target/linux/generic/hack-4.14/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.14/902-debloat_proc.patch @@ -248,10 +248,10 @@ Signed-off-by: Felix Fietkau #endif #ifdef CONFIG_PROC_FS - proc_create("buddyinfo", 0444, NULL, &buddyinfo_file_operations); -- proc_create("pagetypeinfo", 0444, NULL, &pagetypeinfo_file_operations); +- proc_create("pagetypeinfo", 0400, NULL, &pagetypeinfo_file_operations); + if (!IS_ENABLED(CONFIG_PROC_STRIPPED)) { + proc_create("buddyinfo", 0444, NULL, &buddyinfo_file_operations); -+ proc_create("pagetypeinfo", 0444, NULL, &pagetypeinfo_file_operations); ++ proc_create("pagetypeinfo", 0400, NULL, &pagetypeinfo_file_operations); + proc_create("zoneinfo", 0444, NULL, &zoneinfo_file_operations); + } proc_create("vmstat", 0444, NULL, &vmstat_file_operations); diff --git a/target/linux/generic/hack-4.14/904-debloat_dma_buf.patch b/target/linux/generic/hack-4.14/904-debloat_dma_buf.patch index 195507996f..9fd8894225 100644 --- a/target/linux/generic/hack-4.14/904-debloat_dma_buf.patch +++ b/target/linux/generic/hack-4.14/904-debloat_dma_buf.patch @@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau +MODULE_LICENSE("GPL"); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2164,6 +2164,7 @@ int wake_up_state(struct task_struct *p, +@@ -2165,6 +2165,7 @@ int wake_up_state(struct task_struct *p, { return try_to_wake_up(p, state, 0); } diff --git a/target/linux/generic/pending-4.14/655-increase_skb_pad.patch b/target/linux/generic/pending-4.14/655-increase_skb_pad.patch index f692dd3862..4bb1c58bbc 100644 --- a/target/linux/generic/pending-4.14/655-increase_skb_pad.patch +++ b/target/linux/generic/pending-4.14/655-increase_skb_pad.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2478,7 +2478,7 @@ static inline int pskb_network_may_pull( +@@ -2494,7 +2494,7 @@ static inline int pskb_network_may_pull( * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) */ #ifndef NET_SKB_PAD diff --git a/target/linux/ipq40xx/patches-4.14/040-dmaengine-qcom-bam-Process-multiple-pending-descript.patch b/target/linux/ipq40xx/patches-4.14/040-dmaengine-qcom-bam-Process-multiple-pending-descript.patch index 881d08c7e5..1fe4eb036f 100644 --- a/target/linux/ipq40xx/patches-4.14/040-dmaengine-qcom-bam-Process-multiple-pending-descript.patch +++ b/target/linux/ipq40xx/patches-4.14/040-dmaengine-qcom-bam-Process-multiple-pending-descript.patch @@ -132,7 +132,7 @@ Signed-off-by: Vinod Koul async_desc->num_desc = num_alloc; async_desc->curr_desc = async_desc->desc; -@@ -685,14 +688,16 @@ err_out: +@@ -685,29 +688,16 @@ err_out: static int bam_dma_terminate_all(struct dma_chan *chan) { struct bam_chan *bchan = to_bam_chan(chan); @@ -142,17 +142,32 @@ Signed-off-by: Vinod Koul /* remove all transactions, including active transaction */ spin_lock_irqsave(&bchan->vc.lock, flag); +- /* +- * If we have transactions queued, then some might be committed to the +- * hardware in the desc fifo. The only way to reset the desc fifo is +- * to do a hardware reset (either by pipe or the entire block). +- * bam_chan_init_hw() will trigger a pipe reset, and also reinit the +- * pipe. If the pipe is left disabled (default state after pipe reset) +- * and is accessed by a connected hardware engine, a fatal error in +- * the BAM will occur. There is a small window where this could happen +- * with bam_chan_init_hw(), but it is assumed that the caller has +- * stopped activity on any attached hardware engine. Make sure to do +- * this first so that the BAM hardware doesn't cause memory corruption +- * by accessing freed resources. +- */ - if (bchan->curr_txd) { +- bam_chan_init_hw(bchan, bchan->curr_txd->dir); - list_add(&bchan->curr_txd->vd.node, &bchan->vc.desc_issued); - bchan->curr_txd = NULL; +- } + list_for_each_entry_safe(async_desc, tmp, -+ &bchan->desc_list, desc_node) { ++ &bchan->desc_list, desc_node) { + list_add(&async_desc->vd.node, &bchan->vc.desc_issued); + list_del(&async_desc->desc_node); - } vchan_get_all_descriptors(&bchan->vc, &head); -@@ -764,9 +769,9 @@ static int bam_resume(struct dma_chan *c + spin_unlock_irqrestore(&bchan->vc.lock, flag); +@@ -778,9 +768,9 @@ static int bam_resume(struct dma_chan *c */ static u32 process_channel_irqs(struct bam_device *bdev) { @@ -164,7 +179,7 @@ Signed-off-by: Vinod Koul srcs = readl_relaxed(bam_addr(bdev, 0, BAM_IRQ_SRCS_EE)); -@@ -786,27 +791,40 @@ static u32 process_channel_irqs(struct b +@@ -800,27 +790,40 @@ static u32 process_channel_irqs(struct b writel_relaxed(pipe_stts, bam_addr(bdev, i, BAM_P_IRQ_CLR)); spin_lock_irqsave(&bchan->vc.lock, flags); @@ -214,7 +229,7 @@ Signed-off-by: Vinod Koul } spin_unlock_irqrestore(&bchan->vc.lock, flags); -@@ -868,6 +886,7 @@ static enum dma_status bam_tx_status(str +@@ -882,6 +885,7 @@ static enum dma_status bam_tx_status(str struct dma_tx_state *txstate) { struct bam_chan *bchan = to_bam_chan(chan); @@ -222,7 +237,7 @@ Signed-off-by: Vinod Koul struct virt_dma_desc *vd; int ret; size_t residue = 0; -@@ -883,11 +902,17 @@ static enum dma_status bam_tx_status(str +@@ -897,11 +901,17 @@ static enum dma_status bam_tx_status(str spin_lock_irqsave(&bchan->vc.lock, flags); vd = vchan_find_desc(&bchan->vc, cookie); @@ -244,7 +259,7 @@ Signed-off-by: Vinod Koul spin_unlock_irqrestore(&bchan->vc.lock, flags); -@@ -928,63 +953,86 @@ static void bam_start_dma(struct bam_cha +@@ -942,63 +952,86 @@ static void bam_start_dma(struct bam_cha { struct virt_dma_desc *vd = vchan_next_desc(&bchan->vc); struct bam_device *bdev = bchan->bdev; @@ -311,19 +326,19 @@ Signed-off-by: Vinod Koul + async_desc->xfer_len = avail; + else + async_desc->xfer_len = async_desc->num_desc; -+ + +- if (bchan->tail + async_desc->xfer_len > MAX_DESCRIPTORS) { +- u32 partial = MAX_DESCRIPTORS - bchan->tail; + /* set any special flags on the last descriptor */ + if (async_desc->num_desc == async_desc->xfer_len) + desc[async_desc->xfer_len - 1].flags |= + cpu_to_le16(async_desc->flags); -- if (bchan->tail + async_desc->xfer_len > MAX_DESCRIPTORS) { -- u32 partial = MAX_DESCRIPTORS - bchan->tail; -+ vd = vchan_next_desc(&bchan->vc); - - memcpy(&fifo[bchan->tail], desc, - partial * sizeof(struct bam_desc_hw)); - memcpy(fifo, &desc[partial], (async_desc->xfer_len - partial) * ++ vd = vchan_next_desc(&bchan->vc); ++ + dmaengine_desc_get_callback(&async_desc->vd.tx, &cb); + + /* @@ -367,7 +382,7 @@ Signed-off-by: Vinod Koul /* ensure descriptor writes and dma start not reordered */ wmb(); -@@ -1013,7 +1061,7 @@ static void dma_tasklet(unsigned long da +@@ -1027,7 +1060,7 @@ static void dma_tasklet(unsigned long da bchan = &bdev->channels[i]; spin_lock_irqsave(&bchan->vc.lock, flags); @@ -376,7 +391,7 @@ Signed-off-by: Vinod Koul bam_start_dma(bchan); spin_unlock_irqrestore(&bchan->vc.lock, flags); } -@@ -1034,7 +1082,7 @@ static void bam_issue_pending(struct dma +@@ -1048,7 +1081,7 @@ static void bam_issue_pending(struct dma spin_lock_irqsave(&bchan->vc.lock, flags); /* if work pending and idle, start a transaction */ @@ -385,7 +400,7 @@ Signed-off-by: Vinod Koul bam_start_dma(bchan); spin_unlock_irqrestore(&bchan->vc.lock, flags); -@@ -1138,6 +1186,7 @@ static void bam_channel_init(struct bam_ +@@ -1152,6 +1185,7 @@ static void bam_channel_init(struct bam_ vchan_init(&bchan->vc, &bdev->common); bchan->vc.desc_free = bam_dma_free_desc; diff --git a/target/linux/ipq40xx/patches-4.14/303-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch b/target/linux/ipq40xx/patches-4.14/303-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch index 28a04fae6d..01de239814 100644 --- a/target/linux/ipq40xx/patches-4.14/303-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch +++ b/target/linux/ipq40xx/patches-4.14/303-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch @@ -7,7 +7,7 @@ + { "mx25l25635f", INFO(0xc22019, 0, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) }, { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) }, - { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, @@ -1201,11 +1202,12 @@ static const struct flash_info spi_nor_i { }, }; diff --git a/target/linux/ipq806x/patches-4.14/105-mtd-nor-add-mx25l25635f.patch b/target/linux/ipq806x/patches-4.14/105-mtd-nor-add-mx25l25635f.patch index 1c903bbc3b..0986d99074 100644 --- a/target/linux/ipq806x/patches-4.14/105-mtd-nor-add-mx25l25635f.patch +++ b/target/linux/ipq806x/patches-4.14/105-mtd-nor-add-mx25l25635f.patch @@ -19,4 +19,4 @@ the ubi volume created by the other. + { "mx25l25635f", INFO(0xc22019, 0, 64 * 1024, 512, SECT_4K) }, { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) }, { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) }, - { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, diff --git a/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch b/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch index 512d323ac6..49e528402c 100644 --- a/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch @@ -580,7 +580,7 @@ Signed-off-by: Yangbo Lu void __kfree_skb(struct sk_buff *skb); extern struct kmem_cache *skbuff_head_cache; -@@ -3297,6 +3298,7 @@ static inline void skb_free_datagram_loc +@@ -3313,6 +3314,7 @@ static inline void skb_free_datagram_loc } int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags); int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len); diff --git a/target/linux/layerscape/patches-4.14/301-arch-support-layerscape.patch b/target/linux/layerscape/patches-4.14/301-arch-support-layerscape.patch index a2766a46b2..e8b730f95c 100644 --- a/target/linux/layerscape/patches-4.14/301-arch-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/301-arch-support-layerscape.patch @@ -285,7 +285,7 @@ Signed-off-by: Zhao Qiang #define PAGE_NONE __pgprot(((_PAGE_DEFAULT) & ~PTE_VALID) | PTE_PROT_NONE | PTE_RDONLY | PTE_NG | PTE_PXN | PTE_UXN) --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h -@@ -377,6 +377,11 @@ static inline int pmd_protnone(pmd_t pmd +@@ -360,6 +360,11 @@ static inline int pmd_protnone(pmd_t pmd __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN) #define pgprot_writecombine(prot) \ __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN) diff --git a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch index 70bc3b32aa..34a86b56bb 100644 --- a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch @@ -217,7 +217,7 @@ Signed-off-by: Zhao Chenhui } static void __dwc3_set_mode(struct work_struct *work) -@@ -766,6 +810,96 @@ static void dwc3_core_setup_global_contr +@@ -765,6 +809,96 @@ static void dwc3_core_setup_global_contr static int dwc3_core_get_phy(struct dwc3 *dwc); static int dwc3_core_ulpi_init(struct dwc3 *dwc); @@ -314,7 +314,7 @@ Signed-off-by: Zhao Chenhui /** * dwc3_core_init - Low-level initialization of DWC3 Core * @dwc: Pointer to our controller context structure -@@ -828,6 +962,8 @@ static int dwc3_core_init(struct dwc3 *d +@@ -827,6 +961,8 @@ static int dwc3_core_init(struct dwc3 *d /* Adjust Frame Length */ dwc3_frame_length_adjustment(dwc); @@ -323,7 +323,7 @@ Signed-off-by: Zhao Chenhui usb_phy_set_suspend(dwc->usb2_phy, 0); usb_phy_set_suspend(dwc->usb3_phy, 0); ret = phy_power_on(dwc->usb2_generic_phy); -@@ -871,6 +1007,22 @@ static int dwc3_core_init(struct dwc3 *d +@@ -870,6 +1006,22 @@ static int dwc3_core_init(struct dwc3 *d dwc3_writel(dwc->regs, DWC3_GUCTL1, reg); } @@ -346,7 +346,7 @@ Signed-off-by: Zhao Chenhui return 0; err4: -@@ -1074,6 +1226,8 @@ static void dwc3_get_properties(struct d +@@ -1073,6 +1225,8 @@ static void dwc3_get_properties(struct d &hird_threshold); dwc->usb3_lpm_capable = device_property_read_bool(dev, "snps,usb3_lpm_capable"); @@ -355,7 +355,7 @@ Signed-off-by: Zhao Chenhui dwc->disable_scramble_quirk = device_property_read_bool(dev, "snps,disable_scramble_quirk"); -@@ -1106,8 +1260,16 @@ static void dwc3_get_properties(struct d +@@ -1105,8 +1259,16 @@ static void dwc3_get_properties(struct d dwc->dis_tx_ipgap_linecheck_quirk = device_property_read_bool(dev, "snps,dis-tx-ipgap-linecheck-quirk"); @@ -372,9 +372,9 @@ Signed-off-by: Zhao Chenhui device_property_read_u8(dev, "snps,tx_de_emphasis", &tx_de_emphasis); device_property_read_string(dev, "snps,hsphy_interface", -@@ -1115,6 +1277,9 @@ static void dwc3_get_properties(struct d - device_property_read_u32(dev, "snps,quirk-frame-length-adjustment", - &dwc->fladj); +@@ -1117,6 +1279,9 @@ static void dwc3_get_properties(struct d + dwc->dis_metastability_quirk = device_property_read_bool(dev, + "snps,dis_metastability_quirk"); + dwc->host_vbus_glitches = device_property_read_bool(dev, + "snps,host-vbus-glitches"); @@ -382,7 +382,7 @@ Signed-off-by: Zhao Chenhui dwc->lpm_nyet_threshold = lpm_nyet_threshold; dwc->tx_de_emphasis = tx_de_emphasis; -@@ -1365,12 +1530,14 @@ static int dwc3_resume_common(struct dwc +@@ -1367,12 +1532,14 @@ static int dwc3_resume_common(struct dwc switch (dwc->dr_mode) { case USB_DR_MODE_PERIPHERAL: @@ -473,21 +473,7 @@ Signed-off-by: Zhao Chenhui * @disable_scramble_quirk: set if we enable the disable scramble quirk * @u2exit_lfps_quirk: set if we enable u2exit lfps quirk * @u2ss_inp3_quirk: set if we enable P3 OK for U2/SS Inactive quirk -@@ -869,6 +908,13 @@ struct dwc3_scratchpad_array { - * 1 - -3.5dB de-emphasis - * 2 - No de-emphasis - * 3 - Reserved -+ * @disable_devinit_u1u2_quirk: disable device-initiated U1/U2 request. -+ * @quirk_reverse_in_out: prevent tx fifo reverse the data direction -+ * @quirk_stop_transfer_in_block: prevent block transmission from being -+ * interrupted -+ * @quirk_stop_ep_in_u1: replace stop commad with disable slot command -+ * @host-vbus-glitches: set to avoid vbus glitch during -+ * xhci reset. - * @imod_interval: set the interrupt moderation interval in 250ns - * increments or 0 to disable. - */ -@@ -921,6 +967,12 @@ struct dwc3 { +@@ -922,6 +961,12 @@ struct dwc3 { enum usb_phy_interface hsphy_mode; u32 fladj; @@ -500,7 +486,7 @@ Signed-off-by: Zhao Chenhui u32 irq_gadget; u32 nr_scratch; u32 u1u2; -@@ -1005,6 +1057,7 @@ struct dwc3 { +@@ -1006,6 +1051,7 @@ struct dwc3 { unsigned setup_packet_pending:1; unsigned three_stage_setup:1; unsigned usb3_lpm_capable:1; @@ -508,7 +494,7 @@ Signed-off-by: Zhao Chenhui unsigned disable_scramble_quirk:1; unsigned u2exit_lfps_quirk:1; -@@ -1024,6 +1077,11 @@ struct dwc3 { +@@ -1025,6 +1071,11 @@ struct dwc3 { unsigned tx_de_emphasis_quirk:1; unsigned tx_de_emphasis:2; @@ -518,8 +504,8 @@ Signed-off-by: Zhao Chenhui + unsigned quirk_stop_ep_in_u1:1; + unsigned host_vbus_glitches:1; - u16 imod_interval; - }; + unsigned dis_metastability_quirk:1; + --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -391,7 +391,7 @@ static int dwc3_ep0_handle_u1(struct dwc @@ -542,7 +528,7 @@ Signed-off-by: Zhao Chenhui reg &= ~DWC3_DCTL_INITU2ENA; --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c -@@ -3210,6 +3210,7 @@ int dwc3_gadget_init(struct dwc3 *dwc) +@@ -3211,6 +3211,7 @@ int dwc3_gadget_init(struct dwc3 *dwc) { int ret; int irq; @@ -550,7 +536,7 @@ Signed-off-by: Zhao Chenhui irq = dwc3_gadget_get_irq(dwc); if (irq < 0) { -@@ -3288,6 +3289,12 @@ int dwc3_gadget_init(struct dwc3 *dwc) +@@ -3290,6 +3291,12 @@ int dwc3_gadget_init(struct dwc3 *dwc) dwc3_gadget_set_speed(&dwc->gadget, dwc->maximum_speed); @@ -754,15 +740,6 @@ Signed-off-by: Zhao Chenhui /* DR has been stopped in usb_gadget_unregister_driver() */ remove_proc_file(); -@@ -2569,7 +2579,7 @@ static int fsl_udc_remove(struct platfor - dma_pool_destroy(udc_controller->td_pool); - free_irq(udc_controller->irq, udc_controller); - iounmap(dr_regs); -- if (pdata->operating_mode == FSL_USB2_DR_DEVICE) -+ if (res && (pdata->operating_mode == FSL_USB2_DR_DEVICE)) - release_mem_region(res->start, resource_size(res)); - - /* free udc --wait for the release() finished */ --- a/drivers/usb/gadget/udc/fsl_usb2_udc.h +++ b/drivers/usb/gadget/udc/fsl_usb2_udc.h @@ -20,6 +20,10 @@ diff --git a/target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch b/target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch index a52b8b5167..75a6d97adb 100644 --- a/target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch @@ -470,7 +470,7 @@ Signed-off-by: Biwen Li /* On Vybrid, disable memory error detection interrupts * and freeze mode. -@@ -1011,16 +1028,16 @@ static int flexcan_chip_start(struct net +@@ -1011,17 +1028,17 @@ static int flexcan_chip_start(struct net * and Correction of Memory Errors" to write to * MECR register */ @@ -485,6 +485,7 @@ Signed-off-by: Biwen Li reg_mecr &= ~FLEXCAN_MECR_ECRWRDIS; - flexcan_write(reg_mecr, ®s->mecr); + priv->write(reg_mecr, ®s->mecr); + reg_mecr |= FLEXCAN_MECR_ECCDIS; reg_mecr &= ~(FLEXCAN_MECR_NCEFAFRZ | FLEXCAN_MECR_HANCEI_MSK | FLEXCAN_MECR_FANCEI_MSK); - flexcan_write(reg_mecr, ®s->mecr); @@ -492,7 +493,7 @@ Signed-off-by: Biwen Li } err = flexcan_transceiver_enable(priv); -@@ -1036,14 +1053,14 @@ static int flexcan_chip_start(struct net +@@ -1037,14 +1054,14 @@ static int flexcan_chip_start(struct net /* enable interrupts atomically */ disable_irq(dev->irq); @@ -511,7 +512,7 @@ Signed-off-by: Biwen Li return 0; -@@ -1068,10 +1085,10 @@ static void flexcan_chip_stop(struct net +@@ -1069,10 +1086,10 @@ static void flexcan_chip_stop(struct net flexcan_chip_disable(priv); /* Disable all interrupts */ @@ -526,7 +527,7 @@ Signed-off-by: Biwen Li flexcan_transceiver_disable(priv); priv->can.state = CAN_STATE_STOPPED; -@@ -1186,26 +1203,26 @@ static int register_flexcandev(struct ne +@@ -1187,26 +1204,26 @@ static int register_flexcandev(struct ne err = flexcan_chip_disable(priv); if (err) goto out_disable_per; @@ -558,7 +559,7 @@ Signed-off-by: Biwen Li if (!(reg & FLEXCAN_MCR_FEN)) { netdev_err(dev, "Could not enable RX FIFO, unsupported core\n"); err = -ENODEV; -@@ -1233,8 +1250,12 @@ static void unregister_flexcandev(struct +@@ -1234,8 +1251,12 @@ static void unregister_flexcandev(struct static const struct of_device_id flexcan_of_match[] = { { .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, }, { .compatible = "fsl,imx28-flexcan", .data = &fsl_imx28_devtype_data, }, @@ -571,7 +572,7 @@ Signed-off-by: Biwen Li { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, flexcan_of_match); -@@ -1314,6 +1335,21 @@ static int flexcan_probe(struct platform +@@ -1315,6 +1336,21 @@ static int flexcan_probe(struct platform dev->flags |= IFF_ECHO; priv = netdev_priv(dev); diff --git a/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch b/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch index 88f38df746..781333356a 100644 --- a/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch @@ -286,15 +286,7 @@ Signed-off-by: Yangbo Lu enum pci_barno { BAR_0, BAR_1, -@@ -92,6 +103,7 @@ struct pci_endpoint_test { - void __iomem *bar[6]; - struct completion irq_raised; - int last_irq; -+ int num_irqs; - /* mutex to protect the ioctls */ - struct mutex mutex; - struct miscdevice miscdev; -@@ -102,7 +114,7 @@ struct pci_endpoint_test { +@@ -103,7 +114,7 @@ struct pci_endpoint_test { struct pci_endpoint_test_data { enum pci_barno test_reg_bar; size_t alignment; @@ -303,7 +295,7 @@ Signed-off-by: Yangbo Lu }; static inline u32 pci_endpoint_test_readl(struct pci_endpoint_test *test, -@@ -146,6 +158,100 @@ static irqreturn_t pci_endpoint_test_irq +@@ -147,6 +158,100 @@ static irqreturn_t pci_endpoint_test_irq return IRQ_HANDLED; } @@ -404,7 +396,7 @@ Signed-off-by: Yangbo Lu static bool pci_endpoint_test_bar(struct pci_endpoint_test *test, enum pci_barno barno) { -@@ -178,6 +284,9 @@ static bool pci_endpoint_test_legacy_irq +@@ -179,6 +284,9 @@ static bool pci_endpoint_test_legacy_irq { u32 val; @@ -414,7 +406,7 @@ Signed-off-by: Yangbo Lu pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_COMMAND, COMMAND_RAISE_LEGACY_IRQ); val = wait_for_completion_timeout(&test->irq_raised, -@@ -189,20 +298,24 @@ static bool pci_endpoint_test_legacy_irq +@@ -190,20 +298,24 @@ static bool pci_endpoint_test_legacy_irq } static bool pci_endpoint_test_msi_irq(struct pci_endpoint_test *test, @@ -443,9 +435,9 @@ Signed-off-by: Yangbo Lu return true; return false; -@@ -226,10 +339,18 @@ static bool pci_endpoint_test_copy(struc - u32 src_crc32; - u32 dst_crc32; +@@ -230,10 +342,18 @@ static bool pci_endpoint_test_copy(struc + if (size > SIZE_MAX - alignment) + goto err; + if (size > SIZE_MAX - alignment) + goto err; @@ -463,7 +455,7 @@ Signed-off-by: Yangbo Lu ret = false; goto err; } -@@ -255,7 +376,7 @@ static bool pci_endpoint_test_copy(struc +@@ -259,7 +379,7 @@ static bool pci_endpoint_test_copy(struc orig_dst_addr = dma_alloc_coherent(dev, size + alignment, &orig_dst_phys_addr, GFP_KERNEL); if (!orig_dst_addr) { @@ -472,7 +464,7 @@ Signed-off-by: Yangbo Lu ret = false; goto err_orig_src_addr; } -@@ -277,8 +398,10 @@ static bool pci_endpoint_test_copy(struc +@@ -281,8 +401,10 @@ static bool pci_endpoint_test_copy(struc pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_SIZE, size); @@ -484,9 +476,9 @@ Signed-off-by: Yangbo Lu wait_for_completion(&test->irq_raised); -@@ -311,10 +434,18 @@ static bool pci_endpoint_test_write(stru - size_t alignment = test->alignment; - u32 crc32; +@@ -318,10 +440,18 @@ static bool pci_endpoint_test_write(stru + if (size > SIZE_MAX - alignment) + goto err; + if (size > SIZE_MAX - alignment) + goto err; @@ -504,7 +496,7 @@ Signed-off-by: Yangbo Lu ret = false; goto err; } -@@ -341,8 +472,10 @@ static bool pci_endpoint_test_write(stru +@@ -348,8 +478,10 @@ static bool pci_endpoint_test_write(stru pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_SIZE, size); @@ -516,9 +508,9 @@ Signed-off-by: Yangbo Lu wait_for_completion(&test->irq_raised); -@@ -369,10 +502,18 @@ static bool pci_endpoint_test_read(struc - size_t alignment = test->alignment; - u32 crc32; +@@ -379,10 +511,18 @@ static bool pci_endpoint_test_read(struc + if (size > SIZE_MAX - alignment) + goto err; + if (size > SIZE_MAX - alignment) + goto err; @@ -536,7 +528,7 @@ Signed-off-by: Yangbo Lu ret = false; goto err; } -@@ -393,8 +534,10 @@ static bool pci_endpoint_test_read(struc +@@ -403,8 +543,10 @@ static bool pci_endpoint_test_read(struc pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_SIZE, size); @@ -548,7 +540,7 @@ Signed-off-by: Yangbo Lu wait_for_completion(&test->irq_raised); -@@ -407,6 +550,38 @@ err: +@@ -417,6 +559,38 @@ err: return ret; } @@ -587,7 +579,7 @@ Signed-off-by: Yangbo Lu static long pci_endpoint_test_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { -@@ -426,7 +601,8 @@ static long pci_endpoint_test_ioctl(stru +@@ -436,7 +610,8 @@ static long pci_endpoint_test_ioctl(stru ret = pci_endpoint_test_legacy_irq(test); break; case PCITEST_MSI: @@ -597,7 +589,7 @@ Signed-off-by: Yangbo Lu break; case PCITEST_WRITE: ret = pci_endpoint_test_write(test, arg); -@@ -437,6 +613,12 @@ static long pci_endpoint_test_ioctl(stru +@@ -447,6 +622,12 @@ static long pci_endpoint_test_ioctl(stru case PCITEST_COPY: ret = pci_endpoint_test_copy(test, arg); break; @@ -610,7 +602,7 @@ Signed-off-by: Yangbo Lu } ret: -@@ -452,9 +634,7 @@ static const struct file_operations pci_ +@@ -462,9 +643,7 @@ static const struct file_operations pci_ static int pci_endpoint_test_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -620,7 +612,7 @@ Signed-off-by: Yangbo Lu int id; char name[20]; enum pci_barno bar; -@@ -476,12 +656,15 @@ static int pci_endpoint_test_probe(struc +@@ -486,12 +665,15 @@ static int pci_endpoint_test_probe(struc test->alignment = 0; test->pdev = pdev; @@ -637,7 +629,7 @@ Signed-off-by: Yangbo Lu } init_completion(&test->irq_raised); -@@ -501,35 +684,21 @@ static int pci_endpoint_test_probe(struc +@@ -511,36 +693,21 @@ static int pci_endpoint_test_probe(struc pci_set_master(pdev); @@ -645,6 +637,7 @@ Signed-off-by: Yangbo Lu - irq = pci_alloc_irq_vectors(pdev, 1, 32, PCI_IRQ_MSI); - if (irq < 0) - dev_err(dev, "failed to get MSI interrupts\n"); +- test->num_irqs = irq; - } + if (!pci_endpoint_test_alloc_irq_vectors(test, irq_type)) + goto err_disable_irq; @@ -684,7 +677,7 @@ Signed-off-by: Yangbo Lu } test->base = test->bar[test_reg_bar]; -@@ -545,24 +714,31 @@ static int pci_endpoint_test_probe(struc +@@ -556,24 +723,31 @@ static int pci_endpoint_test_probe(struc id = ida_simple_get(&pci_endpoint_test_ida, 0, 0, GFP_KERNEL); if (id < 0) { err = id; @@ -720,20 +713,23 @@ Signed-off-by: Yangbo Lu err_ida_remove: ida_simple_remove(&pci_endpoint_test_ida, id); -@@ -571,9 +747,10 @@ err_iounmap: - if (test->bar[bar]) +@@ -583,11 +757,13 @@ err_iounmap: pci_iounmap(pdev, test->bar[bar]); } + +- for (i = 0; i < irq; i++) +- devm_free_irq(dev, pdev->irq + i, test); + pci_endpoint_test_release_irq(test); --err_disable_msi: -- pci_disable_msi(pdev); + err_disable_msi: + pci_disable_msi(pdev); ++ +err_disable_irq: + pci_endpoint_test_free_irq_vectors(test); pci_release_regions(pdev); err_disable_pdev: -@@ -595,12 +772,16 @@ static void pci_endpoint_test_remove(str +@@ -610,14 +786,15 @@ static void pci_endpoint_test_remove(str return; misc_deregister(&test->miscdev); @@ -743,15 +739,16 @@ Signed-off-by: Yangbo Lu if (test->bar[bar]) pci_iounmap(pdev, test->bar[bar]); } +- for (i = 0; i < test->num_irqs; i++) +- devm_free_irq(&pdev->dev, pdev->irq + i, test); - pci_disable_msi(pdev); + + pci_endpoint_test_release_irq(test); + pci_endpoint_test_free_irq_vectors(test); -+ pci_release_regions(pdev); pci_disable_device(pdev); } -@@ -608,6 +789,7 @@ static void pci_endpoint_test_remove(str +@@ -625,6 +802,7 @@ static void pci_endpoint_test_remove(str static const struct pci_device_id pci_endpoint_test_tbl[] = { { PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_DRA74x) }, { PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_DRA72x) }, diff --git a/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch b/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch index a5efa25838..2e4be1bc48 100644 --- a/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch +++ b/target/linux/mvebu/patches-4.14/408-sfp-move-module-eeprom-ethtool-access-into-netdev-co.patch @@ -159,7 +159,7 @@ Signed-off-by: Russell King #include #include #include -@@ -2212,6 +2213,9 @@ static int __ethtool_get_module_info(str +@@ -2214,6 +2215,9 @@ static int __ethtool_get_module_info(str const struct ethtool_ops *ops = dev->ethtool_ops; struct phy_device *phydev = dev->phydev; @@ -169,7 +169,7 @@ Signed-off-by: Russell King if (phydev && phydev->drv && phydev->drv->module_info) return phydev->drv->module_info(phydev, modinfo); -@@ -2246,6 +2250,9 @@ static int __ethtool_get_module_eeprom(s +@@ -2248,6 +2252,9 @@ static int __ethtool_get_module_eeprom(s const struct ethtool_ops *ops = dev->ethtool_ops; struct phy_device *phydev = dev->phydev; diff --git a/target/linux/ramips/patches-4.14/303-spi-nor-enable-4B-opcodes-for-mx66l51235l.patch b/target/linux/ramips/patches-4.14/303-spi-nor-enable-4B-opcodes-for-mx66l51235l.patch deleted file mode 100644 index 4832ebff2b..0000000000 --- a/target/linux/ramips/patches-4.14/303-spi-nor-enable-4B-opcodes-for-mx66l51235l.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/mtd/spi-nor/spi-nor.c -+++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1100,7 +1100,7 @@ static const struct flash_info spi_nor_i - { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) }, - { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) }, -- { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, -+ { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, - { "mx66u51235f", INFO(0xc2253a, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, - { "mx66l1g45g", INFO(0xc2201b, 0, 64 * 1024, 2048, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) }, diff --git a/target/linux/x86/config-4.14 b/target/linux/x86/config-4.14 index 1388a995b7..18b7de832f 100644 --- a/target/linux/x86/config-4.14 +++ b/target/linux/x86/config-4.14 @@ -475,7 +475,12 @@ CONFIG_X86_FAST_FEATURE_TESTS=y CONFIG_X86_FEATURE_NAMES=y CONFIG_X86_GENERIC=y # CONFIG_X86_GX_SUSPMOD is not set +# CONFIG_X86_INTEL_MPX is not set +# CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS is not set # CONFIG_X86_INTEL_PSTATE is not set +CONFIG_X86_INTEL_TSX_MODE_OFF=y +# CONFIG_X86_INTEL_TSX_MODE_ON is not set +# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set CONFIG_X86_INTEL_USERCOPY=y CONFIG_X86_INTERNODE_CACHE_SHIFT=6 CONFIG_X86_IO_APIC=y From 7533087565005ecb41954790d4991cb7c32bb066 Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Mon, 18 Nov 2019 10:17:50 +0100 Subject: [PATCH 09/12] kernel: bump 4.19 to 4.19.84 Refreshed all patches. Altered patches: - 950-0748-net-bcmgenet-Workaround-for-Pi-4B-network-issue.patch - 950-0754-Revert-net-bcmgenet-Workaround-for-Pi-4B-network-iss.patch - 902-debloat_proc.patch Remove upstreamed: - 150-MIPS-bmips-mark-exception-vectors-as-char-arrays.patch New symbols: X86_INTEL_MPX X86_INTEL_MEMORY_PROTECTION_KEYS X86_INTEL_TSX_MODE_OFF X86_INTEL_TSX_MODE_ON X86_INTEL_TSX_MODE_AUTO Compile-tested on: cns3xxx, x86_64 Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte --- include/kernel-version.mk | 4 +- ...-0030-mm-Remove-the-PFN-busy-warning.patch | 2 +- ...8xx-Enable-LEDs-and-auto-negotiation.patch | 6 +- ...78xx-Read-initial-EEE-status-from-DT.patch | 2 +- ...Disable-TCP-Segmentation-Offload-TSO.patch | 2 +- ...e-enabling-of-EEE-into-PHY-init-code.patch | 4 +- ...e-link-events-to-minimize-poll-storm.patch | 2 +- ...xx-EEE-support-is-now-a-PHY-property.patch | 2 +- ...use-default-alignment-for-rx-buffers.patch | 2 +- ...Better-coalescing-parameter-defaults.patch | 4 +- ...ce-quirks-for-Freeway-Airmouse-T3-an.patch | 2 +- ...t-Workaround-for-Pi-4B-network-issue.patch | 18 ++-- ...net-Workaround-for-Pi-4B-network-iss.patch | 18 ++-- ...ark-exception-vectors-as-char-arrays.patch | 93 ------------------- ...ow_offload-handle-netdevice-events-f.patch | 2 +- ...w_table-fix-offloaded-connection-tim.patch | 13 +-- ...w_table-fix-up-ct-state-of-flows-aft.patch | 2 +- ...dev-fix-handling-on-interface-rename.patch | 9 +- .../hack-4.19/207-disable-modorder.patch | 4 +- .../generic/hack-4.19/721-phy_packets.patch | 4 +- .../generic/hack-4.19/902-debloat_proc.patch | 4 +- ...e_mem_map-with-ARCH_PFN_OFFSET-calcu.patch | 2 +- .../pending-4.19/220-optimize_inlining.patch | 4 +- ...w_table-add-hardware-offload-support.patch | 14 +-- ...w_table-rework-hardware-offload-time.patch | 2 +- .../pending-4.19/655-increase_skb_pad.patch | 2 +- ...ng-with-source-address-failed-policy.patch | 20 ++-- ...atek-Add-SPI-Nand-support-for-MT7629.patch | 15 +-- target/linux/x86/config-4.19 | 5 + 29 files changed, 82 insertions(+), 181 deletions(-) delete mode 100644 target/linux/brcm63xx/patches-4.19/150-MIPS-bmips-mark-exception-vectors-as-char-arrays.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 3602da999f..87a39a8790 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -8,11 +8,11 @@ endif LINUX_VERSION-4.9 = .202 LINUX_VERSION-4.14 = .154 -LINUX_VERSION-4.19 = .82 +LINUX_VERSION-4.19 = .84 LINUX_KERNEL_HASH-4.9.202 = 8108ec1cd10fc40821c84e9f087dba10b1767aad66596f4a36925faef55e4ebf LINUX_KERNEL_HASH-4.14.154 = 86de4a24379a78d67fc08b2e249ccf7b689eb6c37fbe329fc3dfbe8ab4300603 -LINUX_KERNEL_HASH-4.19.82 = 58d96d6c2c5ee8288fe9714891e4037a18f457b008e369e33fc744afc2cb595d +LINUX_KERNEL_HASH-4.19.84 = 868b4a92619cb00ab142a20a67f000525b9605820d1b66faa4a183133eac0660 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/brcm2708/patches-4.19/950-0030-mm-Remove-the-PFN-busy-warning.patch b/target/linux/brcm2708/patches-4.19/950-0030-mm-Remove-the-PFN-busy-warning.patch index ba2e3e684f..cfc52ead26 100644 --- a/target/linux/brcm2708/patches-4.19/950-0030-mm-Remove-the-PFN-busy-warning.patch +++ b/target/linux/brcm2708/patches-4.19/950-0030-mm-Remove-the-PFN-busy-warning.patch @@ -14,7 +14,7 @@ Signed-off-by: Eric Anholt --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -7972,8 +7972,6 @@ int alloc_contig_range(unsigned long sta +@@ -7980,8 +7980,6 @@ int alloc_contig_range(unsigned long sta /* Make sure the range is really isolated. */ if (test_pages_isolated(outer_start, end, false)) { diff --git a/target/linux/brcm2708/patches-4.19/950-0033-lan78xx-Enable-LEDs-and-auto-negotiation.patch b/target/linux/brcm2708/patches-4.19/950-0033-lan78xx-Enable-LEDs-and-auto-negotiation.patch index 66b43c46f1..48939f8484 100644 --- a/target/linux/brcm2708/patches-4.19/950-0033-lan78xx-Enable-LEDs-and-auto-negotiation.patch +++ b/target/linux/brcm2708/patches-4.19/950-0033-lan78xx-Enable-LEDs-and-auto-negotiation.patch @@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2472,6 +2472,11 @@ static int lan78xx_reset(struct lan78xx_ +@@ -2475,6 +2475,11 @@ static int lan78xx_reset(struct lan78xx_ int ret = 0; unsigned long timeout; u8 sig; @@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell ret = lan78xx_read_reg(dev, HW_CFG, &buf); buf |= HW_CFG_LRST_; -@@ -2525,6 +2530,9 @@ static int lan78xx_reset(struct lan78xx_ +@@ -2528,6 +2533,9 @@ static int lan78xx_reset(struct lan78xx_ ret = lan78xx_read_reg(dev, HW_CFG, &buf); buf |= HW_CFG_MEF_; @@ -36,7 +36,7 @@ Signed-off-by: Phil Elwell ret = lan78xx_write_reg(dev, HW_CFG, buf); ret = lan78xx_read_reg(dev, USB_CFG0, &buf); -@@ -2580,6 +2588,9 @@ static int lan78xx_reset(struct lan78xx_ +@@ -2583,6 +2591,9 @@ static int lan78xx_reset(struct lan78xx_ buf |= MAC_CR_AUTO_DUPLEX_ | MAC_CR_AUTO_SPEED_; } } diff --git a/target/linux/brcm2708/patches-4.19/950-0127-lan78xx-Read-initial-EEE-status-from-DT.patch b/target/linux/brcm2708/patches-4.19/950-0127-lan78xx-Read-initial-EEE-status-from-DT.patch index c302a13553..2b9670e2c6 100644 --- a/target/linux/brcm2708/patches-4.19/950-0127-lan78xx-Read-initial-EEE-status-from-DT.patch +++ b/target/linux/brcm2708/patches-4.19/950-0127-lan78xx-Read-initial-EEE-status-from-DT.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2654,6 +2654,22 @@ static int lan78xx_open(struct net_devic +@@ -2657,6 +2657,22 @@ static int lan78xx_open(struct net_devic netif_dbg(dev, ifup, dev->net, "phy initialised successfully"); diff --git a/target/linux/brcm2708/patches-4.19/950-0134-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch b/target/linux/brcm2708/patches-4.19/950-0134-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch index f4bb93f426..6a403d4861 100644 --- a/target/linux/brcm2708/patches-4.19/950-0134-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch +++ b/target/linux/brcm2708/patches-4.19/950-0134-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch @@ -37,7 +37,7 @@ Signed-off-by: Dave Stevenson static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data) { u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL); -@@ -3003,8 +3012,14 @@ static int lan78xx_bind(struct lan78xx_n +@@ -3006,8 +3015,14 @@ static int lan78xx_bind(struct lan78xx_n if (DEFAULT_RX_CSUM_ENABLE) dev->net->features |= NETIF_F_RXCSUM; diff --git a/target/linux/brcm2708/patches-4.19/950-0136-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch b/target/linux/brcm2708/patches-4.19/950-0136-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch index a21f8eed12..0d9f8b6569 100644 --- a/target/linux/brcm2708/patches-4.19/950-0136-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch +++ b/target/linux/brcm2708/patches-4.19/950-0136-lan78xx-Move-enabling-of-EEE-into-PHY-init-code.patch @@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2186,6 +2186,22 @@ static int lan78xx_phy_init(struct lan78 +@@ -2189,6 +2189,22 @@ static int lan78xx_phy_init(struct lan78 mii_adv = (u32)mii_advertise_flowctrl(dev->fc_request_control); phydev->advertising |= mii_adv_to_ethtool_adv_t(mii_adv); @@ -39,7 +39,7 @@ Signed-off-by: Phil Elwell if (phydev->mdio.dev.of_node) { u32 reg; int len; -@@ -2663,22 +2679,6 @@ static int lan78xx_open(struct net_devic +@@ -2666,22 +2682,6 @@ static int lan78xx_open(struct net_devic netif_dbg(dev, ifup, dev->net, "phy initialised successfully"); diff --git a/target/linux/brcm2708/patches-4.19/950-0298-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch b/target/linux/brcm2708/patches-4.19/950-0298-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch index 6759d3f154..d4e61c2186 100644 --- a/target/linux/brcm2708/patches-4.19/950-0298-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch +++ b/target/linux/brcm2708/patches-4.19/950-0298-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch @@ -28,7 +28,7 @@ See: https://github.com/raspberrypi/linux/issues/2447 static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data) { u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL); -@@ -3816,7 +3821,12 @@ static int lan78xx_probe(struct usb_inte +@@ -3819,7 +3824,12 @@ static int lan78xx_probe(struct usb_inte dev->pipe_intr = usb_rcvintpipe(dev->udev, dev->ep_intr->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK); diff --git a/target/linux/brcm2708/patches-4.19/950-0365-lan78xx-EEE-support-is-now-a-PHY-property.patch b/target/linux/brcm2708/patches-4.19/950-0365-lan78xx-EEE-support-is-now-a-PHY-property.patch index ea4a7187aa..bfefa39508 100644 --- a/target/linux/brcm2708/patches-4.19/950-0365-lan78xx-EEE-support-is-now-a-PHY-property.patch +++ b/target/linux/brcm2708/patches-4.19/950-0365-lan78xx-EEE-support-is-now-a-PHY-property.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2191,7 +2191,7 @@ static int lan78xx_phy_init(struct lan78 +@@ -2194,7 +2194,7 @@ static int lan78xx_phy_init(struct lan78 mii_adv = (u32)mii_advertise_flowctrl(dev->fc_request_control); phydev->advertising |= mii_adv_to_ethtool_adv_t(mii_adv); diff --git a/target/linux/brcm2708/patches-4.19/950-0479-lan78xx-use-default-alignment-for-rx-buffers.patch b/target/linux/brcm2708/patches-4.19/950-0479-lan78xx-use-default-alignment-for-rx-buffers.patch index 9ef0928084..3bc2582dc4 100644 --- a/target/linux/brcm2708/patches-4.19/950-0479-lan78xx-use-default-alignment-for-rx-buffers.patch +++ b/target/linux/brcm2708/patches-4.19/950-0479-lan78xx-use-default-alignment-for-rx-buffers.patch @@ -12,7 +12,7 @@ in both dwc_otg and in ipv6 processing. --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -3250,7 +3250,7 @@ static int rx_submit(struct lan78xx_net +@@ -3253,7 +3253,7 @@ static int rx_submit(struct lan78xx_net size_t size = dev->rx_urb_size; int ret = 0; diff --git a/target/linux/brcm2708/patches-4.19/950-0541-bcmgenet-Better-coalescing-parameter-defaults.patch b/target/linux/brcm2708/patches-4.19/950-0541-bcmgenet-Better-coalescing-parameter-defaults.patch index 95806baa96..0e2657c423 100644 --- a/target/linux/brcm2708/patches-4.19/950-0541-bcmgenet-Better-coalescing-parameter-defaults.patch +++ b/target/linux/brcm2708/patches-4.19/950-0541-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 -@@ -2147,7 +2147,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); -@@ -3571,9 +3571,12 @@ static int bcmgenet_probe(struct platfor +@@ -3576,9 +3576,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/brcm2708/patches-4.19/950-0730-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/brcm2708/patches-4.19/950-0730-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index fd3f2c749e..051399fc04 100644 --- a/target/linux/brcm2708/patches-4.19/950-0730-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/brcm2708/patches-4.19/950-0730-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 -@@ -1190,6 +1193,9 @@ +@@ -1192,6 +1195,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 diff --git a/target/linux/brcm2708/patches-4.19/950-0748-net-bcmgenet-Workaround-for-Pi-4B-network-issue.patch b/target/linux/brcm2708/patches-4.19/950-0748-net-bcmgenet-Workaround-for-Pi-4B-network-issue.patch index 8d5b1ae54e..a09d49f2fd 100644 --- a/target/linux/brcm2708/patches-4.19/950-0748-net-bcmgenet-Workaround-for-Pi-4B-network-issue.patch +++ b/target/linux/brcm2708/patches-4.19/950-0748-net-bcmgenet-Workaround-for-Pi-4B-network-issue.patch @@ -31,7 +31,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 -@@ -2610,6 +2614,7 @@ static void bcmgenet_irq_task(struct wor +@@ -2612,6 +2616,7 @@ static void bcmgenet_irq_task(struct wor unsigned int status; struct bcmgenet_priv *priv = container_of( work, struct bcmgenet_priv, bcmgenet_irq_work); @@ -39,11 +39,14 @@ Signed-off-by: Phil Elwell netif_dbg(priv, intr, priv->dev, "%s\n", __func__); -@@ -2622,6 +2627,23 @@ static void bcmgenet_irq_task(struct wor - if (status & UMAC_IRQ_LINK_EVENT) { - priv->dev->phydev->link = !!(status & UMAC_IRQ_LINK_UP); +@@ -2625,9 +2630,26 @@ static void bcmgenet_irq_task(struct wor + phy_init_hw(priv->dev->phydev); + + /* Link UP/DOWN event */ +- if (status & UMAC_IRQ_LINK_EVENT) ++ if (status & UMAC_IRQ_LINK_EVENT) { phy_mac_interrupt(priv->dev->phydev); -+ + + if (priv->dev->phydev->link && first_link) { + first_link = 0; + /* @@ -56,10 +59,11 @@ Signed-off-by: Phil Elwell + */ + if (force_reneg) { + dev_info(&priv->pdev->dev, -+ "Forcing renegotiation\n"); ++ "Forcing renegotiation\n"); + genphy_restart_aneg(priv->dev->phydev); + } + } - } ++ } } + /* bcmgenet_isr1: handle Rx and Tx priority queues */ diff --git a/target/linux/brcm2708/patches-4.19/950-0754-Revert-net-bcmgenet-Workaround-for-Pi-4B-network-iss.patch b/target/linux/brcm2708/patches-4.19/950-0754-Revert-net-bcmgenet-Workaround-for-Pi-4B-network-iss.patch index 65f96bd65e..d7512dacd8 100644 --- a/target/linux/brcm2708/patches-4.19/950-0754-Revert-net-bcmgenet-Workaround-for-Pi-4B-network-iss.patch +++ b/target/linux/brcm2708/patches-4.19/950-0754-Revert-net-bcmgenet-Workaround-for-Pi-4B-network-iss.patch @@ -22,7 +22,7 @@ This reverts commit 9c0770ea7682a84a22c33410ef6870af258abacc. static inline void bcmgenet_writel(u32 value, void __iomem *offset) { /* MIPS chips strapped for BE will automagically configure the -@@ -2614,7 +2610,6 @@ static void bcmgenet_irq_task(struct wor +@@ -2616,7 +2612,6 @@ static void bcmgenet_irq_task(struct wor unsigned int status; struct bcmgenet_priv *priv = container_of( work, struct bcmgenet_priv, bcmgenet_irq_work); @@ -30,11 +30,14 @@ This reverts commit 9c0770ea7682a84a22c33410ef6870af258abacc. netif_dbg(priv, intr, priv->dev, "%s\n", __func__); -@@ -2627,23 +2622,6 @@ static void bcmgenet_irq_task(struct wor - if (status & UMAC_IRQ_LINK_EVENT) { - priv->dev->phydev->link = !!(status & UMAC_IRQ_LINK_UP); +@@ -2630,26 +2625,9 @@ static void bcmgenet_irq_task(struct wor + phy_init_hw(priv->dev->phydev); + + /* Link UP/DOWN event */ +- if (status & UMAC_IRQ_LINK_EVENT) { ++ if (status & UMAC_IRQ_LINK_EVENT) phy_mac_interrupt(priv->dev->phydev); -- + - if (priv->dev->phydev->link && first_link) { - first_link = 0; - /* @@ -47,10 +50,11 @@ This reverts commit 9c0770ea7682a84a22c33410ef6870af258abacc. - */ - if (force_reneg) { - dev_info(&priv->pdev->dev, -- "Forcing renegotiation\n"); +- "Forcing renegotiation\n"); - genphy_restart_aneg(priv->dev->phydev); - } - } - } +- } } + /* bcmgenet_isr1: handle Rx and Tx priority queues */ diff --git a/target/linux/brcm63xx/patches-4.19/150-MIPS-bmips-mark-exception-vectors-as-char-arrays.patch b/target/linux/brcm63xx/patches-4.19/150-MIPS-bmips-mark-exception-vectors-as-char-arrays.patch deleted file mode 100644 index 11d79ea21c..0000000000 --- a/target/linux/brcm63xx/patches-4.19/150-MIPS-bmips-mark-exception-vectors-as-char-arrays.patch +++ /dev/null @@ -1,93 +0,0 @@ -From badf0fc9f7dc72d06a47357123c7d97dc45792f5 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Tue, 15 Oct 2019 23:27:10 +0200 -Subject: [PATCH v2] MIPS: bmips: mark exception vectors as char arrays - -The vectors span more than one byte, so mark them as arrays. - -Fixes the following build error when building when using GCC 8.3: - -In file included from ./include/linux/string.h:19, - from ./include/linux/bitmap.h:9, - from ./include/linux/cpumask.h:12, - from ./arch/mips/include/asm/processor.h:15, - from ./arch/mips/include/asm/thread_info.h:16, - from ./include/linux/thread_info.h:38, - from ./include/asm-generic/preempt.h:5, - from ./arch/mips/include/generated/asm/preempt.h:1, - from ./include/linux/preempt.h:81, - from ./include/linux/spinlock.h:51, - from ./include/linux/mmzone.h:8, - from ./include/linux/bootmem.h:8, - from arch/mips/bcm63xx/prom.c:10: -arch/mips/bcm63xx/prom.c: In function 'prom_init': -./arch/mips/include/asm/string.h:162:11: error: '__builtin_memcpy' forming offset [2, 32] is out of the bounds [0, 1] of object 'bmips_smp_movevec' with type 'char' [-Werror=array-bounds] - __ret = __builtin_memcpy((dst), (src), __len); \ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -arch/mips/bcm63xx/prom.c:97:3: note: in expansion of macro 'memcpy' - memcpy((void *)0xa0000200, &bmips_smp_movevec, 0x20); - ^~~~~~ -In file included from arch/mips/bcm63xx/prom.c:14: -./arch/mips/include/asm/bmips.h:80:13: note: 'bmips_smp_movevec' declared here - extern char bmips_smp_movevec; - -Fixes: 18a1eef92dcd ("MIPS: BMIPS: Introduce bmips.h") -Signed-off-by: Jonas Gorski ---- - -v1 -> v2: - * Actually update the callers as well, to not break the build in a - different way. - - arch/mips/bcm63xx/prom.c | 2 +- - arch/mips/include/asm/bmips.h | 10 +++++----- - arch/mips/kernel/smp-bmips.c | 8 ++++---- - 3 files changed, 10 insertions(+), 10 deletions(-) - ---- a/arch/mips/bcm63xx/prom.c -+++ b/arch/mips/bcm63xx/prom.c -@@ -84,7 +84,7 @@ void __init prom_init(void) - * Here we will start up CPU1 in the background and ask it to - * reconfigure itself then go back to sleep. - */ -- memcpy((void *)0xa0000200, &bmips_smp_movevec, 0x20); -+ memcpy((void *)0xa0000200, bmips_smp_movevec, 0x20); - __sync(); - set_c0_cause(C_SW0); - cpumask_set_cpu(1, &bmips_booted_mask); ---- a/arch/mips/include/asm/bmips.h -+++ b/arch/mips/include/asm/bmips.h -@@ -75,11 +75,11 @@ static inline int register_bmips_smp_ops - #endif - } - --extern char bmips_reset_nmi_vec; --extern char bmips_reset_nmi_vec_end; --extern char bmips_smp_movevec; --extern char bmips_smp_int_vec; --extern char bmips_smp_int_vec_end; -+extern char bmips_reset_nmi_vec[]; -+extern char bmips_reset_nmi_vec_end[]; -+extern char bmips_smp_movevec[]; -+extern char bmips_smp_int_vec[]; -+extern char bmips_smp_int_vec_end[]; - - extern int bmips_smp_enabled; - extern int bmips_cpu_offset; ---- a/arch/mips/kernel/smp-bmips.c -+++ b/arch/mips/kernel/smp-bmips.c -@@ -457,10 +457,10 @@ static void bmips_wr_vec(unsigned long d - - static inline void bmips_nmi_handler_setup(void) - { -- bmips_wr_vec(BMIPS_NMI_RESET_VEC, &bmips_reset_nmi_vec, -- &bmips_reset_nmi_vec_end); -- bmips_wr_vec(BMIPS_WARM_RESTART_VEC, &bmips_smp_int_vec, -- &bmips_smp_int_vec_end); -+ bmips_wr_vec(BMIPS_NMI_RESET_VEC, bmips_reset_nmi_vec, -+ bmips_reset_nmi_vec_end); -+ bmips_wr_vec(BMIPS_WARM_RESTART_VEC, bmips_smp_int_vec, -+ bmips_smp_int_vec_end); - } - - struct reset_vec_info { diff --git a/target/linux/generic/backport-4.19/343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch b/target/linux/generic/backport-4.19/343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch index 3a9e21f580..55d0f40f45 100644 --- a/target/linux/generic/backport-4.19/343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch +++ b/target/linux/generic/backport-4.19/343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch @@ -10,7 +10,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c -@@ -531,5 +531,35 @@ void nf_flow_table_free(struct nf_flowta +@@ -532,5 +532,35 @@ void nf_flow_table_free(struct nf_flowta } EXPORT_SYMBOL_GPL(nf_flow_table_free); diff --git a/target/linux/generic/backport-4.19/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch b/target/linux/generic/backport-4.19/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch index 64eda53295..7c10f6f189 100644 --- a/target/linux/generic/backport-4.19/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch +++ b/target/linux/generic/backport-4.19/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch @@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau nf_ct_gc_expired(tmp); --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c -@@ -183,6 +183,24 @@ static const struct rhashtable_params nf +@@ -183,10 +183,29 @@ static const struct rhashtable_params nf .automatic_shrinking = true, }; @@ -79,15 +79,12 @@ Signed-off-by: Felix Fietkau int flow_offload_add(struct nf_flowtable *flow_table, struct flow_offload *flow) { int err; -@@ -203,6 +221,7 @@ int flow_offload_add(struct nf_flowtable - return err; - } + nf_ct_offload_timeout(flow); flow->timeout = (u32)jiffies + NF_FLOW_TIMEOUT; - return 0; - } -@@ -316,6 +335,8 @@ static int nf_flow_offload_gc_step(struc + + err = rhashtable_insert_fast(&flow_table->rhashtable, +@@ -317,6 +336,8 @@ static int nf_flow_offload_gc_step(struc rhashtable_walk_start(&hti); while ((tuplehash = rhashtable_walk_next(&hti))) { @@ -96,7 +93,7 @@ Signed-off-by: Felix Fietkau if (IS_ERR(tuplehash)) { err = PTR_ERR(tuplehash); if (err != -EAGAIN) -@@ -328,9 +349,13 @@ static int nf_flow_offload_gc_step(struc +@@ -329,9 +350,13 @@ static int nf_flow_offload_gc_step(struc flow = container_of(tuplehash, struct flow_offload, tuplehash[0]); diff --git a/target/linux/generic/backport-4.19/371-netfilter-nf_flow_table-fix-up-ct-state-of-flows-aft.patch b/target/linux/generic/backport-4.19/371-netfilter-nf_flow_table-fix-up-ct-state-of-flows-aft.patch index 9fb9ed9ad3..2e25066499 100644 --- a/target/linux/generic/backport-4.19/371-netfilter-nf_flow_table-fix-up-ct-state-of-flows-aft.patch +++ b/target/linux/generic/backport-4.19/371-netfilter-nf_flow_table-fix-up-ct-state-of-flows-aft.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c -@@ -242,6 +242,9 @@ static void flow_offload_del(struct nf_f +@@ -243,6 +243,9 @@ static void flow_offload_del(struct nf_f e = container_of(flow, struct flow_offload_entry, flow); clear_bit(IPS_OFFLOAD_BIT, &e->ct->status); diff --git a/target/linux/generic/backport-4.19/402-leds-trigger-netdev-fix-handling-on-interface-rename.patch b/target/linux/generic/backport-4.19/402-leds-trigger-netdev-fix-handling-on-interface-rename.patch index baae3b7cb4..c40ca42471 100644 --- a/target/linux/generic/backport-4.19/402-leds-trigger-netdev-fix-handling-on-interface-rename.patch +++ b/target/linux/generic/backport-4.19/402-leds-trigger-netdev-fix-handling-on-interface-rename.patch @@ -23,11 +23,9 @@ Signed-off-by: Martin Schiller drivers/leds/trigger/ledtrig-netdev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -diff --git a/drivers/leds/trigger/ledtrig-netdev.c b/drivers/leds/trigger/ledtrig-netdev.c -index 136f86a1627d..d5e774d83021 100644 --- a/drivers/leds/trigger/ledtrig-netdev.c +++ b/drivers/leds/trigger/ledtrig-netdev.c -@@ -302,10 +302,12 @@ static int netdev_trig_notify(struct notifier_block *nb, +@@ -302,10 +302,12 @@ static int netdev_trig_notify(struct not container_of(nb, struct led_netdev_data, notifier); if (evt != NETDEV_UP && evt != NETDEV_DOWN && evt != NETDEV_CHANGE @@ -41,7 +39,7 @@ index 136f86a1627d..d5e774d83021 100644 (evt == NETDEV_REGISTER && !strcmp(dev->name, trigger_data->device_name)))) return NOTIFY_DONE; -@@ -315,6 +317,7 @@ static int netdev_trig_notify(struct notifier_block *nb, +@@ -315,6 +317,7 @@ static int netdev_trig_notify(struct not clear_bit(NETDEV_LED_MODE_LINKUP, &trigger_data->mode); switch (evt) { @@ -49,6 +47,3 @@ index 136f86a1627d..d5e774d83021 100644 case NETDEV_REGISTER: if (trigger_data->net_dev) dev_put(trigger_data->net_dev); --- -2.20.1 - 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 942c025563..f47da3f24e 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 -@@ -1226,7 +1226,6 @@ all: modules +@@ -1232,7 +1232,6 @@ all: modules 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 -@@ -1255,7 +1254,6 @@ _modinst_: +@@ -1261,7 +1260,6 @@ _modinst_: rm -f $(MODLIB)/build ; \ ln -s $(CURDIR) $(MODLIB)/build ; \ fi 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 640ef37769..39bb364d08 100644 --- a/target/linux/generic/hack-4.19/721-phy_packets.patch +++ b/target/linux/generic/hack-4.19/721-phy_packets.patch @@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau */ --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2529,6 +2529,10 @@ static inline int pskb_trim(struct sk_bu +@@ -2545,6 +2545,10 @@ static inline int pskb_trim(struct sk_bu return (len < skb->len) ? __pskb_trim(skb, len) : 0; } @@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau /** * pskb_trim_unique - remove end from a paged unique (not cloned) buffer * @skb: buffer to alter -@@ -2660,16 +2664,6 @@ static inline struct sk_buff *dev_alloc_ +@@ -2676,16 +2680,6 @@ static inline struct sk_buff *dev_alloc_ } 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 73a1f3677c..ec976c165b 100644 --- a/target/linux/generic/hack-4.19/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.19/902-debloat_proc.patch @@ -248,10 +248,10 @@ Signed-off-by: Felix Fietkau #endif #ifdef CONFIG_PROC_FS - proc_create_seq("buddyinfo", 0444, NULL, &fragmentation_op); -- proc_create_seq("pagetypeinfo", 0444, NULL, &pagetypeinfo_op); +- proc_create_seq("pagetypeinfo", 0400, NULL, &pagetypeinfo_op); + if (!IS_ENABLED(CONFIG_PROC_STRIPPED)) { + proc_create_seq("buddyinfo", 0444, NULL, &fragmentation_op); -+ proc_create_seq("pagetypeinfo", 0444, NULL, &pagetypeinfo_op); ++ proc_create_seq("pagetypeinfo", 0400, NULL, &pagetypeinfo_op); + proc_create_seq("zoneinfo", 0444, NULL, &zoneinfo_op); + } proc_create_seq("vmstat", 0444, NULL, &vmstat_op); 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 429cd3c334..1a416e7782 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 -@@ -6395,7 +6395,7 @@ static void __ref alloc_node_mem_map(str +@@ -6403,7 +6403,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/220-optimize_inlining.patch b/target/linux/generic/pending-4.19/220-optimize_inlining.patch index 1cb0a1d485..e6a9c19cac 100644 --- a/target/linux/generic/pending-4.19/220-optimize_inlining.patch +++ b/target/linux/generic/pending-4.19/220-optimize_inlining.patch @@ -113,7 +113,7 @@ { unsigned long rb,rs,prs,r; -@@ -239,7 +239,7 @@ static inline void fixup_tlbie_lpid(unsi +@@ -300,7 +300,7 @@ static inline void fixup_tlbie_lpid(unsi /* * We use 128 set in radix mode and 256 set in hpt mode. */ @@ -122,7 +122,7 @@ { int set; -@@ -918,7 +918,7 @@ void radix__tlb_flush(struct mmu_gather +@@ -982,7 +982,7 @@ void radix__tlb_flush(struct mmu_gather tlb->need_flush_all = 0; } diff --git a/target/linux/generic/pending-4.19/640-netfilter-nf_flow_table-add-hardware-offload-support.patch b/target/linux/generic/pending-4.19/640-netfilter-nf_flow_table-add-hardware-offload-support.patch index 292870dd34..78b7cc9f3e 100644 --- a/target/linux/generic/pending-4.19/640-netfilter-nf_flow_table-add-hardware-offload-support.patch +++ b/target/linux/generic/pending-4.19/640-netfilter-nf_flow_table-add-hardware-offload-support.patch @@ -156,7 +156,7 @@ Signed-off-by: Pablo Neira Ayuso obj-$(CONFIG_NETFILTER_XTABLES) += x_tables.o xt_tcpudp.o --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c -@@ -227,10 +227,16 @@ int flow_offload_add(struct nf_flowtable +@@ -228,10 +228,16 @@ int flow_offload_add(struct nf_flowtable } EXPORT_SYMBOL_GPL(flow_offload_add); @@ -173,7 +173,7 @@ Signed-off-by: Pablo Neira Ayuso rhashtable_remove_fast(&flow_table->rhashtable, &flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].node, -@@ -245,6 +251,9 @@ static void flow_offload_del(struct nf_f +@@ -246,6 +252,9 @@ static void flow_offload_del(struct nf_f if (!(flow->flags & FLOW_OFFLOAD_TEARDOWN)) flow_offload_fixup_ct_state(e->ct); @@ -183,7 +183,7 @@ Signed-off-by: Pablo Neira Ayuso flow_offload_free(flow); } -@@ -358,6 +367,9 @@ static int nf_flow_offload_gc_step(struc +@@ -359,6 +368,9 @@ static int nf_flow_offload_gc_step(struc if (!teardown) nf_ct_offload_timeout(flow); @@ -193,7 +193,7 @@ Signed-off-by: Pablo Neira Ayuso if (nf_flow_has_expired(flow) || teardown) flow_offload_del(flow_table, flow); } -@@ -493,10 +505,43 @@ int nf_flow_dnat_port(const struct flow_ +@@ -494,10 +506,43 @@ int nf_flow_dnat_port(const struct flow_ } EXPORT_SYMBOL_GPL(nf_flow_dnat_port); @@ -237,7 +237,7 @@ Signed-off-by: Pablo Neira Ayuso INIT_DEFERRABLE_WORK(&flowtable->gc_work, nf_flow_offload_work_gc); err = rhashtable_init(&flowtable->rhashtable, -@@ -534,6 +579,8 @@ static void nf_flow_table_iterate_cleanu +@@ -535,6 +580,8 @@ static void nf_flow_table_iterate_cleanu { nf_flow_table_iterate(flowtable, nf_flow_table_do_cleanup, dev); flush_delayed_work(&flowtable->gc_work); @@ -246,7 +246,7 @@ Signed-off-by: Pablo Neira Ayuso } void nf_flow_table_cleanup(struct net *net, struct net_device *dev) -@@ -547,6 +594,26 @@ void nf_flow_table_cleanup(struct net *n +@@ -548,6 +595,26 @@ void nf_flow_table_cleanup(struct net *n } EXPORT_SYMBOL_GPL(nf_flow_table_cleanup); @@ -273,7 +273,7 @@ Signed-off-by: Pablo Neira Ayuso void nf_flow_table_free(struct nf_flowtable *flow_table) { mutex_lock(&flowtable_lock); -@@ -556,9 +623,58 @@ void nf_flow_table_free(struct nf_flowta +@@ -557,9 +624,58 @@ void nf_flow_table_free(struct nf_flowta nf_flow_table_iterate(flow_table, nf_flow_table_do_cleanup, NULL); WARN_ON(!nf_flow_offload_gc_step(flow_table)); rhashtable_destroy(&flow_table->rhashtable); diff --git a/target/linux/generic/pending-4.19/645-netfilter-nf_flow_table-rework-hardware-offload-time.patch b/target/linux/generic/pending-4.19/645-netfilter-nf_flow_table-rework-hardware-offload-time.patch index 8d2f2039d1..bfb7a9c190 100644 --- a/target/linux/generic/pending-4.19/645-netfilter-nf_flow_table-rework-hardware-offload-time.patch +++ b/target/linux/generic/pending-4.19/645-netfilter-nf_flow_table-rework-hardware-offload-time.patch @@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau struct flow_offload_tuple_rhash tuplehash[FLOW_OFFLOAD_DIR_MAX]; --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c -@@ -367,7 +367,7 @@ static int nf_flow_offload_gc_step(struc +@@ -368,7 +368,7 @@ static int nf_flow_offload_gc_step(struc if (!teardown) nf_ct_offload_timeout(flow); diff --git a/target/linux/generic/pending-4.19/655-increase_skb_pad.patch b/target/linux/generic/pending-4.19/655-increase_skb_pad.patch index db79a6db22..b5f7fadbe7 100644 --- a/target/linux/generic/pending-4.19/655-increase_skb_pad.patch +++ b/target/linux/generic/pending-4.19/655-increase_skb_pad.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2493,7 +2493,7 @@ static inline int pskb_network_may_pull( +@@ -2509,7 +2509,7 @@ static inline int pskb_network_may_pull( * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) */ #ifndef NET_SKB_PAD diff --git a/target/linux/generic/pending-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 9e8bc10fd6..114595b3f5 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 @@ -138,7 +138,7 @@ Signed-off-by: Jonas Gorski static const struct rt6_info ip6_blk_hole_entry_template = { .dst = { .__refcnt = ATOMIC_INIT(1), -@@ -900,6 +914,7 @@ static const int fib6_prop[RTN_MAX + 1] +@@ -904,6 +918,7 @@ static const int fib6_prop[RTN_MAX + 1] [RTN_BLACKHOLE] = -EINVAL, [RTN_UNREACHABLE] = -EHOSTUNREACH, [RTN_PROHIBIT] = -EACCES, @@ -146,7 +146,7 @@ Signed-off-by: Jonas Gorski [RTN_THROW] = -EAGAIN, [RTN_NAT] = -EINVAL, [RTN_XRESOLVE] = -EINVAL, -@@ -937,6 +952,10 @@ static void ip6_rt_init_dst_reject(struc +@@ -941,6 +956,10 @@ static void ip6_rt_init_dst_reject(struc rt->dst.output = ip6_pkt_prohibit_out; rt->dst.input = ip6_pkt_prohibit; break; @@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski case RTN_THROW: case RTN_UNREACHABLE: default: -@@ -3774,6 +3793,17 @@ static int ip6_pkt_prohibit_out(struct n +@@ -3781,6 +3800,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. */ -@@ -4221,7 +4251,8 @@ static int rtm_to_fib6_config(struct sk_ +@@ -4228,7 +4258,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) -@@ -5069,6 +5100,8 @@ static int ip6_route_dev_notify(struct n +@@ -5076,6 +5107,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 -@@ -5080,6 +5113,7 @@ static int ip6_route_dev_notify(struct n +@@ -5087,6 +5120,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 } -@@ -5274,6 +5308,15 @@ static int __net_init ip6_route_net_init +@@ -5281,6 +5315,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; -@@ -5292,6 +5335,8 @@ out: +@@ -5299,6 +5342,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: -@@ -5312,6 +5357,7 @@ static void __net_exit ip6_route_net_exi +@@ -5319,6 +5364,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); } -@@ -5388,6 +5434,9 @@ void __init ip6_route_init_special_entri +@@ -5395,6 +5441,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/mediatek/patches-4.19/0307-spi-mem-Mediatek-Add-SPI-Nand-support-for-MT7629.patch b/target/linux/mediatek/patches-4.19/0307-spi-mem-Mediatek-Add-SPI-Nand-support-for-MT7629.patch index 72e56945d9..31530afc9b 100644 --- a/target/linux/mediatek/patches-4.19/0307-spi-mem-Mediatek-Add-SPI-Nand-support-for-MT7629.patch +++ b/target/linux/mediatek/patches-4.19/0307-spi-mem-Mediatek-Add-SPI-Nand-support-for-MT7629.patch @@ -11,8 +11,6 @@ Signed-off-by: Xiangsheng Hou drivers/spi/spi-mtk-snfi.c | 12 +++++++++ 3 files changed, 79 insertions(+) -diff --git a/arch/arm/boot/dts/mt7629-rfb.dts b/arch/arm/boot/dts/mt7629-rfb.dts -index 8043238fe..ef140623e 100755 --- a/arch/arm/boot/dts/mt7629-rfb.dts +++ b/arch/arm/boot/dts/mt7629-rfb.dts @@ -258,6 +258,51 @@ @@ -67,8 +65,6 @@ index 8043238fe..ef140623e 100755 &spi { pinctrl-names = "default"; pinctrl-0 = <&spi_pins>; -diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi -index 53f47796b..c7bd5fc9b 100755 --- a/arch/arm/boot/dts/mt7629.dtsi +++ b/arch/arm/boot/dts/mt7629.dtsi @@ -259,6 +259,28 @@ @@ -100,11 +96,9 @@ index 53f47796b..c7bd5fc9b 100755 spi: spi@1100a000 { compatible = "mediatek,mt7629-spi", "mediatek,mt7622-spi"; -diff --git a/drivers/spi/spi-mtk-snfi.c b/drivers/spi/spi-mtk-snfi.c -index cd600d9fb..113f541e6 100644 --- a/drivers/spi/spi-mtk-snfi.c +++ b/drivers/spi/spi-mtk-snfi.c -@@ -1029,8 +1029,20 @@ static const struct mtk_snfi_caps snfi_mt7622 = { +@@ -1029,8 +1029,20 @@ static const struct mtk_snfi_caps snfi_m .bad_mark_swap = 0, }; @@ -125,14 +119,9 @@ index cd600d9fb..113f541e6 100644 { /* sentinel */ } }; --- -2.21.0 - -diff --git a/arch/arm/boot/dts/mt7629-lynx-rfb.dts b/arch/arm/boot/dts/mt7629-lynx-rfb.dts -index f3fadd3..895d6c4 100755 --- a/arch/arm/boot/dts/mt7629-lynx-rfb.dts +++ b/arch/arm/boot/dts/mt7629-lynx-rfb.dts -@@ -278,6 +278,52 @@ +@@ -281,6 +281,52 @@ }; }; diff --git a/target/linux/x86/config-4.19 b/target/linux/x86/config-4.19 index 316209c30c..ecfaf45d90 100644 --- a/target/linux/x86/config-4.19 +++ b/target/linux/x86/config-4.19 @@ -458,7 +458,12 @@ CONFIG_X86_F00F_BUG=y CONFIG_X86_FEATURE_NAMES=y CONFIG_X86_GENERIC=y # CONFIG_X86_GX_SUSPMOD is not set +# CONFIG_X86_INTEL_MPX is not set +# CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS is not set # CONFIG_X86_INTEL_PSTATE is not set +CONFIG_X86_INTEL_TSX_MODE_OFF=y +# CONFIG_X86_INTEL_TSX_MODE_ON is not set +# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set CONFIG_X86_INTEL_UMIP=y CONFIG_X86_INTEL_USERCOPY=y CONFIG_X86_INTERNODE_CACHE_SHIFT=6 From e5c18dad14956ef41488fc7016ef0aa57e7347c7 Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Tue, 19 Nov 2019 10:38:45 +0100 Subject: [PATCH 10/12] toolchain/gcc: bump to 7.5.0 This updates the GCC to the next minor release which fixes +213 bugs. Tested on ARMv6, ARMv7, MIPS R2, x86 Signed-off-by: Koen Vandeputte --- toolchain/gcc/Config.version | 2 +- toolchain/gcc/common.mk | 4 ++-- .../{7.4.0 => 7.5.0}/001-revert_register_mode_search.patch | 0 .../gcc/patches/{7.4.0 => 7.5.0}/002-case_insensitive.patch | 0 .../gcc/patches/{7.4.0 => 7.5.0}/010-documentation.patch | 0 .../gcc/patches/{7.4.0 => 7.5.0}/110-Fix-MIPS-PR-84790.patch | 0 toolchain/gcc/patches/{7.4.0 => 7.5.0}/230-musl_libssp.patch | 0 .../{7.4.0 => 7.5.0}/300-mips_Os_cpu_rtx_cost_model.patch | 0 .../patches/{7.4.0 => 7.5.0}/800-arm_v5te_no_ldrd_strd.patch | 0 .../patches/{7.4.0 => 7.5.0}/810-arm-softfloat-libgcc.patch | 0 toolchain/gcc/patches/{7.4.0 => 7.5.0}/820-libgcc_pic.patch | 0 .../{7.4.0 => 7.5.0}/840-armv4_pass_fix-v4bx_to_ld.patch | 0 .../gcc/patches/{7.4.0 => 7.5.0}/850-use_shared_libgcc.patch | 0 .../gcc/patches/{7.4.0 => 7.5.0}/851-libgcc_no_compat.patch | 0 .../gcc/patches/{7.4.0 => 7.5.0}/870-ppc_no_crtsavres.patch | 0 .../gcc/patches/{7.4.0 => 7.5.0}/881-no_tm_section.patch | 0 .../gcc/patches/{7.4.0 => 7.5.0}/900-bad-mips16-crt.patch | 0 toolchain/gcc/patches/{7.4.0 => 7.5.0}/910-mbsd_multi.patch | 0 .../patches/{7.4.0 => 7.5.0}/920-specs_nonfatal_getenv.patch | 0 .../patches/{7.4.0 => 7.5.0}/930-fix-mips-noexecstack.patch | 0 .../931-libffi-fix-MIPS-softfloat-build-issue.patch | 0 .../patches/{7.4.0 => 7.5.0}/940-no-clobber-stamp-bits.patch | 0 .../{7.4.0 => 7.5.0}/950-cpp_file_path_translation.patch | 0 ...0-gotools-fix-compilation-when-making-cross-compiler.patch | 0 24 files changed, 3 insertions(+), 3 deletions(-) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/001-revert_register_mode_search.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/002-case_insensitive.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/010-documentation.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/110-Fix-MIPS-PR-84790.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/230-musl_libssp.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/300-mips_Os_cpu_rtx_cost_model.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/800-arm_v5te_no_ldrd_strd.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/810-arm-softfloat-libgcc.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/820-libgcc_pic.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/840-armv4_pass_fix-v4bx_to_ld.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/850-use_shared_libgcc.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/851-libgcc_no_compat.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/870-ppc_no_crtsavres.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/881-no_tm_section.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/900-bad-mips16-crt.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/910-mbsd_multi.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/920-specs_nonfatal_getenv.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/930-fix-mips-noexecstack.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/931-libffi-fix-MIPS-softfloat-build-issue.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/940-no-clobber-stamp-bits.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/950-cpp_file_path_translation.patch (100%) rename toolchain/gcc/patches/{7.4.0 => 7.5.0}/960-gotools-fix-compilation-when-making-cross-compiler.patch (100%) diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version index 687857bd1f..7819e9d039 100644 --- a/toolchain/gcc/Config.version +++ b/toolchain/gcc/Config.version @@ -13,7 +13,7 @@ config GCC_VERSION_9 config GCC_VERSION string default "5.5.0" if GCC_VERSION_5 - default "7.4.0" if GCC_VERSION_7 + default "7.5.0" if GCC_VERSION_7 default "9.2.0" if GCC_VERSION_9 default "8.3.0" diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 883d2a0b4a..8ce8d84a5f 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -32,8 +32,8 @@ ifeq ($(PKG_VERSION),5.5.0) PKG_HASH:=530cea139d82fe542b358961130c69cfde8b3d14556370b65823d2f91f0ced87 endif -ifeq ($(PKG_VERSION),7.4.0) - PKG_HASH:=eddde28d04f334aec1604456e536416549e9b1aa137fc69204e65eb0c009fe51 +ifeq ($(PKG_VERSION),7.5.0) + PKG_HASH:=b81946e7f01f90528a1f7352ab08cc602b9ccc05d4e44da4bd501c5a189ee661 endif ifeq ($(PKG_VERSION),8.3.0) diff --git a/toolchain/gcc/patches/7.4.0/001-revert_register_mode_search.patch b/toolchain/gcc/patches/7.5.0/001-revert_register_mode_search.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/001-revert_register_mode_search.patch rename to toolchain/gcc/patches/7.5.0/001-revert_register_mode_search.patch diff --git a/toolchain/gcc/patches/7.4.0/002-case_insensitive.patch b/toolchain/gcc/patches/7.5.0/002-case_insensitive.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/002-case_insensitive.patch rename to toolchain/gcc/patches/7.5.0/002-case_insensitive.patch diff --git a/toolchain/gcc/patches/7.4.0/010-documentation.patch b/toolchain/gcc/patches/7.5.0/010-documentation.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/010-documentation.patch rename to toolchain/gcc/patches/7.5.0/010-documentation.patch diff --git a/toolchain/gcc/patches/7.4.0/110-Fix-MIPS-PR-84790.patch b/toolchain/gcc/patches/7.5.0/110-Fix-MIPS-PR-84790.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/110-Fix-MIPS-PR-84790.patch rename to toolchain/gcc/patches/7.5.0/110-Fix-MIPS-PR-84790.patch diff --git a/toolchain/gcc/patches/7.4.0/230-musl_libssp.patch b/toolchain/gcc/patches/7.5.0/230-musl_libssp.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/230-musl_libssp.patch rename to toolchain/gcc/patches/7.5.0/230-musl_libssp.patch diff --git a/toolchain/gcc/patches/7.4.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches/7.5.0/300-mips_Os_cpu_rtx_cost_model.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/300-mips_Os_cpu_rtx_cost_model.patch rename to toolchain/gcc/patches/7.5.0/300-mips_Os_cpu_rtx_cost_model.patch diff --git a/toolchain/gcc/patches/7.4.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain/gcc/patches/7.5.0/800-arm_v5te_no_ldrd_strd.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/800-arm_v5te_no_ldrd_strd.patch rename to toolchain/gcc/patches/7.5.0/800-arm_v5te_no_ldrd_strd.patch diff --git a/toolchain/gcc/patches/7.4.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/7.5.0/810-arm-softfloat-libgcc.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/810-arm-softfloat-libgcc.patch rename to toolchain/gcc/patches/7.5.0/810-arm-softfloat-libgcc.patch diff --git a/toolchain/gcc/patches/7.4.0/820-libgcc_pic.patch b/toolchain/gcc/patches/7.5.0/820-libgcc_pic.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/820-libgcc_pic.patch rename to toolchain/gcc/patches/7.5.0/820-libgcc_pic.patch diff --git a/toolchain/gcc/patches/7.4.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/7.5.0/840-armv4_pass_fix-v4bx_to_ld.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/840-armv4_pass_fix-v4bx_to_ld.patch rename to toolchain/gcc/patches/7.5.0/840-armv4_pass_fix-v4bx_to_ld.patch diff --git a/toolchain/gcc/patches/7.4.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches/7.5.0/850-use_shared_libgcc.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/850-use_shared_libgcc.patch rename to toolchain/gcc/patches/7.5.0/850-use_shared_libgcc.patch diff --git a/toolchain/gcc/patches/7.4.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches/7.5.0/851-libgcc_no_compat.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/851-libgcc_no_compat.patch rename to toolchain/gcc/patches/7.5.0/851-libgcc_no_compat.patch diff --git a/toolchain/gcc/patches/7.4.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/7.5.0/870-ppc_no_crtsavres.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/870-ppc_no_crtsavres.patch rename to toolchain/gcc/patches/7.5.0/870-ppc_no_crtsavres.patch diff --git a/toolchain/gcc/patches/7.4.0/881-no_tm_section.patch b/toolchain/gcc/patches/7.5.0/881-no_tm_section.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/881-no_tm_section.patch rename to toolchain/gcc/patches/7.5.0/881-no_tm_section.patch diff --git a/toolchain/gcc/patches/7.4.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches/7.5.0/900-bad-mips16-crt.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/900-bad-mips16-crt.patch rename to toolchain/gcc/patches/7.5.0/900-bad-mips16-crt.patch diff --git a/toolchain/gcc/patches/7.4.0/910-mbsd_multi.patch b/toolchain/gcc/patches/7.5.0/910-mbsd_multi.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/910-mbsd_multi.patch rename to toolchain/gcc/patches/7.5.0/910-mbsd_multi.patch diff --git a/toolchain/gcc/patches/7.4.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/7.5.0/920-specs_nonfatal_getenv.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/920-specs_nonfatal_getenv.patch rename to toolchain/gcc/patches/7.5.0/920-specs_nonfatal_getenv.patch diff --git a/toolchain/gcc/patches/7.4.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/7.5.0/930-fix-mips-noexecstack.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/930-fix-mips-noexecstack.patch rename to toolchain/gcc/patches/7.5.0/930-fix-mips-noexecstack.patch diff --git a/toolchain/gcc/patches/7.4.0/931-libffi-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches/7.5.0/931-libffi-fix-MIPS-softfloat-build-issue.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/931-libffi-fix-MIPS-softfloat-build-issue.patch rename to toolchain/gcc/patches/7.5.0/931-libffi-fix-MIPS-softfloat-build-issue.patch diff --git a/toolchain/gcc/patches/7.4.0/940-no-clobber-stamp-bits.patch b/toolchain/gcc/patches/7.5.0/940-no-clobber-stamp-bits.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/940-no-clobber-stamp-bits.patch rename to toolchain/gcc/patches/7.5.0/940-no-clobber-stamp-bits.patch diff --git a/toolchain/gcc/patches/7.4.0/950-cpp_file_path_translation.patch b/toolchain/gcc/patches/7.5.0/950-cpp_file_path_translation.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/950-cpp_file_path_translation.patch rename to toolchain/gcc/patches/7.5.0/950-cpp_file_path_translation.patch diff --git a/toolchain/gcc/patches/7.4.0/960-gotools-fix-compilation-when-making-cross-compiler.patch b/toolchain/gcc/patches/7.5.0/960-gotools-fix-compilation-when-making-cross-compiler.patch similarity index 100% rename from toolchain/gcc/patches/7.4.0/960-gotools-fix-compilation-when-making-cross-compiler.patch rename to toolchain/gcc/patches/7.5.0/960-gotools-fix-compilation-when-making-cross-compiler.patch From 2d6a062b22c1dd8f1b6aae5235812bf9cfbdad11 Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Wed, 6 Nov 2019 13:38:51 +0100 Subject: [PATCH 11/12] mac80211: backport upstream fixes This potentially fixes some issues seen on IBSS when interfaces go out of range and then re-appear. Signed-off-by: Koen Vandeputte --- ...11-accept-deauth-frames-in-IBSS-mode.patch | 39 +++++++++++++++++++ ...domize-BA-session-dialog-token-alloc.patch | 38 ++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 package/kernel/mac80211/patches/subsys/363-mac80211-accept-deauth-frames-in-IBSS-mode.patch create mode 100644 package/kernel/mac80211/patches/subsys/364-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch diff --git a/package/kernel/mac80211/patches/subsys/363-mac80211-accept-deauth-frames-in-IBSS-mode.patch b/package/kernel/mac80211/patches/subsys/363-mac80211-accept-deauth-frames-in-IBSS-mode.patch new file mode 100644 index 0000000000..ad0792b4f6 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/363-mac80211-accept-deauth-frames-in-IBSS-mode.patch @@ -0,0 +1,39 @@ +From 95697f9907bfe3eab0ef20265a766b22e27dde64 Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Fri, 4 Oct 2019 15:37:05 +0300 +Subject: [PATCH] mac80211: accept deauth frames in IBSS mode + +We can process deauth frames and all, but we drop them very +early in the RX path today - this could never have worked. + +Fixes: 2cc59e784b54 ("mac80211: reply to AUTH with DEAUTH if sta allocation fails in IBSS") +Signed-off-by: Johannes Berg +Signed-off-by: Luca Coelho +Link: https://lore.kernel.org/r/20191004123706.15768-2-luca@coelho.fi +Signed-off-by: Johannes Berg +--- + net/mac80211/rx.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +--- a/net/mac80211/rx.c ++++ b/net/mac80211/rx.c +@@ -3467,9 +3467,18 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_ + case cpu_to_le16(IEEE80211_STYPE_PROBE_RESP): + /* process for all: mesh, mlme, ibss */ + break; ++ case cpu_to_le16(IEEE80211_STYPE_DEAUTH): ++ if (is_multicast_ether_addr(mgmt->da) && ++ !is_broadcast_ether_addr(mgmt->da)) ++ return RX_DROP_MONITOR; ++ ++ /* process only for station/IBSS */ ++ if (sdata->vif.type != NL80211_IFTYPE_STATION && ++ sdata->vif.type != NL80211_IFTYPE_ADHOC) ++ return RX_DROP_MONITOR; ++ break; + case cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP): + case cpu_to_le16(IEEE80211_STYPE_REASSOC_RESP): +- case cpu_to_le16(IEEE80211_STYPE_DEAUTH): + case cpu_to_le16(IEEE80211_STYPE_DISASSOC): + if (is_multicast_ether_addr(mgmt->da) && + !is_broadcast_ether_addr(mgmt->da)) diff --git a/package/kernel/mac80211/patches/subsys/364-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch b/package/kernel/mac80211/patches/subsys/364-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch new file mode 100644 index 0000000000..dc7cac5ad1 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/364-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch @@ -0,0 +1,38 @@ +From b478e06a16a8baa00c5ecc87c1d636981f2206d5 Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Tue, 29 Oct 2019 10:25:25 +0100 +Subject: [PATCH] mac80211: sta: randomize BA session dialog token allocator + +We currently always start the dialog token generator at zero, +so the first dialog token we use is always 1. This would be +OK if we had a perfect guarantee that we always do a proper +deauth/re-auth handshake, but in IBSS mode this doesn't always +happen properly. + +To make problems with block ack (aggregation) sessions getting +stuck less likely, randomize the dialog token so if we start a +new session but the peer still has old state for us, it can +better detect this. + +This is really just a workaround to make things a bit more +robust than they are now - a better fix would be to do a full +authentication handshake in IBSS mode upon having discovered a +new station, and on the receiver resetting the state (removing +and re-adding the station) on receiving the authentication +packet. + +Signed-off-by: Johannes Berg +--- + net/mac80211/sta_info.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/net/mac80211/sta_info.c ++++ b/net/mac80211/sta_info.c +@@ -324,6 +324,7 @@ struct sta_info *sta_info_alloc(struct i + INIT_WORK(&sta->drv_deliver_wk, sta_deliver_ps_frames); + INIT_WORK(&sta->ampdu_mlme.work, ieee80211_ba_session_work); + mutex_init(&sta->ampdu_mlme.mtx); ++ sta->ampdu_mlme.dialog_token_allocator = prandom_u32_max(U8_MAX); + #ifdef CPTCFG_MAC80211_MESH + if (ieee80211_vif_is_mesh(&sdata->vif)) { + sta->mesh = kzalloc(sizeof(*sta->mesh), gfp); From a74095c68c4fc66195f7c4885171e4f1d9e5c5e6 Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Tue, 19 Nov 2019 12:09:03 +0100 Subject: [PATCH 12/12] mac80211: refresh patches Signed-off-by: Koen Vandeputte --- .../build/100-backports-pci-Include-linux-pci-aspm.h.patch | 6 +++--- ...ckport-add-pci_disable_link_state-wrapper-with-ret.patch | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package/kernel/mac80211/patches/build/100-backports-pci-Include-linux-pci-aspm.h.patch b/package/kernel/mac80211/patches/build/100-backports-pci-Include-linux-pci-aspm.h.patch index 5faeb96748..91740a62b9 100644 --- a/package/kernel/mac80211/patches/build/100-backports-pci-Include-linux-pci-aspm.h.patch +++ b/package/kernel/mac80211/patches/build/100-backports-pci-Include-linux-pci-aspm.h.patch @@ -11,9 +11,9 @@ Signed-off-by: Hauke Mehrtens --- a/backport-include/linux/pci.h +++ b/backport-include/linux/pci.h -@@ -3,6 +3,10 @@ - #include_next - #include +@@ -7,6 +7,10 @@ + #include + #endif +#if LINUX_VERSION_IS_LESS(5,4,0) +#include diff --git a/package/kernel/mac80211/patches/build/101-backport-add-pci_disable_link_state-wrapper-with-ret.patch b/package/kernel/mac80211/patches/build/101-backport-add-pci_disable_link_state-wrapper-with-ret.patch index a41879184b..7691522e73 100644 --- a/package/kernel/mac80211/patches/build/101-backport-add-pci_disable_link_state-wrapper-with-ret.patch +++ b/package/kernel/mac80211/patches/build/101-backport-add-pci_disable_link_state-wrapper-with-ret.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/backport-include/linux/pci.h +++ b/backport-include/linux/pci.h -@@ -236,4 +236,29 @@ static inline struct pci_dev *pcie_find_ +@@ -240,4 +240,29 @@ static inline struct pci_dev *pcie_find_ (PCI_IRQ_LEGACY | PCI_IRQ_MSI | PCI_IRQ_MSIX) #endif