Unverified Commit 9ad1f3cd authored by Cezary Rojewski's avatar Cezary Rojewski Committed by Mark Brown
Browse files

ASoC: Intel: avs: Fix deadlock when the failing IPC is SET_D0IX



The procedure handling IPC timeouts and EXCEPTION_CAUGHT notification
shall cancel any D0IX work before proceeding with DSP recovery. If
SET_D0IX called from delayed_work is the failing IPC the procedure will
deadlock. Conditionally skip cancelling the work to fix that.

Fixes: 335c4cbd ("ASoC: Intel: avs: D0ix power state support")
Reviewed-by: default avatarAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250530141025.2942936-3-cezary.rojewski@intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent ff0045de
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -169,6 +169,8 @@ static void avs_dsp_exception_caught(struct avs_dev *adev, union avs_notify_msg

	dev_crit(adev->dev, "communication severed, rebooting dsp..\n");

	/* Avoid deadlock as the exception may be the response to SET_D0IX. */
	if (current_work() != &ipc->d0ix_work.work)
		cancel_delayed_work_sync(&ipc->d0ix_work);
	ipc->in_d0ix = false;
	/* Re-enabled on recovery completion. */