* [PATCH] ASoC: cs35l56: Prevent unbalanced pm_runtime in dsp_work() on SoundWire
@ 2023-05-12 14:42 Richard Fitzgerald
2023-05-15 11:09 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Richard Fitzgerald @ 2023-05-12 14:42 UTC (permalink / raw)
To: broonie
Cc: alsa-devel, linux-kernel, patches, Simon Trimmer, Richard Fitzgerald
From: Simon Trimmer <simont@opensource.cirrus.com>
Flush the SoundWire interrupt handler work instead of cancelling it.
When a SoundWire interrupt is triggered the pm_runtime is held
until the work has completed. It's therefore unsafe to cancel
the work, it must be flushed.
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
sound/soc/codecs/cs35l56.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index 46762f7f1449..d1677d76d018 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -852,10 +852,11 @@ static void cs35l56_dsp_work(struct work_struct *work)
*/
if (cs35l56->sdw_peripheral) {
cs35l56->sdw_irq_no_unmask = true;
- cancel_work_sync(&cs35l56->sdw_irq_work);
+ flush_work(&cs35l56->sdw_irq_work);
sdw_write_no_pm(cs35l56->sdw_peripheral, CS35L56_SDW_GEN_INT_MASK_1, 0);
sdw_read_no_pm(cs35l56->sdw_peripheral, CS35L56_SDW_GEN_INT_STAT_1);
sdw_write_no_pm(cs35l56->sdw_peripheral, CS35L56_SDW_GEN_INT_STAT_1, 0xFF);
+ flush_work(&cs35l56->sdw_irq_work);
}
ret = cs35l56_mbox_send(cs35l56, CS35L56_MBOX_CMD_SHUTDOWN);
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC: cs35l56: Prevent unbalanced pm_runtime in dsp_work() on SoundWire
2023-05-12 14:42 [PATCH] ASoC: cs35l56: Prevent unbalanced pm_runtime in dsp_work() on SoundWire Richard Fitzgerald
@ 2023-05-15 11:09 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-05-15 11:09 UTC (permalink / raw)
To: Richard Fitzgerald; +Cc: alsa-devel, linux-kernel, patches, Simon Trimmer
On Fri, 12 May 2023 15:42:37 +0100, Richard Fitzgerald wrote:
> Flush the SoundWire interrupt handler work instead of cancelling it.
>
> When a SoundWire interrupt is triggered the pm_runtime is held
> until the work has completed. It's therefore unsafe to cancel
> the work, it must be flushed.
>
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: cs35l56: Prevent unbalanced pm_runtime in dsp_work() on SoundWire
commit: 17082e09b94cfe60bf39088f3d37c1f10e6c5928
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-15 11:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-12 14:42 [PATCH] ASoC: cs35l56: Prevent unbalanced pm_runtime in dsp_work() on SoundWire Richard Fitzgerald
2023-05-15 11:09 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®