linux/sound/soc/sof
Pierre-Louis Bossart 0b9001fc98 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>
History 2020-02-11 04:36:57 -08:00
..
imx ASoC: Fixes for v5.5 2020-01-06 17:39:15 +01:00
intel ASoC: SOF: Introduce state machine for FW boot 2020-02-11 04:36:57 -08:00
xtensa sound fixes for 5.2-rc5 2019-06-14 05:37:06 -10:00
control.c Merge branch 'for-5.4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.5 2019-11-06 16:29:34 +00:00
core.c ASoC: SOF: core: release resources on errors in probe_continue 2020-02-11 04:36:57 -08:00
debug.c Merge branch 'for-5.4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.5 2019-11-06 16:29:34 +00:00
ipc.c ASoC: SOF: Introduce state machine for FW boot 2020-02-11 04:36:57 -08:00
Kconfig ASoC: SOF: Intel: use def_tristate, avoid using select 2019-11-04 13:24:14 +00:00
loader.c ASoC: SOF: Introduce state machine for FW boot 2020-02-11 04:36:57 -08:00
Makefile ASoC: SOF: imx: Add i.MX8 HW support 2019-08-22 18:28:32 +01:00
nocodec.c ASoC: sof: use modern dai_link style 2019-06-06 22:10:38 +01:00
ops.c ASoC: SOF: Fix a compile warning with CONFIG_PCI=n 2019-05-07 11:23:57 +09:00
ops.h ASoC: SOF: return -ENOTSUPP if D0I3 is not supported 2019-10-28 14:46:21 +00:00
pcm.c ASoC: SOF: Drop superfluous snd_pcm_sgbuf_ops_page 2019-11-09 18:02:53 +01:00
pm.c ASoC: SOF: core: release resources on errors in probe_continue 2020-02-11 04:36:57 -08:00
sof-acpi-dev.c ASoC: SOF: acpi: add debug module param 2019-10-10 15:15:11 +01:00
sof-of-dev.c ASoC: SOF: Add OF DSP device support 2019-08-22 18:28:20 +01:00
sof-pci-dev.c ASoC: More updates for v5.5 2019-11-25 14:27:41 +01:00
sof-priv.h ASoC: SOF: Introduce state machine for FW boot 2020-02-11 04:36:57 -08:00
topology.c ASoC: SOF: topology: Fix unload for SAI/ESAI 2019-11-27 12:50:37 +00:00
trace.c ASoC: SOF: trace: move to opt-in with Kconfig and module parameter 2019-10-01 18:34:06 +01:00
utils.c ASoC: SOF: Add utils 2019-04-28 02:49:47 +09:00