From f2d7b01f744ae22b67a95f2665c6b8729ed9592b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 8 Sep 2020 13:55:50 +0200 Subject: [PATCH] 5.4-stable patches added patches: alsa-ca0106-fix-error-code-handling.patch revert-alsa-hda-add-support-for-loongson-7a1000-controller.patch --- .../alsa-ca0106-fix-error-code-handling.patch | 35 ++++++++++ ...pport-for-loongson-7a1000-controller.patch | 67 +++++++++++++++++++ queue-5.4/series | 2 + 3 files changed, 104 insertions(+) create mode 100644 queue-5.4/alsa-ca0106-fix-error-code-handling.patch create mode 100644 queue-5.4/revert-alsa-hda-add-support-for-loongson-7a1000-controller.patch diff --git a/queue-5.4/alsa-ca0106-fix-error-code-handling.patch b/queue-5.4/alsa-ca0106-fix-error-code-handling.patch new file mode 100644 index 00000000000..54d8944f4c8 --- /dev/null +++ b/queue-5.4/alsa-ca0106-fix-error-code-handling.patch @@ -0,0 +1,35 @@ +From ee0761d1d8222bcc5c86bf10849dc86cf008557c Mon Sep 17 00:00:00 2001 +From: Tong Zhang +Date: Mon, 24 Aug 2020 18:45:41 -0400 +Subject: ALSA: ca0106: fix error code handling + +From: Tong Zhang + +commit ee0761d1d8222bcc5c86bf10849dc86cf008557c upstream. + +snd_ca0106_spi_write() returns 1 on error, snd_ca0106_pcm_power_dac() +is returning the error code directly, and the caller is expecting an +negative error code + +Signed-off-by: Tong Zhang +Cc: +Link: https://lore.kernel.org/r/20200824224541.1260307-1-ztong0001@gmail.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/ca0106/ca0106_main.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/sound/pci/ca0106/ca0106_main.c ++++ b/sound/pci/ca0106/ca0106_main.c +@@ -537,7 +537,8 @@ static int snd_ca0106_pcm_power_dac(stru + else + /* Power down */ + chip->spi_dac_reg[reg] |= bit; +- return snd_ca0106_spi_write(chip, chip->spi_dac_reg[reg]); ++ if (snd_ca0106_spi_write(chip, chip->spi_dac_reg[reg]) != 0) ++ return -ENXIO; + } + return 0; + } diff --git a/queue-5.4/revert-alsa-hda-add-support-for-loongson-7a1000-controller.patch b/queue-5.4/revert-alsa-hda-add-support-for-loongson-7a1000-controller.patch new file mode 100644 index 00000000000..e7e80367b40 --- /dev/null +++ b/queue-5.4/revert-alsa-hda-add-support-for-loongson-7a1000-controller.patch @@ -0,0 +1,67 @@ +From eed8f88b109aa927fbf0d0c80ff9f8d00444ca7f Mon Sep 17 00:00:00 2001 +From: Tiezhu Yang +Date: Tue, 25 Aug 2020 17:39:48 +0800 +Subject: Revert "ALSA: hda: Add support for Loongson 7A1000 controller" + +From: Tiezhu Yang + +commit eed8f88b109aa927fbf0d0c80ff9f8d00444ca7f upstream. + +This reverts commit 61eee4a7fc40 ("ALSA: hda: Add support for Loongson +7A1000 controller") to fix the following error on the Loongson LS7A +platform: + +rcu: INFO: rcu_preempt self-detected stall on CPU + +NMI backtrace for cpu 0 +CPU: 0 PID: 68 Comm: kworker/0:2 Not tainted 5.8.0+ #3 +Hardware name: , BIOS +Workqueue: events azx_probe_work [snd_hda_intel] + +Call Trace: +[] show_stack+0x9c/0x130 +[] dump_stack+0xb0/0xf0 +[] nmi_cpu_backtrace+0x134/0x140 +[] nmi_trigger_cpumask_backtrace+0x190/0x200 +[] rcu_dump_cpu_stacks+0x12c/0x190 +[] rcu_sched_clock_irq+0xa2c/0xfc8 +[] update_process_times+0x2c/0xb8 +[] tick_sched_timer+0x40/0xb8 +[] __hrtimer_run_queues+0x118/0x1d0 +[] hrtimer_interrupt+0x12c/0x2d8 +[] c0_compare_interrupt+0x74/0xa0 +[] __handle_irq_event_percpu+0xa8/0x198 +[] handle_irq_event_percpu+0x30/0x90 +[] handle_percpu_irq+0x88/0xb8 +[] generic_handle_irq+0x44/0x60 +[] do_IRQ+0x18/0x28 +[] plat_irq_dispatch+0x64/0x100 +[] handle_int+0x140/0x14c +[] irq_exit+0xf8/0x100 + +Because AZX_DRIVER_GENERIC can not work well for Loongson LS7A HDA +controller, it needs some workarounds which are not merged into the +upstream kernel at this time, so it should revert this patch now. + +Fixes: 61eee4a7fc40 ("ALSA: hda: Add support for Loongson 7A1000 controller") +Cc: # 5.9-rc1+ +Signed-off-by: Tiezhu Yang +Link: https://lore.kernel.org/r/1598348388-2518-1-git-send-email-yangtiezhu@loongson.cn +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/hda_intel.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/sound/pci/hda/hda_intel.c ++++ b/sound/pci/hda/hda_intel.c +@@ -2671,8 +2671,6 @@ static const struct pci_device_id azx_id + .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_HDMI }, + /* Zhaoxin */ + { PCI_DEVICE(0x1d17, 0x3288), .driver_data = AZX_DRIVER_ZHAOXIN }, +- /* Loongson */ +- { PCI_DEVICE(0x0014, 0x7a07), .driver_data = AZX_DRIVER_GENERIC }, + { 0, } + }; + MODULE_DEVICE_TABLE(pci, azx_ids); diff --git a/queue-5.4/series b/queue-5.4/series index 2faf8e1e8de..80548d14803 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -86,3 +86,5 @@ btrfs-tree-checker-fix-the-error-message-for-transid-error.patch net-core-use-listified-rx-for-gro_normal-in-napi_gro_receive.patch btrfs-fix-potential-deadlock-in-the-search-ioctl.patch revert-net-dsa-microchip-set-the-correct-number-of-p.patch +revert-alsa-hda-add-support-for-loongson-7a1000-controller.patch +alsa-ca0106-fix-error-code-handling.patch -- 2.47.3