From: Srinivas Kandagatla <srini@kernel.org>
To: Charles Keepax <ckeepax@opensource.cirrus.com>,
broonie@kernel.org, vkoul@kernel.org, lee@kernel.org
Cc: lgirdwood@gmail.com, pierre-louis.bossart@linux.dev,
yung-chuan.liao@linux.intel.com, peter.ujfalusi@linux.intel.com,
oder_chiou@realtek.com, jack.yu@realtek.com,
shumingf@realtek.com, srini@kernel.org,
linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, patches@opensource.cirrus.com
Subject: Re: [PATCH v2 01/10] soundwire: Always wait for initialisation of unattached devices
Date: Fri, 5 Jun 2026 12:43:24 +0100 [thread overview]
Message-ID: <371781e9-6c5f-486f-a0ca-ef6e59b91a1e@kernel.org> (raw)
In-Reply-To: <20260605084810.1575539-2-ckeepax@opensource.cirrus.com>
some minor typos in commit msg.
On 6/5/26 9:48 AM, Charles Keepax wrote:
> Currently in sdw_slave_wait_for_init() the waiting can be skipped
> if unattach_request is not set. Doing so was added in [1] likely
> because the core used to do a complete() on the completion so
> waiting in the case an unattach hadn't actually happened would
> block for the full timeout. However patch [2] updated the core to
> use complete_all() which means that the wait_for_completion() will
> now simply return if the device is already attached skipping the
> completion doesn't add much.
>
> Additionally, unatttach_request is only set if the host initiates
s/unatttach/unattach
> a bus reset. However, the host doing a bus reset is not the only
> reason a device may be unattached from the bus. Other options
> could include the driver probing before the device enumerates, a
> sync-loss, or the device itself powering down.
>
> Removing the skip using unattached_request, doesn't cost much in
> terms of efficiency and allows the sdw_slave_wiat_for_init() helper
s/wiat/wait
> to be used outside of runtime resume.
>
> [1] b2bd75f806c4 ("soundwire: sdw_slave: track unattach_request to handle all init sequences")
> [2] c40d6b3249b1 ("soundwire: fix enumeration completion")
>
> Acked-by: Vinod Koul <vkoul@kernel.org>
> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
> ---
>
> No change since v1.
>
> drivers/soundwire/bus.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
> index ea3a24f805c00..b7bdf19ebb42e 100644
> --- a/drivers/soundwire/bus.c
> +++ b/drivers/soundwire/bus.c
> @@ -1386,9 +1386,6 @@ int sdw_slave_wait_for_init(struct sdw_slave *slave, int timeout_ms)
> {
> unsigned long time;
>
> - if (!slave->unattach_request)
> - return 0;
> -
> time = wait_for_completion_timeout(&slave->initialization_complete,
> msecs_to_jiffies(timeout_ms));
> if (!time) {
next prev parent reply other threads:[~2026-06-05 11:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-05 8:48 [PATCH v2 00/10] Expand SoundWire enumeration helper coverage Charles Keepax
2026-06-05 8:48 ` [PATCH v2 01/10] soundwire: Always wait for initialisation of unattached devices Charles Keepax
2026-06-05 11:43 ` Srinivas Kandagatla [this message]
2026-06-05 16:10 ` Charles Keepax
2026-06-05 8:48 ` [PATCH v2 02/10] ASoC: wsa881x: Use new SoundWire enumeration helper Charles Keepax
2026-06-05 8:48 ` [PATCH v2 03/10] mfd: cs42l43: " Charles Keepax
2026-06-05 8:48 ` [PATCH v2 04/10] ASoC: rt5682: " Charles Keepax
2026-06-05 8:48 ` [PATCH v2 05/10] ASoC: pm4125: " Charles Keepax
2026-06-05 8:48 ` [PATCH v2 06/10] ASoC: wcd937x: " Charles Keepax
2026-06-05 8:48 ` [PATCH v2 07/10] ASoC: wcd938x: " Charles Keepax
2026-06-05 8:48 ` [PATCH v2 08/10] ASoC: wcd939x: " Charles Keepax
2026-06-05 8:48 ` [PATCH v2 09/10] ASoC: SDCA: " Charles Keepax
2026-06-05 8:48 ` [PATCH v2 10/10] ASoC: cs35l56: Remove unnecessary conditionals waiting for enumeration Charles Keepax
2026-06-05 11:42 ` [PATCH v2 00/10] Expand SoundWire enumeration helper coverage Srinivas Kandagatla
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=371781e9-6c5f-486f-a0ca-ef6e59b91a1e@kernel.org \
--to=srini@kernel.org \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=jack.yu@realtek.com \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=oder_chiou@realtek.com \
--cc=patches@opensource.cirrus.com \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=shumingf@realtek.com \
--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
Powered by JetHome