From aaa1286b89a058bab2d23f55182453bf1f5a5e69 Mon Sep 17 00:00:00 2001 From: Matt Merhar Date: Sat, 28 Oct 2023 21:15:46 -0400 Subject: [PATCH 1/5] kernel: fix jffs2 compilation with GCC_PLUGIN_RANDSTRUCT enabled Designated initializers are required when using the randstruct GCC plugin, otherwise an error like the following is seen: ./include/linux/lzma.h:60:31: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] This was originally applied via 55643e469c21, but was unintentionally reverted in 483503603cb2. Fixes: 483503603cb2 ("generic: 5.15: rework pending patch") Signed-off-by: Matt Merhar (cherry picked from commit b2068f4aac43754a681b675ff3814d9ca87ac986) [ drop change for unavailable kernel 6.1 ] Signed-off-by: Christian Marangi --- .../generic/pending-5.15/530-jffs2_make_lzma_available.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch b/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch index ac784d0b0b..f236657b71 100644 --- a/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch +++ b/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch @@ -351,7 +351,7 @@ Signed-off-by: Alexandros C. Couloumbis + LZMA_FREE(address); +} + -+static ISzAlloc lzma_alloc = {p_lzma_malloc, p_lzma_free}; ++static ISzAlloc lzma_alloc = { .Alloc = p_lzma_malloc, .Free = p_lzma_free }; + +#endif --- /dev/null From 269896fed0dfc079cee9447cd18624f931b2a738 Mon Sep 17 00:00:00 2001 From: John Audia Date: Wed, 11 Oct 2023 15:53:45 -0400 Subject: [PATCH 2/5] kernel: bump 5.15 to 5.15.135 Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.135 All patches automatically rebased. Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Signed-off-by: John Audia [Refreshed on top of OpenWrt 23.05] Signed-off-by: Hauke Mehrtens (cherry picked from commit 096bb8ed82cebeb8926a5b64466afec649385159) --- include/kernel-5.15 | 4 ++-- .../ath79/patches-5.15/910-unaligned_access_hacks.patch | 8 ++++---- .../711-net-dsa-mv88e6xxx-disable-ATU-violation.patch | 2 +- ...auto-attach-mtd-device-named-ubi-or-data-on-boot.patch | 4 ++-- ...-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 35a21308aa..313e735a54 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .134 -LINUX_KERNEL_HASH-5.15.134 = f37182aecb57ed6853d01e1074d3a60a653331e35f3115728381e08be050b9d3 +LINUX_VERSION-5.15 = .135 +LINUX_KERNEL_HASH-5.15.135 = 14835e629e237f136cfed484fdb533c95242429809bdcdb2a2d66dfcb7447170 diff --git a/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch index 53f5b1472d..47216bee71 100644 --- a/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch @@ -349,7 +349,7 @@ SVN-Revision: 35130 list_for_each_entry(p, head, list) { --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c -@@ -610,48 +610,53 @@ static void tcp_options_write(__be32 *pt +@@ -609,48 +609,53 @@ static void tcp_options_write(__be32 *pt u16 options = opts->options; /* mungable copy */ if (unlikely(OPTION_MD5 & options)) { @@ -426,7 +426,7 @@ SVN-Revision: 35130 } if (unlikely(opts->num_sack_blocks)) { -@@ -659,16 +664,17 @@ static void tcp_options_write(__be32 *pt +@@ -658,16 +663,17 @@ static void tcp_options_write(__be32 *pt tp->duplicate_sack : tp->selective_acks; int this_sack; @@ -450,7 +450,7 @@ SVN-Revision: 35130 } tp->rx_opt.dsack = 0; -@@ -681,13 +687,14 @@ static void tcp_options_write(__be32 *pt +@@ -680,13 +686,14 @@ static void tcp_options_write(__be32 *pt if (foc->exp) { len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len; @@ -750,7 +750,7 @@ SVN-Revision: 35130 EXPORT_SYMBOL(xfrm_parse_spi); --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c -@@ -4157,14 +4157,16 @@ static bool tcp_parse_aligned_timestamp( +@@ -4170,14 +4170,16 @@ static bool tcp_parse_aligned_timestamp( { const __be32 *ptr = (const __be32 *)(th + 1); diff --git a/target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch b/target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch index f6dacb6e50..c5f86c030f 100644 --- a/target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch +++ b/target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch @@ -9,7 +9,7 @@ Subject: [PATCH] net/dsa/mv88e6xxx: disable ATU violation --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -2993,6 +2993,9 @@ static int mv88e6xxx_setup_port(struct m +@@ -2995,6 +2995,9 @@ static int mv88e6xxx_setup_port(struct m else reg = 1 << port; diff --git a/target/linux/generic/pending-5.15/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/pending-5.15/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch index 2751da541a..e8da36edba 100644 --- a/target/linux/generic/pending-5.15/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch +++ b/target/linux/generic/pending-5.15/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch @@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c -@@ -1200,6 +1200,73 @@ static struct mtd_info * __init open_mtd +@@ -1207,6 +1207,73 @@ static struct mtd_info * __init open_mtd return mtd; } @@ -82,7 +82,7 @@ Signed-off-by: Daniel Golle static int __init ubi_init(void) { int err, i, k; -@@ -1283,6 +1350,12 @@ static int __init ubi_init(void) +@@ -1290,6 +1357,12 @@ static int __init ubi_init(void) } } diff --git a/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch index 5aa540acf7..98d5d6d4f0 100644 --- a/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch +++ b/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch @@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -6341,6 +6341,7 @@ static int mv88e6xxx_register_switch(str +@@ -6343,6 +6343,7 @@ static int mv88e6xxx_register_switch(str ds->ops = &mv88e6xxx_switch_ops; ds->ageing_time_min = chip->info->age_time_coeff; ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX; From 8ff92641773605346030b3b56c24a1d8ad5f76ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Thu, 26 Oct 2023 15:53:14 +0200 Subject: [PATCH 3/5] bcm53xx: backport XHCI patch modifying xhci_run_finished() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will help switching to newer 5.15 kernels. This backport required rebasing Northstar's USB host patch. Signed-off-by: Rafał Miłecki (cherry picked from commit c25c1e28b778e185da9253c4638db67952a84476) --- ...upt-disabled-in-initialization-until.patch | 87 +++++++++++++++++++ ...support-for-performing-fake-doorbell.patch | 36 ++------ 2 files changed, 96 insertions(+), 27 deletions(-) create mode 100644 target/linux/bcm53xx/patches-5.15/081-xhci-Keep-interrupt-disabled-in-initialization-until.patch diff --git a/target/linux/bcm53xx/patches-5.15/081-xhci-Keep-interrupt-disabled-in-initialization-until.patch b/target/linux/bcm53xx/patches-5.15/081-xhci-Keep-interrupt-disabled-in-initialization-until.patch new file mode 100644 index 0000000000..78b3aa85e3 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/081-xhci-Keep-interrupt-disabled-in-initialization-until.patch @@ -0,0 +1,87 @@ +From a808925075fb750804a60ff0710614466c396db4 Mon Sep 17 00:00:00 2001 +From: Hongyu Xie +Date: Thu, 23 Jun 2022 14:19:42 +0300 +Subject: [PATCH] xhci: Keep interrupt disabled in initialization until host is + running. + +irq is disabled in xhci_quiesce(called by xhci_halt, with bit:2 cleared +in USBCMD register), but xhci_run(called by usb_add_hcd) re-enable it. +It's possible that you will receive thousands of interrupt requests +after initialization for 2.0 roothub. And you will get a lot of +warning like, "xHCI dying, ignoring interrupt. Shouldn't IRQs be +disabled?". This amount of interrupt requests will cause the entire +system to freeze. +This problem was first found on a device with ASM2142 host controller +on it. + +[tidy up old code while moving it, reword header -Mathias] + +Cc: stable@kernel.org +Signed-off-by: Hongyu Xie +Signed-off-by: Mathias Nyman +Link: https://lore.kernel.org/r/20220623111945.1557702-2-mathias.nyman@linux.intel.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/host/xhci.c | 35 ++++++++++++++++++++++------------- + 1 file changed, 22 insertions(+), 13 deletions(-) + +--- a/drivers/usb/host/xhci.c ++++ b/drivers/usb/host/xhci.c +@@ -611,8 +611,27 @@ static int xhci_init(struct usb_hcd *hcd + + static int xhci_run_finished(struct xhci_hcd *xhci) + { ++ unsigned long flags; ++ u32 temp; ++ ++ /* ++ * Enable interrupts before starting the host (xhci 4.2 and 5.5.2). ++ * Protect the short window before host is running with a lock ++ */ ++ spin_lock_irqsave(&xhci->lock, flags); ++ ++ xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Enable interrupts"); ++ temp = readl(&xhci->op_regs->command); ++ temp |= (CMD_EIE); ++ writel(temp, &xhci->op_regs->command); ++ ++ xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Enable primary interrupter"); ++ temp = readl(&xhci->ir_set->irq_pending); ++ writel(ER_IRQ_ENABLE(temp), &xhci->ir_set->irq_pending); ++ + if (xhci_start(xhci)) { + xhci_halt(xhci); ++ spin_unlock_irqrestore(&xhci->lock, flags); + return -ENODEV; + } + xhci->shared_hcd->state = HC_STATE_RUNNING; +@@ -623,6 +642,9 @@ static int xhci_run_finished(struct xhci + + xhci_dbg_trace(xhci, trace_xhci_dbg_init, + "Finished xhci_run for USB3 roothub"); ++ ++ spin_unlock_irqrestore(&xhci->lock, flags); ++ + return 0; + } + +@@ -671,19 +693,6 @@ int xhci_run(struct usb_hcd *hcd) + temp |= (xhci->imod_interval / 250) & ER_IRQ_INTERVAL_MASK; + writel(temp, &xhci->ir_set->irq_control); + +- /* Set the HCD state before we enable the irqs */ +- temp = readl(&xhci->op_regs->command); +- temp |= (CMD_EIE); +- xhci_dbg_trace(xhci, trace_xhci_dbg_init, +- "// Enable interrupts, cmd = 0x%x.", temp); +- writel(temp, &xhci->op_regs->command); +- +- temp = readl(&xhci->ir_set->irq_pending); +- xhci_dbg_trace(xhci, trace_xhci_dbg_init, +- "// Enabling event ring interrupter %p by writing 0x%x to irq_pending", +- xhci->ir_set, (unsigned int) ER_IRQ_ENABLE(temp)); +- writel(ER_IRQ_ENABLE(temp), &xhci->ir_set->irq_pending); +- + if (xhci->quirks & XHCI_NEC_HOST) { + struct xhci_command *command; + diff --git a/target/linux/bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index 17013c75ba..49277ab251 100644 --- a/target/linux/bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -90,41 +90,23 @@ it on BCM4708 family. /* * Reset a halted HC. * -@@ -611,10 +654,20 @@ static int xhci_init(struct usb_hcd *hcd - - static int xhci_run_finished(struct xhci_hcd *xhci) - { -- if (xhci_start(xhci)) { -- xhci_halt(xhci); -- return -ENODEV; -+ int err; -+ -+ err = xhci_start(xhci); -+ if (err) { -+ err = -ENODEV; -+ goto err_halt; +@@ -634,6 +677,16 @@ static int xhci_run_finished(struct xhci + spin_unlock_irqrestore(&xhci->lock, flags); + return -ENODEV; } + + if (xhci->quirks & XHCI_FAKE_DOORBELL) { -+ err = xhci_fake_doorbell(xhci, 1); -+ if (err) -+ goto err_halt; ++ int err = xhci_fake_doorbell(xhci, 1); ++ if (err) { ++ xhci_halt(xhci); ++ spin_unlock_irqrestore(&xhci->lock, flags); ++ return err; ++ } + } + xhci->shared_hcd->state = HC_STATE_RUNNING; xhci->cmd_ring_state = CMD_RING_STATE_RUNNING; -@@ -624,6 +677,10 @@ static int xhci_run_finished(struct xhci - xhci_dbg_trace(xhci, trace_xhci_dbg_init, - "Finished xhci_run for USB3 roothub"); - return 0; -+ -+err_halt: -+ xhci_halt(xhci); -+ return err; - } - - /* --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1908,6 +1908,7 @@ struct xhci_hcd { From 06efc8027fb5066e818d9b4fd66a3c268c04dea4 Mon Sep 17 00:00:00 2001 From: John Audia Date: Fri, 20 Oct 2023 10:27:12 -0400 Subject: [PATCH 4/5] kernel: bump 5.15 to 5.15.136 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.136 Removed bcm53xx patch backported from 5.15.136: target/linux/bcm53xx/patches-5.15/081-xhci-Keep-interrupt-disabled-in-initialization-until.patch [1] All other patches automatically rebased. Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 1. https://github.com/openwrt/openwrt/pull/13751#issuecomment-1781206937 Signed-off-by: John Audia [rmilecki: updated commit description & tested on Luxul XWR-3150] Signed-off-by: Rafał Miłecki [Refreshed on top of OpenWrt 23.05] Signed-off-by: Hauke Mehrtens (cherry picked from commit 5a6368e85deb1d751238447ea8b289576e701cb0) --- include/kernel-5.15 | 4 +- .../950-0064-Add-dwc_otg-driver.patch | 2 +- ...ware-emulation-of-deprecated-instruc.patch | 4 +- ...hci_fixup_endpoint-for-interval-adju.patch | 4 +- ...vice-quirks-for-A4Tech-FHD-1080p-web.patch | 2 +- ...t-TRBS_PER_SEGMENT-define-in-runtime.patch | 4 +- ...upt-disabled-in-initialization-until.patch | 87 ------------------- 7 files changed, 10 insertions(+), 97 deletions(-) delete mode 100644 target/linux/bcm53xx/patches-5.15/081-xhci-Keep-interrupt-disabled-in-initialization-until.patch diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 313e735a54..3806ef18b4 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .135 -LINUX_KERNEL_HASH-5.15.135 = 14835e629e237f136cfed484fdb533c95242429809bdcdb2a2d66dfcb7447170 +LINUX_VERSION-5.15 = .136 +LINUX_KERNEL_HASH-5.15.136 = c624b9fe7ee4708d34cfd0b7ebc58037afac7463338cc498641ea31c55eeacb8 diff --git a/target/linux/bcm27xx/patches-5.15/950-0064-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-5.15/950-0064-Add-dwc_otg-driver.patch index aabb741503..49283f5563 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0064-Add-dwc_otg-driver.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0064-Add-dwc_otg-driver.patch @@ -1123,7 +1123,7 @@ Signed-off-by: Jonathan Bell } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5640,7 +5640,7 @@ static void port_event(struct usb_hub *h +@@ -5659,7 +5659,7 @@ static void port_event(struct usb_hub *h port_dev->over_current_count++; port_over_current_notify(port_dev); diff --git a/target/linux/bcm27xx/patches-5.15/950-0090-ARM64-Force-hardware-emulation-of-deprecated-instruc.patch b/target/linux/bcm27xx/patches-5.15/950-0090-ARM64-Force-hardware-emulation-of-deprecated-instruc.patch index 3ab51b0f07..33d3e3b7b6 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0090-ARM64-Force-hardware-emulation-of-deprecated-instruc.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0090-ARM64-Force-hardware-emulation-of-deprecated-instruc.patch @@ -10,9 +10,9 @@ Subject: [PATCH] ARM64: Force hardware emulation of deprecated --- a/arch/arm64/kernel/armv8_deprecated.c +++ b/arch/arm64/kernel/armv8_deprecated.c -@@ -183,10 +183,15 @@ static void __init register_insn_emulati +@@ -546,10 +546,15 @@ static void __init register_insn_emulati - switch (ops->status) { + switch (insn->status) { case INSN_DEPRECATED: +#if 0 insn->current_mode = INSN_EMULATE; diff --git a/target/linux/bcm27xx/patches-5.15/950-0152-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-5.15/950-0152-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch index f832fa126c..c1952de661 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0152-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0152-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch @@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -1622,6 +1622,109 @@ command_cleanup: +@@ -1631,6 +1631,109 @@ command_cleanup: } /* @@ -125,7 +125,7 @@ Signed-off-by: Jonathan Bell * non-error returns are a promise to giveback() the urb later * we drop ownership so next owner (or urb unlink) can get it */ -@@ -5461,6 +5564,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5470,6 +5573,7 @@ static const struct hc_driver xhci_hc_dr .endpoint_reset = xhci_endpoint_reset, .check_bandwidth = xhci_check_bandwidth, .reset_bandwidth = xhci_reset_bandwidth, diff --git a/target/linux/bcm27xx/patches-5.15/950-0470-sound-usb-add-device-quirks-for-A4Tech-FHD-1080p-web.patch b/target/linux/bcm27xx/patches-5.15/950-0470-sound-usb-add-device-quirks-for-A4Tech-FHD-1080p-web.patch index d8ee96258d..6dc533b3fe 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0470-sound-usb-add-device-quirks-for-A4Tech-FHD-1080p-web.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0470-sound-usb-add-device-quirks-for-A4Tech-FHD-1080p-web.patch @@ -16,7 +16,7 @@ Signed-off-by: Jonathan Bell --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c -@@ -1884,6 +1884,8 @@ static const struct usb_audio_quirk_flag +@@ -1888,6 +1888,8 @@ static const struct usb_audio_quirk_flag QUIRK_FLAG_GENERIC_IMPLICIT_FB), DEVICE_FLG(0x2b53, 0x0031, /* Fiero SC-01 (firmware v1.1.0) */ QUIRK_FLAG_GENERIC_IMPLICIT_FB), diff --git a/target/linux/bcm27xx/patches-5.15/950-0605-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch b/target/linux/bcm27xx/patches-5.15/950-0605-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch index 792f3bdf0f..917e324a00 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0605-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0605-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch @@ -226,7 +226,7 @@ Signed-off-by: Jonathan Bell } --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -880,8 +880,8 @@ static void xhci_clear_command_ring(stru +@@ -889,8 +889,8 @@ static void xhci_clear_command_ring(stru seg = ring->deq_seg; do { memset(seg->trbs, 0, @@ -237,7 +237,7 @@ Signed-off-by: Jonathan Bell cpu_to_le32(~TRB_CYCLE); seg = seg->next; } while (seg != ring->deq_seg); -@@ -892,7 +892,7 @@ static void xhci_clear_command_ring(stru +@@ -901,7 +901,7 @@ static void xhci_clear_command_ring(stru ring->enq_seg = ring->deq_seg; ring->enqueue = ring->dequeue; diff --git a/target/linux/bcm53xx/patches-5.15/081-xhci-Keep-interrupt-disabled-in-initialization-until.patch b/target/linux/bcm53xx/patches-5.15/081-xhci-Keep-interrupt-disabled-in-initialization-until.patch deleted file mode 100644 index 78b3aa85e3..0000000000 --- a/target/linux/bcm53xx/patches-5.15/081-xhci-Keep-interrupt-disabled-in-initialization-until.patch +++ /dev/null @@ -1,87 +0,0 @@ -From a808925075fb750804a60ff0710614466c396db4 Mon Sep 17 00:00:00 2001 -From: Hongyu Xie -Date: Thu, 23 Jun 2022 14:19:42 +0300 -Subject: [PATCH] xhci: Keep interrupt disabled in initialization until host is - running. - -irq is disabled in xhci_quiesce(called by xhci_halt, with bit:2 cleared -in USBCMD register), but xhci_run(called by usb_add_hcd) re-enable it. -It's possible that you will receive thousands of interrupt requests -after initialization for 2.0 roothub. And you will get a lot of -warning like, "xHCI dying, ignoring interrupt. Shouldn't IRQs be -disabled?". This amount of interrupt requests will cause the entire -system to freeze. -This problem was first found on a device with ASM2142 host controller -on it. - -[tidy up old code while moving it, reword header -Mathias] - -Cc: stable@kernel.org -Signed-off-by: Hongyu Xie -Signed-off-by: Mathias Nyman -Link: https://lore.kernel.org/r/20220623111945.1557702-2-mathias.nyman@linux.intel.com -Signed-off-by: Greg Kroah-Hartman ---- - drivers/usb/host/xhci.c | 35 ++++++++++++++++++++++------------- - 1 file changed, 22 insertions(+), 13 deletions(-) - ---- a/drivers/usb/host/xhci.c -+++ b/drivers/usb/host/xhci.c -@@ -611,8 +611,27 @@ static int xhci_init(struct usb_hcd *hcd - - static int xhci_run_finished(struct xhci_hcd *xhci) - { -+ unsigned long flags; -+ u32 temp; -+ -+ /* -+ * Enable interrupts before starting the host (xhci 4.2 and 5.5.2). -+ * Protect the short window before host is running with a lock -+ */ -+ spin_lock_irqsave(&xhci->lock, flags); -+ -+ xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Enable interrupts"); -+ temp = readl(&xhci->op_regs->command); -+ temp |= (CMD_EIE); -+ writel(temp, &xhci->op_regs->command); -+ -+ xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Enable primary interrupter"); -+ temp = readl(&xhci->ir_set->irq_pending); -+ writel(ER_IRQ_ENABLE(temp), &xhci->ir_set->irq_pending); -+ - if (xhci_start(xhci)) { - xhci_halt(xhci); -+ spin_unlock_irqrestore(&xhci->lock, flags); - return -ENODEV; - } - xhci->shared_hcd->state = HC_STATE_RUNNING; -@@ -623,6 +642,9 @@ static int xhci_run_finished(struct xhci - - xhci_dbg_trace(xhci, trace_xhci_dbg_init, - "Finished xhci_run for USB3 roothub"); -+ -+ spin_unlock_irqrestore(&xhci->lock, flags); -+ - return 0; - } - -@@ -671,19 +693,6 @@ int xhci_run(struct usb_hcd *hcd) - temp |= (xhci->imod_interval / 250) & ER_IRQ_INTERVAL_MASK; - writel(temp, &xhci->ir_set->irq_control); - -- /* Set the HCD state before we enable the irqs */ -- temp = readl(&xhci->op_regs->command); -- temp |= (CMD_EIE); -- xhci_dbg_trace(xhci, trace_xhci_dbg_init, -- "// Enable interrupts, cmd = 0x%x.", temp); -- writel(temp, &xhci->op_regs->command); -- -- temp = readl(&xhci->ir_set->irq_pending); -- xhci_dbg_trace(xhci, trace_xhci_dbg_init, -- "// Enabling event ring interrupter %p by writing 0x%x to irq_pending", -- xhci->ir_set, (unsigned int) ER_IRQ_ENABLE(temp)); -- writel(ER_IRQ_ENABLE(temp), &xhci->ir_set->irq_pending); -- - if (xhci->quirks & XHCI_NEC_HOST) { - struct xhci_command *command; - From 64ab02aff86839dad65d97d38ed302c73b22ad40 Mon Sep 17 00:00:00 2001 From: John Audia Date: Wed, 25 Oct 2023 15:26:53 -0400 Subject: [PATCH 5/5] kernel: bump 5.15 to 5.15.137 Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.137 All patches automatically rebased. Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Signed-off-by: John Audia [Refreshed on top of OpenWrt 23.05] Signed-off-by: Hauke Mehrtens (cherry picked from commit 75aeb7ed627ba5ea6f10f365b232bed21e40b502) --- include/kernel-5.15 | 4 ++-- ...-fixup-modes-that-haven-t-been-reset.patch | 2 +- ...rs-remove-legacy_cursor_update-hacks.patch | 4 ++-- ...dsa-bcm_sf2-refactor-LED-regs-access.patch | 2 +- ...m_sf2-enable-GPHY-for-switch-probing.patch | 2 +- ...sf2-keep-GPHY-enabled-on-the-BCM4908.patch | 2 +- ..._eth_soc-implement-flow-offloading-t.patch | 2 +- ...-users-of-bitmap_foo-to-linkmode_foo.patch | 4 ++-- ...ive-renaming-when-an-interface-is-up.patch | 4 ++-- .../721-net-add-packet-mangeling.patch | 2 +- .../780-usb-net-MeigLink_modem_support.patch | 4 ++-- .../generic/hack-5.15/902-debloat_proc.patch | 4 ++-- ...ng-with-source-address-failed-policy.patch | 2 +- ...T-skip-GRO-for-foreign-MAC-addresses.patch | 10 +++++----- ...ional-threading-for-backlog-processi.patch | 20 +++++++++---------- 15 files changed, 34 insertions(+), 34 deletions(-) diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 3806ef18b4..47db849241 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .136 -LINUX_KERNEL_HASH-5.15.136 = c624b9fe7ee4708d34cfd0b7ebc58037afac7463338cc498641ea31c55eeacb8 +LINUX_VERSION-5.15 = .137 +LINUX_KERNEL_HASH-5.15.137 = 9749b21609f9e7ad9c46160c2c107db823b99cef77fa6cb080b6c2dc685fb2f7 diff --git a/target/linux/bcm27xx/patches-5.15/950-0439-drm-atomic-Don-t-fixup-modes-that-haven-t-been-reset.patch b/target/linux/bcm27xx/patches-5.15/950-0439-drm-atomic-Don-t-fixup-modes-that-haven-t-been-reset.patch index 657e3969a6..96a92663bd 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0439-drm-atomic-Don-t-fixup-modes-that-haven-t-been-reset.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0439-drm-atomic-Don-t-fixup-modes-that-haven-t-been-reset.patch @@ -10,7 +10,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c -@@ -431,6 +431,11 @@ mode_fixup(struct drm_atomic_state *stat +@@ -436,6 +436,11 @@ mode_fixup(struct drm_atomic_state *stat new_crtc_state = drm_atomic_get_new_crtc_state(state, new_conn_state->crtc); diff --git a/target/linux/bcm27xx/patches-5.15/950-0806-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch b/target/linux/bcm27xx/patches-5.15/950-0806-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch index bfcbbe153b..c5380469e9 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0806-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0806-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch @@ -59,7 +59,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c -@@ -1507,13 +1507,6 @@ drm_atomic_helper_wait_for_vblanks(struc +@@ -1516,13 +1516,6 @@ drm_atomic_helper_wait_for_vblanks(struc int i, ret; unsigned int crtc_mask = 0; @@ -73,7 +73,7 @@ Signed-off-by: Maxime Ripard for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { if (!new_crtc_state->active) continue; -@@ -2141,12 +2134,6 @@ int drm_atomic_helper_setup_commit(struc +@@ -2150,12 +2143,6 @@ int drm_atomic_helper_setup_commit(struc complete_all(&commit->flip_done); continue; } diff --git a/target/linux/bcm4908/patches-5.15/070-v5.17-net-dsa-bcm_sf2-refactor-LED-regs-access.patch b/target/linux/bcm4908/patches-5.15/070-v5.17-net-dsa-bcm_sf2-refactor-LED-regs-access.patch index fd0b13c17b..e01c1e4728 100644 --- a/target/linux/bcm4908/patches-5.15/070-v5.17-net-dsa-bcm_sf2-refactor-LED-regs-access.patch +++ b/target/linux/bcm4908/patches-5.15/070-v5.17-net-dsa-bcm_sf2-refactor-LED-regs-access.patch @@ -82,7 +82,7 @@ Signed-off-by: Jakub Kicinski } } -@@ -1241,9 +1278,14 @@ static const u16 bcm_sf2_4908_reg_offset +@@ -1247,9 +1284,14 @@ static const u16 bcm_sf2_4908_reg_offset [REG_SPHY_CNTRL] = 0x24, [REG_CROSSBAR] = 0xc8, [REG_RGMII_11_CNTRL] = 0x014c, diff --git a/target/linux/bcm4908/patches-5.15/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch b/target/linux/bcm4908/patches-5.15/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch index ba09c562ae..165b02da0f 100644 --- a/target/linux/bcm4908/patches-5.15/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch +++ b/target/linux/bcm4908/patches-5.15/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch @@ -29,7 +29,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c -@@ -1542,10 +1542,14 @@ static int bcm_sf2_sw_probe(struct platf +@@ -1548,10 +1548,14 @@ static int bcm_sf2_sw_probe(struct platf rev = reg_readl(priv, REG_PHY_REVISION); priv->hw_params.gphy_rev = rev & PHY_REVISION_MASK; diff --git a/target/linux/bcm4908/patches-5.15/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch b/target/linux/bcm4908/patches-5.15/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch index b5baa8717e..ea0adca26f 100644 --- a/target/linux/bcm4908/patches-5.15/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch +++ b/target/linux/bcm4908/patches-5.15/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch @@ -15,7 +15,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c -@@ -1556,6 +1556,12 @@ static int bcm_sf2_sw_probe(struct platf +@@ -1562,6 +1562,12 @@ static int bcm_sf2_sw_probe(struct platf priv->hw_params.core_rev >> 8, priv->hw_params.core_rev & 0xff, priv->irq0, priv->irq1); diff --git a/target/linux/generic/backport-5.15/702-v5.19-03-net-ethernet-mtk_eth_soc-implement-flow-offloading-t.patch b/target/linux/generic/backport-5.15/702-v5.19-03-net-ethernet-mtk_eth_soc-implement-flow-offloading-t.patch index ef2f53aa38..69113c2ffa 100644 --- a/target/linux/generic/backport-5.15/702-v5.19-03-net-ethernet-mtk_eth_soc-implement-flow-offloading-t.patch +++ b/target/linux/generic/backport-5.15/702-v5.19-03-net-ethernet-mtk_eth_soc-implement-flow-offloading-t.patch @@ -256,7 +256,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -763,6 +763,10 @@ int dev_fill_forward_path(const struct n +@@ -769,6 +769,10 @@ int dev_fill_forward_path(const struct n if (WARN_ON_ONCE(last_dev == ctx.dev)) return -1; } diff --git a/target/linux/generic/backport-5.15/703-00-v5.16-net-convert-users-of-bitmap_foo-to-linkmode_foo.patch b/target/linux/generic/backport-5.15/703-00-v5.16-net-convert-users-of-bitmap_foo-to-linkmode_foo.patch index 2f8128b3f3..284a6d0722 100644 --- a/target/linux/generic/backport-5.15/703-00-v5.16-net-convert-users-of-bitmap_foo-to-linkmode_foo.patch +++ b/target/linux/generic/backport-5.15/703-00-v5.16-net-convert-users-of-bitmap_foo-to-linkmode_foo.patch @@ -304,7 +304,7 @@ Signed-off-by: David S. Miller } --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c -@@ -686,7 +686,7 @@ static void bcm_sf2_sw_validate(struct d +@@ -692,7 +692,7 @@ static void bcm_sf2_sw_validate(struct d state->interface != PHY_INTERFACE_MODE_GMII && state->interface != PHY_INTERFACE_MODE_INTERNAL && state->interface != PHY_INTERFACE_MODE_MOCA) { @@ -313,7 +313,7 @@ Signed-off-by: David S. Miller if (port != core_readl(priv, CORE_IMP0_PRT_ID)) dev_err(ds->dev, "Unsupported interface: %d for port %d\n", -@@ -714,10 +714,8 @@ static void bcm_sf2_sw_validate(struct d +@@ -720,10 +720,8 @@ static void bcm_sf2_sw_validate(struct d phylink_set(mask, 100baseT_Half); phylink_set(mask, 100baseT_Full); diff --git a/target/linux/generic/backport-5.15/794-v6.2-net-core-Allow-live-renaming-when-an-interface-is-up.patch b/target/linux/generic/backport-5.15/794-v6.2-net-core-Allow-live-renaming-when-an-interface-is-up.patch index bd58db2e77..582e1ce2ef 100644 --- a/target/linux/generic/backport-5.15/794-v6.2-net-core-Allow-live-renaming-when-an-interface-is-up.patch +++ b/target/linux/generic/backport-5.15/794-v6.2-net-core-Allow-live-renaming-when-an-interface-is-up.patch @@ -73,7 +73,7 @@ Signed-off-by: David S. Miller /* Specifies the type of the struct net_device::ml_priv pointer */ --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -1222,22 +1222,6 @@ int dev_change_name(struct net_device *d +@@ -1242,22 +1242,6 @@ int dev_change_name(struct net_device *d net = dev_net(dev); @@ -96,7 +96,7 @@ Signed-off-by: David S. Miller down_write(&devnet_rename_sem); if (strncmp(newname, dev->name, IFNAMSIZ) == 0) { -@@ -1254,7 +1238,8 @@ int dev_change_name(struct net_device *d +@@ -1274,7 +1258,8 @@ int dev_change_name(struct net_device *d } if (oldname[0] && !strchr(oldname, '%')) diff --git a/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch index fcaed01cad..ac9a161b5f 100644 --- a/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch +++ b/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch @@ -116,7 +116,7 @@ Signed-off-by: Felix Fietkau help --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3577,6 +3577,11 @@ static int xmit_one(struct sk_buff *skb, +@@ -3597,6 +3597,11 @@ static int xmit_one(struct sk_buff *skb, if (dev_nit_active(dev)) dev_queue_xmit_nit(skb, dev); diff --git a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch index 5c1dbd69d3..e5667c1743 100644 --- a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch +++ b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch @@ -20,7 +20,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support {QMI_FIXED_INTF(0x0408, 0xea42, 4)}, /* Yota / Megafon M100-1 */ --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c -@@ -244,6 +244,8 @@ static void option_instat_callback(struc +@@ -247,6 +247,8 @@ static void option_instat_callback(struc #define UBLOX_PRODUCT_R410M 0x90b2 /* These Yuga products use Qualcomm's vendor ID */ #define YUGA_PRODUCT_CLM920_NC5 0x9625 @@ -29,7 +29,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support #define QUECTEL_VENDOR_ID 0x2c7c /* These Quectel products use Quectel's vendor ID */ -@@ -1180,6 +1182,11 @@ static const struct usb_device_id option +@@ -1185,6 +1187,11 @@ static const struct usb_device_id option .driver_info = ZLP }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), .driver_info = RSVD(4) }, diff --git a/target/linux/generic/hack-5.15/902-debloat_proc.patch b/target/linux/generic/hack-5.15/902-debloat_proc.patch index 58c2026c48..768d3e1f0c 100644 --- a/target/linux/generic/hack-5.15/902-debloat_proc.patch +++ b/target/linux/generic/hack-5.15/902-debloat_proc.patch @@ -341,7 +341,7 @@ Signed-off-by: Felix Fietkau --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c -@@ -3025,11 +3025,13 @@ static const struct seq_operations fib_r +@@ -3029,11 +3029,13 @@ static const struct seq_operations fib_r int __net_init fib_proc_init(struct net *net) { @@ -357,7 +357,7 @@ Signed-off-by: Felix Fietkau fib_triestat_seq_show, NULL)) goto out2; -@@ -3040,17 +3042,21 @@ int __net_init fib_proc_init(struct net +@@ -3044,17 +3046,21 @@ int __net_init fib_proc_init(struct net return 0; out3: diff --git a/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 351d5864a1..7aaac96531 100644 --- a/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -66,7 +66,7 @@ Signed-off-by: Jonas Gorski static void rt_fibinfo_free(struct rtable __rcu **rtp) --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c -@@ -2773,6 +2773,7 @@ static const char *const rtn_type_names[ +@@ -2777,6 +2777,7 @@ static const char *const rtn_type_names[ [RTN_THROW] = "THROW", [RTN_NAT] = "NAT", [RTN_XRESOLVE] = "XRESOLVE", diff --git a/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 71b3aac846..46856e1552 100644 --- a/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau __u8 inner_protocol_type:1; --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6054,6 +6054,9 @@ static enum gro_result dev_gro_receive(s +@@ -6074,6 +6074,9 @@ static enum gro_result dev_gro_receive(s int same_flow; int grow; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau if (netif_elide_gro(skb->dev)) goto normal; -@@ -8068,6 +8071,48 @@ static void __netdev_adjacent_dev_unlink +@@ -8088,6 +8091,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info, -@@ -8119,6 +8164,7 @@ static int __netdev_upper_dev_link(struc +@@ -8139,6 +8184,7 @@ static int __netdev_upper_dev_link(struc if (ret) return ret; @@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); ret = notifier_to_errno(ret); -@@ -8215,6 +8261,7 @@ static void __netdev_upper_dev_unlink(st +@@ -8235,6 +8281,7 @@ static void __netdev_upper_dev_unlink(st __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); @@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, &changeupper_info.info); -@@ -9034,6 +9081,7 @@ int dev_set_mac_address(struct net_devic +@@ -9054,6 +9101,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/generic/pending-5.15/760-net-core-add-optional-threading-for-backlog-processi.patch b/target/linux/generic/pending-5.15/760-net-core-add-optional-threading-for-backlog-processi.patch index 8a65cbe021..62daef91b1 100644 --- a/target/linux/generic/pending-5.15/760-net-core-add-optional-threading-for-backlog-processi.patch +++ b/target/linux/generic/pending-5.15/760-net-core-add-optional-threading-for-backlog-processi.patch @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau /** * napi_disable - prevent NAPI from scheduling -@@ -3362,6 +3363,7 @@ struct softnet_data { +@@ -3363,6 +3364,7 @@ struct softnet_data { unsigned int processed; unsigned int time_squeeze; unsigned int received_rps; @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau #endif --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4563,7 +4563,7 @@ static int rps_ipi_queued(struct softnet +@@ -4583,7 +4583,7 @@ static int rps_ipi_queued(struct softnet #ifdef CONFIG_RPS struct softnet_data *mysd = this_cpu_ptr(&softnet_data); @@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau sd->rps_ipi_next = mysd->rps_ipi_list; mysd->rps_ipi_list = sd; -@@ -5744,6 +5744,8 @@ static DEFINE_PER_CPU(struct work_struct +@@ -5764,6 +5764,8 @@ static DEFINE_PER_CPU(struct work_struct /* Network device is going away, flush any packets still pending */ static void flush_backlog(struct work_struct *work) { @@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau struct sk_buff *skb, *tmp; struct softnet_data *sd; -@@ -5759,9 +5761,18 @@ static void flush_backlog(struct work_st +@@ -5779,9 +5781,18 @@ static void flush_backlog(struct work_st input_queue_head_incr(sd); } } @@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau skb_queue_walk_safe(&sd->process_queue, skb, tmp) { if (skb->dev->reg_state == NETREG_UNREGISTERING) { __skb_unlink(skb, &sd->process_queue); -@@ -5769,7 +5780,18 @@ static void flush_backlog(struct work_st +@@ -5789,7 +5800,18 @@ static void flush_backlog(struct work_st input_queue_head_incr(sd); } } @@ -86,7 +86,7 @@ Signed-off-by: Felix Fietkau } static bool flush_required(int cpu) -@@ -6452,6 +6474,7 @@ static int process_backlog(struct napi_s +@@ -6472,6 +6494,7 @@ static int process_backlog(struct napi_s local_irq_disable(); rps_lock(sd); @@ -94,7 +94,7 @@ Signed-off-by: Felix Fietkau if (skb_queue_empty(&sd->input_pkt_queue)) { /* * Inline a custom version of __napi_complete(). -@@ -6461,7 +6484,8 @@ static int process_backlog(struct napi_s +@@ -6481,7 +6504,8 @@ static int process_backlog(struct napi_s * We can use a plain write instead of clear_bit(), * and we dont need an smp_mb() memory barrier. */ @@ -104,7 +104,7 @@ Signed-off-by: Felix Fietkau again = false; } else { skb_queue_splice_tail_init(&sd->input_pkt_queue, -@@ -6878,6 +6902,57 @@ int dev_set_threaded(struct net_device * +@@ -6898,6 +6922,57 @@ int dev_set_threaded(struct net_device * } EXPORT_SYMBOL(dev_set_threaded); @@ -162,7 +162,7 @@ Signed-off-by: Felix Fietkau void netif_napi_add(struct net_device *dev, struct napi_struct *napi, int (*poll)(struct napi_struct *, int), int weight) { -@@ -11354,6 +11429,9 @@ static int dev_cpu_dead(unsigned int old +@@ -11378,6 +11453,9 @@ static int dev_cpu_dead(unsigned int old raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_enable(); @@ -172,7 +172,7 @@ Signed-off-by: Felix Fietkau #ifdef CONFIG_RPS remsd = oldsd->rps_ipi_list; oldsd->rps_ipi_list = NULL; -@@ -11693,6 +11771,7 @@ static int __init net_dev_init(void) +@@ -11717,6 +11795,7 @@ static int __init net_dev_init(void) sd->cpu = i; #endif