Skip to content

Commit f936fa7

Browse files
Srinivas-Kandagatlavinodkoul
authored andcommitted
soundwire: qcom: reinit broadcast completion
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 13c30a7 commit f936fa7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/soundwire/qcom.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,9 @@ static int qcom_swrm_cmd_fifo_wr_cmd(struct qcom_swrm_ctrl *swrm, u8 cmd_data,
344344
if (swrm_wait_for_wr_fifo_avail(swrm))
345345
return SDW_CMD_FAIL_OTHER;
346346

347+
if (cmd_id == SWR_BROADCAST_CMD_ID)
348+
reinit_completion(&swrm->broadcast);
349+
347350
/* Its assumed that write is okay as we do not get any status back */
348351
swrm->reg_write(swrm, SWRM_CMD_FIFO_WR_CMD, val);
349352

0 commit comments

Comments
 (0)