Skip to content

Commit 13c30a7

Browse files
sjoerdsimonsvinodkoul
authored andcommitted
soundwire: intel: Initialize clock stop timeout
The bus->clk_stop_timeout member is only initialized to a non-zero value during the codec driver probe. This can lead to corner cases where this value remains pegged at zero when the bus suspends, which results in an endless loop in sdw_bus_wait_for_clk_prep_deprep(). Corner cases include configurations with no codecs described in the firmware, or delays in probing codec drivers. Initializing the default timeout to the smallest non-zero value avoid this problem and allows for the existing logic to be preserved: the bus->clk_stop_timeout is set as the maximum required by all codecs connected on the bus. Fixes: 1f2dcf3 ("soundwire: intel: set dev_num_ida_min") Signed-off-by: Sjoerd Simons <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Chao Song <[email protected]> Signed-off-by: Bard Liao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 9abf231 commit 13c30a7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/soundwire/intel.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,6 +1513,7 @@ static int intel_link_probe(struct auxiliary_device *auxdev,
15131513

15141514
bus->link_id = auxdev->id;
15151515
bus->dev_num_ida_min = INTEL_DEV_NUM_IDA_MIN;
1516+
bus->clk_stop_timeout = 1;
15161517

15171518
sdw_cdns_probe(cdns);
15181519

0 commit comments

Comments
 (0)