diff options
author | David Lechner <[email protected]> | 2024-01-26 15:23:57 -0600 |
---|---|---|
committer | Mark Brown <[email protected]> | 2024-02-05 14:35:44 +0000 |
commit | c8bec3355f08ddb887d5c13b7095dfa79e6db108 (patch) | |
tree | 56c78044c77c7987b21ae1b78fc1525bbfd981ed /tools/perf/scripts/python/check-perf-trace.py | |
parent | 1e942b5bb18e8a9709a5cb5293b15dd54ed79f98 (diff) |
spi: move split xfers for CS_WORD emulation
This moves splitting transfers for CS_WORD software emulation to the
same place where we split transfers for controller-specific reasons.
This fixes a few subtle bugs.
The calculation for maxsize was wrong for bit sizes between 17 and 24.
This is fixed by making use of spi_split_transfers_maxwords() which
already has the correct calculation.
Also, since this indirectly calls spi_res_alloc(), to avoid leaking
resources, spi_finalize_current_message() would need to be called
on all error paths in __spi_validate() and callers of __spi_validate()
would need to do the same. This is fixed by moving the call to
__spi_pump_transfer_message() where it is already splitting transfers
for other reasons and correctly releases resources in the subsequent
error paths.
Fixes: cbaa62e0094a ("spi: add software implementation for SPI_CS_WORD")
Signed-off-by: David Lechner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions