From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: Bard Liao <yung-chuan.liao@linux.intel.com>,
linux-sound@vger.kernel.org, vkoul@kernel.org
Cc: vinod.koul@linaro.org, linux-kernel@vger.kernel.org,
peter.ujfalusi@linux.intel.com, bard.liao@intel.com
Subject: Re: [PATCH] soundwire: only handle alert events when the peripheral is attached
Date: Wed, 20 May 2026 19:21:16 +0200 [thread overview]
Message-ID: <1e808962-9a8d-4b0b-ad3c-867de1555d9f@linux.dev> (raw)
In-Reply-To: <20260520025720.1999367-1-yung-chuan.liao@linux.intel.com>
On 5/20/26 04:57, Bard Liao wrote:
> It doesn't make sense to handle an alert event when the peripheral is
> not attached. The slave->status could be SDW_SLAVE_ATTACHED or
> SDW_SLAVE_ALERT when it is attached on the bus.
How would you get an ALERT if the peripheral is not attached in the first place?
The status is only reported in a PING frame after enumeration.
Not following what this new test is needed for...
> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
> ---
> drivers/soundwire/bus.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
> index fe5316d93fef..0490777fa406 100644
> --- a/drivers/soundwire/bus.c
> +++ b/drivers/soundwire/bus.c
> @@ -1958,6 +1958,10 @@ int sdw_handle_slave_status(struct sdw_bus *bus,
> break;
>
> case SDW_SLAVE_ALERT:
> + if (slave->status != SDW_SLAVE_ATTACHED &&
> + slave->status != SDW_SLAVE_ALERT)
> + continue;
> +
> ret = sdw_handle_slave_alerts(slave);
> if (ret < 0)
> dev_err(&slave->dev,
next prev parent reply other threads:[~2026-05-20 17:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 2:57 Bard Liao
2026-05-20 17:21 ` Pierre-Louis Bossart [this message]
2026-05-21 2:24 ` Liao, Bard
2026-05-21 13:20 ` Pierre-Louis Bossart
2026-05-29 6:38 ` 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=1e808962-9a8d-4b0b-ad3c-867de1555d9f@linux.dev \
--to=pierre-louis.bossart@linux.dev \
--cc=bard.liao@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=peter.ujfalusi@linux.intel.com \
--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
Powered by JetHome