Skip to content

Commit a6e232e

Browse files
vijendarmukundagregkh
authored andcommitted
soundwire: amd: fix for handling slave alerts after link is down
[ Upstream commit 86a4371 ] Sometimes, its observed that during system level suspend callback execution, after link is down, handling pending slave status workqueue results in mipi register access failures as shown below. soundwire sdw-master-0-0: trf on Slave 1 failed:-110 read addr 0 count 1 rt722-sdca sdw:0:0:025d:0722:01: SDW_DP0_INT recheck read failed:-110 rt722-sdca sdw:0:0:025d:0722:01: Slave 1 alert handling failed: -110 amd_sdw_manager amd_sdw_manager.0: SDW0 cmd response timeout occurred amd_sdw_manager amd_sdw_manager.0: command timeout for Slave 1 soundwire sdw-master-0-0: trf on Slave 1 failed:-110 write addr 5c count 1 amd_sdw_manager amd_sdw_manager.0: SDW0 previous cmd status clear failed amd_sdw_manager amd_sdw_manager.0: command timeout for Slave 1 soundwire sdw-master-0-0: trf on Slave 1 failed:-110 write addr 5d count 1 amd_sdw_manager amd_sdw_manager.0: SDW0 previous cmd status clear failed amd_sdw_manager amd_sdw_manager.0: command timeout for Slave 1 Cancel the pending slave status workqueue prior to initiating clock stop sequence during suspend callback execution for both the power modes. Fixes: 9cf1efc ("soundwire: amd: add pm_prepare callback and pm ops support") Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20250530054447.1645807-2-Vijendar.Mukunda@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 8814cbb commit a6e232e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/soundwire/amd_manager.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,9 +1107,11 @@ static int __maybe_unused amd_suspend(struct device *dev)
11071107
}
11081108

11091109
if (amd_manager->power_mode_mask & AMD_SDW_CLK_STOP_MODE) {
1110+
cancel_work_sync(&amd_manager->amd_sdw_work);
11101111
amd_sdw_wake_enable(amd_manager, false);
11111112
return amd_sdw_clock_stop(amd_manager);
11121113
} else if (amd_manager->power_mode_mask & AMD_SDW_POWER_OFF_MODE) {
1114+
cancel_work_sync(&amd_manager->amd_sdw_work);
11131115
amd_sdw_wake_enable(amd_manager, false);
11141116
/*
11151117
* As per hardware programming sequence on AMD platforms,

0 commit comments

Comments
 (0)