diff options
| author | Bard Liao <yung-chuan.liao@linux.intel.com> | 2026-09-01 11:10:19 +0800 |
|---|---|---|
| committer | Vinod Koul <vkoul@kernel.org> | 2026-09-08 19:19:42 +0530 |
| commit | aba7b41faeecb7692458095ce6fafc341fe0b80e (patch) | |
| tree | af3aa69ee59d557b96fb4586a9f0bdb2f6acc84b | |
| parent | 6d49beec658f61801e79019fd73691b17252dee3 (diff) | |
| download | linux-next-aba7b41faeecb7692458095ce6fafc341fe0b80e.tar.gz linux-next-aba7b41faeecb7692458095ce6fafc341fe0b80e.zip | |
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: af4cc917826f ("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>
| -rw-r--r-- | drivers/soundwire/cadence_master.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index e690237fe981..a0a63b76793e 100644 --- a/drivers/soundwire/cadence_master.c +++ b/drivers/soundwire/cadence_master.c @@ -1702,6 +1702,13 @@ int sdw_cdns_clock_stop(struct sdw_cdns *cdns, bool block_wake) } /* + * 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 * Slave becoming UNATTACHED while the clock is being stopped |
