]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 6.1
authorSasha Levin <sashal@kernel.org>
Wed, 4 Sep 2024 10:27:27 +0000 (06:27 -0400)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Sep 2024 10:27:27 +0000 (06:27 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
14 files changed:
queue-6.1/alsa-hda-conexant-mute-speakers-at-suspend-shutdown.patch [new file with mode: 0644]
queue-6.1/alsa-hda-generic-add-a-helper-to-mute-speakers-at-su.patch [new file with mode: 0644]
queue-6.1/asoc-amd-yc-support-mic-on-lenovo-thinkpad-e14-gen-6.patch [new file with mode: 0644]
queue-6.1/dma-debug-avoid-deadlock-between-dma-debug-vs-printk.patch [new file with mode: 0644]
queue-6.1/drm-panel-orientation-quirks-add-quirk-for-orangepi-.patch [new file with mode: 0644]
queue-6.1/i2c-fix-conditional-for-substituting-empty-acpi-func.patch [new file with mode: 0644]
queue-6.1/mptcp-make-pm_remove_addrs_and_subflows-static.patch [new file with mode: 0644]
queue-6.1/mptcp-pm-fix-rm_addr-id-for-the-initial-subflow.patch [new file with mode: 0644]
queue-6.1/net-usb-qmi_wwan-add-meig-smart-srm825l.patch [new file with mode: 0644]
queue-6.1/scsi-ufs-core-bypass-quick-recovery-if-force-reset-i.patch [new file with mode: 0644]
queue-6.1/selftests-mptcp-add-explicit-test-case-for-remove-re.patch [new file with mode: 0644]
queue-6.1/selftests-mptcp-join-check-re-adding-init-endp-with-.patch [new file with mode: 0644]
queue-6.1/selftests-mptcp-join-check-re-using-id-of-unused-add.patch [new file with mode: 0644]
queue-6.1/series [new file with mode: 0644]

diff --git a/queue-6.1/alsa-hda-conexant-mute-speakers-at-suspend-shutdown.patch b/queue-6.1/alsa-hda-conexant-mute-speakers-at-suspend-shutdown.patch
new file mode 100644 (file)
index 0000000..cdd1bd4
--- /dev/null
@@ -0,0 +1,36 @@
+From bb0488e2140245bac50a0dc0e47fcc6e7c440569 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 26 Jul 2024 16:26:20 +0200
+Subject: ALSA: hda/conexant: Mute speakers at suspend / shutdown
+
+From: Takashi Iwai <tiwai@suse.de>
+
+[ Upstream commit 4f61c8fe35202702426cfc0003e15116a01ba885 ]
+
+Use the new helper to mute speakers at suspend / shutdown for avoiding
+click noises.
+
+Link: https://bugzilla.suse.com/show_bug.cgi?id=1228269
+Link: https://patch.msgid.link/20240726142625.2460-2-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/pci/hda/patch_conexant.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
+index af921364195e4..8396d1d93668c 100644
+--- a/sound/pci/hda/patch_conexant.c
++++ b/sound/pci/hda/patch_conexant.c
+@@ -205,6 +205,8 @@ static void cx_auto_shutdown(struct hda_codec *codec)
+ {
+       struct conexant_spec *spec = codec->spec;
++      snd_hda_gen_shutup_speakers(codec);
++
+       /* Turn the problematic codec into D3 to avoid spurious noises
+          from the internal speaker during (and after) reboot */
+       cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, false);
+-- 
+2.43.0
+
diff --git a/queue-6.1/alsa-hda-generic-add-a-helper-to-mute-speakers-at-su.patch b/queue-6.1/alsa-hda-generic-add-a-helper-to-mute-speakers-at-su.patch
new file mode 100644 (file)
index 0000000..0624513
--- /dev/null
@@ -0,0 +1,114 @@
+From 18f1487189748cd6fce04bd3baa163d463c31959 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 26 Jul 2024 16:26:19 +0200
+Subject: ALSA: hda/generic: Add a helper to mute speakers at suspend/shutdown
+
+From: Takashi Iwai <tiwai@suse.de>
+
+[ Upstream commit 6cd23b26b348fa52c88e1adf9c0e48d68e13f95e ]
+
+Some devices indicate click noises at suspend or shutdown when the
+speakers are unmuted.  This patch adds a helper,
+snd_hda_gen_shutup_speakers(), to work around it.  The new function is
+supposed to be called at suspend or shutdown by the codec driver, and
+it mutes the speakers.
+
+The mute status isn't cached, hence the original mute state will be
+restored at resume again.
+
+Link: https://patch.msgid.link/20240726142625.2460-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/pci/hda/hda_generic.c | 63 +++++++++++++++++++++++++++++++++++++
+ sound/pci/hda/hda_generic.h |  1 +
+ 2 files changed, 64 insertions(+)
+
+diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
+index dbf7aa88e0e31..992cf82da1024 100644
+--- a/sound/pci/hda/hda_generic.c
++++ b/sound/pci/hda/hda_generic.c
+@@ -4952,6 +4952,69 @@ void snd_hda_gen_stream_pm(struct hda_codec *codec, hda_nid_t nid, bool on)
+ }
+ EXPORT_SYMBOL_GPL(snd_hda_gen_stream_pm);
++/* forcibly mute the speaker output without caching; return true if updated */
++static bool force_mute_output_path(struct hda_codec *codec, hda_nid_t nid)
++{
++      if (!nid)
++              return false;
++      if (!nid_has_mute(codec, nid, HDA_OUTPUT))
++              return false; /* no mute, skip */
++      if (snd_hda_codec_amp_read(codec, nid, 0, HDA_OUTPUT, 0) &
++          snd_hda_codec_amp_read(codec, nid, 1, HDA_OUTPUT, 0) &
++          HDA_AMP_MUTE)
++              return false; /* both channels already muted, skip */
++
++      /* direct amp update without caching */
++      snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE,
++                          AC_AMP_SET_OUTPUT | AC_AMP_SET_LEFT |
++                          AC_AMP_SET_RIGHT | HDA_AMP_MUTE);
++      return true;
++}
++
++/**
++ * snd_hda_gen_shutup_speakers - Forcibly mute the speaker outputs
++ * @codec: the HDA codec
++ *
++ * Forcibly mute the speaker outputs, to be called at suspend or shutdown.
++ *
++ * The mute state done by this function isn't cached, hence the original state
++ * will be restored at resume.
++ *
++ * Return true if the mute state has been changed.
++ */
++bool snd_hda_gen_shutup_speakers(struct hda_codec *codec)
++{
++      struct hda_gen_spec *spec = codec->spec;
++      const int *paths;
++      const struct nid_path *path;
++      int i, p, num_paths;
++      bool updated = false;
++
++      /* if already powered off, do nothing */
++      if (!snd_hdac_is_power_on(&codec->core))
++              return false;
++
++      if (spec->autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT) {
++              paths = spec->out_paths;
++              num_paths = spec->autocfg.line_outs;
++      } else {
++              paths = spec->speaker_paths;
++              num_paths = spec->autocfg.speaker_outs;
++      }
++
++      for (i = 0; i < num_paths; i++) {
++              path = snd_hda_get_path_from_idx(codec, paths[i]);
++              if (!path)
++                      continue;
++              for (p = 0; p < path->depth; p++)
++                      if (force_mute_output_path(codec, path->path[p]))
++                              updated = true;
++      }
++
++      return updated;
++}
++EXPORT_SYMBOL_GPL(snd_hda_gen_shutup_speakers);
++
+ /**
+  * snd_hda_gen_parse_auto_config - Parse the given BIOS configuration and
+  * set up the hda_gen_spec
+diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
+index 34eba40cc6e67..fb3ce68e2d717 100644
+--- a/sound/pci/hda/hda_generic.h
++++ b/sound/pci/hda/hda_generic.h
+@@ -352,5 +352,6 @@ int snd_hda_gen_add_mute_led_cdev(struct hda_codec *codec,
+ int snd_hda_gen_add_micmute_led_cdev(struct hda_codec *codec,
+                                    int (*callback)(struct led_classdev *,
+                                                    enum led_brightness));
++bool snd_hda_gen_shutup_speakers(struct hda_codec *codec);
+ #endif /* __SOUND_HDA_GENERIC_H */
+-- 
+2.43.0
+
diff --git a/queue-6.1/asoc-amd-yc-support-mic-on-lenovo-thinkpad-e14-gen-6.patch b/queue-6.1/asoc-amd-yc-support-mic-on-lenovo-thinkpad-e14-gen-6.patch
new file mode 100644 (file)
index 0000000..2a3de53
--- /dev/null
@@ -0,0 +1,44 @@
+From 314a48635985ee1e6d864e3107b299fb074568d7 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 7 Aug 2024 02:12:19 +0200
+Subject: ASoC: amd: yc: Support mic on Lenovo Thinkpad E14 Gen 6
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Krzysztof Stępniak <kfs.szk@gmail.com>
+
+[ Upstream commit 23a58b782f864951485d7a0018549729e007cb43 ]
+
+Lenovo Thinkpad E14 Gen 6 (model type 21M3)
+needs a quirk entry for internal mic to work.
+
+Signed-off-by: Krzysztof Stępniak <kfs.szk@gmail.com>
+Link: https://patch.msgid.link/20240807001219.1147-1-kfs.szk@gmail.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/amd/yc/acp6x-mach.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c
+index b4a40a880035c..de655f687dd7d 100644
+--- a/sound/soc/amd/yc/acp6x-mach.c
++++ b/sound/soc/amd/yc/acp6x-mach.c
+@@ -220,6 +220,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
+                       DMI_MATCH(DMI_PRODUCT_NAME, "21J6"),
+               }
+       },
++      {
++              .driver_data = &acp6x_card,
++              .matches = {
++                      DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
++                      DMI_MATCH(DMI_PRODUCT_NAME, "21M3"),
++              }
++      },
+       {
+               .driver_data = &acp6x_card,
+               .matches = {
+-- 
+2.43.0
+
diff --git a/queue-6.1/dma-debug-avoid-deadlock-between-dma-debug-vs-printk.patch b/queue-6.1/dma-debug-avoid-deadlock-between-dma-debug-vs-printk.patch
new file mode 100644 (file)
index 0000000..3163491
--- /dev/null
@@ -0,0 +1,112 @@
+From f0f7c26d7215a1a97027638c11999e77bb99325e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 6 Aug 2024 11:56:45 -0400
+Subject: dma-debug: avoid deadlock between dma debug vs printk and netconsole
+
+From: Rik van Riel <riel@surriel.com>
+
+[ Upstream commit bd44ca3de49cc1badcff7a96010fa2c64f04868c ]
+
+Currently the dma debugging code can end up indirectly calling printk
+under the radix_lock. This happens when a radix tree node allocation
+fails.
+
+This is a problem because the printk code, when used together with
+netconsole, can end up inside the dma debugging code while trying to
+transmit a message over netcons.
+
+This creates the possibility of either a circular deadlock on the same
+CPU, with that CPU trying to grab the radix_lock twice, or an ABBA
+deadlock between different CPUs, where one CPU grabs the console lock
+first and then waits for the radix_lock, while the other CPU is holding
+the radix_lock and is waiting for the console lock.
+
+The trace captured by lockdep is of the ABBA variant.
+
+-> #2 (&dma_entry_hash[i].lock){-.-.}-{2:2}:
+                  _raw_spin_lock_irqsave+0x5a/0x90
+                  debug_dma_map_page+0x79/0x180
+                  dma_map_page_attrs+0x1d2/0x2f0
+                  bnxt_start_xmit+0x8c6/0x1540
+                  netpoll_start_xmit+0x13f/0x180
+                  netpoll_send_skb+0x20d/0x320
+                  netpoll_send_udp+0x453/0x4a0
+                  write_ext_msg+0x1b9/0x460
+                  console_flush_all+0x2ff/0x5a0
+                  console_unlock+0x55/0x180
+                  vprintk_emit+0x2e3/0x3c0
+                  devkmsg_emit+0x5a/0x80
+                  devkmsg_write+0xfd/0x180
+                  do_iter_readv_writev+0x164/0x1b0
+                  vfs_writev+0xf9/0x2b0
+                  do_writev+0x6d/0x110
+                  do_syscall_64+0x80/0x150
+                  entry_SYSCALL_64_after_hwframe+0x4b/0x53
+
+-> #0 (console_owner){-.-.}-{0:0}:
+                  __lock_acquire+0x15d1/0x31a0
+                  lock_acquire+0xe8/0x290
+                  console_flush_all+0x2ea/0x5a0
+                  console_unlock+0x55/0x180
+                  vprintk_emit+0x2e3/0x3c0
+                  _printk+0x59/0x80
+                  warn_alloc+0x122/0x1b0
+                  __alloc_pages_slowpath+0x1101/0x1120
+                  __alloc_pages+0x1eb/0x2c0
+                  alloc_slab_page+0x5f/0x150
+                  new_slab+0x2dc/0x4e0
+                  ___slab_alloc+0xdcb/0x1390
+                  kmem_cache_alloc+0x23d/0x360
+                  radix_tree_node_alloc+0x3c/0xf0
+                  radix_tree_insert+0xf5/0x230
+                  add_dma_entry+0xe9/0x360
+                  dma_map_page_attrs+0x1d2/0x2f0
+                  __bnxt_alloc_rx_frag+0x147/0x180
+                  bnxt_alloc_rx_data+0x79/0x160
+                  bnxt_rx_skb+0x29/0xc0
+                  bnxt_rx_pkt+0xe22/0x1570
+                  __bnxt_poll_work+0x101/0x390
+                  bnxt_poll+0x7e/0x320
+                  __napi_poll+0x29/0x160
+                  net_rx_action+0x1e0/0x3e0
+                  handle_softirqs+0x190/0x510
+                  run_ksoftirqd+0x4e/0x90
+                  smpboot_thread_fn+0x1a8/0x270
+                  kthread+0x102/0x120
+                  ret_from_fork+0x2f/0x40
+                  ret_from_fork_asm+0x11/0x20
+
+This bug is more likely than it seems, because when one CPU has run out
+of memory, chances are the other has too.
+
+The good news is, this bug is hidden behind the CONFIG_DMA_API_DEBUG, so
+not many users are likely to trigger it.
+
+Signed-off-by: Rik van Riel <riel@surriel.com>
+Reported-by: Konstantin Ovsepian <ovs@meta.com>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ kernel/dma/debug.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c
+index 3ff7089d11a92..de02c0808fb83 100644
+--- a/kernel/dma/debug.c
++++ b/kernel/dma/debug.c
+@@ -445,8 +445,11 @@ void debug_dma_dump_mappings(struct device *dev)
+  * dma_active_cacheline entry to track per event.  dma_map_sg(), on the
+  * other hand, consumes a single dma_debug_entry, but inserts 'nents'
+  * entries into the tree.
++ *
++ * Use __GFP_NOWARN because the printk from an OOM, to netconsole, could end
++ * up right back in the DMA debugging code, leading to a deadlock.
+  */
+-static RADIX_TREE(dma_active_cacheline, GFP_ATOMIC);
++static RADIX_TREE(dma_active_cacheline, GFP_ATOMIC | __GFP_NOWARN);
+ static DEFINE_SPINLOCK(radix_lock);
+ #define ACTIVE_CACHELINE_MAX_OVERLAP ((1 << RADIX_TREE_MAX_TAGS) - 1)
+ #define CACHELINE_PER_PAGE_SHIFT (PAGE_SHIFT - L1_CACHE_SHIFT)
+-- 
+2.43.0
+
diff --git a/queue-6.1/drm-panel-orientation-quirks-add-quirk-for-orangepi-.patch b/queue-6.1/drm-panel-orientation-quirks-add-quirk-for-orangepi-.patch
new file mode 100644 (file)
index 0000000..d314249
--- /dev/null
@@ -0,0 +1,41 @@
+From 3402d0a6790dd1f3a78d9b79c04809a11cac77b0 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 15 Jul 2024 11:57:49 +0700
+Subject: drm: panel-orientation-quirks: Add quirk for OrangePi Neo
+
+From: Philip Mueller <philm@manjaro.org>
+
+[ Upstream commit d60c429610a14560085d98fa6f4cdb43040ca8f0 ]
+
+This adds a DMI orientation quirk for the OrangePi Neo Linux Gaming
+Handheld.
+
+Signed-off-by: Philip Mueller <philm@manjaro.org>
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20240715045818.1019979-1-philm@manjaro.org
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
+index 5db52d6c5c35c..039da0d1a613b 100644
+--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
++++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
+@@ -414,6 +414,12 @@ static const struct dmi_system_id orientation_data[] = {
+                 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "ONE XPLAYER"),
+               },
+               .driver_data = (void *)&lcd1600x2560_leftside_up,
++      }, {    /* OrangePi Neo */
++              .matches = {
++                DMI_EXACT_MATCH(DMI_SYS_VENDOR, "OrangePi"),
++                DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "NEO-01"),
++              },
++              .driver_data = (void *)&lcd1200x1920_rightside_up,
+       }, {    /* Samsung GalaxyBook 10.6 */
+               .matches = {
+                 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
+-- 
+2.43.0
+
diff --git a/queue-6.1/i2c-fix-conditional-for-substituting-empty-acpi-func.patch b/queue-6.1/i2c-fix-conditional-for-substituting-empty-acpi-func.patch
new file mode 100644 (file)
index 0000000..6ce1d8a
--- /dev/null
@@ -0,0 +1,39 @@
+From 59517d5406f818b44c73e7ac8771c98b88cfa730 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 2 Aug 2024 16:22:14 +0100
+Subject: i2c: Fix conditional for substituting empty ACPI functions
+
+From: Richard Fitzgerald <rf@opensource.cirrus.com>
+
+[ Upstream commit f17c06c6608ad4ecd2ccf321753fb511812d821b ]
+
+Add IS_ENABLED(CONFIG_I2C) to the conditional around a bunch of ACPI
+functions.
+
+The conditional around these functions depended only on CONFIG_ACPI.
+But the functions are implemented in I2C core, so are only present if
+CONFIG_I2C is enabled.
+
+Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
+Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/linux/i2c.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/linux/i2c.h b/include/linux/i2c.h
+index cfc59c3371cb2..aeb94241db52e 100644
+--- a/include/linux/i2c.h
++++ b/include/linux/i2c.h
+@@ -1035,7 +1035,7 @@ static inline int of_i2c_get_board_info(struct device *dev,
+ struct acpi_resource;
+ struct acpi_resource_i2c_serialbus;
+-#if IS_ENABLED(CONFIG_ACPI)
++#if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_I2C)
+ bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares,
+                              struct acpi_resource_i2c_serialbus **i2c);
+ int i2c_acpi_client_count(struct acpi_device *adev);
+-- 
+2.43.0
+
diff --git a/queue-6.1/mptcp-make-pm_remove_addrs_and_subflows-static.patch b/queue-6.1/mptcp-make-pm_remove_addrs_and_subflows-static.patch
new file mode 100644 (file)
index 0000000..c85a7e1
--- /dev/null
@@ -0,0 +1,56 @@
+From 7b82404c061c122b4f6efb1918d7a53145661c09 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 1 Mar 2024 19:18:25 +0100
+Subject: mptcp: make pm_remove_addrs_and_subflows static
+
+From: Geliang Tang <tanggeliang@kylinos.cn>
+
+[ Upstream commit e38b117d7f3b4a5d810f6d0069ad0f643e503796 ]
+
+mptcp_pm_remove_addrs_and_subflows() is only used in pm_netlink.c, it's
+no longer used in pm_userspace.c any more since the commit 8b1c94da1e48
+("mptcp: only send RM_ADDR in nl_cmd_remove"). So this patch changes it
+to a static function.
+
+Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
+Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Stable-dep-of: 87b5896f3f78 ("mptcp: pm: fix RM_ADDR ID for the initial subflow")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/mptcp/pm_netlink.c | 4 ++--
+ net/mptcp/protocol.h   | 2 --
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
+index 9e16ae1b23fc7..fa0579c2a6ee2 100644
+--- a/net/mptcp/pm_netlink.c
++++ b/net/mptcp/pm_netlink.c
+@@ -1667,8 +1667,8 @@ void mptcp_pm_remove_addrs(struct mptcp_sock *msk, struct list_head *rm_list)
+       }
+ }
+-void mptcp_pm_remove_addrs_and_subflows(struct mptcp_sock *msk,
+-                                      struct list_head *rm_list)
++static void mptcp_pm_remove_addrs_and_subflows(struct mptcp_sock *msk,
++                                             struct list_head *rm_list)
+ {
+       struct mptcp_rm_list alist = { .nr = 0 }, slist = { .nr = 0 };
+       struct mptcp_pm_addr_entry *entry;
+diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
+index c3cd68edab779..ee973d25f5eb5 100644
+--- a/net/mptcp/protocol.h
++++ b/net/mptcp/protocol.h
+@@ -837,8 +837,6 @@ int mptcp_pm_announce_addr(struct mptcp_sock *msk,
+                          bool echo);
+ int mptcp_pm_remove_addr(struct mptcp_sock *msk, const struct mptcp_rm_list *rm_list);
+ void mptcp_pm_remove_addrs(struct mptcp_sock *msk, struct list_head *rm_list);
+-void mptcp_pm_remove_addrs_and_subflows(struct mptcp_sock *msk,
+-                                      struct list_head *rm_list);
+ void mptcp_free_local_addr_list(struct mptcp_sock *msk);
+ int mptcp_nl_cmd_announce(struct sk_buff *skb, struct genl_info *info);
+-- 
+2.43.0
+
diff --git a/queue-6.1/mptcp-pm-fix-rm_addr-id-for-the-initial-subflow.patch b/queue-6.1/mptcp-pm-fix-rm_addr-id-for-the-initial-subflow.patch
new file mode 100644 (file)
index 0000000..41592e0
--- /dev/null
@@ -0,0 +1,143 @@
+From 7c436b43f05b1219e47fd6871d4773e0012c51be Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 28 Aug 2024 08:14:25 +0200
+Subject: mptcp: pm: fix RM_ADDR ID for the initial subflow
+
+From: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+
+[ Upstream commit 87b5896f3f7848130095656739b05881904e2697 ]
+
+The initial subflow has a special local ID: 0. When an endpoint is being
+deleted, it is then important to check if its address is not linked to
+the initial subflow to send the right ID.
+
+If there was an endpoint linked to the initial subflow, msk's
+mpc_endpoint_id field will be set. We can then use this info when an
+endpoint is being removed to see if it is linked to the initial subflow.
+
+So now, the correct IDs are passed to mptcp_pm_nl_rm_addr_or_subflow(),
+it is no longer needed to use mptcp_local_id_match().
+
+Fixes: 3ad14f54bd74 ("mptcp: more accurate MPC endpoint tracking")
+Cc: stable@vger.kernel.org
+Reviewed-by: Mat Martineau <martineau@kernel.org>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/mptcp/pm_netlink.c | 28 +++++++++++++++-------------
+ 1 file changed, 15 insertions(+), 13 deletions(-)
+
+diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
+index fa0579c2a6ee2..7543abf02f0c7 100644
+--- a/net/mptcp/pm_netlink.c
++++ b/net/mptcp/pm_netlink.c
+@@ -797,11 +797,6 @@ int mptcp_pm_nl_mp_prio_send_ack(struct mptcp_sock *msk,
+       return -EINVAL;
+ }
+-static bool mptcp_local_id_match(const struct mptcp_sock *msk, u8 local_id, u8 id)
+-{
+-      return local_id == id || (!local_id && msk->mpc_endpoint_id == id);
+-}
+-
+ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk,
+                                          const struct mptcp_rm_list *rm_list,
+                                          enum linux_mptcp_mib_field rm_type)
+@@ -838,7 +833,7 @@ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk,
+                               continue;
+                       if (rm_type == MPTCP_MIB_RMADDR && remote_id != rm_id)
+                               continue;
+-                      if (rm_type == MPTCP_MIB_RMSUBFLOW && !mptcp_local_id_match(msk, id, rm_id))
++                      if (rm_type == MPTCP_MIB_RMSUBFLOW && id != rm_id)
+                               continue;
+                       pr_debug(" -> %s rm_list_ids[%d]=%u local_id=%u remote_id=%u mpc_id=%u",
+@@ -1472,6 +1467,12 @@ static bool remove_anno_list_by_saddr(struct mptcp_sock *msk,
+       return false;
+ }
++static u8 mptcp_endp_get_local_id(struct mptcp_sock *msk,
++                                const struct mptcp_addr_info *addr)
++{
++      return msk->mpc_endpoint_id == addr->id ? 0 : addr->id;
++}
++
+ static bool mptcp_pm_remove_anno_addr(struct mptcp_sock *msk,
+                                     const struct mptcp_addr_info *addr,
+                                     bool force)
+@@ -1479,7 +1480,7 @@ static bool mptcp_pm_remove_anno_addr(struct mptcp_sock *msk,
+       struct mptcp_rm_list list = { .nr = 0 };
+       bool ret;
+-      list.ids[list.nr++] = addr->id;
++      list.ids[list.nr++] = mptcp_endp_get_local_id(msk, addr);
+       ret = remove_anno_list_by_saddr(msk, addr);
+       if (ret || force) {
+@@ -1506,14 +1507,12 @@ static int mptcp_nl_remove_subflow_and_signal_addr(struct net *net,
+                                                  const struct mptcp_pm_addr_entry *entry)
+ {
+       const struct mptcp_addr_info *addr = &entry->addr;
+-      struct mptcp_rm_list list = { .nr = 0 };
++      struct mptcp_rm_list list = { .nr = 1 };
+       long s_slot = 0, s_num = 0;
+       struct mptcp_sock *msk;
+       pr_debug("remove_id=%d", addr->id);
+-      list.ids[list.nr++] = addr->id;
+-
+       while ((msk = mptcp_token_iter_next(net, &s_slot, &s_num)) != NULL) {
+               struct sock *sk = (struct sock *)msk;
+               bool remove_subflow;
+@@ -1531,6 +1530,7 @@ static int mptcp_nl_remove_subflow_and_signal_addr(struct net *net,
+               mptcp_pm_remove_anno_addr(msk, addr, remove_subflow &&
+                                         !(entry->flags & MPTCP_PM_ADDR_FLAG_IMPLICIT));
++              list.ids[0] = mptcp_endp_get_local_id(msk, addr);
+               if (remove_subflow) {
+                       spin_lock_bh(&msk->pm.lock);
+                       mptcp_pm_nl_rm_subflow_received(msk, &list);
+@@ -1639,6 +1639,7 @@ static int mptcp_nl_cmd_del_addr(struct sk_buff *skb, struct genl_info *info)
+       return ret;
+ }
++/* Called from the userspace PM only */
+ void mptcp_pm_remove_addrs(struct mptcp_sock *msk, struct list_head *rm_list)
+ {
+       struct mptcp_rm_list alist = { .nr = 0 };
+@@ -1667,6 +1668,7 @@ void mptcp_pm_remove_addrs(struct mptcp_sock *msk, struct list_head *rm_list)
+       }
+ }
++/* Called from the in-kernel PM only */
+ static void mptcp_pm_remove_addrs_and_subflows(struct mptcp_sock *msk,
+                                              struct list_head *rm_list)
+ {
+@@ -1676,11 +1678,11 @@ static void mptcp_pm_remove_addrs_and_subflows(struct mptcp_sock *msk,
+       list_for_each_entry(entry, rm_list, list) {
+               if (slist.nr < MPTCP_RM_IDS_MAX &&
+                   lookup_subflow_by_saddr(&msk->conn_list, &entry->addr))
+-                      slist.ids[slist.nr++] = entry->addr.id;
++                      slist.ids[slist.nr++] = mptcp_endp_get_local_id(msk, &entry->addr);
+               if (alist.nr < MPTCP_RM_IDS_MAX &&
+                   remove_anno_list_by_saddr(msk, &entry->addr))
+-                      alist.ids[alist.nr++] = entry->addr.id;
++                      alist.ids[alist.nr++] = mptcp_endp_get_local_id(msk, &entry->addr);
+       }
+       spin_lock_bh(&msk->pm.lock);
+@@ -1968,7 +1970,7 @@ static void mptcp_pm_nl_fullmesh(struct mptcp_sock *msk,
+ {
+       struct mptcp_rm_list list = { .nr = 0 };
+-      list.ids[list.nr++] = addr->id;
++      list.ids[list.nr++] = mptcp_endp_get_local_id(msk, addr);
+       spin_lock_bh(&msk->pm.lock);
+       mptcp_pm_nl_rm_subflow_received(msk, &list);
+-- 
+2.43.0
+
diff --git a/queue-6.1/net-usb-qmi_wwan-add-meig-smart-srm825l.patch b/queue-6.1/net-usb-qmi_wwan-add-meig-smart-srm825l.patch
new file mode 100644 (file)
index 0000000..bd8a722
--- /dev/null
@@ -0,0 +1,64 @@
+From a3a06d9dbbd96a3e27daafcd1701588fea7e138b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 3 Aug 2024 15:46:51 +0800
+Subject: net: usb: qmi_wwan: add MeiG Smart SRM825L
+
+From: ZHANG Yuntian <yt@radxa.com>
+
+[ Upstream commit 1ca645a2f74a4290527ae27130c8611391b07dbf ]
+
+Add support for MeiG Smart SRM825L which is based on Qualcomm 315 chip.
+
+T:  Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=5000 MxCh= 0
+D:  Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
+P:  Vendor=2dee ProdID=4d22 Rev= 4.14
+S:  Manufacturer=MEIG
+S:  Product=LTE-A Module
+S:  SerialNumber=6f345e48
+C:* #Ifs= 6 Cfg#= 1 Atr=80 MxPwr=896mA
+I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
+E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+E:  Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
+E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
+E:  Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
+E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
+E:  Ad=84(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+E:  Ad=03(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option
+E:  Ad=87(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
+E:  Ad=86(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+E:  Ad=04(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
+E:  Ad=05(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+E:  Ad=88(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan
+E:  Ad=89(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
+E:  Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+E:  Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+
+Signed-off-by: ZHANG Yuntian <yt@radxa.com>
+Link: https://patch.msgid.link/D1EB81385E405DFE+20240803074656.567061-1-yt@radxa.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/usb/qmi_wwan.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
+index ee0ea3d0f50ee..72a2c41b9dbf8 100644
+--- a/drivers/net/usb/qmi_wwan.c
++++ b/drivers/net/usb/qmi_wwan.c
+@@ -1436,6 +1436,7 @@ static const struct usb_device_id products[] = {
+       {QMI_FIXED_INTF(0x2692, 0x9025, 4)},    /* Cellient MPL200 (rebranded Qualcomm 05c6:9025) */
+       {QMI_QUIRK_SET_DTR(0x1546, 0x1342, 4)}, /* u-blox LARA-L6 */
+       {QMI_QUIRK_SET_DTR(0x33f8, 0x0104, 4)}, /* Rolling RW101 RMNET */
++      {QMI_FIXED_INTF(0x2dee, 0x4d22, 5)},    /* MeiG Smart SRM825L */
+       /* 4. Gobi 1000 devices */
+       {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)},    /* Acer Gobi Modem Device */
+-- 
+2.43.0
+
diff --git a/queue-6.1/scsi-ufs-core-bypass-quick-recovery-if-force-reset-i.patch b/queue-6.1/scsi-ufs-core-bypass-quick-recovery-if-force-reset-i.patch
new file mode 100644 (file)
index 0000000..7b37b98
--- /dev/null
@@ -0,0 +1,39 @@
+From cad5d155e77fa5d00102627cb1673abfbdf41cd7 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 12 Jul 2024 17:45:06 +0800
+Subject: scsi: ufs: core: Bypass quick recovery if force reset is needed
+
+From: Peter Wang <peter.wang@mediatek.com>
+
+[ Upstream commit 022587d8aec3da1d1698ddae9fb8cfe35f3ad49c ]
+
+If force_reset is true, bypass quick recovery.  This will shorten error
+recovery time.
+
+Signed-off-by: Peter Wang <peter.wang@mediatek.com>
+Link: https://lore.kernel.org/r/20240712094506.11284-1-peter.wang@mediatek.com
+Reviewed-by: Bean Huo <beanhuo@micron.com>
+Reviewed-by: Bart Van Assche <bvanassche@acm.org>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/ufs/core/ufshcd.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
+index bfed5d36fa2e5..d528ee0092bd2 100644
+--- a/drivers/ufs/core/ufshcd.c
++++ b/drivers/ufs/core/ufshcd.c
+@@ -6307,7 +6307,8 @@ static void ufshcd_err_handler(struct work_struct *work)
+       if (ufshcd_err_handling_should_stop(hba))
+               goto skip_err_handling;
+-      if (hba->dev_quirks & UFS_DEVICE_QUIRK_RECOVERY_FROM_DL_NAC_ERRORS) {
++      if ((hba->dev_quirks & UFS_DEVICE_QUIRK_RECOVERY_FROM_DL_NAC_ERRORS) &&
++          !hba->force_reset) {
+               bool ret;
+               spin_unlock_irqrestore(hba->host->host_lock, flags);
+-- 
+2.43.0
+
diff --git a/queue-6.1/selftests-mptcp-add-explicit-test-case-for-remove-re.patch b/queue-6.1/selftests-mptcp-add-explicit-test-case-for-remove-re.patch
new file mode 100644 (file)
index 0000000..8bc6474
--- /dev/null
@@ -0,0 +1,65 @@
+From 746e07b3f2176a625ba494e91d855f2c3a1e9ca1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 27 Jul 2024 11:04:01 +0200
+Subject: selftests: mptcp: add explicit test case for remove/readd
+
+From: Paolo Abeni <pabeni@redhat.com>
+
+[ Upstream commit b5e2fb832f48bc01d937a053e0550a1465a2f05d ]
+
+Delete and re-create a signal endpoint and ensure that the PM
+actually deletes and re-create the subflow.
+
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Stable-dep-of: 1c2326fcae4f ("selftests: mptcp: join: check re-adding init endp with != id")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ .../testing/selftests/net/mptcp/mptcp_join.sh | 29 +++++++++++++++++++
+ 1 file changed, 29 insertions(+)
+
+diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
+index a73358d753aa7..4f8b0c0faac96 100755
+--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
++++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
+@@ -3281,6 +3281,35 @@ endpoint_tests()
+               chk_subflow_nr "" "after re-add" 2
+               kill_tests_wait
+       fi
++
++      # remove and re-add
++      if reset "delete re-add signal" &&
++         mptcp_lib_kallsyms_has "subflow_rebuild_header$"; then
++              pm_nl_set_limits $ns1 1 1
++              pm_nl_set_limits $ns2 1 1
++              pm_nl_add_endpoint $ns1 10.0.2.1 id 1 flags signal
++              test_linkfail=4 speed=20 \
++                      run_tests $ns1 $ns2 10.0.1.1 &
++              local tests_pid=$!
++
++              wait_mpj $ns2
++              pm_nl_check_endpoint "creation" \
++                      $ns1 10.0.2.1 id 1 flags signal
++              chk_subflow_nr "before delete" 2
++              chk_mptcp_info subflows 1 subflows 1
++
++              pm_nl_del_endpoint $ns1 1 10.0.2.1
++              sleep 0.5
++              chk_subflow_nr "after delete" 1
++              chk_mptcp_info subflows 0 subflows 0
++
++              pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
++              wait_mpj $ns2
++              chk_subflow_nr "after re-add" 2
++              chk_mptcp_info subflows 1 subflows 1
++              mptcp_lib_kill_wait $tests_pid
++      fi
++
+ }
+ # [$1: error message]
+-- 
+2.43.0
+
diff --git a/queue-6.1/selftests-mptcp-join-check-re-adding-init-endp-with-.patch b/queue-6.1/selftests-mptcp-join-check-re-adding-init-endp-with-.patch
new file mode 100644 (file)
index 0000000..dfec258
--- /dev/null
@@ -0,0 +1,86 @@
+From 258989bf2bae0317055be62110dde3fa35f0b466 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 28 Aug 2024 08:14:30 +0200
+Subject: selftests: mptcp: join: check re-adding init endp with != id
+
+From: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+
+[ Upstream commit 1c2326fcae4f0c5de8ad0d734ced43a8e5f17dac ]
+
+The initial subflow has a special local ID: 0. It is specific per
+connection.
+
+When a global endpoint is deleted and re-added later, it can have a
+different ID, but the kernel should still use the ID 0 if it corresponds
+to the initial address.
+
+This test validates this behaviour: the endpoint linked to the initial
+subflow is removed, and re-added with a different ID.
+
+Note that removing the initial subflow will not decrement the 'subflows'
+counters, which corresponds to the *additional* subflows. On the other
+hand, when the same endpoint is re-added, it will increment this
+counter, as it will be seen as an additional subflow this time.
+
+The 'Fixes' tag here below is the same as the one from the previous
+commit: this patch here is not fixing anything wrong in the selftests,
+but it validates the previous fix for an issue introduced by this commit
+ID.
+
+Fixes: 3ad14f54bd74 ("mptcp: more accurate MPC endpoint tracking")
+Cc: stable@vger.kernel.org
+Reviewed-by: Mat Martineau <martineau@kernel.org>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ .../testing/selftests/net/mptcp/mptcp_join.sh | 21 ++++++++++++++-----
+ 1 file changed, 16 insertions(+), 5 deletions(-)
+
+diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
+index 0dbbc9e9ed6f6..e26da5f163154 100755
+--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
++++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
+@@ -3285,11 +3285,12 @@ endpoint_tests()
+       # remove and re-add
+       if reset "delete re-add signal" &&
+          mptcp_lib_kallsyms_has "subflow_rebuild_header$"; then
+-              pm_nl_set_limits $ns1 0 2
+-              pm_nl_set_limits $ns2 2 2
++              pm_nl_set_limits $ns1 0 3
++              pm_nl_set_limits $ns2 3 3
+               pm_nl_add_endpoint $ns1 10.0.2.1 id 1 flags signal
+               # broadcast IP: no packet for this address will be received on ns1
+               pm_nl_add_endpoint $ns1 224.0.0.1 id 2 flags signal
++              pm_nl_add_endpoint $ns1 10.0.1.1 id 42 flags signal
+               test_linkfail=4 speed=20 \
+                       run_tests $ns1 $ns2 10.0.1.1 &
+               local tests_pid=$!
+@@ -3311,11 +3312,21 @@ endpoint_tests()
+               wait_mpj $ns2
+               chk_subflow_nr "after re-add" 3
+               chk_mptcp_info subflows 2 subflows 2
++
++              pm_nl_del_endpoint $ns1 42 10.0.1.1
++              sleep 0.5
++              chk_subflow_nr "after delete ID 0" 2
++              chk_mptcp_info subflows 2 subflows 2
++
++              pm_nl_add_endpoint $ns1 10.0.1.1 id 99 flags signal
++              wait_mpj $ns2
++              chk_subflow_nr "after re-add" 3
++              chk_mptcp_info subflows 3 subflows 3
+               mptcp_lib_kill_wait $tests_pid
+-              chk_join_nr 3 3 3
+-              chk_add_nr 4 4
+-              chk_rm_nr 2 1 invert
++              chk_join_nr 4 4 4
++              chk_add_nr 5 5
++              chk_rm_nr 3 2 invert
+       fi
+ }
+-- 
+2.43.0
+
diff --git a/queue-6.1/selftests-mptcp-join-check-re-using-id-of-unused-add.patch b/queue-6.1/selftests-mptcp-join-check-re-using-id-of-unused-add.patch
new file mode 100644 (file)
index 0000000..1a198a5
--- /dev/null
@@ -0,0 +1,85 @@
+From e506695da52a62d4badd38b4862a98c6c2034e36 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 19 Aug 2024 21:45:20 +0200
+Subject: selftests: mptcp: join: check re-using ID of unused ADD_ADDR
+
+From: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+
+[ Upstream commit a13d5aad4dd9a309eecdc33cfd75045bd5f376a3 ]
+
+This test extends "delete re-add signal" to validate the previous
+commit. An extra address is announced by the server, but this address
+cannot be used by the client. The result is that no subflow will be
+established to this address.
+
+Later, the server will delete this extra endpoint, and set a new one,
+with a valid address, but re-using the same ID. Before the previous
+commit, the server would not have been able to announce this new
+address.
+
+While at it, extra checks have been added to validate the expected
+numbers of MPJ, ADD_ADDR and RM_ADDR.
+
+The 'Fixes' tag here below is the same as the one from the previous
+commit: this patch here is not fixing anything wrong in the selftests,
+but it validates the previous fix for an issue introduced by this commit
+ID.
+
+Fixes: b6c08380860b ("mptcp: remove addr and subflow in PM netlink")
+Cc: stable@vger.kernel.org
+Reviewed-by: Mat Martineau <martineau@kernel.org>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-2-38035d40de5b@kernel.org
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Stable-dep-of: 1c2326fcae4f ("selftests: mptcp: join: check re-adding init endp with != id")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ .../testing/selftests/net/mptcp/mptcp_join.sh  | 18 +++++++++++++-----
+ 1 file changed, 13 insertions(+), 5 deletions(-)
+
+diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
+index 4f8b0c0faac96..0dbbc9e9ed6f6 100755
+--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
++++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
+@@ -3285,9 +3285,11 @@ endpoint_tests()
+       # remove and re-add
+       if reset "delete re-add signal" &&
+          mptcp_lib_kallsyms_has "subflow_rebuild_header$"; then
+-              pm_nl_set_limits $ns1 1 1
+-              pm_nl_set_limits $ns2 1 1
++              pm_nl_set_limits $ns1 0 2
++              pm_nl_set_limits $ns2 2 2
+               pm_nl_add_endpoint $ns1 10.0.2.1 id 1 flags signal
++              # broadcast IP: no packet for this address will be received on ns1
++              pm_nl_add_endpoint $ns1 224.0.0.1 id 2 flags signal
+               test_linkfail=4 speed=20 \
+                       run_tests $ns1 $ns2 10.0.1.1 &
+               local tests_pid=$!
+@@ -3299,15 +3301,21 @@ endpoint_tests()
+               chk_mptcp_info subflows 1 subflows 1
+               pm_nl_del_endpoint $ns1 1 10.0.2.1
++              pm_nl_del_endpoint $ns1 2 224.0.0.1
+               sleep 0.5
+               chk_subflow_nr "after delete" 1
+               chk_mptcp_info subflows 0 subflows 0
+-              pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
++              pm_nl_add_endpoint $ns1 10.0.2.1 id 1 flags signal
++              pm_nl_add_endpoint $ns1 10.0.3.1 id 2 flags signal
+               wait_mpj $ns2
+-              chk_subflow_nr "after re-add" 2
+-              chk_mptcp_info subflows 1 subflows 1
++              chk_subflow_nr "after re-add" 3
++              chk_mptcp_info subflows 2 subflows 2
+               mptcp_lib_kill_wait $tests_pid
++
++              chk_join_nr 3 3 3
++              chk_add_nr 4 4
++              chk_rm_nr 2 1 invert
+       fi
+ }
+-- 
+2.43.0
+
diff --git a/queue-6.1/series b/queue-6.1/series
new file mode 100644 (file)
index 0000000..b3bfd9c
--- /dev/null
@@ -0,0 +1,13 @@
+drm-panel-orientation-quirks-add-quirk-for-orangepi-.patch
+scsi-ufs-core-bypass-quick-recovery-if-force-reset-i.patch
+alsa-hda-generic-add-a-helper-to-mute-speakers-at-su.patch
+alsa-hda-conexant-mute-speakers-at-suspend-shutdown.patch
+i2c-fix-conditional-for-substituting-empty-acpi-func.patch
+dma-debug-avoid-deadlock-between-dma-debug-vs-printk.patch
+net-usb-qmi_wwan-add-meig-smart-srm825l.patch
+asoc-amd-yc-support-mic-on-lenovo-thinkpad-e14-gen-6.patch
+mptcp-make-pm_remove_addrs_and_subflows-static.patch
+mptcp-pm-fix-rm_addr-id-for-the-initial-subflow.patch
+selftests-mptcp-add-explicit-test-case-for-remove-re.patch
+selftests-mptcp-join-check-re-using-id-of-unused-add.patch
+selftests-mptcp-join-check-re-adding-init-endp-with-.patch