From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Bard Liao <yung-chuan.liao@linux.intel.com>,
alsa-devel@alsa-project.org, vkoul@kernel.org
Cc: stable@vger.kernel.org, vinod.koul@linaro.org,
bard.liao@intel.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soundwire: intel: Initialize clock stop timeout
Date: Fri, 21 Oct 2022 11:37:05 -0500 [thread overview]
Message-ID: <ad0a158f-6311-4da9-ee78-68e72decb056@linux.intel.com> (raw)
In-Reply-To: <20221020015624.1703950-1-yung-chuan.liao@linux.intel.com>
On 10/19/22 20:56, Bard Liao wrote:
> From: Sjoerd Simons <sjoerd@collabora.com>
>
> 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 <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>
this patch should be sent to GregKH/Linus as a 6.1-rcx fix, it does seem
to make the life of Arch/Debian users less miserable - for some reason
very large delays on driver probe seem to trigger this corner case and
make things even worse.
see https://github.com/thesofproject/linux/issues/3777 for details.
Thanks Vinod.
> ---
> drivers/soundwire/intel.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
> index 25ec9c272239..78d35bb4852c 100644
> --- a/drivers/soundwire/intel.c
> +++ b/drivers/soundwire/intel.c
> @@ -1311,6 +1311,7 @@ static int intel_link_probe(struct auxiliary_device *auxdev,
>
> bus->link_id = auxdev->id;
> bus->dev_num_ida_min = INTEL_DEV_NUM_IDA_MIN;
> + bus->clk_stop_timeout = 1;
>
> sdw_cdns_probe(cdns);
>
next prev parent reply other threads:[~2022-10-21 16:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 1:56 [PATCH] soundwire: intel: Initialize clock stop timeout Bard Liao
2022-10-21 16:37 ` Pierre-Louis Bossart [this message]
2022-10-28 11:28 ` Vinod Koul
2022-11-09 16:05 ` Pierre-Louis Bossart
2022-11-11 4:11 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ad0a158f-6311-4da9-ee78-68e72decb056@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=bard.liao@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=vinod.koul@linaro.org \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox