linux-brain/drivers/soundwire
Richard Fitzgerald 142ab7ff42 soundwire: stream: Fix test for DP prepare complete
[ Upstream commit 3d3e88e336338834086278236d42039f3cde50e1 ]

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: 79df15b7d3 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-14 16:53:45 +02:00
..
Kconfig soundwire: depend on ACPI || OF 2019-10-15 16:15:58 +05:30
Makefile soundwire updates for v5.4-rc1 2019-09-22 10:52:23 -07:00
bus.c soundwire: bus: Fix device found flag correctly 2021-05-14 09:44:19 +02:00
bus.h soundwire: core: add device tree support for slave devices 2019-09-04 13:12:31 +05:30
bus_type.c soundwire: add debugfs support 2019-08-23 12:01:02 +05:30
cadence_master.c soundwire: cadence: fix ACK/NAK handling 2021-03-04 10:26:36 +01:00
cadence_master.h soundwire: intel/cadence: fix startup sequence 2020-10-01 13:17:13 +02:00
debugfs.c soundwire: add debugfs support 2019-08-23 12:01:02 +05:30
intel.c soundwire: intel/cadence: fix startup sequence 2020-10-01 13:17:13 +02:00
intel.h soundwire: fix typo in comments 2019-05-27 10:53:00 +05:30
intel_init.c soundwire: intel_init: add kernel module parameter to filter out links 2019-08-21 14:36:18 +05:30
mipi_disco.c soundwire: mipi_disco: Switch to use fwnode_property_count_uXX() 2019-08-02 17:15:13 +05:30
slave.c soundwire: slave: don't init debugfs on device registration error 2020-06-24 17:50:23 +02:00
stream.c soundwire: stream: Fix test for DP prepare complete 2021-07-14 16:53:45 +02:00