From: Greg Kroah-Hartman Date: Tue, 23 Apr 2024 11:52:21 +0000 (+0200) Subject: 6.8-stable patches X-Git-Tag: v5.15.157~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d51beb45dea043b35505d8f17828ae8f3bb871c;p=thirdparty%2Fkernel%2Fstable-queue.git 6.8-stable patches added patches: alsa-hda-realtek-add-quirks-for-huawei-matebook-d14-nblb-wax9n.patch alsa-hda-realtek-enable-audio-jacks-of-haier-boyue-g42-with-alc269vc.patch alsa-hda-tas2781-add-new-vendor_id-and-subsystem_id-to-support-thinkpad-ice-1.patch alsa-hda-tas2781-correct-the-register-for-pow-calibrated-data.patch alsa-seq-ump-fix-conversion-from-midi2-to-midi1-ump-messages.patch binder-check-offset-alignment-in-binder_get_object.patch misc-rtsx-fix-rts5264-driver-status-incorrect-when-card-removed.patch usb-misc-onboard_usb_hub-disable-the-usb-hub-clock-on-failure.patch --- diff --git a/queue-6.8/alsa-hda-realtek-add-quirks-for-huawei-matebook-d14-nblb-wax9n.patch b/queue-6.8/alsa-hda-realtek-add-quirks-for-huawei-matebook-d14-nblb-wax9n.patch new file mode 100644 index 00000000000..adea5b36976 --- /dev/null +++ b/queue-6.8/alsa-hda-realtek-add-quirks-for-huawei-matebook-d14-nblb-wax9n.patch @@ -0,0 +1,34 @@ +From 7caf3daaaf0436fe370834c72c667a97d3671d1a Mon Sep 17 00:00:00 2001 +From: Mauro Carvalho Chehab +Date: Wed, 17 Apr 2024 17:16:33 +0100 +Subject: ALSA: hda/realtek: Add quirks for Huawei Matebook D14 NBLB-WAX9N + +From: Mauro Carvalho Chehab + +commit 7caf3daaaf0436fe370834c72c667a97d3671d1a upstream. + +The headset mic requires a fixup to be properly detected/used. + +As a reference, this specific model from 2021 reports +the following devices: + https://alsa-project.org/db/?f=1a5ddeb0b151db8fe051407f5bb1c075b7dd3e4a + +Signed-off-by: Mauro Carvalho Chehab +Cc: +Message-ID: +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -10215,6 +10215,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC), + SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC), + SND_PCI_QUIRK(0x152d, 0x1082, "Quanta NL3", ALC269_FIXUP_LIFEBOOK), ++ SND_PCI_QUIRK(0x152d, 0x1262, "Huawei NBLB-WAX9N", ALC2XX_FIXUP_HEADSET_MIC), + SND_PCI_QUIRK(0x1558, 0x0353, "Clevo V35[05]SN[CDE]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x1323, "Clevo N130ZU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x1325, "Clevo N15[01][CW]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), diff --git a/queue-6.8/alsa-hda-realtek-enable-audio-jacks-of-haier-boyue-g42-with-alc269vc.patch b/queue-6.8/alsa-hda-realtek-enable-audio-jacks-of-haier-boyue-g42-with-alc269vc.patch new file mode 100644 index 00000000000..a79ff9ed029 --- /dev/null +++ b/queue-6.8/alsa-hda-realtek-enable-audio-jacks-of-haier-boyue-g42-with-alc269vc.patch @@ -0,0 +1,32 @@ +From 7ee5faad0f8c3ad86c8cfc2f6aac91d2ba29790f Mon Sep 17 00:00:00 2001 +From: Ai Chao +Date: Fri, 19 Apr 2024 16:21:59 +0800 +Subject: ALSA: hda/realtek - Enable audio jacks of Haier Boyue G42 with ALC269VC + +From: Ai Chao + +commit 7ee5faad0f8c3ad86c8cfc2f6aac91d2ba29790f upstream. + +The Haier Boyue G42 with ALC269VC cannot detect the MIC of headset, +the line out and internal speaker until +ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS quirk applied. + +Signed-off-by: Ai Chao +Cc: +Message-ID: <20240419082159.476879-1-aichao@kylinos.cn> +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -10444,6 +10444,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP), + SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP), + SND_PCI_QUIRK(0x1d05, 0x1387, "TongFang GMxIXxx", ALC2XX_FIXUP_HEADSET_MIC), ++ SND_PCI_QUIRK(0x1d17, 0x3288, "Haier Boyue G42", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS), + SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC), + SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC), diff --git a/queue-6.8/alsa-hda-tas2781-add-new-vendor_id-and-subsystem_id-to-support-thinkpad-ice-1.patch b/queue-6.8/alsa-hda-tas2781-add-new-vendor_id-and-subsystem_id-to-support-thinkpad-ice-1.patch new file mode 100644 index 00000000000..16bfdde305a --- /dev/null +++ b/queue-6.8/alsa-hda-tas2781-add-new-vendor_id-and-subsystem_id-to-support-thinkpad-ice-1.patch @@ -0,0 +1,31 @@ +From f74ab0c5e5947bcb3a400ab73d837974e76fad23 Mon Sep 17 00:00:00 2001 +From: Shenghao Ding +Date: Thu, 11 Apr 2024 17:18:22 +0800 +Subject: ALSA: hda/tas2781: Add new vendor_id and subsystem_id to support ThinkPad ICE-1 + +From: Shenghao Ding + +commit f74ab0c5e5947bcb3a400ab73d837974e76fad23 upstream. + +Add new vendor_id and subsystem_id to support new Lenovo laptop +ThinkPad ICE-1 + +Signed-off-by: Shenghao Ding +Cc: +Message-ID: <20240411091823.1644-1-shenghao-ding@ti.com> +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -10320,6 +10320,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x17aa, 0x222e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), + SND_PCI_QUIRK(0x17aa, 0x2231, "Thinkpad T560", ALC292_FIXUP_TPT460), + SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460), ++ SND_PCI_QUIRK(0x17aa, 0x2234, "Thinkpad ICE-1", ALC287_FIXUP_TAS2781_I2C), + SND_PCI_QUIRK(0x17aa, 0x2245, "Thinkpad T470", ALC298_FIXUP_TPT470_DOCK), + SND_PCI_QUIRK(0x17aa, 0x2246, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), + SND_PCI_QUIRK(0x17aa, 0x2247, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), diff --git a/queue-6.8/alsa-hda-tas2781-correct-the-register-for-pow-calibrated-data.patch b/queue-6.8/alsa-hda-tas2781-correct-the-register-for-pow-calibrated-data.patch new file mode 100644 index 00000000000..c7e51c7c398 --- /dev/null +++ b/queue-6.8/alsa-hda-tas2781-correct-the-register-for-pow-calibrated-data.patch @@ -0,0 +1,37 @@ +From 0b6f0ff01a4a8c1b66c600263465976d57dcc1a3 Mon Sep 17 00:00:00 2001 +From: Shenghao Ding +Date: Sat, 6 Apr 2024 21:20:09 +0800 +Subject: ALSA: hda/tas2781: correct the register for pow calibrated data + +From: Shenghao Ding + +commit 0b6f0ff01a4a8c1b66c600263465976d57dcc1a3 upstream. + +Calibrated data was written into an incorrect register, which cause +speaker protection sometimes malfuctions + +Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") +Signed-off-by: Shenghao Ding +Cc: +Message-ID: <20240406132010.341-1-shenghao-ding@ti.com> +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/tas2781_hda_i2c.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/pci/hda/tas2781_hda_i2c.c ++++ b/sound/pci/hda/tas2781_hda_i2c.c +@@ -501,10 +501,10 @@ static int tas2563_save_calibration(stru + static void tas2781_apply_calib(struct tasdevice_priv *tas_priv) + { + static const unsigned char page_array[CALIB_MAX] = { +- 0x17, 0x18, 0x18, 0x0d, 0x18 ++ 0x17, 0x18, 0x18, 0x13, 0x18, + }; + static const unsigned char rgno_array[CALIB_MAX] = { +- 0x74, 0x0c, 0x14, 0x3c, 0x7c ++ 0x74, 0x0c, 0x14, 0x70, 0x7c, + }; + unsigned char *data; + int i, j, rc; diff --git a/queue-6.8/alsa-seq-ump-fix-conversion-from-midi2-to-midi1-ump-messages.patch b/queue-6.8/alsa-seq-ump-fix-conversion-from-midi2-to-midi1-ump-messages.patch new file mode 100644 index 00000000000..0cda875b6d1 --- /dev/null +++ b/queue-6.8/alsa-seq-ump-fix-conversion-from-midi2-to-midi1-ump-messages.patch @@ -0,0 +1,34 @@ +From f25f17dc5c6a5e3f2014d44635f0c0db45224efe Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 19 Apr 2024 12:04:39 +0200 +Subject: ALSA: seq: ump: Fix conversion from MIDI2 to MIDI1 UMP messages + +From: Takashi Iwai + +commit f25f17dc5c6a5e3f2014d44635f0c0db45224efe upstream. + +The conversion from MIDI2 to MIDI1 UMP messages had a leftover +artifact (superfluous bit shift), and this resulted in the bogus type +check, leading to empty outputs. Let's fix it. + +Fixes: e9e02819a98a ("ALSA: seq: Automatic conversion of UMP events") +Cc: +Link: https://github.com/alsa-project/alsa-utils/issues/262 +Message-ID: <20240419100442.14806-1-tiwai@suse.de> +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/core/seq/seq_ump_convert.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/core/seq/seq_ump_convert.c ++++ b/sound/core/seq/seq_ump_convert.c +@@ -428,7 +428,7 @@ static int cvt_ump_midi2_to_midi1(struct + midi1->note.group = midi2->note.group; + midi1->note.status = midi2->note.status; + midi1->note.channel = midi2->note.channel; +- switch (midi2->note.status << 4) { ++ switch (midi2->note.status) { + case UMP_MSG_STATUS_NOTE_ON: + case UMP_MSG_STATUS_NOTE_OFF: + midi1->note.note = midi2->note.note; diff --git a/queue-6.8/binder-check-offset-alignment-in-binder_get_object.patch b/queue-6.8/binder-check-offset-alignment-in-binder_get_object.patch new file mode 100644 index 00000000000..470c2debeeb --- /dev/null +++ b/queue-6.8/binder-check-offset-alignment-in-binder_get_object.patch @@ -0,0 +1,46 @@ +From aaef73821a3b0194a01bd23ca77774f704a04d40 Mon Sep 17 00:00:00 2001 +From: Carlos Llamas +Date: Sat, 30 Mar 2024 19:01:14 +0000 +Subject: binder: check offset alignment in binder_get_object() + +From: Carlos Llamas + +commit aaef73821a3b0194a01bd23ca77774f704a04d40 upstream. + +Commit 6d98eb95b450 ("binder: avoid potential data leakage when copying +txn") introduced changes to how binder objects are copied. In doing so, +it unintentionally removed an offset alignment check done through calls +to binder_alloc_copy_from_buffer() -> check_buffer(). + +These calls were replaced in binder_get_object() with copy_from_user(), +so now an explicit offset alignment check is needed here. This avoids +later complications when unwinding the objects gets harder. + +It is worth noting this check existed prior to commit 7a67a39320df +("binder: add function to copy binder object from buffer"), likely +removed due to redundancy at the time. + +Fixes: 6d98eb95b450 ("binder: avoid potential data leakage when copying txn") +Cc: stable@vger.kernel.org +Signed-off-by: Carlos Llamas +Acked-by: Todd Kjos +Link: https://lore.kernel.org/r/20240330190115.1877819-1-cmllamas@google.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/android/binder.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/android/binder.c ++++ b/drivers/android/binder.c +@@ -1708,8 +1708,10 @@ static size_t binder_get_object(struct b + size_t object_size = 0; + + read_size = min_t(size_t, sizeof(*object), buffer->data_size - offset); +- if (offset > buffer->data_size || read_size < sizeof(*hdr)) ++ if (offset > buffer->data_size || read_size < sizeof(*hdr) || ++ !IS_ALIGNED(offset, sizeof(u32))) + return 0; ++ + if (u) { + if (copy_from_user(object, u + offset, read_size)) + return 0; diff --git a/queue-6.8/misc-rtsx-fix-rts5264-driver-status-incorrect-when-card-removed.patch b/queue-6.8/misc-rtsx-fix-rts5264-driver-status-incorrect-when-card-removed.patch new file mode 100644 index 00000000000..ca43073eb61 --- /dev/null +++ b/queue-6.8/misc-rtsx-fix-rts5264-driver-status-incorrect-when-card-removed.patch @@ -0,0 +1,37 @@ +From 26ac2df47d4c58f17210b7a59037e40f7eca693e Mon Sep 17 00:00:00 2001 +From: Ricky Wu +Date: Thu, 14 Mar 2024 14:51:13 +0800 +Subject: misc: rtsx: Fix rts5264 driver status incorrect when card removed + +From: Ricky Wu + +commit 26ac2df47d4c58f17210b7a59037e40f7eca693e upstream. + +rts5264 driver not clean express link error and set EXTRA_CAPS_SD_EXPRESS +capability back when card removed + +Fixes: 6a511c9b3a0d ("misc: rtsx: add to support new card reader rts5264") +Cc: stable +Signed-off-by: Ricky Wu +Link: https://lore.kernel.org/r/20240314065113.5962-1-ricky_wu@realtek.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/misc/cardreader/rtsx_pcr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/misc/cardreader/rtsx_pcr.c b/drivers/misc/cardreader/rtsx_pcr.c +index 1a64364700eb..0ad2ff9065aa 100644 +--- a/drivers/misc/cardreader/rtsx_pcr.c ++++ b/drivers/misc/cardreader/rtsx_pcr.c +@@ -1002,7 +1002,7 @@ static irqreturn_t rtsx_pci_isr(int irq, void *dev_id) + } else { + pcr->card_removed |= SD_EXIST; + pcr->card_inserted &= ~SD_EXIST; +- if (PCI_PID(pcr) == PID_5261) { ++ if ((PCI_PID(pcr) == PID_5261) || (PCI_PID(pcr) == PID_5264)) { + rtsx_pci_write_register(pcr, RTS5261_FW_STATUS, + RTS5261_EXPRESS_LINK_FAIL_MASK, 0); + pcr->extra_caps |= EXTRA_CAPS_SD_EXPRESS; +-- +2.44.0 + diff --git a/queue-6.8/series b/queue-6.8/series index 8c191b14c51..3feefeec958 100644 --- a/queue-6.8/series +++ b/queue-6.8/series @@ -84,3 +84,11 @@ x86-bugs-fix-bhi-retpoline-check.patch x86-cpufeatures-fix-dependencies-for-gfni-vaes-and-v.patch block-propagate-partition-scanning-errors-to-the-blk.patch net-mlx5-e-switch-store-eswitch-pointer-before-regis.patch +alsa-seq-ump-fix-conversion-from-midi2-to-midi1-ump-messages.patch +alsa-hda-tas2781-correct-the-register-for-pow-calibrated-data.patch +alsa-hda-tas2781-add-new-vendor_id-and-subsystem_id-to-support-thinkpad-ice-1.patch +alsa-hda-realtek-add-quirks-for-huawei-matebook-d14-nblb-wax9n.patch +alsa-hda-realtek-enable-audio-jacks-of-haier-boyue-g42-with-alc269vc.patch +usb-misc-onboard_usb_hub-disable-the-usb-hub-clock-on-failure.patch +misc-rtsx-fix-rts5264-driver-status-incorrect-when-card-removed.patch +binder-check-offset-alignment-in-binder_get_object.patch diff --git a/queue-6.8/usb-misc-onboard_usb_hub-disable-the-usb-hub-clock-on-failure.patch b/queue-6.8/usb-misc-onboard_usb_hub-disable-the-usb-hub-clock-on-failure.patch new file mode 100644 index 00000000000..dab24d20740 --- /dev/null +++ b/queue-6.8/usb-misc-onboard_usb_hub-disable-the-usb-hub-clock-on-failure.patch @@ -0,0 +1,52 @@ +From 34b990e9bb54d20b9675ca9483be8668eed374d8 Mon Sep 17 00:00:00 2001 +From: Fabio Estevam +Date: Tue, 9 Apr 2024 13:29:10 -0300 +Subject: usb: misc: onboard_usb_hub: Disable the USB hub clock on failure + +From: Fabio Estevam + +commit 34b990e9bb54d20b9675ca9483be8668eed374d8 upstream. + +In case regulator_bulk_enable() fails, the previously enabled USB hub +clock should be disabled. + +Fix it accordingly. + +Fixes: 65e62b8a955a ("usb: misc: onboard_usb_hub: Add support for clock input") +Cc: stable +Signed-off-by: Fabio Estevam +Reviewed-by: Frieder Schrempf +Acked-by: Matthias Kaehlcke +Link: https://lore.kernel.org/r/20240409162910.2061640-1-festevam@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/misc/onboard_usb_hub.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c +index c6101ed2d9d4..d8049275a023 100644 +--- a/drivers/usb/misc/onboard_usb_hub.c ++++ b/drivers/usb/misc/onboard_usb_hub.c +@@ -78,7 +78,7 @@ static int onboard_hub_power_on(struct onboard_hub *hub) + err = regulator_bulk_enable(hub->pdata->num_supplies, hub->supplies); + if (err) { + dev_err(hub->dev, "failed to enable supplies: %pe\n", ERR_PTR(err)); +- return err; ++ goto disable_clk; + } + + fsleep(hub->pdata->reset_us); +@@ -87,6 +87,10 @@ static int onboard_hub_power_on(struct onboard_hub *hub) + hub->is_powered_on = true; + + return 0; ++ ++disable_clk: ++ clk_disable_unprepare(hub->clk); ++ return err; + } + + static int onboard_hub_power_off(struct onboard_hub *hub) +-- +2.44.0 +