From: Greg Kroah-Hartman Date: Mon, 16 Jan 2023 15:29:36 +0000 (+0100) Subject: 4.19-stable patches X-Git-Tag: v4.14.303~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a91bd61329fbb367d73a5cc97aa078c16395ccd;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: alsa-hda-realtek-fix-inverted-bass-gpio-pin-on-acer-8951g.patch alsa-hda-realtek-fixed-one-of-hp-alc671-platform-headset-mic-supported.patch powerpc-powernv-eeh-fix-oops-when-probing-cxl-devices.patch serial-tegra-only-print-fifo-error-message-when-an-error-occurs.patch --- diff --git a/queue-4.19/alsa-hda-realtek-fix-inverted-bass-gpio-pin-on-acer-8951g.patch b/queue-4.19/alsa-hda-realtek-fix-inverted-bass-gpio-pin-on-acer-8951g.patch new file mode 100644 index 00000000000..3f03b0929d3 --- /dev/null +++ b/queue-4.19/alsa-hda-realtek-fix-inverted-bass-gpio-pin-on-acer-8951g.patch @@ -0,0 +1,78 @@ +From 336820c4374bc065317f247dc2bb37c0e41b64a6 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 28 Nov 2019 21:26:30 +0100 +Subject: ALSA: hda/realtek - Fix inverted bass GPIO pin on Acer 8951G + +From: Takashi Iwai + +commit 336820c4374bc065317f247dc2bb37c0e41b64a6 upstream. + +We've added the bass speaker support on Acer 8951G by the commit +00066e9733f6 ("Add Acer Aspire Ethos 8951G model quirk"), but it seems +that the GPIO pin was wrongly set: while the commit turns off the bit +to power up the amp, the actual hardware reacts other way round, +i.e. GPIO bit on = amp on. + +So this patch fixes the bug, turning on the GPIO bit 0x02 as default. +Since turning on the GPIO bit can be more easily managed with +alc_setup_gpio() call, we simplify the quirk code by integrating the +GPIO setup into the existing alc662_fixup_aspire_ethos_hp() and +dropping the whole ALC669_FIXUP_ACER_ASPIRE_ETHOS_SUBWOOFER quirk. + +Fixes: 00066e9733f6 ("Add Acer Aspire Ethos 8951G model quirk") +Reported-and-tested-by: Sergey 'Jin' Bostandzhyan +Cc: +Link: https://lore.kernel.org/r/20191128202630.6626-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 17 +++-------------- + 1 file changed, 3 insertions(+), 14 deletions(-) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -8539,6 +8539,8 @@ static void alc662_fixup_aspire_ethos_hp + case HDA_FIXUP_ACT_PRE_PROBE: + snd_hda_jack_detect_enable_callback(codec, 0x1b, + alc662_aspire_ethos_mute_speakers); ++ /* subwoofer needs an extra GPIO setting to become audible */ ++ alc_setup_gpio(codec, 0x02); + break; + case HDA_FIXUP_ACT_INIT: + /* Make sure to start in a correct state, i.e. if +@@ -8676,7 +8678,6 @@ enum { + ALC662_FIXUP_USI_HEADSET_MODE, + ALC662_FIXUP_LENOVO_MULTI_CODECS, + ALC669_FIXUP_ACER_ASPIRE_ETHOS, +- ALC669_FIXUP_ACER_ASPIRE_ETHOS_SUBWOOFER, + ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET, + ALC671_FIXUP_HP_HEADSET_MIC2, + ALC662_FIXUP_ACER_X2660G_HEADSET_MODE, +@@ -9019,18 +9020,6 @@ static const struct hda_fixup alc662_fix + .type = HDA_FIXUP_FUNC, + .v.func = alc662_fixup_aspire_ethos_hp, + }, +- [ALC669_FIXUP_ACER_ASPIRE_ETHOS_SUBWOOFER] = { +- .type = HDA_FIXUP_VERBS, +- /* subwoofer needs an extra GPIO setting to become audible */ +- .v.verbs = (const struct hda_verb[]) { +- {0x01, AC_VERB_SET_GPIO_MASK, 0x02}, +- {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x02}, +- {0x01, AC_VERB_SET_GPIO_DATA, 0x00}, +- { } +- }, +- .chained = true, +- .chain_id = ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET +- }, + [ALC669_FIXUP_ACER_ASPIRE_ETHOS] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl[]) { +@@ -9040,7 +9029,7 @@ static const struct hda_fixup alc662_fix + { } + }, + .chained = true, +- .chain_id = ALC669_FIXUP_ACER_ASPIRE_ETHOS_SUBWOOFER ++ .chain_id = ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET + }, + [ALC671_FIXUP_HP_HEADSET_MIC2] = { + .type = HDA_FIXUP_FUNC, diff --git a/queue-4.19/alsa-hda-realtek-fixed-one-of-hp-alc671-platform-headset-mic-supported.patch b/queue-4.19/alsa-hda-realtek-fixed-one-of-hp-alc671-platform-headset-mic-supported.patch new file mode 100644 index 00000000000..8cb8991d46a --- /dev/null +++ b/queue-4.19/alsa-hda-realtek-fixed-one-of-hp-alc671-platform-headset-mic-supported.patch @@ -0,0 +1,31 @@ +From f2adbae0cb20c8eaf06914b2187043ea944b0aff Mon Sep 17 00:00:00 2001 +From: Kailang Yang +Date: Wed, 5 Feb 2020 15:40:01 +0800 +Subject: ALSA: hda/realtek - Fixed one of HP ALC671 platform Headset Mic supported + +From: Kailang Yang + +commit f2adbae0cb20c8eaf06914b2187043ea944b0aff upstream. + +HP want to keep BIOS verb table for release platform. +So, it need to add 0x19 pin for quirk. + +Fixes: 5af29028fd6d ("ALSA: hda/realtek - Add Headset Mic supported for HP cPC") +Signed-off-by: Kailang Yang +Link: https://lore.kernel.org/r/74636ccb700a4cbda24c58a99dc430ce@realtek.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 +@@ -9304,6 +9304,7 @@ static const struct snd_hda_pin_quirk al + SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, + {0x14, 0x01014010}, + {0x17, 0x90170150}, ++ {0x19, 0x02a11060}, + {0x1b, 0x01813030}, + {0x21, 0x02211020}), + SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, diff --git a/queue-4.19/powerpc-powernv-eeh-fix-oops-when-probing-cxl-devices.patch b/queue-4.19/powerpc-powernv-eeh-fix-oops-when-probing-cxl-devices.patch new file mode 100644 index 00000000000..4605bbb7c0b --- /dev/null +++ b/queue-4.19/powerpc-powernv-eeh-fix-oops-when-probing-cxl-devices.patch @@ -0,0 +1,68 @@ +From a8a30219ba78b1abb92091102b632f8e9bbdbf03 Mon Sep 17 00:00:00 2001 +From: Frederic Barrat +Date: Wed, 16 Oct 2019 18:28:33 +0200 +Subject: powerpc/powernv/eeh: Fix oops when probing cxl devices + +From: Frederic Barrat + +commit a8a30219ba78b1abb92091102b632f8e9bbdbf03 upstream. + +Recent cleanup in the way EEH support is added to a device causes a +kernel oops when the cxl driver probes a device and creates virtual +devices discovered on the FPGA: + + BUG: Kernel NULL pointer dereference at 0x000000a0 + Faulting instruction address: 0xc000000000048070 + Oops: Kernel access of bad area, sig: 7 [#1] + ... + NIP eeh_add_device_late.part.9+0x50/0x1e0 + LR eeh_add_device_late.part.9+0x3c/0x1e0 + Call Trace: + _dev_info+0x5c/0x6c (unreliable) + pnv_pcibios_bus_add_device+0x60/0xb0 + pcibios_bus_add_device+0x40/0x60 + pci_bus_add_device+0x30/0x100 + pci_bus_add_devices+0x64/0xd0 + cxl_pci_vphb_add+0xe0/0x130 [cxl] + cxl_probe+0x504/0x5b0 [cxl] + local_pci_probe+0x6c/0x110 + work_for_cpu_fn+0x38/0x60 + +The root cause is that those cxl virtual devices don't have a +representation in the device tree and therefore no associated pci_dn +structure. In eeh_add_device_late(), pdn is NULL, so edev is NULL and +we oops. + +We never had explicit support for EEH for those virtual devices. +Instead, EEH events are reported to the (real) pci device and handled +by the cxl driver. Which can then forward to the virtual devices and +handle dependencies. The fact that we try adding EEH support for the +virtual devices is new and a side-effect of the recent cleanup. + +This patch fixes it by skipping adding EEH support on powernv for +devices which don't have a pci_dn structure. + +The cxl driver doesn't create virtual devices on pseries so this patch +doesn't fix it there intentionally. + +Fixes: b905f8cdca77 ("powerpc/eeh: EEH for pSeries hot plug") +Signed-off-by: Frederic Barrat +Reviewed-by: Sam Bobroff +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/20191016162833.22509-1-fbarrat@linux.ibm.com +Signed-off-by: Greg Kroah-Hartman +--- + arch/powerpc/platforms/powernv/eeh-powernv.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/powerpc/platforms/powernv/eeh-powernv.c ++++ b/arch/powerpc/platforms/powernv/eeh-powernv.c +@@ -47,7 +47,7 @@ void pnv_pcibios_bus_add_device(struct p + { + struct pci_dn *pdn = pci_get_pdn(pdev); + +- if (eeh_has_flag(EEH_FORCE_DISABLED)) ++ if (!pdn || eeh_has_flag(EEH_FORCE_DISABLED)) + return; + + pr_debug("%s: EEH: Setting up device %s.\n", __func__, pci_name(pdev)); diff --git a/queue-4.19/serial-tegra-only-print-fifo-error-message-when-an-error-occurs.patch b/queue-4.19/serial-tegra-only-print-fifo-error-message-when-an-error-occurs.patch new file mode 100644 index 00000000000..0f8bd6e5006 --- /dev/null +++ b/queue-4.19/serial-tegra-only-print-fifo-error-message-when-an-error-occurs.patch @@ -0,0 +1,42 @@ +From cc9ca4d95846cbbece48d9cd385550f8fba6a3c1 Mon Sep 17 00:00:00 2001 +From: Jon Hunter +Date: Wed, 30 Jun 2021 13:56:43 +0100 +Subject: serial: tegra: Only print FIFO error message when an error occurs + +From: Jon Hunter + +commit cc9ca4d95846cbbece48d9cd385550f8fba6a3c1 upstream. + +The Tegra serial driver always prints an error message when enabling the +FIFO for devices that have support for checking the FIFO enable status. +Fix this by displaying the error message, only when an error occurs. + +Finally, update the error message to make it clear that enabling the +FIFO failed and display the error code. + +Fixes: 222dcdff3405 ("serial: tegra: check for FIFO mode enabled status") +Cc: +Acked-by: Thierry Reding +Signed-off-by: Jon Hunter +Link: https://lore.kernel.org/r/20210630125643.264264-1-jonathanh@nvidia.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/tty/serial/serial-tegra.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/tty/serial/serial-tegra.c ++++ b/drivers/tty/serial/serial-tegra.c +@@ -991,9 +991,11 @@ static int tegra_uart_hw_init(struct teg + + if (tup->cdata->fifo_mode_enable_status) { + ret = tegra_uart_wait_fifo_mode_enabled(tup); +- dev_err(tup->uport.dev, "FIFO mode not enabled\n"); +- if (ret < 0) ++ if (ret < 0) { ++ dev_err(tup->uport.dev, ++ "Failed to enable FIFO mode: %d\n", ret); + return ret; ++ } + } else { + /* + * For all tegra devices (up to t210), there is a hardware diff --git a/queue-4.19/series b/queue-4.19/series index 57696299c5b..d120abcdc1f 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -222,8 +222,6 @@ uio-uio_dmem_genirq-fix-deadlock-between-irq-config-.patch usb-fotg210-udc-fix-ages-old-endianness-issues.patch staging-vme_user-fix-possible-uaf-in-tsi148_dma_list.patch usb-typec-check-for-ops-exit-instead-of-ops-enter-in.patch -usb-typec-group-all-tcpci-tcpm-code-together.patch -usb-typec-tcpci-fix-of-node-refcount-leak-in-tcpci_r.patch serial-amba-pl011-avoid-sbsa-uart-accessing-dmacr-re.patch serial-pl011-do-not-clear-rx-fifo-rx-interrupt-in-un.patch serial-pch-fix-pci-device-refcount-leak-in-pch_reque.patch @@ -517,3 +515,7 @@ efi-fix-null-deref-in-init-error-path.patch revert-usb-ulpi-defer-ulpi_register-on-ulpi_read_id-timeout.patch tty-serial-tegra-handle-rx-transfer-in-pio-mode-if-dma-wasn-t-started.patch pseries-eeh-fix-the-kdump-kernel-crash-during-eeh_pseries_init.patch +alsa-hda-realtek-fix-inverted-bass-gpio-pin-on-acer-8951g.patch +alsa-hda-realtek-fixed-one-of-hp-alc671-platform-headset-mic-supported.patch +powerpc-powernv-eeh-fix-oops-when-probing-cxl-devices.patch +serial-tegra-only-print-fifo-error-message-when-an-error-occurs.patch