diff options
| author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2026-02-27 11:16:48 +0000 |
|---|---|---|
| committer | Vinod Koul <vkoul@kernel.org> | 2026-03-09 08:02:38 +0100 |
| commit | fee12f3c20dd5902dbd95eb41f80d3fba89336d7 (patch) | |
| tree | e68923d5e100b70bb77baecada31674809055fa6 /tools/perf/scripts/python | |
| parent | 27ab4f1e4909a674dfd03058fb9802cae2343a36 (diff) | |
soundwire: stream: Poll for DP prepare to avoid interrupt deadlock
Replace the wait_for_completion_timeout() in sdw_prep_deprep_slave_ports()
with a read_poll_timeout().
The original intent of the wait_for_completion_timeout() was to wait for
the port prepare interrupt. But at this time the code is holding the
bus_lock, which prevents the interrupt handler from running. Because of
this, the port_prep completion will not be signaled and the
wait_for_completion_timeout() will always timeout.
Rewriting the code to avoid taking the bus_lock carries risks, and
needs careful consideration of the consequences. It is safer and simpler
to replace the completion with a simple register poll.
As the code is holding the bus_lock, it is already blocking other activity
so consuming control channel bandwidth for polling isn't really a concern.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260227111648.175548-1-rf@opensource.cirrus.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
