From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: Cole Leavitt <cole@unwrap.rs>, Vinod Koul <vkoul@kernel.org>,
Bard Liao <yung-chuan.liao@linux.intel.com>
Cc: Richard Fitzgerald <rf@opensource.cirrus.com>,
Charles Keepax <ckeepax@opensource.cirrus.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] soundwire: bus: demote UNATTACHED slave warnings to dev_dbg
Date: Wed, 18 Feb 2026 17:52:51 +0100 [thread overview]
Message-ID: <06e00cc3-5c4a-4116-aa2f-ea61ab3493d4@linux.dev> (raw)
In-Reply-To: <20260218140042.21536-1-cole@unwrap.rs>
On 2/18/26 15:00, Cole Leavitt wrote:
> The dev_warn() messages in sdw_handle_slave_status() for UNATTACHED
> transitions were added in commit d1b328557058 ("soundwire: bus: add
> dev_warn() messages to track UNATTACHED devices") to debug attachment
> failures with dynamic debug enabled.
>
> These warnings fire during normal operation -- for example when a codec
> driver triggers a system reset after firmware download, or during
> initial multi-device enumeration due to the PING frame race documented
> in cadence_master.c -- producing misleading noise on every boot.
That second sentence doesn't seem right.
The problem documented in cadence_master.c was that devices may report as ATTACHED at the same time, but the detector only sees one device.
As a result only one of the two devices would be assigned a non-zero device number.
But the second device does not lose sync and never becomes UNATTACHED.
> The original debugging use case is fully served by dev_dbg(), which
> remains visible when dynamic debug is enabled. Demote both state
> check warnings to dev_dbg().
>
> Fixes: d1b328557058 ("soundwire: bus: add dev_warn() messages to track UNATTACHED devices")
> Signed-off-by: Cole Leavitt <cole@unwrap.rs>
> ---
> Changes in v3:
> - Add Fixes tag and version changelog
>
> Changes in v2:
> - Drop unattach_pending flag approach entirely per reviewer feedback
> (Pierre-Louis, Richard, Charles)
> - Simply demote dev_warn() to dev_dbg() unconditionally
> - Single patch instead of 2-patch series
>
> drivers/soundwire/bus.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
> index fb68738dfb9b..45234cc07f35 100644
> --- a/drivers/soundwire/bus.c
> +++ b/drivers/soundwire/bus.c
> @@ -1899,8 +1899,8 @@ int sdw_handle_slave_status(struct sdw_bus *bus,
>
> if (status[i] == SDW_SLAVE_UNATTACHED &&
> slave->status != SDW_SLAVE_UNATTACHED) {
> - dev_warn(&slave->dev, "Slave %d state check1: UNATTACHED, status was %d\n",
> - i, slave->status);
> + dev_dbg(&slave->dev, "Slave %d state check1: UNATTACHED, status was %d\n",
> + i, slave->status);
> sdw_modify_slave_status(slave, SDW_SLAVE_UNATTACHED);
>
> /* Ensure driver knows that peripheral unattached */
> @@ -1951,8 +1951,8 @@ int sdw_handle_slave_status(struct sdw_bus *bus,
> if (slave->status == SDW_SLAVE_UNATTACHED)
> break;
>
> - dev_warn(&slave->dev, "Slave %d state check2: UNATTACHED, status was %d\n",
> - i, slave->status);
> + dev_dbg(&slave->dev, "Slave %d state check2: UNATTACHED, status was %d\n",
> + i, slave->status);
>
> sdw_modify_slave_status(slave, SDW_SLAVE_UNATTACHED);
> break;
next prev parent reply other threads:[~2026-02-18 16:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 23:35 [PATCH 0/2] soundwire: suppress expected unattach warnings during codec reset Cole Leavitt
2026-02-17 23:35 ` [PATCH 1/2] soundwire: bus: downgrade expected unattach warnings to dev_dbg Cole Leavitt
2026-02-17 23:35 ` [PATCH 2/2] ASoC: cs35l56: set unattach_pending before SoundWire system reset Cole Leavitt
2026-02-18 10:14 ` [PATCH 0/2] soundwire: suppress expected unattach warnings during codec reset Richard Fitzgerald
2026-02-18 10:50 ` Pierre-Louis Bossart
2026-02-18 11:01 ` Richard Fitzgerald
2026-02-18 12:49 ` Charles Keepax
2026-02-18 13:55 ` [PATCH v2] soundwire: bus: demote UNATTACHED slave warnings to dev_dbg Cole Leavitt
2026-02-18 14:00 ` [PATCH v3] " Cole Leavitt
2026-02-18 16:52 ` Pierre-Louis Bossart [this message]
2026-02-18 18:02 ` [PATCH v4] soundwire: bus: demote UNATTACHED state warnings to dev_dbg() Cole Leavitt
2026-02-23 15:20 ` Richard Fitzgerald
2026-03-09 7:05 ` [PATCH 0/2] soundwire: suppress expected unattach warnings during codec reset 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=06e00cc3-5c4a-4116-aa2f-ea61ab3493d4@linux.dev \
--to=pierre-louis.bossart@linux.dev \
--cc=ckeepax@opensource.cirrus.com \
--cc=cole@unwrap.rs \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=rf@opensource.cirrus.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