From de83df1a39c35852acbcc7584f9ae7611b078a0b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 8 Dec 2022 21:36:00 +0100 Subject: [PATCH] 6.0-stable patches added patches: soundwire-intel-initialize-clock-stop-timeout.patch --- queue-6.0/series | 1 + ...-intel-initialize-clock-stop-timeout.patch | 45 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 queue-6.0/soundwire-intel-initialize-clock-stop-timeout.patch diff --git a/queue-6.0/series b/queue-6.0/series index 1a96daff0ff..10400fb7d6f 100644 --- a/queue-6.0/series +++ b/queue-6.0/series @@ -53,3 +53,4 @@ xen-netback-ensure-protocol-headers-don-t-fall-in-th.patch xen-netback-don-t-call-kfree_skb-with-interrupts-dis.patch media-videobuf2-core-take-mmap_lock-in-vb2_get_unmap.patch fscache-fix-oops-due-to-race-with-cookie_lru-and-use.patch +soundwire-intel-initialize-clock-stop-timeout.patch diff --git a/queue-6.0/soundwire-intel-initialize-clock-stop-timeout.patch b/queue-6.0/soundwire-intel-initialize-clock-stop-timeout.patch new file mode 100644 index 00000000000..bcd24071670 --- /dev/null +++ b/queue-6.0/soundwire-intel-initialize-clock-stop-timeout.patch @@ -0,0 +1,45 @@ +From 13c30a755847c7e804e1bf755e66e3ff7b7f9367 Mon Sep 17 00:00:00 2001 +From: Sjoerd Simons +Date: Thu, 20 Oct 2022 09:56:24 +0800 +Subject: soundwire: intel: Initialize clock stop timeout + +From: Sjoerd Simons + +commit 13c30a755847c7e804e1bf755e66e3ff7b7f9367 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: 1f2dcf3a154ac ("soundwire: intel: set dev_num_ida_min") +Signed-off-by: Sjoerd Simons +Reviewed-by: Pierre-Louis Bossart +Reviewed-by: Chao Song +Signed-off-by: Bard Liao +Link: https://lore.kernel.org/r/20221020015624.1703950-1-yung-chuan.liao@linux.intel.com +Signed-off-by: Vinod Koul +Signed-off-by: Pierre-Louis Bossart +Signed-off-by: Greg Kroah-Hartman +--- + drivers/soundwire/intel.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/soundwire/intel.c ++++ b/drivers/soundwire/intel.c +@@ -1307,6 +1307,7 @@ static int intel_link_probe(struct auxil + cdns->msg_count = 0; + + bus->link_id = auxdev->id; ++ bus->clk_stop_timeout = 1; + + sdw_cdns_probe(cdns); + -- 2.47.3