From b625c0de266b4239a72a6a916a9f63566edf965f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 23 Nov 2020 09:47:34 +0100 Subject: [PATCH] 5.4-stable patches added patches: alsa-ctl-fix-error-path-at-adding-user-defined-element-set.patch alsa-firewire-clean-up-a-locking-issue-in-copy_resp_to_buf.patch alsa-hda-realtek-add-some-clove-ssid-in-the-alc293-alc1220.patch alsa-hda-realtek-add-supported-for-lenovo-thinkpad-headset-button.patch alsa-mixart-fix-mutex-deadlock.patch alsa-usb-audio-add-delay-quirk-for-all-logitech-usb-devices.patch efivarfs-fix-memory-leak-in-efivarfs_create.patch hid-logitech-dj-fix-an-error-in-mse_bluetooth_descriptor.patch iio-light-fix-kconfig-dependency-bug-for-vcnl4035.patch staging-rtl8723bs-add-024c-0627-to-the-list-of-sdio-device-ids.patch tty-serial-imx-fix-potential-deadlock.patch tty-serial-imx-keep-console-clocks-always-on.patch --- ...h-at-adding-user-defined-element-set.patch | 40 +++++++ ...-a-locking-issue-in-copy_resp_to_buf.patch | 50 +++++++++ ...ome-clove-ssid-in-the-alc293-alc1220.patch | 100 ++++++++++++++++++ ...d-for-lenovo-thinkpad-headset-button.patch | 55 ++++++++++ .../alsa-mixart-fix-mutex-deadlock.patch | 56 ++++++++++ ...y-quirk-for-all-logitech-usb-devices.patch | 45 ++++++++ ...s-fix-memory-leak-in-efivarfs_create.patch | 49 +++++++++ ...an-error-in-mse_bluetooth_descriptor.patch | 40 +++++++ ...-kconfig-dependency-bug-for-vcnl4035.patch | 46 ++++++++ queue-5.4/series | 12 +++ ...-0627-to-the-list-of-sdio-device-ids.patch | 32 ++++++ ...ty-serial-imx-fix-potential-deadlock.patch | 63 +++++++++++ ...al-imx-keep-console-clocks-always-on.patch | 91 ++++++++++++++++ 13 files changed, 679 insertions(+) create mode 100644 queue-5.4/alsa-ctl-fix-error-path-at-adding-user-defined-element-set.patch create mode 100644 queue-5.4/alsa-firewire-clean-up-a-locking-issue-in-copy_resp_to_buf.patch create mode 100644 queue-5.4/alsa-hda-realtek-add-some-clove-ssid-in-the-alc293-alc1220.patch create mode 100644 queue-5.4/alsa-hda-realtek-add-supported-for-lenovo-thinkpad-headset-button.patch create mode 100644 queue-5.4/alsa-mixart-fix-mutex-deadlock.patch create mode 100644 queue-5.4/alsa-usb-audio-add-delay-quirk-for-all-logitech-usb-devices.patch create mode 100644 queue-5.4/efivarfs-fix-memory-leak-in-efivarfs_create.patch create mode 100644 queue-5.4/hid-logitech-dj-fix-an-error-in-mse_bluetooth_descriptor.patch create mode 100644 queue-5.4/iio-light-fix-kconfig-dependency-bug-for-vcnl4035.patch create mode 100644 queue-5.4/staging-rtl8723bs-add-024c-0627-to-the-list-of-sdio-device-ids.patch create mode 100644 queue-5.4/tty-serial-imx-fix-potential-deadlock.patch create mode 100644 queue-5.4/tty-serial-imx-keep-console-clocks-always-on.patch diff --git a/queue-5.4/alsa-ctl-fix-error-path-at-adding-user-defined-element-set.patch b/queue-5.4/alsa-ctl-fix-error-path-at-adding-user-defined-element-set.patch new file mode 100644 index 00000000000..8941ae8b13b --- /dev/null +++ b/queue-5.4/alsa-ctl-fix-error-path-at-adding-user-defined-element-set.patch @@ -0,0 +1,40 @@ +From 95a793c3bc75cf888e0e641d656e7d080f487d8b Mon Sep 17 00:00:00 2001 +From: Takashi Sakamoto +Date: Fri, 13 Nov 2020 18:20:43 +0900 +Subject: ALSA: ctl: fix error path at adding user-defined element set + +From: Takashi Sakamoto + +commit 95a793c3bc75cf888e0e641d656e7d080f487d8b upstream. + +When processing request to add/replace user-defined element set, check +of given element identifier and decision of numeric identifier is done +in "__snd_ctl_add_replace()" helper function. When the result of check +is wrong, the helper function returns error code. The error code shall +be returned to userspace application. + +Current implementation includes bug to return zero to userspace application +regardless of the result. This commit fixes the bug. + +Cc: +Fixes: e1a7bfe38079 ("ALSA: control: Fix race between adding and removing a user element") +Signed-off-by: Takashi Sakamoto +Link: https://lore.kernel.org/r/20201113092043.16148-1-o-takashi@sakamocchi.jp +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/core/control.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/core/control.c ++++ b/sound/core/control.c +@@ -1350,7 +1350,7 @@ static int snd_ctl_elem_add(struct snd_c + + unlock: + up_write(&card->controls_rwsem); +- return 0; ++ return err; + } + + static int snd_ctl_elem_add_user(struct snd_ctl_file *file, diff --git a/queue-5.4/alsa-firewire-clean-up-a-locking-issue-in-copy_resp_to_buf.patch b/queue-5.4/alsa-firewire-clean-up-a-locking-issue-in-copy_resp_to_buf.patch new file mode 100644 index 00000000000..ae0ee4cea0d --- /dev/null +++ b/queue-5.4/alsa-firewire-clean-up-a-locking-issue-in-copy_resp_to_buf.patch @@ -0,0 +1,50 @@ +From 02a9c6ee4183af2e438454c55098b828a96085fb Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Fri, 13 Nov 2020 13:12:41 +0300 +Subject: ALSA: firewire: Clean up a locking issue in copy_resp_to_buf() + +From: Dan Carpenter + +commit 02a9c6ee4183af2e438454c55098b828a96085fb upstream. + +The spin_lock/unlock_irq() functions cannot be nested. The problem is +that presumably we would want the IRQs to be re-enabled on the second +call the spin_unlock_irq() but instead it will be enabled at the first +call so IRQs will be enabled earlier than expected. + +In this situation the copy_resp_to_buf() function is only called from +one function and it is called with IRQs disabled. We can just use +the regular spin_lock/unlock() functions. + +Fixes: 555e8a8f7f14 ("ALSA: fireworks: Add command/response functionality into hwdep interface") +Signed-off-by: Dan Carpenter +Acked-by: Takashi Sakamoto +Cc: +Link: https://lore.kernel.org/r/20201113101241.GB168908@mwanda +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/firewire/fireworks/fireworks_transaction.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/firewire/fireworks/fireworks_transaction.c ++++ b/sound/firewire/fireworks/fireworks_transaction.c +@@ -123,7 +123,7 @@ copy_resp_to_buf(struct snd_efw *efw, vo + t = (struct snd_efw_transaction *)data; + length = min_t(size_t, be32_to_cpu(t->length) * sizeof(u32), length); + +- spin_lock_irq(&efw->lock); ++ spin_lock(&efw->lock); + + if (efw->push_ptr < efw->pull_ptr) + capacity = (unsigned int)(efw->pull_ptr - efw->push_ptr); +@@ -190,7 +190,7 @@ handle_resp_for_user(struct fw_card *car + + copy_resp_to_buf(efw, data, length, rcode); + end: +- spin_unlock_irq(&instances_lock); ++ spin_unlock(&instances_lock); + } + + static void diff --git a/queue-5.4/alsa-hda-realtek-add-some-clove-ssid-in-the-alc293-alc1220.patch b/queue-5.4/alsa-hda-realtek-add-some-clove-ssid-in-the-alc293-alc1220.patch new file mode 100644 index 00000000000..c552e7d3514 --- /dev/null +++ b/queue-5.4/alsa-hda-realtek-add-some-clove-ssid-in-the-alc293-alc1220.patch @@ -0,0 +1,100 @@ +From b5acfe152abaa2721c9ca8aa67f941d7de55d24e Mon Sep 17 00:00:00 2001 +From: PeiSen Hou +Date: Wed, 11 Nov 2020 08:58:59 +0100 +Subject: ALSA: hda/realtek: Add some Clove SSID in the ALC293(ALC1220) + +From: PeiSen Hou + +commit b5acfe152abaa2721c9ca8aa67f941d7de55d24e upstream. + +Fix "use as headset mic, without its own jack detect" problem. + +[ Minor coding style fixes by tiwai ] + +Signed-off-by: PeiSen Hou +Cc: +Link: https://lore.kernel.org/r/481963e4a5694ff19f27ae1e283d79ad@realtek.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 50 +++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 49 insertions(+), 1 deletion(-) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -2513,13 +2513,23 @@ static const struct snd_pci_quirk alc882 + SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3), + SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), + SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950), ++ SND_PCI_QUIRK(0x1558, 0x9506, "Clevo P955HQ", ALC1220_FIXUP_CLEVO_P950), ++ SND_PCI_QUIRK(0x1558, 0x950A, "Clevo P955H[PR]", ALC1220_FIXUP_CLEVO_P950), + SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950), + SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950), ++ SND_PCI_QUIRK(0x1558, 0x95e3, "Clevo P955[ER]T", ALC1220_FIXUP_CLEVO_P950), ++ SND_PCI_QUIRK(0x1558, 0x95e4, "Clevo P955ER", ALC1220_FIXUP_CLEVO_P950), ++ SND_PCI_QUIRK(0x1558, 0x95e5, "Clevo P955EE6", ALC1220_FIXUP_CLEVO_P950), ++ SND_PCI_QUIRK(0x1558, 0x95e6, "Clevo P950R[CDF]", ALC1220_FIXUP_CLEVO_P950), + SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950), + SND_PCI_QUIRK(0x1558, 0x97e1, "Clevo P970[ER][CDFN]", ALC1220_FIXUP_CLEVO_P950), ++ SND_PCI_QUIRK(0x1558, 0x97e2, "Clevo P970RC-M", ALC1220_FIXUP_CLEVO_P950), ++ SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), ++ SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), ++ SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), +- SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), ++ SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD), +@@ -7913,11 +7923,49 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC), + 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(0x1558, 0x1323, "Clevo N130ZU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x1325, "System76 Darter Pro (darp5)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x1401, "Clevo L140[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x1403, "Clevo N140CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x1404, "Clevo N150CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x14a1, "Clevo L141MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x8535, "Clevo NH50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x8536, "Clevo NH79D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x8550, "System76 Gazelle (gaze14)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x8551, "System76 Gazelle (gaze14)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x8560, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC), + SND_PCI_QUIRK(0x1558, 0x8561, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC), ++ SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x951d, "Clevo N950T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x961d, "Clevo N960S[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL53RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS), + SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), + SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), diff --git a/queue-5.4/alsa-hda-realtek-add-supported-for-lenovo-thinkpad-headset-button.patch b/queue-5.4/alsa-hda-realtek-add-supported-for-lenovo-thinkpad-headset-button.patch new file mode 100644 index 00000000000..117dd1f162d --- /dev/null +++ b/queue-5.4/alsa-hda-realtek-add-supported-for-lenovo-thinkpad-headset-button.patch @@ -0,0 +1,55 @@ +From 446b8185f0c39ac3faadbcd8ac156c50f2fd4ffe Mon Sep 17 00:00:00 2001 +From: Kailang Yang +Date: Mon, 2 Nov 2020 15:00:12 +0800 +Subject: ALSA: hda/realtek - Add supported for Lenovo ThinkPad Headset Button + +From: Kailang Yang + +commit 446b8185f0c39ac3faadbcd8ac156c50f2fd4ffe upstream. + +Add supported for Lenovo ThinkPad Headset Button. +Thinkpad P1 Gen 3 (0x22c1) +Thinkpad X1 Extreme Gen 3 (0x22c2) + +Signed-off-by: Kailang Yang +Cc: +Link: https://lore.kernel.org/r/f39b11d00340408ca2ed2df9b4fc2a09@realtek.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -6283,6 +6283,7 @@ enum { + ALC274_FIXUP_HP_MIC, + ALC274_FIXUP_HP_HEADSET_MIC, + ALC256_FIXUP_ASUS_HPE, ++ ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, + }; + + static const struct hda_fixup alc269_fixups[] = { +@@ -7687,6 +7688,12 @@ static const struct hda_fixup alc269_fix + .chained = true, + .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC + }, ++ [ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK] = { ++ .type = HDA_FIXUP_FUNC, ++ .v.func = alc_fixup_headset_jack, ++ .chained = true, ++ .chain_id = ALC269_FIXUP_THINKPAD_ACPI ++ }, + }; + + static const struct snd_pci_quirk alc269_fixup_tbl[] = { +@@ -7948,6 +7955,8 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), + SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), + SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), ++ SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK), ++ SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK), + SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), + SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), + SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), diff --git a/queue-5.4/alsa-mixart-fix-mutex-deadlock.patch b/queue-5.4/alsa-mixart-fix-mutex-deadlock.patch new file mode 100644 index 00000000000..027bd4bfd27 --- /dev/null +++ b/queue-5.4/alsa-mixart-fix-mutex-deadlock.patch @@ -0,0 +1,56 @@ +From d21b96c8ed2aea7e6b7bf4735e1d2503cfbf4072 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 19 Nov 2020 13:14:40 +0100 +Subject: ALSA: mixart: Fix mutex deadlock + +From: Takashi Iwai + +commit d21b96c8ed2aea7e6b7bf4735e1d2503cfbf4072 upstream. + +The code change for switching to non-atomic mode brought the +unexpected mutex deadlock in get_msg(). It converted the spinlock +with the existing mutex, but there were calls with the already holding +the mutex. Since the only place that needs the extra lock is the code +path from snd_mixart_send_msg(), remove the mutex lock in get_msg() +and apply in the caller side for fixing the mutex deadlock. + +Fixes: 8d3a8b5cb57d ("ALSA: mixart: Use nonatomic PCM ops") +Reported-by: Dan Carpenter +Cc: +Link: https://lore.kernel.org/r/20201119121440.18945-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/mixart/mixart_core.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/sound/pci/mixart/mixart_core.c ++++ b/sound/pci/mixart/mixart_core.c +@@ -70,7 +70,6 @@ static int get_msg(struct mixart_mgr *mg + unsigned int i; + #endif + +- mutex_lock(&mgr->msg_lock); + err = 0; + + /* copy message descriptor from miXart to driver */ +@@ -119,8 +118,6 @@ static int get_msg(struct mixart_mgr *mg + writel_be(headptr, MIXART_MEM(mgr, MSG_OUTBOUND_FREE_HEAD)); + + _clean_exit: +- mutex_unlock(&mgr->msg_lock); +- + return err; + } + +@@ -258,7 +255,9 @@ int snd_mixart_send_msg(struct mixart_mg + resp.data = resp_data; + resp.size = max_resp_size; + ++ mutex_lock(&mgr->msg_lock); + err = get_msg(mgr, &resp, msg_frame); ++ mutex_unlock(&mgr->msg_lock); + + if( request->message_id != resp.message_id ) + dev_err(&mgr->pci->dev, "RESPONSE ERROR!\n"); diff --git a/queue-5.4/alsa-usb-audio-add-delay-quirk-for-all-logitech-usb-devices.patch b/queue-5.4/alsa-usb-audio-add-delay-quirk-for-all-logitech-usb-devices.patch new file mode 100644 index 00000000000..016da045736 --- /dev/null +++ b/queue-5.4/alsa-usb-audio-add-delay-quirk-for-all-logitech-usb-devices.patch @@ -0,0 +1,45 @@ +From 54a2a3898f469a915510038fe84ef4f083131d3e Mon Sep 17 00:00:00 2001 +From: Joakim Tjernlund +Date: Tue, 17 Nov 2020 13:28:03 +0100 +Subject: ALSA: usb-audio: Add delay quirk for all Logitech USB devices + +From: Joakim Tjernlund + +commit 54a2a3898f469a915510038fe84ef4f083131d3e upstream. + +Found one more Logitech device, BCC950 ConferenceCam, which needs +the same delay here. This makes 3 out of 3 devices I have tried. + +Therefore, add a delay for all Logitech devices as it does not hurt. + +Signed-off-by: Joakim Tjernlund +Cc: # 4.19.y, 5.4.y +Link: https://lore.kernel.org/r/20201117122803.24310-1-joakim.tjernlund@infinera.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/quirks.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/sound/usb/quirks.c ++++ b/sound/usb/quirks.c +@@ -1604,13 +1604,13 @@ void snd_usb_ctl_msg_quirk(struct usb_de + && (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS) + msleep(20); + +- /* Zoom R16/24, Logitech H650e/H570e, Jabra 550a, Kingston HyperX +- * needs a tiny delay here, otherwise requests like get/set +- * frequency return as failed despite actually succeeding. ++ /* Zoom R16/24, many Logitech(at least H650e/H570e/BCC950), ++ * Jabra 550a, Kingston HyperX needs a tiny delay here, ++ * otherwise requests like get/set frequency return ++ * as failed despite actually succeeding. + */ + if ((chip->usb_id == USB_ID(0x1686, 0x00dd) || +- chip->usb_id == USB_ID(0x046d, 0x0a46) || +- chip->usb_id == USB_ID(0x046d, 0x0a56) || ++ USB_ID_VENDOR(chip->usb_id) == 0x046d || /* Logitech */ + chip->usb_id == USB_ID(0x0b0e, 0x0349) || + chip->usb_id == USB_ID(0x0951, 0x16ad)) && + (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS) diff --git a/queue-5.4/efivarfs-fix-memory-leak-in-efivarfs_create.patch b/queue-5.4/efivarfs-fix-memory-leak-in-efivarfs_create.patch new file mode 100644 index 00000000000..b09a66a3b0e --- /dev/null +++ b/queue-5.4/efivarfs-fix-memory-leak-in-efivarfs_create.patch @@ -0,0 +1,49 @@ +From fe5186cf12e30facfe261e9be6c7904a170bd822 Mon Sep 17 00:00:00 2001 +From: Vamshi K Sthambamkadi +Date: Fri, 23 Oct 2020 17:24:39 +0530 +Subject: efivarfs: fix memory leak in efivarfs_create() + +From: Vamshi K Sthambamkadi + +commit fe5186cf12e30facfe261e9be6c7904a170bd822 upstream. + +kmemleak report: + unreferenced object 0xffff9b8915fcb000 (size 4096): + comm "efivarfs.sh", pid 2360, jiffies 4294920096 (age 48.264s) + hex dump (first 32 bytes): + 2d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -............... + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + backtrace: + [<00000000cc4d897c>] kmem_cache_alloc_trace+0x155/0x4b0 + [<000000007d1dfa72>] efivarfs_create+0x6e/0x1a0 + [<00000000e6ee18fc>] path_openat+0xe4b/0x1120 + [<000000000ad0414f>] do_filp_open+0x91/0x100 + [<00000000ce93a198>] do_sys_openat2+0x20c/0x2d0 + [<000000002a91be6d>] do_sys_open+0x46/0x80 + [<000000000a854999>] __x64_sys_openat+0x20/0x30 + [<00000000c50d89c9>] do_syscall_64+0x38/0x90 + [<00000000cecd6b5f>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 + +In efivarfs_create(), inode->i_private is setup with efivar_entry +object which is never freed. + +Cc: +Signed-off-by: Vamshi K Sthambamkadi +Link: https://lore.kernel.org/r/20201023115429.GA2479@cosmos +Signed-off-by: Ard Biesheuvel +Signed-off-by: Greg Kroah-Hartman + +--- + fs/efivarfs/super.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/fs/efivarfs/super.c ++++ b/fs/efivarfs/super.c +@@ -21,6 +21,7 @@ LIST_HEAD(efivarfs_list); + static void efivarfs_evict_inode(struct inode *inode) + { + clear_inode(inode); ++ kfree(inode->i_private); + } + + static const struct super_operations efivarfs_ops = { diff --git a/queue-5.4/hid-logitech-dj-fix-an-error-in-mse_bluetooth_descriptor.patch b/queue-5.4/hid-logitech-dj-fix-an-error-in-mse_bluetooth_descriptor.patch new file mode 100644 index 00000000000..9b009791dd0 --- /dev/null +++ b/queue-5.4/hid-logitech-dj-fix-an-error-in-mse_bluetooth_descriptor.patch @@ -0,0 +1,40 @@ +From eec231e060fb79923c349f6e89f022b286f32c1e Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Sat, 14 Nov 2020 10:45:31 +0100 +Subject: HID: logitech-dj: Fix an error in mse_bluetooth_descriptor + +From: Hans de Goede + +commit eec231e060fb79923c349f6e89f022b286f32c1e upstream. + +Fix an error in the mouse / INPUT(2) descriptor used for quad/bt2.0 combo +receivers. Replace INPUT with INPUT (Data,Var,Abs) for the field for the +4 extra buttons which share their report-byte with the low-res hwheel. + +This is likely a copy and paste error. I've verified that the new +0x81, 0x02 value matches both the mouse descriptor for the currently +supported MX5000 / MX5500 receivers, as well as the INPUT(2) mouse +descriptors for the Dinovo receivers for which support is being +worked on. + +Cc: stable@vger.kernel.org +Fixes: f2113c3020ef ("HID: logitech-dj: add support for Logitech Bluetooth Mini-Receiver") +Signed-off-by: Hans de Goede +Signed-off-by: Benjamin Tissoires +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hid/hid-logitech-dj.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/hid/hid-logitech-dj.c ++++ b/drivers/hid/hid-logitech-dj.c +@@ -328,7 +328,7 @@ static const char mse_bluetooth_descript + 0x25, 0x01, /* LOGICAL_MAX (1) */ + 0x75, 0x01, /* REPORT_SIZE (1) */ + 0x95, 0x04, /* REPORT_COUNT (4) */ +- 0x81, 0x06, /* INPUT */ ++ 0x81, 0x02, /* INPUT (Data,Var,Abs) */ + 0xC0, /* END_COLLECTION */ + 0xC0, /* END_COLLECTION */ + }; diff --git a/queue-5.4/iio-light-fix-kconfig-dependency-bug-for-vcnl4035.patch b/queue-5.4/iio-light-fix-kconfig-dependency-bug-for-vcnl4035.patch new file mode 100644 index 00000000000..3480b0c8b7d --- /dev/null +++ b/queue-5.4/iio-light-fix-kconfig-dependency-bug-for-vcnl4035.patch @@ -0,0 +1,46 @@ +From 44a146a44f656fc03d368c1b9248d29a128cd053 Mon Sep 17 00:00:00 2001 +From: Necip Fazil Yildiran +Date: Tue, 3 Nov 2020 01:35:24 +0300 +Subject: iio: light: fix kconfig dependency bug for VCNL4035 + +From: Necip Fazil Yildiran + +commit 44a146a44f656fc03d368c1b9248d29a128cd053 upstream. + +When VCNL4035 is enabled and IIO_BUFFER is disabled, it results in the +following Kbuild warning: + +WARNING: unmet direct dependencies detected for IIO_TRIGGERED_BUFFER + Depends on [n]: IIO [=y] && IIO_BUFFER [=n] + Selected by [y]: + - VCNL4035 [=y] && IIO [=y] && I2C [=y] + +The reason is that VCNL4035 selects IIO_TRIGGERED_BUFFER without depending +on or selecting IIO_BUFFER while IIO_TRIGGERED_BUFFER depends on +IIO_BUFFER. This can also fail building the kernel. + +Honor the kconfig dependency to remove unmet direct dependency warnings +and avoid any potential build failures. + +Fixes: 55707294c4eb ("iio: light: Add support for vishay vcnl4035") +Signed-off-by: Necip Fazil Yildiran +Link: https://bugzilla.kernel.org/show_bug.cgi?id=209883 +Link: https://lore.kernel.org/r/20201102223523.572461-1-fazilyildiran@gmail.com +Cc: +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/light/Kconfig | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/iio/light/Kconfig ++++ b/drivers/iio/light/Kconfig +@@ -485,6 +485,7 @@ config VCNL4000 + + config VCNL4035 + tristate "VCNL4035 combined ALS and proximity sensor" ++ select IIO_BUFFER + select IIO_TRIGGERED_BUFFER + select REGMAP_I2C + depends on I2C diff --git a/queue-5.4/series b/queue-5.4/series index ee19a55f9ce..4c163718dec 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -114,3 +114,15 @@ hid-logitech-hidpp-add-pid-for-mx-anywhere-2.patch hid-logitech-dj-handle-quad-bluetooth-keyboards-with.patch hid-logitech-dj-fix-dinovo-mini-when-paired-with-a-m.patch speakup-do-not-let-the-line-discipline-be-used-several-times.patch +alsa-firewire-clean-up-a-locking-issue-in-copy_resp_to_buf.patch +alsa-usb-audio-add-delay-quirk-for-all-logitech-usb-devices.patch +alsa-ctl-fix-error-path-at-adding-user-defined-element-set.patch +alsa-mixart-fix-mutex-deadlock.patch +alsa-hda-realtek-add-supported-for-lenovo-thinkpad-headset-button.patch +alsa-hda-realtek-add-some-clove-ssid-in-the-alc293-alc1220.patch +tty-serial-imx-fix-potential-deadlock.patch +tty-serial-imx-keep-console-clocks-always-on.patch +hid-logitech-dj-fix-an-error-in-mse_bluetooth_descriptor.patch +efivarfs-fix-memory-leak-in-efivarfs_create.patch +staging-rtl8723bs-add-024c-0627-to-the-list-of-sdio-device-ids.patch +iio-light-fix-kconfig-dependency-bug-for-vcnl4035.patch diff --git a/queue-5.4/staging-rtl8723bs-add-024c-0627-to-the-list-of-sdio-device-ids.patch b/queue-5.4/staging-rtl8723bs-add-024c-0627-to-the-list-of-sdio-device-ids.patch new file mode 100644 index 00000000000..13ea617bf41 --- /dev/null +++ b/queue-5.4/staging-rtl8723bs-add-024c-0627-to-the-list-of-sdio-device-ids.patch @@ -0,0 +1,32 @@ +From aee9dccc5b64e878cf1b18207436e73f66d74157 Mon Sep 17 00:00:00 2001 +From: Brian O'Keefe +Date: Fri, 6 Nov 2020 10:10:34 -0500 +Subject: staging: rtl8723bs: Add 024c:0627 to the list of SDIO device-ids + +From: Brian O'Keefe + +commit aee9dccc5b64e878cf1b18207436e73f66d74157 upstream. + +Add 024c:0627 to the list of SDIO device-ids, based on hardware found in +the wild. This hardware exists on at least some Acer SW1-011 tablets. + +Signed-off-by: Brian O'Keefe +Reviewed-by: Hans de Goede +Link: https://lore.kernel.org/r/b9e1523f-2ba7-fb82-646a-37f095b4440e@alum.wpi.edu +Cc: stable +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c ++++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c +@@ -21,6 +21,7 @@ static const struct sdio_device_id sdio_ + { SDIO_DEVICE(0x024c, 0x0525), }, + { SDIO_DEVICE(0x024c, 0x0623), }, + { SDIO_DEVICE(0x024c, 0x0626), }, ++ { SDIO_DEVICE(0x024c, 0x0627), }, + { SDIO_DEVICE(0x024c, 0xb723), }, + { /* end: all zeroes */ }, + }; diff --git a/queue-5.4/tty-serial-imx-fix-potential-deadlock.patch b/queue-5.4/tty-serial-imx-fix-potential-deadlock.patch new file mode 100644 index 00000000000..f30437c33b7 --- /dev/null +++ b/queue-5.4/tty-serial-imx-fix-potential-deadlock.patch @@ -0,0 +1,63 @@ +From 33f16855dcb973f745c51882d0e286601ff3be2b Mon Sep 17 00:00:00 2001 +From: Sam Nobs +Date: Tue, 10 Nov 2020 09:50:06 +1300 +Subject: tty: serial: imx: fix potential deadlock +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Sam Nobs + +commit 33f16855dcb973f745c51882d0e286601ff3be2b upstream. + +Enabling the lock dependency validator has revealed +that the way spinlocks are used in the IMX serial +port could result in a deadlock. + +Specifically, imx_uart_int() acquires a spinlock +without disabling the interrupts, meaning that another +interrupt could come along and try to acquire the same +spinlock, potentially causing the two to wait for each +other indefinitely. + +Use spin_lock_irqsave() instead to disable interrupts +upon acquisition of the spinlock. + +Fixes: c974991d2620 ("tty:serial:imx: use spin_lock instead of spin_lock_irqsave in isr") +Reviewed-by: Uwe Kleine-König +Signed-off-by: Sam Nobs +Link: https://lore.kernel.org/r/1604955006-9363-1-git-send-email-samuel.nobs@taitradio.com +Cc: stable +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/imx.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +--- a/drivers/tty/serial/imx.c ++++ b/drivers/tty/serial/imx.c +@@ -877,8 +877,14 @@ static irqreturn_t imx_uart_int(int irq, + struct imx_port *sport = dev_id; + unsigned int usr1, usr2, ucr1, ucr2, ucr3, ucr4; + irqreturn_t ret = IRQ_NONE; ++ unsigned long flags = 0; + +- spin_lock(&sport->port.lock); ++ /* ++ * IRQs might not be disabled upon entering this interrupt handler, ++ * e.g. when interrupt handlers are forced to be threaded. To support ++ * this scenario as well, disable IRQs when acquiring the spinlock. ++ */ ++ spin_lock_irqsave(&sport->port.lock, flags); + + usr1 = imx_uart_readl(sport, USR1); + usr2 = imx_uart_readl(sport, USR2); +@@ -946,7 +952,7 @@ static irqreturn_t imx_uart_int(int irq, + ret = IRQ_HANDLED; + } + +- spin_unlock(&sport->port.lock); ++ spin_unlock_irqrestore(&sport->port.lock, flags); + + return ret; + } diff --git a/queue-5.4/tty-serial-imx-keep-console-clocks-always-on.patch b/queue-5.4/tty-serial-imx-keep-console-clocks-always-on.patch new file mode 100644 index 00000000000..2b0b21cd90e --- /dev/null +++ b/queue-5.4/tty-serial-imx-keep-console-clocks-always-on.patch @@ -0,0 +1,91 @@ +From e67c139c488e84e7eae6c333231e791f0e89b3fb Mon Sep 17 00:00:00 2001 +From: Fugang Duan +Date: Wed, 11 Nov 2020 10:51:36 +0800 +Subject: tty: serial: imx: keep console clocks always on +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Fugang Duan + +commit e67c139c488e84e7eae6c333231e791f0e89b3fb upstream. + +For below code, there has chance to cause deadlock in SMP system: +Thread 1: +clk_enable_lock(); +pr_info("debug message"); +clk_enable_unlock(); + +Thread 2: +imx_uart_console_write() + clk_enable() + clk_enable_lock(); + +Thread 1: +Acuired clk enable_lock -> printk -> console_trylock_spinning +Thread 2: +console_unlock() -> imx_uart_console_write -> clk_disable -> Acquite clk enable_lock + +So the patch is to keep console port clocks always on like +other console drivers. + +Fixes: 1cf93e0d5488 ("serial: imx: remove the uart_console() check") +Acked-by: Uwe Kleine-König +Signed-off-by: Fugang Duan +Link: https://lore.kernel.org/r/20201111025136.29818-1-fugang.duan@nxp.com +Cc: stable +[fix up build warning - gregkh] +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/imx.c | 20 +++----------------- + 1 file changed, 3 insertions(+), 17 deletions(-) + +--- a/drivers/tty/serial/imx.c ++++ b/drivers/tty/serial/imx.c +@@ -1942,16 +1942,6 @@ imx_uart_console_write(struct console *c + unsigned int ucr1; + unsigned long flags = 0; + int locked = 1; +- int retval; +- +- retval = clk_enable(sport->clk_per); +- if (retval) +- return; +- retval = clk_enable(sport->clk_ipg); +- if (retval) { +- clk_disable(sport->clk_per); +- return; +- } + + if (sport->port.sysrq) + locked = 0; +@@ -1987,9 +1977,6 @@ imx_uart_console_write(struct console *c + + if (locked) + spin_unlock_irqrestore(&sport->port.lock, flags); +- +- clk_disable(sport->clk_ipg); +- clk_disable(sport->clk_per); + } + + /* +@@ -2090,15 +2077,14 @@ imx_uart_console_setup(struct console *c + + retval = uart_set_options(&sport->port, co, baud, parity, bits, flow); + +- clk_disable(sport->clk_ipg); + if (retval) { +- clk_unprepare(sport->clk_ipg); ++ clk_disable_unprepare(sport->clk_ipg); + goto error_console; + } + +- retval = clk_prepare(sport->clk_per); ++ retval = clk_prepare_enable(sport->clk_per); + if (retval) +- clk_unprepare(sport->clk_ipg); ++ clk_disable_unprepare(sport->clk_ipg); + + error_console: + return retval; -- 2.47.3