mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
soundwire: bus: add dev_warn() messages to track UNATTACHED devices
In rare cases, some devices seem to lose sync and never re-attach on the bus. This seems to happen only when there are more than one device per link, which suggests either an electrical issue, a race condition or a state machine issue. Add two dev_warn() messages to identify the sequence by which the devices become UNATTACHED. BugLink: https://github.com/thesofproject/linux/issues/3063 BugLink: https://github.com/thesofproject/linux/issues/3325 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220126011527.27930-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
e783362eb5
commit
d1b3285570
@ -1749,8 +1749,11 @@ int sdw_handle_slave_status(struct sdw_bus *bus,
|
||||
continue;
|
||||
|
||||
if (status[i] == SDW_SLAVE_UNATTACHED &&
|
||||
slave->status != SDW_SLAVE_UNATTACHED)
|
||||
slave->status != SDW_SLAVE_UNATTACHED) {
|
||||
dev_warn(&slave->dev, "Slave %d state check1: UNATTACHED, status was %d\n",
|
||||
i, slave->status);
|
||||
sdw_modify_slave_status(slave, SDW_SLAVE_UNATTACHED);
|
||||
}
|
||||
}
|
||||
|
||||
if (status[0] == SDW_SLAVE_ATTACHED) {
|
||||
@ -1785,6 +1788,9 @@ 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);
|
||||
|
||||
sdw_modify_slave_status(slave, SDW_SLAVE_UNATTACHED);
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user