Skip to content

Commit

Permalink
soundwire: qcom: reinit broadcast completion
Browse files Browse the repository at this point in the history
For some reason we never reinit the broadcast completion, there is a
danger that broadcast commands could be treated as completed by driver
from previous complete status.
Fix this by reinitializing the completion before sending a broadcast command.

Fixes: ddea6cf ("soundwire: qcom: update register read/write routine")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221026110210.6575-2-srinivas.kandagatla@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Srinivas Kandagatla authored and Vinod Koul committed Oct 28, 2022
1 parent 13c30a7 commit f936fa7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/soundwire/qcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ static int qcom_swrm_cmd_fifo_wr_cmd(struct qcom_swrm_ctrl *swrm, u8 cmd_data,
if (swrm_wait_for_wr_fifo_avail(swrm))
return SDW_CMD_FAIL_OTHER;

if (cmd_id == SWR_BROADCAST_CMD_ID)
reinit_completion(&swrm->broadcast);

/* Its assumed that write is okay as we do not get any status back */
swrm->reg_write(swrm, SWRM_CMD_FIFO_WR_CMD, val);

Expand Down

0 comments on commit f936fa7

Please sign in to comment.