]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 6.1
authorSasha Levin <sashal@kernel.org>
Mon, 8 Jul 2024 14:41:24 +0000 (10:41 -0400)
committerSasha Levin <sashal@kernel.org>
Mon, 8 Jul 2024 14:41:24 +0000 (10:41 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
18 files changed:
queue-6.1/alsa-hda-realtek-enable-headset-mic-of-jp-ik-leap-w5.patch [new file with mode: 0644]
queue-6.1/clk-mediatek-clk-mtk-register-mfg-notifier-in-mtk_cl.patch [new file with mode: 0644]
queue-6.1/clk-mediatek-mt8183-only-enable-runtime-pm-on-mt8183.patch [new file with mode: 0644]
queue-6.1/clk-qcom-gcc-sm6350-fix-gpll6-gpll7-parents.patch [new file with mode: 0644]
queue-6.1/dma-mapping-benchmark-avoid-needless-copy_to_user-if.patch [new file with mode: 0644]
queue-6.1/fs-ntfs3-mark-volume-as-dirty-if-xattr-is-broken.patch [new file with mode: 0644]
queue-6.1/i2c-pnx-fix-potential-deadlock-warning-from-del_time.patch [new file with mode: 0644]
queue-6.1/kbuild-fix-short-log-for-as-in-link-vmlinux.sh.patch [new file with mode: 0644]
queue-6.1/nfc-nci-add-the-inconsistency-check-between-the-inpu.patch [new file with mode: 0644]
queue-6.1/null_blk-do-not-allow-runt-zone-with-zone-capacity-s.patch [new file with mode: 0644]
queue-6.1/nvme-adjust-multiples-of-nvme_ctrl_page_size-in-offs.patch [new file with mode: 0644]
queue-6.1/nvme-multipath-find-numa-path-only-for-online-numa-n.patch [new file with mode: 0644]
queue-6.1/nvmet-fix-a-possible-leak-when-destroy-a-ctrl-during.patch [new file with mode: 0644]
queue-6.1/platform-x86-touchscreen_dmi-add-info-for-globalspac.patch [new file with mode: 0644]
queue-6.1/platform-x86-touchscreen_dmi-add-info-for-the-ezpad-.patch [new file with mode: 0644]
queue-6.1/regmap-i2c-subtract-reg-size-from-max_write.patch [new file with mode: 0644]
queue-6.1/series
queue-6.1/spi-cadence-ensure-data-lines-set-to-low-during-dumm.patch [new file with mode: 0644]

diff --git a/queue-6.1/alsa-hda-realtek-enable-headset-mic-of-jp-ik-leap-w5.patch b/queue-6.1/alsa-hda-realtek-enable-headset-mic-of-jp-ik-leap-w5.patch
new file mode 100644 (file)
index 0000000..9743392
--- /dev/null
@@ -0,0 +1,71 @@
+From 6143d4471caac4bb7001c8a42f0cb4c53096f7f6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 20 May 2024 13:50:09 +0800
+Subject: ALSA: hda/realtek: Enable headset mic of JP-IK LEAP W502 with ALC897
+
+From: Jian-Hong Pan <jhp@endlessos.org>
+
+[ Upstream commit 45e37f9ce28d248470bab4376df2687a215d1b22 ]
+
+JP-IK LEAP W502 laptop's headset mic is not enabled until
+ALC897_FIXUP_HEADSET_MIC_PIN3 quirk is applied.
+
+Here is the original pin node values:
+
+0x11 0x40000000
+0x12 0xb7a60130
+0x14 0x90170110
+0x15 0x411111f0
+0x16 0x411111f0
+0x17 0x411111f0
+0x18 0x411111f0
+0x19 0x411111f0
+0x1a 0x411111f0
+0x1b 0x03211020
+0x1c 0x411111f0
+0x1d 0x4026892d
+0x1e 0x411111f0
+0x1f 0x411111f0
+
+Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
+Link: https://lore.kernel.org/r/20240520055008.7083-2-jhp@endlessos.org
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/pci/hda/patch_realtek.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
+index 11ec5783a2f17..4635dc70a8404 100644
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -11584,6 +11584,7 @@ enum {
+       ALC897_FIXUP_LENOVO_HEADSET_MODE,
+       ALC897_FIXUP_HEADSET_MIC_PIN2,
+       ALC897_FIXUP_UNIS_H3C_X500S,
++      ALC897_FIXUP_HEADSET_MIC_PIN3,
+ };
+ static const struct hda_fixup alc662_fixups[] = {
+@@ -12030,10 +12031,18 @@ static const struct hda_fixup alc662_fixups[] = {
+                       {}
+               },
+       },
++      [ALC897_FIXUP_HEADSET_MIC_PIN3] = {
++              .type = HDA_FIXUP_PINS,
++              .v.pins = (const struct hda_pintbl[]) {
++                      { 0x19, 0x03a11050 }, /* use as headset mic */
++                      { }
++              },
++      },
+ };
+ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
+       SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2),
++      SND_PCI_QUIRK(0x1019, 0x9859, "JP-IK LEAP W502", ALC897_FIXUP_HEADSET_MIC_PIN3),
+       SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC),
+       SND_PCI_QUIRK(0x1025, 0x0241, "Packard Bell DOTS", ALC662_FIXUP_INV_DMIC),
+       SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE),
+-- 
+2.43.0
+
diff --git a/queue-6.1/clk-mediatek-clk-mtk-register-mfg-notifier-in-mtk_cl.patch b/queue-6.1/clk-mediatek-clk-mtk-register-mfg-notifier-in-mtk_cl.patch
new file mode 100644 (file)
index 0000000..dfdcbd9
--- /dev/null
@@ -0,0 +1,64 @@
+From b4ba8b855d27d16920f173174fe1bfebe3536b80 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 20 Jan 2023 10:20:48 +0100
+Subject: clk: mediatek: clk-mtk: Register MFG notifier in
+ mtk_clk_simple_probe()
+
+From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
+
+[ Upstream commit fd9fe654f41c0271dbfe55d975c6d1bfa88820fb ]
+
+In preparation for commonizing topckgen probe on various MediaTek SoCs
+clock drivers, add the ability to register the MFG MUX notifier in
+mtk_clk_simple_probe() by passing a custom notifier register function
+pointer, as this function will be slightly different across different
+SoCs.
+
+Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
+Tested-by: Miles Chen <miles.chen@mediatek.com>
+Link: https://lore.kernel.org/r/20230120092053.182923-19-angelogioacchino.delregno@collabora.com
+Tested-by: Mingming Su <mingming.su@mediatek.com>
+Signed-off-by: Stephen Boyd <sboyd@kernel.org>
+Stable-dep-of: 878e845d8db0 ("clk: mediatek: mt8183: Only enable runtime PM on mt8183-mfgcfg")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/clk/mediatek/clk-mtk.c | 8 ++++++++
+ drivers/clk/mediatek/clk-mtk.h | 3 +++
+ 2 files changed, 11 insertions(+)
+
+diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
+index fa2c1b1c7dee4..42ae5c0d56467 100644
+--- a/drivers/clk/mediatek/clk-mtk.c
++++ b/drivers/clk/mediatek/clk-mtk.c
+@@ -529,6 +529,14 @@ int mtk_clk_simple_probe(struct platform_device *pdev)
+                       goto unregister_composites;
+       }
++      if (mcd->clk_notifier_func) {
++              struct clk *mfg_mux = clk_data->hws[mcd->mfg_clk_idx]->clk;
++
++              r = mcd->clk_notifier_func(&pdev->dev, mfg_mux);
++              if (r)
++                      goto unregister_clks;
++      }
++
+       r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
+       if (r)
+               goto unregister_clks;
+diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
+index 880b3d6d80119..361de8078df01 100644
+--- a/drivers/clk/mediatek/clk-mtk.h
++++ b/drivers/clk/mediatek/clk-mtk.h
+@@ -207,6 +207,9 @@ struct mtk_clk_desc {
+       const struct mtk_clk_rst_desc *rst_desc;
+       spinlock_t *clk_lock;
+       bool shared_io;
++
++      int (*clk_notifier_func)(struct device *dev, struct clk *clk);
++      unsigned int mfg_clk_idx;
+ };
+ int mtk_clk_simple_probe(struct platform_device *pdev);
+-- 
+2.43.0
+
diff --git a/queue-6.1/clk-mediatek-mt8183-only-enable-runtime-pm-on-mt8183.patch b/queue-6.1/clk-mediatek-mt8183-only-enable-runtime-pm-on-mt8183.patch
new file mode 100644 (file)
index 0000000..ca7cd19
--- /dev/null
@@ -0,0 +1,113 @@
+From 6e832ddc248c88673e6b2b9e7004c33ee867c4d8 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 13 Jun 2024 20:02:28 +0800
+Subject: clk: mediatek: mt8183: Only enable runtime PM on mt8183-mfgcfg
+
+From: Pin-yen Lin <treapking@chromium.org>
+
+[ Upstream commit 878e845d8db04df9ff3bbbaac09d335b24153704 ]
+
+Commit 2f7b1d8b5505 ("clk: mediatek: Do a runtime PM get on controllers
+during probe") enabled runtime PM for all mediatek clock controllers,
+but this introduced an issue on the resume path.
+
+If a device resumes earlier than the clock controller and calls
+clk_prepare() when runtime PM is enabled on the controller, it will end
+up calling clk_pm_runtime_get(). But the subsequent
+pm_runtime_resume_and_get() call will fail because the runtime PM is
+temporarily disabled during suspend.
+
+To workaround this, introduce a need_runtime_pm flag and only enable it
+on mt8183-mfgcfg, which is the driver that observed deadlock previously.
+Hopefully mt8183-cfgcfg won't run into the issue at the resume stage
+because the GPU should have stopped rendering before the system calls
+suspend.
+
+Fixes: 2f7b1d8b5505 ("clk: mediatek: Do a runtime PM get on controllers during probe")
+Signed-off-by: Pin-yen Lin <treapking@chromium.org>
+Link: https://lore.kernel.org/r/20240613120357.1043342-1-treapking@chromium.org
+Signed-off-by: Stephen Boyd <sboyd@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/clk/mediatek/clk-mt8183-mfgcfg.c |  1 +
+ drivers/clk/mediatek/clk-mtk.c           | 24 ++++++++++++++----------
+ drivers/clk/mediatek/clk-mtk.h           |  2 ++
+ 3 files changed, 17 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/clk/mediatek/clk-mt8183-mfgcfg.c b/drivers/clk/mediatek/clk-mt8183-mfgcfg.c
+index 730c9ae5ea124..50ccd59794464 100644
+--- a/drivers/clk/mediatek/clk-mt8183-mfgcfg.c
++++ b/drivers/clk/mediatek/clk-mt8183-mfgcfg.c
+@@ -29,6 +29,7 @@ static const struct mtk_gate mfg_clks[] = {
+ static const struct mtk_clk_desc mfg_desc = {
+       .clks = mfg_clks,
+       .num_clks = ARRAY_SIZE(mfg_clks),
++      .need_runtime_pm = true,
+ };
+ static const struct of_device_id of_match_clk_mt8183_mfg[] = {
+diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
+index 42ae5c0d56467..9dbfc11d5c591 100644
+--- a/drivers/clk/mediatek/clk-mtk.c
++++ b/drivers/clk/mediatek/clk-mtk.c
+@@ -472,14 +472,16 @@ int mtk_clk_simple_probe(struct platform_device *pdev)
+       }
+-      devm_pm_runtime_enable(&pdev->dev);
+-      /*
+-       * Do a pm_runtime_resume_and_get() to workaround a possible
+-       * deadlock between clk_register() and the genpd framework.
+-       */
+-      r = pm_runtime_resume_and_get(&pdev->dev);
+-      if (r)
+-              return r;
++      if (mcd->need_runtime_pm) {
++              devm_pm_runtime_enable(&pdev->dev);
++              /*
++               * Do a pm_runtime_resume_and_get() to workaround a possible
++               * deadlock between clk_register() and the genpd framework.
++               */
++              r = pm_runtime_resume_and_get(&pdev->dev);
++              if (r)
++                      return r;
++      }
+       /* Calculate how many clk_hw_onecell_data entries to allocate */
+       num_clks = mcd->num_clks + mcd->num_composite_clks;
+@@ -550,7 +552,8 @@ int mtk_clk_simple_probe(struct platform_device *pdev)
+                       goto unregister_clks;
+       }
+-      pm_runtime_put(&pdev->dev);
++      if (mcd->need_runtime_pm)
++              pm_runtime_put(&pdev->dev);
+       return r;
+@@ -578,7 +581,8 @@ int mtk_clk_simple_probe(struct platform_device *pdev)
+       if (mcd->shared_io && base)
+               iounmap(base);
+-      pm_runtime_put(&pdev->dev);
++      if (mcd->need_runtime_pm)
++              pm_runtime_put(&pdev->dev);
+       return r;
+ }
+ EXPORT_SYMBOL_GPL(mtk_clk_simple_probe);
+diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
+index 361de8078df01..65c24ab6c9470 100644
+--- a/drivers/clk/mediatek/clk-mtk.h
++++ b/drivers/clk/mediatek/clk-mtk.h
+@@ -210,6 +210,8 @@ struct mtk_clk_desc {
+       int (*clk_notifier_func)(struct device *dev, struct clk *clk);
+       unsigned int mfg_clk_idx;
++
++      bool need_runtime_pm;
+ };
+ int mtk_clk_simple_probe(struct platform_device *pdev);
+-- 
+2.43.0
+
diff --git a/queue-6.1/clk-qcom-gcc-sm6350-fix-gpll6-gpll7-parents.patch b/queue-6.1/clk-qcom-gcc-sm6350-fix-gpll6-gpll7-parents.patch
new file mode 100644 (file)
index 0000000..96fa676
--- /dev/null
@@ -0,0 +1,77 @@
+From 2e9dd389355144b1e24e7dc4ad6f9054a7725d15 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 8 May 2024 10:12:53 +0200
+Subject: clk: qcom: gcc-sm6350: Fix gpll6* & gpll7 parents
+
+From: Luca Weiss <luca.weiss@fairphone.com>
+
+[ Upstream commit 3414f41a13eb41db15c558fbc695466203dca4fa ]
+
+Both gpll6 and gpll7 are parented to CXO at 19.2 MHz and not to GPLL0
+which runs at 600 MHz. Also gpll6_out_even should have the parent gpll6
+and not gpll0.
+
+Adjust the parents of these clocks to make Linux report the correct rate
+and not absurd numbers like gpll7 at ~25 GHz or gpll6 at 24 GHz.
+
+Corrected rates are the following:
+
+  gpll7              807999902 Hz
+  gpll6              768000000 Hz
+     gpll6_out_even  384000000 Hz
+  gpll0              600000000 Hz
+     gpll0_out_odd   200000000 Hz
+     gpll0_out_even  300000000 Hz
+
+And because gpll6 is the parent of gcc_sdcc2_apps_clk_src (at 202 MHz)
+that clock also reports the correct rate now and avoids this warning:
+
+  [    5.984062] mmc0: Card appears overclocked; req 202000000 Hz, actual 6312499237 Hz
+
+Fixes: 131abae905df ("clk: qcom: Add SM6350 GCC driver")
+Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
+Link: https://lore.kernel.org/r/20240508-sm6350-gpll-fix-v1-1-e4ea34284a6d@fairphone.com
+Signed-off-by: Bjorn Andersson <andersson@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/clk/qcom/gcc-sm6350.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/clk/qcom/gcc-sm6350.c b/drivers/clk/qcom/gcc-sm6350.c
+index cf4a7b6e0b23a..0559a33faf00e 100644
+--- a/drivers/clk/qcom/gcc-sm6350.c
++++ b/drivers/clk/qcom/gcc-sm6350.c
+@@ -100,8 +100,8 @@ static struct clk_alpha_pll gpll6 = {
+               .enable_mask = BIT(6),
+               .hw.init = &(struct clk_init_data){
+                       .name = "gpll6",
+-                      .parent_hws = (const struct clk_hw*[]){
+-                              &gpll0.clkr.hw,
++                      .parent_data = &(const struct clk_parent_data){
++                              .fw_name = "bi_tcxo",
+                       },
+                       .num_parents = 1,
+                       .ops = &clk_alpha_pll_fixed_fabia_ops,
+@@ -124,7 +124,7 @@ static struct clk_alpha_pll_postdiv gpll6_out_even = {
+       .clkr.hw.init = &(struct clk_init_data){
+               .name = "gpll6_out_even",
+               .parent_hws = (const struct clk_hw*[]){
+-                      &gpll0.clkr.hw,
++                      &gpll6.clkr.hw,
+               },
+               .num_parents = 1,
+               .ops = &clk_alpha_pll_postdiv_fabia_ops,
+@@ -139,8 +139,8 @@ static struct clk_alpha_pll gpll7 = {
+               .enable_mask = BIT(7),
+               .hw.init = &(struct clk_init_data){
+                       .name = "gpll7",
+-                      .parent_hws = (const struct clk_hw*[]){
+-                              &gpll0.clkr.hw,
++                      .parent_data = &(const struct clk_parent_data){
++                              .fw_name = "bi_tcxo",
+                       },
+                       .num_parents = 1,
+                       .ops = &clk_alpha_pll_fixed_fabia_ops,
+-- 
+2.43.0
+
diff --git a/queue-6.1/dma-mapping-benchmark-avoid-needless-copy_to_user-if.patch b/queue-6.1/dma-mapping-benchmark-avoid-needless-copy_to_user-if.patch
new file mode 100644 (file)
index 0000000..058c362
--- /dev/null
@@ -0,0 +1,39 @@
+From 6e7ff405750330bd23ff585b212a06439fa03584 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 4 May 2024 14:47:02 +0300
+Subject: dma-mapping: benchmark: avoid needless copy_to_user if benchmark
+ fails
+
+From: Fedor Pchelkin <pchelkin@ispras.ru>
+
+[ Upstream commit f7c9ccaadffd13066353332c13d7e9bf73b8f92d ]
+
+If do_map_benchmark() has failed, there is nothing useful to copy back
+to userspace.
+
+Suggested-by: Barry Song <21cnbao@gmail.com>
+Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
+Acked-by: Robin Murphy <robin.murphy@arm.com>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ kernel/dma/map_benchmark.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/kernel/dma/map_benchmark.c b/kernel/dma/map_benchmark.c
+index af661734e8f90..dafdc47ae5fcc 100644
+--- a/kernel/dma/map_benchmark.c
++++ b/kernel/dma/map_benchmark.c
+@@ -252,6 +252,9 @@ static long map_benchmark_ioctl(struct file *file, unsigned int cmd,
+                * dma_mask changed by benchmark
+                */
+               dma_set_mask(map->dev, old_dma_mask);
++
++              if (ret)
++                      return ret;
+               break;
+       default:
+               return -EINVAL;
+-- 
+2.43.0
+
diff --git a/queue-6.1/fs-ntfs3-mark-volume-as-dirty-if-xattr-is-broken.patch b/queue-6.1/fs-ntfs3-mark-volume-as-dirty-if-xattr-is-broken.patch
new file mode 100644 (file)
index 0000000..983ef67
--- /dev/null
@@ -0,0 +1,38 @@
+From f13dfdfd75aff6894f21e649fcdd1c364ce0970e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 22 Apr 2024 17:18:51 +0300
+Subject: fs/ntfs3: Mark volume as dirty if xattr is broken
+
+From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
+
+[ Upstream commit 24f6f5020b0b2c89c2cba5ec224547be95f753ee ]
+
+Mark a volume as corrupted if the name length exceeds the space
+occupied by ea.
+
+Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/ntfs3/xattr.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c
+index d98cf7b382bcc..2e4eea854bda5 100644
+--- a/fs/ntfs3/xattr.c
++++ b/fs/ntfs3/xattr.c
+@@ -217,8 +217,11 @@ static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer,
+               if (!ea->name_len)
+                       break;
+-              if (ea->name_len > ea_size)
++              if (ea->name_len > ea_size) {
++                      ntfs_set_state(ni->mi.sbi, NTFS_DIRTY_ERROR);
++                      err = -EINVAL; /* corrupted fs */
+                       break;
++              }
+               if (buffer) {
+                       /* Check if we can use field ea->name */
+-- 
+2.43.0
+
diff --git a/queue-6.1/i2c-pnx-fix-potential-deadlock-warning-from-del_time.patch b/queue-6.1/i2c-pnx-fix-potential-deadlock-warning-from-del_time.patch
new file mode 100644 (file)
index 0000000..0247065
--- /dev/null
@@ -0,0 +1,185 @@
+From 32d6f2fa2df182a7c6651aa5432cee2628110eac Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 28 Jun 2024 17:25:42 +0200
+Subject: i2c: pnx: Fix potential deadlock warning from del_timer_sync() call
+ in isr
+
+From: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
+
+[ Upstream commit f63b94be6942ba82c55343e196bd09b53227618e ]
+
+When del_timer_sync() is called in an interrupt context it throws a warning
+because of potential deadlock. The timer is used only to exit from
+wait_for_completion() after a timeout so replacing the call with
+wait_for_completion_timeout() allows to remove the problematic timer and
+its related functions altogether.
+
+Fixes: 41561f28e76a ("i2c: New Philips PNX bus driver")
+Signed-off-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
+Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/i2c/busses/i2c-pnx.c | 48 ++++++++----------------------------
+ 1 file changed, 10 insertions(+), 38 deletions(-)
+
+diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
+index 50f21cdbe90d3..d2c09b0fdf527 100644
+--- a/drivers/i2c/busses/i2c-pnx.c
++++ b/drivers/i2c/busses/i2c-pnx.c
+@@ -15,7 +15,6 @@
+ #include <linux/ioport.h>
+ #include <linux/delay.h>
+ #include <linux/i2c.h>
+-#include <linux/timer.h>
+ #include <linux/completion.h>
+ #include <linux/platform_device.h>
+ #include <linux/io.h>
+@@ -32,7 +31,6 @@ struct i2c_pnx_mif {
+       int                     ret;            /* Return value */
+       int                     mode;           /* Interface mode */
+       struct completion       complete;       /* I/O completion */
+-      struct timer_list       timer;          /* Timeout */
+       u8 *                    buf;            /* Data buffer */
+       int                     len;            /* Length of data buffer */
+       int                     order;          /* RX Bytes to order via TX */
+@@ -117,24 +115,6 @@ static inline int wait_reset(struct i2c_pnx_algo_data *data)
+       return (timeout <= 0);
+ }
+-static inline void i2c_pnx_arm_timer(struct i2c_pnx_algo_data *alg_data)
+-{
+-      struct timer_list *timer = &alg_data->mif.timer;
+-      unsigned long expires = msecs_to_jiffies(alg_data->timeout);
+-
+-      if (expires <= 1)
+-              expires = 2;
+-
+-      del_timer_sync(timer);
+-
+-      dev_dbg(&alg_data->adapter.dev, "Timer armed at %lu plus %lu jiffies.\n",
+-              jiffies, expires);
+-
+-      timer->expires = jiffies + expires;
+-
+-      add_timer(timer);
+-}
+-
+ /**
+  * i2c_pnx_start - start a device
+  * @slave_addr:               slave address
+@@ -259,8 +239,6 @@ static int i2c_pnx_master_xmit(struct i2c_pnx_algo_data *alg_data)
+                               ~(mcntrl_afie | mcntrl_naie | mcntrl_drmie),
+                                 I2C_REG_CTL(alg_data));
+-                      del_timer_sync(&alg_data->mif.timer);
+-
+                       dev_dbg(&alg_data->adapter.dev,
+                               "%s(): Waking up xfer routine.\n",
+                               __func__);
+@@ -276,8 +254,6 @@ static int i2c_pnx_master_xmit(struct i2c_pnx_algo_data *alg_data)
+                       ~(mcntrl_afie | mcntrl_naie | mcntrl_drmie),
+                         I2C_REG_CTL(alg_data));
+-              /* Stop timer. */
+-              del_timer_sync(&alg_data->mif.timer);
+               dev_dbg(&alg_data->adapter.dev,
+                       "%s(): Waking up xfer routine after zero-xfer.\n",
+                       __func__);
+@@ -364,8 +340,6 @@ static int i2c_pnx_master_rcv(struct i2c_pnx_algo_data *alg_data)
+                                mcntrl_drmie | mcntrl_daie);
+                       iowrite32(ctl, I2C_REG_CTL(alg_data));
+-                      /* Kill timer. */
+-                      del_timer_sync(&alg_data->mif.timer);
+                       complete(&alg_data->mif.complete);
+               }
+       }
+@@ -400,8 +374,6 @@ static irqreturn_t i2c_pnx_interrupt(int irq, void *dev_id)
+                        mcntrl_drmie);
+               iowrite32(ctl, I2C_REG_CTL(alg_data));
+-              /* Stop timer, to prevent timeout. */
+-              del_timer_sync(&alg_data->mif.timer);
+               complete(&alg_data->mif.complete);
+       } else if (stat & mstatus_nai) {
+               /* Slave did not acknowledge, generate a STOP */
+@@ -419,8 +391,6 @@ static irqreturn_t i2c_pnx_interrupt(int irq, void *dev_id)
+               /* Our return value. */
+               alg_data->mif.ret = -EIO;
+-              /* Stop timer, to prevent timeout. */
+-              del_timer_sync(&alg_data->mif.timer);
+               complete(&alg_data->mif.complete);
+       } else {
+               /*
+@@ -453,9 +423,8 @@ static irqreturn_t i2c_pnx_interrupt(int irq, void *dev_id)
+       return IRQ_HANDLED;
+ }
+-static void i2c_pnx_timeout(struct timer_list *t)
++static void i2c_pnx_timeout(struct i2c_pnx_algo_data *alg_data)
+ {
+-      struct i2c_pnx_algo_data *alg_data = from_timer(alg_data, t, mif.timer);
+       u32 ctl;
+       dev_err(&alg_data->adapter.dev,
+@@ -472,7 +441,6 @@ static void i2c_pnx_timeout(struct timer_list *t)
+       iowrite32(ctl, I2C_REG_CTL(alg_data));
+       wait_reset(alg_data);
+       alg_data->mif.ret = -EIO;
+-      complete(&alg_data->mif.complete);
+ }
+ static inline void bus_reset_if_active(struct i2c_pnx_algo_data *alg_data)
+@@ -514,6 +482,7 @@ i2c_pnx_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
+       struct i2c_msg *pmsg;
+       int rc = 0, completed = 0, i;
+       struct i2c_pnx_algo_data *alg_data = adap->algo_data;
++      unsigned long time_left;
+       u32 stat;
+       dev_dbg(&alg_data->adapter.dev,
+@@ -548,7 +517,6 @@ i2c_pnx_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
+               dev_dbg(&alg_data->adapter.dev, "%s(): mode %d, %d bytes\n",
+                       __func__, alg_data->mif.mode, alg_data->mif.len);
+-              i2c_pnx_arm_timer(alg_data);
+               /* initialize the completion var */
+               init_completion(&alg_data->mif.complete);
+@@ -564,7 +532,10 @@ i2c_pnx_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
+                       break;
+               /* Wait for completion */
+-              wait_for_completion(&alg_data->mif.complete);
++              time_left = wait_for_completion_timeout(&alg_data->mif.complete,
++                                                      alg_data->timeout);
++              if (time_left == 0)
++                      i2c_pnx_timeout(alg_data);
+               if (!(rc = alg_data->mif.ret))
+                       completed++;
+@@ -657,7 +628,10 @@ static int i2c_pnx_probe(struct platform_device *pdev)
+       alg_data->adapter.algo_data = alg_data;
+       alg_data->adapter.nr = pdev->id;
+-      alg_data->timeout = I2C_PNX_TIMEOUT_DEFAULT;
++      alg_data->timeout = msecs_to_jiffies(I2C_PNX_TIMEOUT_DEFAULT);
++      if (alg_data->timeout <= 1)
++              alg_data->timeout = 2;
++
+ #ifdef CONFIG_OF
+       alg_data->adapter.dev.of_node = of_node_get(pdev->dev.of_node);
+       if (pdev->dev.of_node) {
+@@ -677,8 +651,6 @@ static int i2c_pnx_probe(struct platform_device *pdev)
+       if (IS_ERR(alg_data->clk))
+               return PTR_ERR(alg_data->clk);
+-      timer_setup(&alg_data->mif.timer, i2c_pnx_timeout, 0);
+-
+       snprintf(alg_data->adapter.name, sizeof(alg_data->adapter.name),
+                "%s", pdev->name);
+-- 
+2.43.0
+
diff --git a/queue-6.1/kbuild-fix-short-log-for-as-in-link-vmlinux.sh.patch b/queue-6.1/kbuild-fix-short-log-for-as-in-link-vmlinux.sh.patch
new file mode 100644 (file)
index 0000000..6aed2b4
--- /dev/null
@@ -0,0 +1,59 @@
+From 382646b033504383376aa1c6e8d66323fc3ae572 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 20 May 2024 21:42:11 +0900
+Subject: kbuild: fix short log for AS in link-vmlinux.sh
+
+From: Masahiro Yamada <masahiroy@kernel.org>
+
+[ Upstream commit 3430f65d6130ccbc86f0ff45642eeb9e2032a600 ]
+
+In convention, short logs print the output file, not the input file.
+
+Let's change the suffix for 'AS' since it assembles *.S into *.o.
+
+[Before]
+
+  LD      .tmp_vmlinux.kallsyms1
+  NM      .tmp_vmlinux.kallsyms1.syms
+  KSYMS   .tmp_vmlinux.kallsyms1.S
+  AS      .tmp_vmlinux.kallsyms1.S
+  LD      .tmp_vmlinux.kallsyms2
+  NM      .tmp_vmlinux.kallsyms2.syms
+  KSYMS   .tmp_vmlinux.kallsyms2.S
+  AS      .tmp_vmlinux.kallsyms2.S
+  LD      vmlinux
+
+[After]
+
+  LD      .tmp_vmlinux.kallsyms1
+  NM      .tmp_vmlinux.kallsyms1.syms
+  KSYMS   .tmp_vmlinux.kallsyms1.S
+  AS      .tmp_vmlinux.kallsyms1.o
+  LD      .tmp_vmlinux.kallsyms2
+  NM      .tmp_vmlinux.kallsyms2.syms
+  KSYMS   .tmp_vmlinux.kallsyms2.S
+  AS      .tmp_vmlinux.kallsyms2.o
+  LD      vmlinux
+
+Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ scripts/link-vmlinux.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
+index 458b2948b580d..019560548ac98 100755
+--- a/scripts/link-vmlinux.sh
++++ b/scripts/link-vmlinux.sh
+@@ -182,7 +182,7 @@ kallsyms_step()
+       mksysmap ${kallsyms_vmlinux} ${kallsyms_vmlinux}.syms
+       kallsyms ${kallsyms_vmlinux}.syms ${kallsyms_S}
+-      info AS ${kallsyms_S}
++      info AS ${kallsymso}
+       ${CC} ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS} \
+             ${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL} \
+             -c -o ${kallsymso} ${kallsyms_S}
+-- 
+2.43.0
+
diff --git a/queue-6.1/nfc-nci-add-the-inconsistency-check-between-the-inpu.patch b/queue-6.1/nfc-nci-add-the-inconsistency-check-between-the-inpu.patch
new file mode 100644 (file)
index 0000000..bc3822a
--- /dev/null
@@ -0,0 +1,45 @@
+From 3b4e469b8ddb2c9b1c998313694038f092c18da4 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 28 May 2024 11:12:31 +0800
+Subject: nfc/nci: Add the inconsistency check between the input data length
+ and count
+
+From: Edward Adam Davis <eadavis@qq.com>
+
+[ Upstream commit 068648aab72c9ba7b0597354ef4d81ffaac7b979 ]
+
+write$nci(r0, &(0x7f0000000740)=ANY=[@ANYBLOB="610501"], 0xf)
+
+Syzbot constructed a write() call with a data length of 3 bytes but a count value
+of 15, which passed too little data to meet the basic requirements of the function
+nci_rf_intf_activated_ntf_packet().
+
+Therefore, increasing the comparison between data length and count value to avoid
+problems caused by inconsistent data length and count.
+
+Reported-and-tested-by: syzbot+71bfed2b2bcea46c98f2@syzkaller.appspotmail.com
+Signed-off-by: Edward Adam Davis <eadavis@qq.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nfc/virtual_ncidev.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/drivers/nfc/virtual_ncidev.c b/drivers/nfc/virtual_ncidev.c
+index 85c06dbb2c449..9fffd4421ad5b 100644
+--- a/drivers/nfc/virtual_ncidev.c
++++ b/drivers/nfc/virtual_ncidev.c
+@@ -121,6 +121,10 @@ static ssize_t virtual_ncidev_write(struct file *file,
+               kfree_skb(skb);
+               return -EFAULT;
+       }
++      if (strnlen(skb->data, count) != count) {
++              kfree_skb(skb);
++              return -EINVAL;
++      }
+       nci_recv_frame(ndev, skb);
+       return count;
+-- 
+2.43.0
+
diff --git a/queue-6.1/null_blk-do-not-allow-runt-zone-with-zone-capacity-s.patch b/queue-6.1/null_blk-do-not-allow-runt-zone-with-zone-capacity-s.patch
new file mode 100644 (file)
index 0000000..56eb525
--- /dev/null
@@ -0,0 +1,56 @@
+From e99e3dee546426efdcf667890ed4c52961c5a2c3 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 30 May 2024 14:40:32 +0900
+Subject: null_blk: Do not allow runt zone with zone capacity smaller then zone
+ size
+
+From: Damien Le Moal <dlemoal@kernel.org>
+
+[ Upstream commit b164316808ec5de391c3e7b0148ec937d32d280d ]
+
+A zoned device with a smaller last zone together with a zone capacity
+smaller than the zone size does make any sense as that does not
+correspond to any possible setup for a real device:
+1) For ZNS and zoned UFS devices, all zones are always the same size.
+2) For SMR HDDs, all zones always have the same capacity.
+In other words, if we have a smaller last runt zone, then this zone
+capacity should always be equal to the zone size.
+
+Add a check in null_init_zoned_dev() to prevent a configuration to have
+both a smaller zone size and a zone capacity smaller than the zone size.
+
+Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
+Reviewed-by: Niklas Cassel <cassel@kernel.org>
+Reviewed-by: Bart Van Assche <bvanassche@acm.org>
+Link: https://lore.kernel.org/r/20240530054035.491497-2-dlemoal@kernel.org
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/block/null_blk/zoned.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/drivers/block/null_blk/zoned.c b/drivers/block/null_blk/zoned.c
+index b0264b3df6f3d..206c2a7a5100e 100644
+--- a/drivers/block/null_blk/zoned.c
++++ b/drivers/block/null_blk/zoned.c
+@@ -83,6 +83,17 @@ int null_init_zoned_dev(struct nullb_device *dev, struct request_queue *q)
+               return -EINVAL;
+       }
++      /*
++       * If a smaller zone capacity was requested, do not allow a smaller last
++       * zone at the same time as such zone configuration does not correspond
++       * to any real zoned device.
++       */
++      if (dev->zone_capacity != dev->zone_size &&
++          dev->size & (dev->zone_size - 1)) {
++              pr_err("A smaller last zone is not allowed with zone capacity smaller than zone size.\n");
++              return -EINVAL;
++      }
++
+       zone_capacity_sects = mb_to_sects(dev->zone_capacity);
+       dev_capacity_sects = mb_to_sects(dev->size);
+       dev->zone_size_sects = mb_to_sects(dev->zone_size);
+-- 
+2.43.0
+
diff --git a/queue-6.1/nvme-adjust-multiples-of-nvme_ctrl_page_size-in-offs.patch b/queue-6.1/nvme-adjust-multiples-of-nvme_ctrl_page_size-in-offs.patch
new file mode 100644 (file)
index 0000000..0351a3f
--- /dev/null
@@ -0,0 +1,45 @@
+From 3f6d026a909c3c5c5a59e06f9fb42dcf0f635af2 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 23 May 2024 17:01:49 +0530
+Subject: nvme: adjust multiples of NVME_CTRL_PAGE_SIZE in offset
+
+From: Kundan Kumar <kundan.kumar@samsung.com>
+
+[ Upstream commit 1bd293fcf3af84674e82ed022c049491f3768840 ]
+
+bio_vec start offset may be relatively large particularly when large
+folio gets added to the bio. A bigger offset will result in avoiding the
+single-segment mapping optimization and end up using expensive
+mempool_alloc further.
+
+Rather than using absolute value, adjust bv_offset by
+NVME_CTRL_PAGE_SIZE while checking if segment can be fitted into one/two
+PRP entries.
+
+Suggested-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Kundan Kumar <kundan.kumar@samsung.com>
+Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Keith Busch <kbusch@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/host/pci.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
+index 5ff09f2cacab7..32e89ea853a47 100644
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -824,7 +824,8 @@ static blk_status_t nvme_map_data(struct nvme_dev *dev, struct request *req,
+               struct bio_vec bv = req_bvec(req);
+               if (!is_pci_p2pdma_page(bv.bv_page)) {
+-                      if (bv.bv_offset + bv.bv_len <= NVME_CTRL_PAGE_SIZE * 2)
++                      if ((bv.bv_offset & (NVME_CTRL_PAGE_SIZE - 1)) +
++                           bv.bv_len <= NVME_CTRL_PAGE_SIZE * 2)
+                               return nvme_setup_prp_simple(dev, req,
+                                                            &cmnd->rw, &bv);
+-- 
+2.43.0
+
diff --git a/queue-6.1/nvme-multipath-find-numa-path-only-for-online-numa-n.patch b/queue-6.1/nvme-multipath-find-numa-path-only-for-online-numa-n.patch
new file mode 100644 (file)
index 0000000..f60cacc
--- /dev/null
@@ -0,0 +1,54 @@
+From c1fcf42629ac96282d23007dd3f49042df83ceed Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 16 May 2024 17:43:51 +0530
+Subject: nvme-multipath: find NUMA path only for online numa-node
+
+From: Nilay Shroff <nilay@linux.ibm.com>
+
+[ Upstream commit d3a043733f25d743f3aa617c7f82dbcb5ee2211a ]
+
+In current native multipath design when a shared namespace is created,
+we loop through each possible numa-node, calculate the NUMA distance of
+that node from each nvme controller and then cache the optimal IO path
+for future reference while sending IO. The issue with this design is that
+we may refer to the NUMA distance table for an offline node which may not
+be populated at the time and so we may inadvertently end up finding and
+caching a non-optimal path for IO. Then latter when the corresponding
+numa-node becomes online and hence the NUMA distance table entry for that
+node is created, ideally we should re-calculate the multipath node distance
+for the newly added node however that doesn't happen unless we rescan/reset
+the controller. So essentially, we may keep using non-optimal IO path for a
+node which is made online after namespace is created.
+This patch helps fix this issue ensuring that when a shared namespace is
+created, we calculate the multipath node distance for each online numa-node
+instead of each possible numa-node. Then latter when a node becomes online
+and we receive any IO on that newly added node, we would calculate the
+multipath node distance for newly added node but this time NUMA distance
+table would have been already populated for newly added node. Hence we
+would be able to correctly calculate the multipath node distance and choose
+the optimal path for the IO.
+
+Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Keith Busch <kbusch@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/host/multipath.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
+index 6cf0ce7aff678..d0154859421db 100644
+--- a/drivers/nvme/host/multipath.c
++++ b/drivers/nvme/host/multipath.c
+@@ -559,7 +559,7 @@ static void nvme_mpath_set_live(struct nvme_ns *ns)
+               int node, srcu_idx;
+               srcu_idx = srcu_read_lock(&head->srcu);
+-              for_each_node(node)
++              for_each_online_node(node)
+                       __nvme_find_path(head, node);
+               srcu_read_unlock(&head->srcu, srcu_idx);
+       }
+-- 
+2.43.0
+
diff --git a/queue-6.1/nvmet-fix-a-possible-leak-when-destroy-a-ctrl-during.patch b/queue-6.1/nvmet-fix-a-possible-leak-when-destroy-a-ctrl-during.patch
new file mode 100644 (file)
index 0000000..faacf89
--- /dev/null
@@ -0,0 +1,63 @@
+From 538a847b4bae418bca955a0ed3fc6eab3fad0a44 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 27 May 2024 22:38:52 +0300
+Subject: nvmet: fix a possible leak when destroy a ctrl during qp
+ establishment
+
+From: Sagi Grimberg <sagi@grimberg.me>
+
+[ Upstream commit c758b77d4a0a0ed3a1292b3fd7a2aeccd1a169a4 ]
+
+In nvmet_sq_destroy we capture sq->ctrl early and if it is non-NULL we
+know that a ctrl was allocated (in the admin connect request handler)
+and we need to release pending AERs, clear ctrl->sqs and sq->ctrl
+(for nvme-loop primarily), and drop the final reference on the ctrl.
+
+However, a small window is possible where nvmet_sq_destroy starts (as
+a result of the client giving up and disconnecting) concurrently with
+the nvme admin connect cmd (which may be in an early stage). But *before*
+kill_and_confirm of sq->ref (i.e. the admin connect managed to get an sq
+live reference). In this case, sq->ctrl was allocated however after it was
+captured in a local variable in nvmet_sq_destroy.
+This prevented the final reference drop on the ctrl.
+
+Solve this by re-capturing the sq->ctrl after all inflight request has
+completed, where for sure sq->ctrl reference is final, and move forward
+based on that.
+
+This issue was observed in an environment with many hosts connecting
+multiple ctrls simoutanuosly, creating a delay in allocating a ctrl
+leading up to this race window.
+
+Reported-by: Alex Turin <alex@vastdata.com>
+Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Keith Busch <kbusch@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/target/core.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
+index 7b74926c50f9b..d2954406b2297 100644
+--- a/drivers/nvme/target/core.c
++++ b/drivers/nvme/target/core.c
+@@ -805,6 +805,15 @@ void nvmet_sq_destroy(struct nvmet_sq *sq)
+       percpu_ref_exit(&sq->ref);
+       nvmet_auth_sq_free(sq);
++      /*
++       * we must reference the ctrl again after waiting for inflight IO
++       * to complete. Because admin connect may have sneaked in after we
++       * store sq->ctrl locally, but before we killed the percpu_ref. the
++       * admin connect allocates and assigns sq->ctrl, which now needs a
++       * final ref put, as this ctrl is going away.
++       */
++      ctrl = sq->ctrl;
++
+       if (ctrl) {
+               /*
+                * The teardown flow may take some time, and the host may not
+-- 
+2.43.0
+
diff --git a/queue-6.1/platform-x86-touchscreen_dmi-add-info-for-globalspac.patch b/queue-6.1/platform-x86-touchscreen_dmi-add-info-for-globalspac.patch
new file mode 100644 (file)
index 0000000..445f29e
--- /dev/null
@@ -0,0 +1,69 @@
+From 2f8d70127093c25f5c25ee6be4b02946537ece76 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 27 May 2024 11:14:46 +0200
+Subject: platform/x86: touchscreen_dmi: Add info for GlobalSpace SolT IVW
+ 11.6" tablet
+
+From: hmtheboy154 <buingoc67@gmail.com>
+
+[ Upstream commit 7c8639aa41343fd7b3dbe09baf6b0791fcc407a1 ]
+
+This is a tablet created by GlobalSpace Technologies Limited
+which uses an Intel Atom x5-Z8300, 4GB of RAM & 64GB of storage.
+
+Link: https://web.archive.org/web/20171102141952/http://globalspace.in/11.6-device.html
+Signed-off-by: hmtheboy154 <buingoc67@gmail.com>
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://lore.kernel.org/r/20240527091447.248849-2-hdegoede@redhat.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/platform/x86/touchscreen_dmi.c | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
+index 399b97b54dd0f..2c3743126e489 100644
+--- a/drivers/platform/x86/touchscreen_dmi.c
++++ b/drivers/platform/x86/touchscreen_dmi.c
+@@ -871,6 +871,22 @@ static const struct ts_dmi_data schneider_sct101ctm_data = {
+       .properties     = schneider_sct101ctm_props,
+ };
++static const struct property_entry globalspace_solt_ivw116_props[] = {
++      PROPERTY_ENTRY_U32("touchscreen-min-x", 7),
++      PROPERTY_ENTRY_U32("touchscreen-min-y", 22),
++      PROPERTY_ENTRY_U32("touchscreen-size-x", 1723),
++      PROPERTY_ENTRY_U32("touchscreen-size-y", 1077),
++      PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-globalspace-solt-ivw116.fw"),
++      PROPERTY_ENTRY_U32("silead,max-fingers", 10),
++      PROPERTY_ENTRY_BOOL("silead,home-button"),
++      { }
++};
++
++static const struct ts_dmi_data globalspace_solt_ivw116_data = {
++      .acpi_name      = "MSSL1680:00",
++      .properties     = globalspace_solt_ivw116_props,
++};
++
+ static const struct property_entry techbite_arc_11_6_props[] = {
+       PROPERTY_ENTRY_U32("touchscreen-min-x", 5),
+       PROPERTY_ENTRY_U32("touchscreen-min-y", 7),
+@@ -1584,6 +1600,15 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
+                       DMI_MATCH(DMI_PRODUCT_NAME, "SCT101CTM"),
+               },
+       },
++      {
++              /* GlobalSpace SoLT IVW 11.6" */
++              .driver_data = (void *)&globalspace_solt_ivw116_data,
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "Globalspace Tech Pvt Ltd"),
++                      DMI_MATCH(DMI_PRODUCT_NAME, "SolTIVW"),
++                      DMI_MATCH(DMI_PRODUCT_SKU, "PN20170413488"),
++              },
++      },
+       {
+               /* Techbite Arc 11.6 */
+               .driver_data = (void *)&techbite_arc_11_6_data,
+-- 
+2.43.0
+
diff --git a/queue-6.1/platform-x86-touchscreen_dmi-add-info-for-the-ezpad-.patch b/queue-6.1/platform-x86-touchscreen_dmi-add-info-for-the-ezpad-.patch
new file mode 100644 (file)
index 0000000..cac5e89
--- /dev/null
@@ -0,0 +1,46 @@
+From ae226f084a88cb7a8e638765361f25cc549e9521 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 27 May 2024 11:14:47 +0200
+Subject: platform/x86: touchscreen_dmi: Add info for the EZpad 6s Pro
+
+From: hmtheboy154 <buingoc67@gmail.com>
+
+[ Upstream commit 3050052613790e75b5e4a8536930426b0a8b0774 ]
+
+The "EZpad 6s Pro" uses the same touchscreen as the "EZpad 6 Pro B",
+unlike the "Ezpad 6 Pro" which has its own touchscreen.
+
+Signed-off-by: hmtheboy154 <buingoc67@gmail.com>
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://lore.kernel.org/r/20240527091447.248849-3-hdegoede@redhat.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/platform/x86/touchscreen_dmi.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
+index 2c3743126e489..029355a2f389d 100644
+--- a/drivers/platform/x86/touchscreen_dmi.c
++++ b/drivers/platform/x86/touchscreen_dmi.c
+@@ -1361,6 +1361,17 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
+                       DMI_MATCH(DMI_BIOS_DATE, "04/24/2018"),
+               },
+       },
++      {
++              /* Jumper EZpad 6s Pro */
++              .driver_data = (void *)&jumper_ezpad_6_pro_b_data,
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
++                      DMI_MATCH(DMI_PRODUCT_NAME, "Ezpad"),
++                      /* Above matches are too generic, add bios match */
++                      DMI_MATCH(DMI_BIOS_VERSION, "E.WSA116_8.E1.042.bin"),
++                      DMI_MATCH(DMI_BIOS_DATE, "01/08/2020"),
++              },
++      },
+       {
+               /* Jumper EZpad 6 m4 */
+               .driver_data = (void *)&jumper_ezpad_6_m4_data,
+-- 
+2.43.0
+
diff --git a/queue-6.1/regmap-i2c-subtract-reg-size-from-max_write.patch b/queue-6.1/regmap-i2c-subtract-reg-size-from-max_write.patch
new file mode 100644 (file)
index 0000000..766fe98
--- /dev/null
@@ -0,0 +1,46 @@
+From 728bca779a6024db77e189de282f9f116ab4721e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 23 May 2024 16:14:36 -0500
+Subject: regmap-i2c: Subtract reg size from max_write
+
+From: Jim Wylder <jwylder@google.com>
+
+[ Upstream commit 611b7eb19d0a305d4de00280e4a71a1b15c507fc ]
+
+Currently, when an adapter defines a max_write_len quirk,
+the data will be chunked into data sizes equal to the
+max_write_len quirk value.  But the payload will be increased by
+the size of the register address before transmission.  The
+resulting value always ends up larger than the limit set
+by the quirk.
+
+Avoid this error by setting regmap's max_write to the quirk's
+max_write_len minus the number of bytes for the register and
+padding.  This allows the chunking to work correctly for this
+limited case without impacting other use-cases.
+
+Signed-off-by: Jim Wylder <jwylder@google.com>
+Link: https://msgid.link/r/20240523211437.2839942-1-jwylder@google.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/base/regmap/regmap-i2c.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/base/regmap/regmap-i2c.c b/drivers/base/regmap/regmap-i2c.c
+index 3ec611dc0c09f..a905e955bbfc7 100644
+--- a/drivers/base/regmap/regmap-i2c.c
++++ b/drivers/base/regmap/regmap-i2c.c
+@@ -350,7 +350,8 @@ static const struct regmap_bus *regmap_get_i2c_bus(struct i2c_client *i2c,
+               if (quirks->max_write_len &&
+                   (bus->max_raw_write == 0 || bus->max_raw_write > quirks->max_write_len))
+-                      max_write = quirks->max_write_len;
++                      max_write = quirks->max_write_len -
++                              (config->reg_bits + config->pad_bits) / BITS_PER_BYTE;
+               if (max_read || max_write) {
+                       ret_bus = kmemdup(bus, sizeof(*bus), GFP_KERNEL);
+-- 
+2.43.0
+
index 5af584e9cacf722e86bf81d949e4e8cd8f53e905..f4578ac6921c44cd22037bb987e699f10df79efa 100644 (file)
@@ -82,3 +82,20 @@ bnx2x-fix-multiple-ubsan-array-index-out-of-bounds.patch
 arm64-dts-rockchip-fix-the-dcdc_reg2-minimum-voltage-on-quartz64-model-b.patch
 ima-avoid-blocking-in-rcu-read-side-critical-section.patch
 media-dw2102-fix-a-potential-buffer-overflow.patch
+clk-qcom-gcc-sm6350-fix-gpll6-gpll7-parents.patch
+clk-mediatek-clk-mtk-register-mfg-notifier-in-mtk_cl.patch
+clk-mediatek-mt8183-only-enable-runtime-pm-on-mt8183.patch
+i2c-pnx-fix-potential-deadlock-warning-from-del_time.patch
+fs-ntfs3-mark-volume-as-dirty-if-xattr-is-broken.patch
+alsa-hda-realtek-enable-headset-mic-of-jp-ik-leap-w5.patch
+nvme-multipath-find-numa-path-only-for-online-numa-n.patch
+dma-mapping-benchmark-avoid-needless-copy_to_user-if.patch
+nvme-adjust-multiples-of-nvme_ctrl_page_size-in-offs.patch
+regmap-i2c-subtract-reg-size-from-max_write.patch
+platform-x86-touchscreen_dmi-add-info-for-globalspac.patch
+platform-x86-touchscreen_dmi-add-info-for-the-ezpad-.patch
+nvmet-fix-a-possible-leak-when-destroy-a-ctrl-during.patch
+kbuild-fix-short-log-for-as-in-link-vmlinux.sh.patch
+nfc-nci-add-the-inconsistency-check-between-the-inpu.patch
+spi-cadence-ensure-data-lines-set-to-low-during-dumm.patch
+null_blk-do-not-allow-runt-zone-with-zone-capacity-s.patch
diff --git a/queue-6.1/spi-cadence-ensure-data-lines-set-to-low-during-dumm.patch b/queue-6.1/spi-cadence-ensure-data-lines-set-to-low-during-dumm.patch
new file mode 100644 (file)
index 0000000..86f79fd
--- /dev/null
@@ -0,0 +1,102 @@
+From e989a74be20dc4c6c9bec88fa7bbcfceb5704fd4 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 29 May 2024 00:40:32 -0700
+Subject: spi: cadence: Ensure data lines set to low during dummy-cycle period
+
+From: Witold Sadowski <wsadowski@marvell.com>
+
+[ Upstream commit 4a69c1264ff41bc5bf7c03101ada0454fbf08868 ]
+
+During dummy-cycles xSPI will switch GPIO into Hi-Z mode. In that dummy
+period voltage on data lines will slowly drop, what can cause
+unintentional modebyte transmission. Value send to SPI memory chip will
+depend on last address, and clock frequency.
+To prevent unforeseen consequences of that behaviour, force send
+single modebyte(0x00).
+Modebyte will be send only if number of dummy-cycles is not equal
+to 0. Code must also reduce dummycycle byte count by one - as one byte
+is send as modebyte.
+
+Signed-off-by: Witold Sadowski <wsadowski@marvell.com>
+Link: https://msgid.link/r/20240529074037.1345882-2-wsadowski@marvell.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/spi/spi-cadence-xspi.c | 20 +++++++++++++++-----
+ 1 file changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/spi/spi-cadence-xspi.c b/drivers/spi/spi-cadence-xspi.c
+index d28b8bd5b70bc..b8bed8f39d2ae 100644
+--- a/drivers/spi/spi-cadence-xspi.c
++++ b/drivers/spi/spi-cadence-xspi.c
+@@ -146,6 +146,9 @@
+ #define CDNS_XSPI_STIG_DONE_FLAG              BIT(0)
+ #define CDNS_XSPI_TRD_STATUS                  0x0104
++#define MODE_NO_OF_BYTES                      GENMASK(25, 24)
++#define MODEBYTES_COUNT                       1
++
+ /* Helper macros for filling command registers */
+ #define CDNS_XSPI_CMD_FLD_P1_INSTR_CMD_1(op, data_phase) ( \
+       FIELD_PREP(CDNS_XSPI_CMD_INSTR_TYPE, (data_phase) ? \
+@@ -158,9 +161,10 @@
+       FIELD_PREP(CDNS_XSPI_CMD_P1_R2_ADDR3, ((op)->addr.val >> 24) & 0xFF) | \
+       FIELD_PREP(CDNS_XSPI_CMD_P1_R2_ADDR4, ((op)->addr.val >> 32) & 0xFF))
+-#define CDNS_XSPI_CMD_FLD_P1_INSTR_CMD_3(op) ( \
++#define CDNS_XSPI_CMD_FLD_P1_INSTR_CMD_3(op, modebytes) ( \
+       FIELD_PREP(CDNS_XSPI_CMD_P1_R3_ADDR5, ((op)->addr.val >> 40) & 0xFF) | \
+       FIELD_PREP(CDNS_XSPI_CMD_P1_R3_CMD, (op)->cmd.opcode) | \
++      FIELD_PREP(MODE_NO_OF_BYTES, modebytes) | \
+       FIELD_PREP(CDNS_XSPI_CMD_P1_R3_NUM_ADDR_BYTES, (op)->addr.nbytes))
+ #define CDNS_XSPI_CMD_FLD_P1_INSTR_CMD_4(op, chipsel) ( \
+@@ -174,12 +178,12 @@
+ #define CDNS_XSPI_CMD_FLD_DSEQ_CMD_2(op) \
+       FIELD_PREP(CDNS_XSPI_CMD_DSEQ_R2_DCNT_L, (op)->data.nbytes & 0xFFFF)
+-#define CDNS_XSPI_CMD_FLD_DSEQ_CMD_3(op) ( \
++#define CDNS_XSPI_CMD_FLD_DSEQ_CMD_3(op, dummybytes) ( \
+       FIELD_PREP(CDNS_XSPI_CMD_DSEQ_R3_DCNT_H, \
+               ((op)->data.nbytes >> 16) & 0xffff) | \
+       FIELD_PREP(CDNS_XSPI_CMD_DSEQ_R3_NUM_OF_DUMMY, \
+                 (op)->dummy.buswidth != 0 ? \
+-                (((op)->dummy.nbytes * 8) / (op)->dummy.buswidth) : \
++                (((dummybytes) * 8) / (op)->dummy.buswidth) : \
+                 0))
+ #define CDNS_XSPI_CMD_FLD_DSEQ_CMD_4(op, chipsel) ( \
+@@ -352,6 +356,7 @@ static int cdns_xspi_send_stig_command(struct cdns_xspi_dev *cdns_xspi,
+       u32 cmd_regs[6];
+       u32 cmd_status;
+       int ret;
++      int dummybytes = op->dummy.nbytes;
+       ret = cdns_xspi_wait_for_controller_idle(cdns_xspi);
+       if (ret < 0)
+@@ -366,7 +371,12 @@ static int cdns_xspi_send_stig_command(struct cdns_xspi_dev *cdns_xspi,
+       memset(cmd_regs, 0, sizeof(cmd_regs));
+       cmd_regs[1] = CDNS_XSPI_CMD_FLD_P1_INSTR_CMD_1(op, data_phase);
+       cmd_regs[2] = CDNS_XSPI_CMD_FLD_P1_INSTR_CMD_2(op);
+-      cmd_regs[3] = CDNS_XSPI_CMD_FLD_P1_INSTR_CMD_3(op);
++      if (dummybytes != 0) {
++              cmd_regs[3] = CDNS_XSPI_CMD_FLD_P1_INSTR_CMD_3(op, 1);
++              dummybytes--;
++      } else {
++              cmd_regs[3] = CDNS_XSPI_CMD_FLD_P1_INSTR_CMD_3(op, 0);
++      }
+       cmd_regs[4] = CDNS_XSPI_CMD_FLD_P1_INSTR_CMD_4(op,
+                                                      cdns_xspi->cur_cs);
+@@ -376,7 +386,7 @@ static int cdns_xspi_send_stig_command(struct cdns_xspi_dev *cdns_xspi,
+               cmd_regs[0] = CDNS_XSPI_STIG_DONE_FLAG;
+               cmd_regs[1] = CDNS_XSPI_CMD_FLD_DSEQ_CMD_1(op);
+               cmd_regs[2] = CDNS_XSPI_CMD_FLD_DSEQ_CMD_2(op);
+-              cmd_regs[3] = CDNS_XSPI_CMD_FLD_DSEQ_CMD_3(op);
++              cmd_regs[3] = CDNS_XSPI_CMD_FLD_DSEQ_CMD_3(op, dummybytes);
+               cmd_regs[4] = CDNS_XSPI_CMD_FLD_DSEQ_CMD_4(op,
+                                                          cdns_xspi->cur_cs);
+-- 
+2.43.0
+