]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Dec 2023 13:00:38 +0000 (14:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Dec 2023 13:00:38 +0000 (14:00 +0100)
added patches:
alsa-hda-disable-power-save-on-kontron-singlepc.patch
alsa-hda-realtek-add-supported-alc257-for-chromeos.patch
alsa-hda-realtek-headset-mic-vref-to-100.patch
dm-verity-align-struct-dm_verity_fec_io-properly.patch
firewire-core-fix-possible-memory-leak-in-create_units.patch
mmc-block-be-sure-to-wait-while-busy-in-cqe-error-recovery.patch
mmc-block-do-not-lose-cache-flush-during-cqe-error-recovery.patch
mmc-sdhci-sprd-fix-vqmmc-not-shutting-down-after-the-card-was-pulled.patch
perf-inject-fix-gen_elf_text_offset-for-jit.patch
pinctrl-avoid-reload-of-p-state-in-list-iteration.patch

queue-5.4/alsa-hda-disable-power-save-on-kontron-singlepc.patch [new file with mode: 0644]
queue-5.4/alsa-hda-realtek-add-supported-alc257-for-chromeos.patch [new file with mode: 0644]
queue-5.4/alsa-hda-realtek-headset-mic-vref-to-100.patch [new file with mode: 0644]
queue-5.4/dm-verity-align-struct-dm_verity_fec_io-properly.patch [new file with mode: 0644]
queue-5.4/firewire-core-fix-possible-memory-leak-in-create_units.patch [new file with mode: 0644]
queue-5.4/mmc-block-be-sure-to-wait-while-busy-in-cqe-error-recovery.patch [new file with mode: 0644]
queue-5.4/mmc-block-do-not-lose-cache-flush-during-cqe-error-recovery.patch [new file with mode: 0644]
queue-5.4/mmc-sdhci-sprd-fix-vqmmc-not-shutting-down-after-the-card-was-pulled.patch [new file with mode: 0644]
queue-5.4/perf-inject-fix-gen_elf_text_offset-for-jit.patch [new file with mode: 0644]
queue-5.4/pinctrl-avoid-reload-of-p-state-in-list-iteration.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/alsa-hda-disable-power-save-on-kontron-singlepc.patch b/queue-5.4/alsa-hda-disable-power-save-on-kontron-singlepc.patch
new file mode 100644 (file)
index 0000000..1a63e78
--- /dev/null
@@ -0,0 +1,35 @@
+From a337c355719c42a6c5b67e985ad753590ed844fb Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Thu, 30 Nov 2023 16:13:21 +0100
+Subject: ALSA: hda: Disable power-save on KONTRON SinglePC
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit a337c355719c42a6c5b67e985ad753590ed844fb upstream.
+
+It's been reported that the runtime PM on KONTRON SinglePC (PCI SSID
+1734:1232) caused a stall of playback after a bunch of invocations.
+(FWIW, this looks like an timing issue, and the stall happens rather
+on the controller side.)
+
+As a workaround, disable the default power-save on this platform.
+
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20231130151321.9813-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/hda_intel.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/sound/pci/hda/hda_intel.c
++++ b/sound/pci/hda/hda_intel.c
+@@ -2244,6 +2244,8 @@ static struct snd_pci_quirk power_save_b
+       SND_PCI_QUIRK(0x17aa, 0x36a7, "Lenovo C50 All in one", 0),
+       /* https://bugs.launchpad.net/bugs/1821663 */
+       SND_PCI_QUIRK(0x1631, 0xe017, "Packard Bell NEC IMEDIA 5204", 0),
++      /* KONTRON SinglePC may cause a stall at runtime resume */
++      SND_PCI_QUIRK(0x1734, 0x1232, "KONTRON SinglePC", 0),
+       {}
+ };
+ #endif /* CONFIG_PM */
diff --git a/queue-5.4/alsa-hda-realtek-add-supported-alc257-for-chromeos.patch b/queue-5.4/alsa-hda-realtek-add-supported-alc257-for-chromeos.patch
new file mode 100644 (file)
index 0000000..af18a39
--- /dev/null
@@ -0,0 +1,47 @@
+From cae2bdb579ecc9d4219c58a7d3fde1958118dc1d Mon Sep 17 00:00:00 2001
+From: Kailang Yang <kailang@realtek.com>
+Date: Wed, 29 Nov 2023 15:38:40 +0800
+Subject: ALSA: hda/realtek: Add supported ALC257 for ChromeOS
+
+From: Kailang Yang <kailang@realtek.com>
+
+commit cae2bdb579ecc9d4219c58a7d3fde1958118dc1d upstream.
+
+ChromeOS want to support ALC257.
+Add codec ID to some relation function.
+
+Signed-off-by: Kailang Yang <kailang@realtek.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/99a88a7dbdb045fd9d934abeb6cec15f@realtek.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -3207,6 +3207,7 @@ static void alc_disable_headset_jack_key
+       case 0x10ec0230:
+       case 0x10ec0236:
+       case 0x10ec0256:
++      case 0x10ec0257:
+       case 0x19e58326:
+               alc_write_coef_idx(codec, 0x48, 0x0);
+               alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
+@@ -3236,6 +3237,7 @@ static void alc_enable_headset_jack_key(
+       case 0x10ec0230:
+       case 0x10ec0236:
+       case 0x10ec0256:
++      case 0x10ec0257:
+       case 0x19e58326:
+               alc_write_coef_idx(codec, 0x48, 0xd011);
+               alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
+@@ -6185,6 +6187,7 @@ static void alc_combo_jack_hp_jd_restart
+       case 0x10ec0236:
+       case 0x10ec0255:
+       case 0x10ec0256:
++      case 0x10ec0257:
+       case 0x19e58326:
+               alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
+               alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
diff --git a/queue-5.4/alsa-hda-realtek-headset-mic-vref-to-100.patch b/queue-5.4/alsa-hda-realtek-headset-mic-vref-to-100.patch
new file mode 100644 (file)
index 0000000..e6f5749
--- /dev/null
@@ -0,0 +1,52 @@
+From baaacbff64d9f34b64f294431966d035aeadb81c Mon Sep 17 00:00:00 2001
+From: Kailang Yang <kailang@realtek.com>
+Date: Wed, 25 Oct 2023 15:24:06 +0800
+Subject: ALSA: hda/realtek: Headset Mic VREF to 100%
+
+From: Kailang Yang <kailang@realtek.com>
+
+commit baaacbff64d9f34b64f294431966d035aeadb81c upstream.
+
+This platform need to set Mic VREF to 100%.
+
+Signed-off-by: Kailang Yang <kailang@realtek.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/0916af40f08a4348a3298a9a59e6967e@realtek.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -1935,6 +1935,7 @@ enum {
+       ALC887_FIXUP_ASUS_AUDIO,
+       ALC887_FIXUP_ASUS_HMIC,
+       ALCS1200A_FIXUP_MIC_VREF,
++      ALC888VD_FIXUP_MIC_100VREF,
+ };
+ static void alc889_fixup_coef(struct hda_codec *codec,
+@@ -2488,6 +2489,13 @@ static const struct hda_fixup alc882_fix
+                       {}
+               }
+       },
++      [ALC888VD_FIXUP_MIC_100VREF] = {
++              .type = HDA_FIXUP_PINCTLS,
++              .v.pins = (const struct hda_pintbl[]) {
++                      { 0x18, PIN_VREF100 }, /* headset mic */
++                      {}
++              }
++      },
+ };
+ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
+@@ -2557,6 +2565,7 @@ static const struct snd_pci_quirk alc882
+       SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF),
+       SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
++      SND_PCI_QUIRK(0x10ec, 0x12d8, "iBase Elo Touch", ALC888VD_FIXUP_MIC_100VREF),
+       SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD),
+       SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE),
+       SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
diff --git a/queue-5.4/dm-verity-align-struct-dm_verity_fec_io-properly.patch b/queue-5.4/dm-verity-align-struct-dm_verity_fec_io-properly.patch
new file mode 100644 (file)
index 0000000..cf812e5
--- /dev/null
@@ -0,0 +1,52 @@
+From 38bc1ab135db87577695816b190e7d6d8ec75879 Mon Sep 17 00:00:00 2001
+From: Mikulas Patocka <mpatocka@redhat.com>
+Date: Tue, 28 Nov 2023 14:50:23 +0100
+Subject: dm-verity: align struct dm_verity_fec_io properly
+
+From: Mikulas Patocka <mpatocka@redhat.com>
+
+commit 38bc1ab135db87577695816b190e7d6d8ec75879 upstream.
+
+dm_verity_fec_io is placed after the end of two hash digests. If the hash
+digest has unaligned length, struct dm_verity_fec_io could be unaligned.
+
+This commit fixes the placement of struct dm_verity_fec_io, so that it's
+aligned.
+
+Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
+Cc: stable@vger.kernel.org
+Fixes: a739ff3f543a ("dm verity: add support for forward error correction")
+Signed-off-by: Mike Snitzer <snitzer@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/md/dm-verity-fec.c |    3 ++-
+ drivers/md/dm-verity.h     |    6 ------
+ 2 files changed, 2 insertions(+), 7 deletions(-)
+
+--- a/drivers/md/dm-verity-fec.c
++++ b/drivers/md/dm-verity-fec.c
+@@ -24,7 +24,8 @@ bool verity_fec_is_enabled(struct dm_ver
+  */
+ static inline struct dm_verity_fec_io *fec_io(struct dm_verity_io *io)
+ {
+-      return (struct dm_verity_fec_io *) verity_io_digest_end(io->v, io);
++      return (struct dm_verity_fec_io *)
++              ((char *)io + io->v->ti->per_io_data_size - sizeof(struct dm_verity_fec_io));
+ }
+ /*
+--- a/drivers/md/dm-verity.h
++++ b/drivers/md/dm-verity.h
+@@ -110,12 +110,6 @@ static inline u8 *verity_io_want_digest(
+       return (u8 *)(io + 1) + v->ahash_reqsize + v->digest_size;
+ }
+-static inline u8 *verity_io_digest_end(struct dm_verity *v,
+-                                     struct dm_verity_io *io)
+-{
+-      return verity_io_want_digest(v, io) + v->digest_size;
+-}
+-
+ extern int verity_for_bv_block(struct dm_verity *v, struct dm_verity_io *io,
+                              struct bvec_iter *iter,
+                              int (*process)(struct dm_verity *v,
diff --git a/queue-5.4/firewire-core-fix-possible-memory-leak-in-create_units.patch b/queue-5.4/firewire-core-fix-possible-memory-leak-in-create_units.patch
new file mode 100644 (file)
index 0000000..f5471b4
--- /dev/null
@@ -0,0 +1,60 @@
+From 891e0eab32a57fca4d36c5162628eb0bcb1f0edf Mon Sep 17 00:00:00 2001
+From: Yang Yingliang <yangyingliang@huawei.com>
+Date: Wed, 29 Nov 2023 17:34:08 +0800
+Subject: firewire: core: fix possible memory leak in create_units()
+
+From: Yang Yingliang <yangyingliang@huawei.com>
+
+commit 891e0eab32a57fca4d36c5162628eb0bcb1f0edf upstream.
+
+If device_register() fails, the refcount of device is not 0, the name
+allocated in dev_set_name() is leaked. To fix this by calling put_device(),
+so that it will be freed in callback function kobject_cleanup().
+
+unreferenced object 0xffff9d99035c7a90 (size 8):
+  comm "systemd-udevd", pid 168, jiffies 4294672386 (age 152.089s)
+  hex dump (first 8 bytes):
+    66 77 30 2e 30 00 ff ff                          fw0.0...
+  backtrace:
+    [<00000000e1d62bac>] __kmem_cache_alloc_node+0x1e9/0x360
+    [<00000000bbeaff31>] __kmalloc_node_track_caller+0x44/0x1a0
+    [<00000000491f2fb4>] kvasprintf+0x67/0xd0
+    [<000000005b960ddc>] kobject_set_name_vargs+0x1e/0x90
+    [<00000000427ac591>] dev_set_name+0x4e/0x70
+    [<000000003b4e447d>] create_units+0xc5/0x110
+
+fw_unit_release() will be called in the error path, move fw_device_get()
+before calling device_register() to keep balanced with fw_device_put() in
+fw_unit_release().
+
+Cc: stable@vger.kernel.org
+Fixes: 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array")
+Fixes: a1f64819fe9f ("firewire: struct device - replace bus_id with dev_name(), dev_set_name()")
+Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
+Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/firewire/core-device.c |   11 ++++-------
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+--- a/drivers/firewire/core-device.c
++++ b/drivers/firewire/core-device.c
+@@ -719,14 +719,11 @@ static void create_units(struct fw_devic
+                                       fw_unit_attributes,
+                                       &unit->attribute_group);
+-              if (device_register(&unit->device) < 0)
+-                      goto skip_unit;
+-
+               fw_device_get(device);
+-              continue;
+-
+-      skip_unit:
+-              kfree(unit);
++              if (device_register(&unit->device) < 0) {
++                      put_device(&unit->device);
++                      continue;
++              }
+       }
+ }
diff --git a/queue-5.4/mmc-block-be-sure-to-wait-while-busy-in-cqe-error-recovery.patch b/queue-5.4/mmc-block-be-sure-to-wait-while-busy-in-cqe-error-recovery.patch
new file mode 100644 (file)
index 0000000..61ac92e
--- /dev/null
@@ -0,0 +1,36 @@
+From c616696a902987352426fdaeec1b0b3240949e6b Mon Sep 17 00:00:00 2001
+From: Adrian Hunter <adrian.hunter@intel.com>
+Date: Fri, 3 Nov 2023 10:47:17 +0200
+Subject: mmc: block: Be sure to wait while busy in CQE error recovery
+
+From: Adrian Hunter <adrian.hunter@intel.com>
+
+commit c616696a902987352426fdaeec1b0b3240949e6b upstream.
+
+STOP command does not guarantee to wait while busy, but subsequent command
+MMC_CMDQ_TASK_MGMT to discard the queue will fail if the card is busy, so
+be sure to wait by employing mmc_poll_for_busy().
+
+Fixes: 72a5af554df8 ("mmc: core: Add support for handling CQE requests")
+Cc: stable@vger.kernel.org
+Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
+Reviewed-by: Avri Altman <avri.altman@wdc.com>
+Reviewed-by: Christian Loehle <christian.loehle@arm.com>
+Link: https://lore.kernel.org/r/20231103084720.6886-4-adrian.hunter@intel.com
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/mmc/core/core.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/mmc/core/core.c
++++ b/drivers/mmc/core/core.c
+@@ -570,6 +570,8 @@ int mmc_cqe_recovery(struct mmc_host *ho
+       cmd.busy_timeout = MMC_CQE_RECOVERY_TIMEOUT,
+       mmc_wait_for_cmd(host, &cmd, 0);
++      mmc_poll_for_busy(host->card, MMC_CQE_RECOVERY_TIMEOUT, true, MMC_BUSY_IO);
++
+       memset(&cmd, 0, sizeof(cmd));
+       cmd.opcode       = MMC_CMDQ_TASK_MGMT;
+       cmd.arg          = 1; /* Discard entire queue */
diff --git a/queue-5.4/mmc-block-do-not-lose-cache-flush-during-cqe-error-recovery.patch b/queue-5.4/mmc-block-do-not-lose-cache-flush-during-cqe-error-recovery.patch
new file mode 100644 (file)
index 0000000..22e953c
--- /dev/null
@@ -0,0 +1,38 @@
+From 174925d340aac55296318e43fd96c0e1d196e105 Mon Sep 17 00:00:00 2001
+From: Adrian Hunter <adrian.hunter@intel.com>
+Date: Fri, 3 Nov 2023 10:47:15 +0200
+Subject: mmc: block: Do not lose cache flush during CQE error recovery
+
+From: Adrian Hunter <adrian.hunter@intel.com>
+
+commit 174925d340aac55296318e43fd96c0e1d196e105 upstream.
+
+During CQE error recovery, error-free data commands get requeued if there
+is any data left to transfer, but non-data commands are completed even
+though they have not been processed.  Requeue them instead.
+
+Note the only non-data command is cache flush, which would have resulted in
+a cache flush being lost if it was queued at the time of CQE recovery.
+
+Fixes: 1e8e55b67030 ("mmc: block: Add CQE support")
+Cc: stable@vger.kernel.org
+Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
+Reviewed-by: Avri Altman <avri.altman@wdc.com>
+Link: https://lore.kernel.org/r/20231103084720.6886-2-adrian.hunter@intel.com
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/mmc/core/block.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/mmc/core/block.c
++++ b/drivers/mmc/core/block.c
+@@ -1463,6 +1463,8 @@ static void mmc_blk_cqe_complete_rq(stru
+                       blk_mq_requeue_request(req, true);
+               else
+                       __blk_mq_end_request(req, BLK_STS_OK);
++      } else if (mq->in_recovery) {
++              blk_mq_requeue_request(req, true);
+       } else {
+               blk_mq_end_request(req, BLK_STS_OK);
+       }
diff --git a/queue-5.4/mmc-sdhci-sprd-fix-vqmmc-not-shutting-down-after-the-card-was-pulled.patch b/queue-5.4/mmc-sdhci-sprd-fix-vqmmc-not-shutting-down-after-the-card-was-pulled.patch
new file mode 100644 (file)
index 0000000..bfd1f11
--- /dev/null
@@ -0,0 +1,88 @@
+From 477865af60b2117ceaa1d558e03559108c15c78c Mon Sep 17 00:00:00 2001
+From: Wenchao Chen <wenchao.chen@unisoc.com>
+Date: Wed, 15 Nov 2023 16:34:06 +0800
+Subject: mmc: sdhci-sprd: Fix vqmmc not shutting down after the card was pulled
+
+From: Wenchao Chen <wenchao.chen@unisoc.com>
+
+commit 477865af60b2117ceaa1d558e03559108c15c78c upstream.
+
+With cat regulator_summary, we found that vqmmc was not shutting
+down after the card was pulled.
+
+cat /sys/kernel/debug/regulator/regulator_summary
+1.before fix
+1)Insert SD card
+ vddsdio               1    1  0 unknown  3500mV 0mA  1200mV  3750mV
+    71100000.mmc-vqmmc  1                         0mA  3500mV  3600mV
+
+2)Pull out the SD card
+ vddsdio                1    1  0 unknown  3500mV 0mA  1200mV  3750mV
+    71100000.mmc-vqmmc  1                         0mA  3500mV  3600mV
+
+2.after fix
+1)Insert SD cardt
+ vddsdio                1    1  0 unknown  3500mV 0mA  1200mV  3750mV
+    71100000.mmc-vqmmc  1                         0mA  3500mV  3600mV
+
+2)Pull out the SD card
+ vddsdio               0    1  0 unknown  3500mV 0mA  1200mV  3750mV
+    71100000.mmc-vqmmc  0                         0mA  3500mV  3600mV
+
+Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller")
+Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/r/20231115083406.7368-1-wenchao.chen@unisoc.com
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/mmc/host/sdhci-sprd.c |   25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+--- a/drivers/mmc/host/sdhci-sprd.c
++++ b/drivers/mmc/host/sdhci-sprd.c
+@@ -381,12 +381,33 @@ static unsigned int sdhci_sprd_get_ro(st
+       return 0;
+ }
++static void sdhci_sprd_set_power(struct sdhci_host *host, unsigned char mode,
++                               unsigned short vdd)
++{
++      struct mmc_host *mmc = host->mmc;
++
++      switch (mode) {
++      case MMC_POWER_OFF:
++              mmc_regulator_set_ocr(host->mmc, mmc->supply.vmmc, 0);
++
++              mmc_regulator_disable_vqmmc(mmc);
++              break;
++      case MMC_POWER_ON:
++              mmc_regulator_enable_vqmmc(mmc);
++              break;
++      case MMC_POWER_UP:
++              mmc_regulator_set_ocr(host->mmc, mmc->supply.vmmc, vdd);
++              break;
++      }
++}
++
+ static struct sdhci_ops sdhci_sprd_ops = {
+       .read_l = sdhci_sprd_readl,
+       .write_l = sdhci_sprd_writel,
+       .write_w = sdhci_sprd_writew,
+       .write_b = sdhci_sprd_writeb,
+       .set_clock = sdhci_sprd_set_clock,
++      .set_power = sdhci_sprd_set_power,
+       .get_max_clock = sdhci_sprd_get_max_clock,
+       .get_min_clock = sdhci_sprd_get_min_clock,
+       .set_bus_width = sdhci_set_bus_width,
+@@ -630,6 +651,10 @@ static int sdhci_sprd_probe(struct platf
+       host->caps1 &= ~(SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_SDR104 |
+                        SDHCI_SUPPORT_DDR50);
++      ret = mmc_regulator_get_supply(host->mmc);
++      if (ret)
++              goto pm_runtime_disable;
++
+       ret = sdhci_setup_host(host);
+       if (ret)
+               goto pm_runtime_disable;
diff --git a/queue-5.4/perf-inject-fix-gen_elf_text_offset-for-jit.patch b/queue-5.4/perf-inject-fix-gen_elf_text_offset-for-jit.patch
new file mode 100644 (file)
index 0000000..dcdafcb
--- /dev/null
@@ -0,0 +1,48 @@
+From 89b15d00527b7825ff19130ed83478e80e3fae99 Mon Sep 17 00:00:00 2001
+From: Adrian Hunter <adrian.hunter@intel.com>
+Date: Fri, 14 Oct 2022 20:09:04 +0300
+Subject: perf inject: Fix GEN_ELF_TEXT_OFFSET for jit
+
+From: Adrian Hunter <adrian.hunter@intel.com>
+
+commit 89b15d00527b7825ff19130ed83478e80e3fae99 upstream.
+
+When a program header was added, it moved the text section but
+GEN_ELF_TEXT_OFFSET was not updated.
+
+Fix by adding the program header size and aligning.
+
+Fixes: babd04386b1df8c3 ("perf jit: Include program header in ELF files")
+Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
+Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Cc: Ian Rogers <irogers@google.com>
+Cc: Jiri Olsa <jolsa@kernel.org>
+Cc: Lieven Hey <lieven.hey@kdab.com>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Link: https://lore.kernel.org/r/20221014170905.64069-7-adrian.hunter@intel.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/perf/util/genelf.h |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/tools/perf/util/genelf.h
++++ b/tools/perf/util/genelf.h
+@@ -2,6 +2,8 @@
+ #ifndef __GENELF_H__
+ #define __GENELF_H__
++#include <linux/math.h>
++
+ /* genelf.c */
+ int jit_write_elf(int fd, uint64_t code_addr, const char *sym,
+                 const void *code, int csize, void *debug, int nr_debug_entries,
+@@ -73,6 +75,6 @@ int jit_add_debug_info(Elf *e, uint64_t
+ #endif
+ /* The .text section is directly after the ELF header */
+-#define GEN_ELF_TEXT_OFFSET sizeof(Elf_Ehdr)
++#define GEN_ELF_TEXT_OFFSET round_up(sizeof(Elf_Ehdr) + sizeof(Elf_Phdr), 16)
+ #endif
diff --git a/queue-5.4/pinctrl-avoid-reload-of-p-state-in-list-iteration.patch b/queue-5.4/pinctrl-avoid-reload-of-p-state-in-list-iteration.patch
new file mode 100644 (file)
index 0000000..596839a
--- /dev/null
@@ -0,0 +1,54 @@
+From 4198a9b571065978632276264e01d71d68000ac5 Mon Sep 17 00:00:00 2001
+From: Maria Yu <quic_aiquny@quicinc.com>
+Date: Wed, 15 Nov 2023 18:28:24 +0800
+Subject: pinctrl: avoid reload of p state in list iteration
+
+From: Maria Yu <quic_aiquny@quicinc.com>
+
+commit 4198a9b571065978632276264e01d71d68000ac5 upstream.
+
+When in the list_for_each_entry iteration, reload of p->state->settings
+with a local setting from old_state will turn the list iteration into an
+infinite loop.
+
+The typical symptom when the issue happens, will be a printk message like:
+
+  "not freeing pin xx (xxx) as part of deactivating group xxx - it is
+already used for some other setting".
+
+This is a compiler-dependent problem, one instance occurred using Clang
+version 10.0 on the arm64 architecture with linux version 4.19.
+
+Fixes: 6e5e959dde0d ("pinctrl: API changes to support multiple states per device")
+Signed-off-by: Maria Yu <quic_aiquny@quicinc.com>
+Cc:  <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20231115102824.23727-1-quic_aiquny@quicinc.com
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/pinctrl/core.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/pinctrl/core.c
++++ b/drivers/pinctrl/core.c
+@@ -1237,17 +1237,17 @@ static void pinctrl_link_add(struct pinc
+ static int pinctrl_commit_state(struct pinctrl *p, struct pinctrl_state *state)
+ {
+       struct pinctrl_setting *setting, *setting2;
+-      struct pinctrl_state *old_state = p->state;
++      struct pinctrl_state *old_state = READ_ONCE(p->state);
+       int ret;
+-      if (p->state) {
++      if (old_state) {
+               /*
+                * For each pinmux setting in the old state, forget SW's record
+                * of mux owner for that pingroup. Any pingroups which are
+                * still owned by the new state will be re-acquired by the call
+                * to pinmux_enable_setting() in the loop below.
+                */
+-              list_for_each_entry(setting, &p->state->settings, node) {
++              list_for_each_entry(setting, &old_state->settings, node) {
+                       if (setting->type != PIN_MAP_TYPE_MUX_GROUP)
+                               continue;
+                       pinmux_disable_setting(setting);
index d98da851627de04a7a705e5d636a2d5f4bbd16bf..bc9747adb530b33c9897239f480762344366d37c 100644 (file)
@@ -47,3 +47,13 @@ usb-dwc3-set-the-dma-max_seg_size.patch
 usb-dwc3-qcom-fix-resource-leaks-on-probe-deferral.patch
 usb-dwc3-qcom-fix-wakeup-after-probe-deferral.patch
 io_uring-fix-off-by-one-bvec-index.patch
+perf-inject-fix-gen_elf_text_offset-for-jit.patch
+pinctrl-avoid-reload-of-p-state-in-list-iteration.patch
+firewire-core-fix-possible-memory-leak-in-create_units.patch
+mmc-sdhci-sprd-fix-vqmmc-not-shutting-down-after-the-card-was-pulled.patch
+mmc-block-do-not-lose-cache-flush-during-cqe-error-recovery.patch
+mmc-block-be-sure-to-wait-while-busy-in-cqe-error-recovery.patch
+alsa-hda-disable-power-save-on-kontron-singlepc.patch
+alsa-hda-realtek-headset-mic-vref-to-100.patch
+alsa-hda-realtek-add-supported-alc257-for-chromeos.patch
+dm-verity-align-struct-dm_verity_fec_io-properly.patch