[PATCH v4] soundwire: bus: demote UNATTACHED state warnings to dev_dbg()

Cole Leavitt posted 1 patch 1 month, 1 week ago
drivers/soundwire/bus.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
[PATCH v4] soundwire: bus: demote UNATTACHED state warnings to dev_dbg()
Posted by Cole Leavitt 1 month, 1 week ago
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 hardware reset after firmware download, causing the
device to momentarily go UNATTACHED before re-attaching -- producing
misleading noise on every boot.

Demote the messages to dev_dbg() so they remain available via dynamic
debug for diagnosing real attachment failures without alarming users
during expected initialization sequences.

Fixes: d1b328557058 ("soundwire: bus: add dev_warn() messages to track UNATTACHED devices")
Signed-off-by: Cole Leavitt <cole@unwrap.rs>
---
Changes in v4:
 - Remove incorrect PING frame race reference from commit message
   (Pierre-Louis Bossart)
 - Clarify that the actual trigger is codec hardware reset after
   firmware download

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..fe5316d93fef 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;
-- 
2.52.0
Re: [PATCH v4] soundwire: bus: demote UNATTACHED state warnings to dev_dbg()
Posted by Richard Fitzgerald 1 month, 1 week ago
On 18/02/2026 6:02 pm, 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 hardware reset after firmware download, causing the
> device to momentarily go UNATTACHED before re-attaching -- producing
> misleading noise on every boot.
> 
> Demote the messages to dev_dbg() so they remain available via dynamic
> debug for diagnosing real attachment failures without alarming users
> during expected initialization sequences.
> 
> Fixes: d1b328557058 ("soundwire: bus: add dev_warn() messages to track UNATTACHED devices")
> Signed-off-by: Cole Leavitt <cole@unwrap.rs>
> ---
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>