summaryrefslogtreecommitdiff
path: root/0003-soundwire-intel-Initialize-clock-stop-timeout.patch
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2022-11-01 18:08:46 -0700
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2022-11-01 18:08:46 -0700
commit790575ea74dd5d17a721bb1217b7b95d571139d0 (patch)
tree0c00120d51baf1f3afacb979e129f406d8856698 /0003-soundwire-intel-Initialize-clock-stop-timeout.patch
parentUpdated to 5.19.16 (diff)
downloadlinux-790575ea74dd5d17a721bb1217b7b95d571139d0.tar.xz
Updated to 6.0.6
Diffstat (limited to '0003-soundwire-intel-Initialize-clock-stop-timeout.patch')
-rw-r--r--0003-soundwire-intel-Initialize-clock-stop-timeout.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/0003-soundwire-intel-Initialize-clock-stop-timeout.patch b/0003-soundwire-intel-Initialize-clock-stop-timeout.patch
new file mode 100644
index 0000000..c00810e
--- /dev/null
+++ b/0003-soundwire-intel-Initialize-clock-stop-timeout.patch
@@ -0,0 +1,38 @@
+From f4e799545c0fc46a5899853f60776adc8671776c Mon Sep 17 00:00:00 2001
+From: Sjoerd Simons <sjoerd@collabora.com>
+Date: Sat, 8 Oct 2022 21:57:51 +0200
+Subject: [PATCH 3/8] 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.
+
+Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
+---
+ drivers/soundwire/intel.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
+index af6c1a93372d..002bc26b525e 100644
+--- a/drivers/soundwire/intel.c
++++ b/drivers/soundwire/intel.c
+@@ -1307,6 +1307,7 @@ static int intel_link_probe(struct auxiliary_device *auxdev,
+ cdns->msg_count = 0;
+
+ bus->link_id = auxdev->id;
++ bus->clk_stop_timeout = 1;
+
+ sdw_cdns_probe(cdns);
+
+--
+2.38.1
+