1
0
Fork 0
alistair23-linux/sound/soc
Pierre-Louis Bossart df57920d6e ASoC: SOF: core: release resources on errors in probe_continue
[ Upstream commit 410e5e55c9 ]

The initial intent of releasing resources in the .remove does not work
well with HDaudio codecs. If the probe_continue() fails in a work
queue, e.g. due to missing firmware or authentication issues, we don't
release any resources, and as a result the kernel oopses during
suspend operations.

The suggested fix is to release all resources during errors in
probe_continue(), and use fw_state to track resource allocation
state, so that .remove does not attempt to release the same
hardware resources twice. PM operations are also modified so that
no action is done if DSP resources have been freed due to
an error at probe.

Reported-by: Takashi Iwai <tiwai@suse.de>
Co-developed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Bugzilla:  http://bugzilla.suse.com/show_bug.cgi?id=1161246
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200124213625.30186-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-11 04:35:27 -08:00
..
adi treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 177 2019-05-30 11:29:19 -07:00
amd Merge branch 'asoc-5.4' into asoc-next 2019-09-15 10:31:44 +01:00
atmel ASoC: Fixes for v5.4 2019-09-23 20:16:13 +02:00
au1x ASoC: au1x: psc-i2s: use devm_platform_ioremap_resource() to simplify code 2019-07-31 12:12:25 +01:00
bcm ASoC: Remove dev_err() usage after platform_get_irq() 2019-08-02 12:12:31 +01:00
cirrus ASoC: ep93xx: use devm_platform_ioremap_resource() to simplify code 2019-09-04 13:48:22 +01:00
codecs ASoC: hdac_hda: Fix error in driver removal after failed probe 2020-02-05 21:22:45 +00:00
dwc treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
fsl ASoC: fsl_audmix: add missed pm_runtime_disable 2020-02-01 09:34:42 +00:00
generic SoC: simple-card-utils: set 0Hz to sysclk when shutdown 2019-09-09 10:51:21 +01:00
hisilicon treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 340 2019-06-05 17:37:07 +02:00
img treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
intel ASoC: Intel: cht_bsw_rt5645: Add quirk for boards using pmc_plt_clk_0 2020-02-01 09:34:46 +00:00
jz4740 ASoC: jz4740: Drop lb60 board code 2019-07-30 10:41:53 -07:00
kirkwood ASoC: kirkwood: fix device remove ordering 2019-10-23 18:20:55 +01:00
mediatek Merge branch 'asoc-5.4' into asoc-next 2019-09-15 10:31:44 +01:00
meson Merge branch 'asoc-5.3' into asoc-linus 2019-09-15 10:31:42 +01:00
mxs ASoC: Remove dev_err() usage after platform_get_irq() 2019-08-02 12:12:31 +01:00
pxa ASoC: mmp-sspa: use devm_platform_ioremap_resource() to simplify code 2019-07-31 12:10:54 +01:00
qcom chrome platform changes for v5.4 2019-09-19 14:14:28 -07:00
rockchip ASoC: Fixes for v5.4 2019-11-07 13:52:17 +01:00
samsung ASoC: samsung: arndale: Add missing OF node dereferencing 2019-09-23 14:14:35 -07:00
sh ASoC: rsnd: fix DALIGN register for SSIU 2020-01-17 19:48:35 +01:00
sirf ASoC: sirf: use devm_platform_ioremap_resource() to simplify code 2019-07-31 12:05:39 +01:00
sof ASoC: SOF: core: release resources on errors in probe_continue 2020-02-11 04:35:27 -08:00
spear ASoC: spear: use devm_platform_ioremap_resource() to simplify code 2019-07-31 12:06:18 +01:00
sprd ASoC: Remove dev_err() usage after platform_get_irq() 2019-08-02 12:12:31 +01:00
sti ASoC: sti: fix possible sleep-in-atomic 2020-02-05 21:22:46 +00:00
stm ASoC: stm32: dfsdm: fix 16 bits record 2020-01-23 08:22:29 +01:00
sunxi ASoC: sun4i: Revert A83t description 2019-08-27 19:22:02 +01:00
tegra ASoC: tegra: use devm_platform_ioremap_resource() to simplify code 2019-09-04 13:48:50 +01:00
ti ASoC: Fixes for v5.4 2019-11-07 13:52:17 +01:00
txx9 Linux 5.2-rc6 2019-06-26 12:39:34 +01:00
uniphier Merge branch 'asoc-5.3' into asoc-5.4 2019-08-20 18:28:43 +01:00
ux500 ASoC: ux500: mop500: consider CPU-Platform possibility 2019-06-28 15:19:55 +01:00
xilinx ASoC: Remove dev_err() usage after platform_get_irq() 2019-08-02 12:12:31 +01:00
xtensa ASoC: Remove dev_err() usage after platform_get_irq() 2019-08-02 12:12:31 +01:00
zte ASoC: zx-tdm: remove redundant assignment to ts_width on error return path 2019-08-01 13:56:26 +01:00
Kconfig ASoC: remove w90x900/nuc900 platform drivers 2019-08-12 14:00:29 +01:00
Makefile ASoC: remove w90x900/nuc900 platform drivers 2019-08-12 14:00:29 +01:00
soc-ac97.c ASoC: ac97: convert to SPDX identifiers 2018-07-02 10:56:09 +01:00
soc-acpi.c ASoC: soc-acpi: fix implicit header use of module.h/export.h 2019-05-08 18:06:28 +09:00
soc-component.c ASoC: soc-component: add snd_soc_pcm_component_pcm_free() 2019-08-05 16:27:16 +01:00
soc-compress.c ASoC: core: Move pcm_mutex up to card level from snd_soc_pcm_runtime 2019-08-15 15:07:43 +01:00
soc-core.c ASoC: soc-core: Set dpcm_playback / dpcm_capture 2020-01-17 19:48:17 +01:00
soc-dai.c ASoC: soc-dai: move snd_soc_dai_stream_valid() to soc-dai.c 2019-07-23 18:14:26 +01:00
soc-dapm.c ASoC: soc-core: add snd_soc_dapm_init() 2019-09-02 13:21:20 +01:00
soc-devres.c ASoC: soc-devres.c: convert to SPDX identifiers 2018-07-02 10:55:22 +01:00
soc-generic-dmaengine-pcm.c ASoC: dmaengine: Replace strncpy() with strscpy_pad() for pcm->name 2019-09-11 15:55:28 +01:00
soc-io.c ASoC: soc-io.c: convert to SPDX identifiers 2018-07-02 10:53:55 +01:00
soc-jack.c ASoC: Jack: Fix NULL pointer dereference in snd_soc_jack_report 2019-12-17 19:56:14 +01:00
soc-ops.c ASoC: Fix UBSAN warning at snd_soc_get/put_volsw_sx() 2018-09-11 11:58:52 +01:00
soc-pcm.c ASoC: core: Fix compile warning with CONFIG_DEBUG_FS=n 2020-01-17 19:48:35 +01:00
soc-topology.c ASoC: topology: fix soc_tplg_fe_link_create() - link->dobj initialization order 2020-02-05 21:22:53 +00:00
soc-utils.c ASoC: add soc-component.c 2019-08-05 16:16:19 +01:00