Repository navigation
Conversation
kv2019i
left a comment
There was a problem hiding this comment.
Patch is good, but the commit message could be improved a bit.
Call to sdw_update_slave_status() needs to be added to sdw_clear_slave_ status() to ensure Slaves are informed of the new status via update_ status() callback. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
7135507 to
2ef85f7
Compare
hw_init will be set to false when Slave is unattached and will be set to true after io init is done. So we should test hw_init after io init. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
I would like to let @plbossart has a chance to review next week. |
|
I am not sure if this works in all cases @bardliao. The intent of the if (!hw_init) test in the resume() stage was to make sure we do not wait for the initialization complete in the case where there are 'ghost' devices exposed in ACPI tables but not physically populated in hardware. Are you sure this doesn't lead to reports of 'timeouts' with e.g. RT700 devices that are copy/pasted in all RVPs configs? |
I also don't know if the test for hw_init done after the wait_for_completion(initialization_complete) is actually doing anything. If the attach fails, then hw_init will not be set. Conversely if the device attaches, hw_init will be set already. Testing it in the resume doesn't accomplish anything. Maybe the right fix is to use if (!first_hw_init) // instead of if (!hw_init)
return 0;
wait_for_completion(&initialization_complete);That way if we resume a device that never attached then we just do nothing. |
Ack |
|
closing since PR #2941 implements the same fixes. |
sdw_update_slave_status() will call the update_status() callback to
inform Slaves and do the corresponding tasks. We modify Slave status to
SDW_SLAVE_UNATTACHED but not update Slave status in sdw_clear_slave_status()
will lead to Slave status will never be updated elsewhere due to the
status is not changed.
Signed-off-by: Bard Liao yung-chuan.liao@linux.intel.com