WSL2-Linux-Kernel/drivers/soundwire
Krzysztof Kozlowski a8d2245fed soundwire: stream: fix programming slave ports for non-continous port maps
commit ab8d66d132bc8f1992d3eb6cab8d32dda6733c84 upstream.

Two bitmasks in 'struct sdw_slave_prop' - 'source_ports' and
'sink_ports' - define which ports to program in
sdw_program_slave_port_params().  The masks are used to get the
appropriate data port properties ('struct sdw_get_slave_dpn_prop') from
an array.

Bitmasks can be non-continuous or can start from index different than 0,
thus when looking for matching port property for given port, we must
iterate over mask bits, not from 0 up to number of ports.

This fixes allocation and programming slave ports, when a source or sink
masks start from further index.

Fixes: f8101c74aa ("soundwire: Add Master and Slave port programming")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240729140157.326450-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-09-04 13:23:39 +02:00
..
Kconfig
Makefile
bus.c soundwire: fix enumeration completion 2023-08-11 15:14:00 +02:00
bus.h
bus_type.c
cadence_master.c soundwire: cadence: fix invalid PDI offset 2024-06-16 13:39:34 +02:00
cadence_master.h
debugfs.c
dmi-quirks.c soundwire: dmi-quirks: add new mapping for HP Spectre x360 2023-06-28 10:29:52 +02:00
generic_bandwidth_allocation.c
intel.c
intel.h
intel_init.c
master.c
mipi_disco.c
qcom.c soundwire: qcom: update status correctly with mask 2023-08-03 10:22:33 +02:00
slave.c
stream.c soundwire: stream: fix programming slave ports for non-continous port maps 2024-09-04 13:23:39 +02:00
sysfs_local.h
sysfs_slave.c
sysfs_slave_dpn.c