linux-stable/drivers/soundwire
Sjoerd Simons 28abc11459 soundwire: intel: Initialize clock stop timeout
commit 13c30a7558 upstream.

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: 1f2dcf3a15 ("soundwire: intel: set dev_num_ida_min")
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Chao Song <chao.song@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20221020015624.1703950-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-12-14 11:37:19 +01:00
..
bus.c soundwire: revisit driver bind/unbind and callbacks 2022-08-17 14:23:48 +02:00
bus.h
bus_type.c soundwire: revisit driver bind/unbind and callbacks 2022-08-17 14:23:48 +02:00
cadence_master.c soundwire: cadence: Don't overwrite msg->buf during write commands 2022-10-26 12:35:48 +02:00
cadence_master.h soundwire: cadence: add debugfs interface for PDI loopbacks 2021-08-02 11:08:22 +05:30
debugfs.c soundwire: debugfs: use controller id and link_id for debugfs 2021-11-18 19:16:49 +01:00
dmi-quirks.c ASoC: Intel: sof_sdw: fix quirks for 2022 HP Spectre x360 13" 2022-04-08 14:24:02 +02:00
generic_bandwidth_allocation.c
intel.c soundwire: intel: Initialize clock stop timeout 2022-12-14 11:37:19 +01:00
intel.h soundwire: intel: skip suspend/resume/wake when link was not started 2021-08-23 17:40:33 +05:30
intel_init.c soundwire: intel: introduce shim and alh base 2021-08-02 15:45:42 +01:00
Kconfig
Makefile
master.c
mipi_disco.c
qcom.c soundwire: qcom: check for outanding writes before doing a read 2022-11-16 09:58:14 +01:00
slave.c soundwire: revisit driver bind/unbind and callbacks 2022-08-17 14:23:48 +02:00
stream.c soundwire: revisit driver bind/unbind and callbacks 2022-08-17 14:23:48 +02:00
sysfs_local.h
sysfs_slave.c
sysfs_slave_dpn.c