Skip to content
Unverified Commit 91ec48f5 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown
Browse files

ASoC: SOF: core: harden shutdown helper

When the probe is handled in a workqueue, we must use
cancel_work_sync() in the shutdown helper to avoid possible race
conditions.

We must also take care of possible errors happening in a probe
workqueue or during pm_runtime resume (called e.g. before shutdown for
PCI devices). We should really only try to access hardware registers
and initiate IPCs if the DSP is fully booted.

Fixes: daff7f14

 ("ASoC: SOF: add snd_sof_device_shutdown() helper for shutdown")
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: default avatarLibin Yang <libin.yang@intel.com>
Link: https://lore.kernel.org/r/20210322163728.16616-3-pierre-louis.bossart@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 92728090
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment