mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
soundwire: cadence_master: wait and cancel cdns->work before clock stop
A peripheral event could happen during the clock stop process. We need
to wait for the event be handled before stopping the bus clock.
Otherwise, we will get the IO transfer timed out issue.
Fixes: af4cc91782 ("soundwire: cadence: mask Slave interrupt before stopping clock")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: David Lin <david.lin@intel.com>
Reviewed-by: Shuming Fan <shumingf@realtek.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20260901031019.233254-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
6d49beec65
commit
aba7b41fae
|
|
@ -1701,6 +1701,13 @@ int sdw_cdns_clock_stop(struct sdw_cdns *cdns, bool block_wake)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* wait for any in-flight peripheral event handling to complete before stopping the clock.
|
||||
* No need to disable peripheral interrupts before canceling the work, as the peripheral
|
||||
* interrupts are already masked before the work is scheduled.
|
||||
*/
|
||||
cancel_work_sync(&cdns->work);
|
||||
|
||||
/*
|
||||
* Before entering clock stop we mask the Slave
|
||||
* interrupts. This helps avoid having to deal with e.g. a
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user