Commit 3d3e88e
soundwire: stream: Fix test for DP prepare complete
In sdw_prep_deprep_slave_ports(), after the wait_for_completion()
the DP prepare status register is read. If this indicates that the
port is now prepared, the code should continue with the port setup.
It is irrelevant whether the wait_for_completion() timed out if the
port is now ready.
The previous implementation would always fail if the
wait_for_completion() timed out, even if the port was reporting
successful prepare.
This patch also fixes a minor bug where the return from sdw_read()
was not checked for error - any error code with LSBits clear could
be misinterpreted as a successful port prepare.
Fixes: 79df15b ("soundwire: Add helpers for ports operations")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210618144745.30629-1-rf@opensource.cirrus.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>1 parent 031e668 commit 3d3e88e
1 file changed
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | | - | |
426 | 425 | | |
427 | 426 | | |
428 | 427 | | |
| |||
479 | 478 | | |
480 | 479 | | |
481 | 480 | | |
482 | | - | |
483 | | - | |
| 481 | + | |
| 482 | + | |
484 | 483 | | |
485 | 484 | | |
486 | | - | |
487 | | - | |
| 485 | + | |
| 486 | + | |
488 | 487 | | |
489 | | - | |
490 | | - | |
| 488 | + | |
| 489 | + | |
491 | 490 | | |
492 | 491 | | |
493 | 492 | | |
| |||
0 commit comments