Skip to content

Commit f0f3df6

Browse files
committed
soundwire: lower the trace level to warning when the alert is ignored
Command Ignored is a valid response of SoundWire. It could happen when an invalid interrupt occurs when the device is not attached. The driver will try to access the device and will get an Ignored response. It is harmless to ignore the unexpected interrupt. Lower the trace level to not scare users. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent 719a32e commit f0f3df6

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

drivers/soundwire/bus.c

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,8 +1664,12 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
16641664
/* Read Intstat 1, Intstat 2 and Intstat 3 registers */
16651665
ret = sdw_read_no_pm(slave, SDW_SCP_INT1);
16661666
if (ret < 0) {
1667-
dev_err(&slave->dev,
1668-
"SDW_SCP_INT1 read failed:%d\n", ret);
1667+
if (ret == -ENODATA)
1668+
dev_warn(&slave->dev,
1669+
"SDW_SCP_INT1 read command was ignored\n");
1670+
else
1671+
dev_err(&slave->dev,
1672+
"SDW_SCP_INT1 read failed:%d\n", ret);
16691673
goto io_err;
16701674
}
16711675
buf = ret;
@@ -1959,10 +1963,14 @@ int sdw_handle_slave_status(struct sdw_bus *bus,
19591963

19601964
case SDW_SLAVE_ALERT:
19611965
ret = sdw_handle_slave_alerts(slave);
1962-
if (ret < 0)
1963-
dev_err(&slave->dev,
1964-
"Slave %d alert handling failed: %d\n",
1965-
i, ret);
1966+
if (ret < 0) {
1967+
if (ret == -ENODATA)
1968+
dev_warn(&slave->dev,
1969+
"Slave %d alert is ignored\n", i);
1970+
else
1971+
dev_err(&slave->dev,
1972+
"Slave %d alert handling failed: %d\n", i, ret);
1973+
}
19661974
break;
19671975

19681976
case SDW_SLAVE_ATTACHED:

0 commit comments

Comments
 (0)