diff options
author | James Clark <james.clark@linaro.org> | 2025-06-27 11:21:37 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-06-29 22:10:53 +0100 |
commit | fa60c094c19b97e103d653f528f8d9c178b6a5f5 (patch) | |
tree | b18a2a04e5ee9ef03ce8d21d1ad7db6946972de7 /scripts/lib/kdoc/kdoc_parser.py | |
parent | 96893cdd4760ad94a438c1523cc5ca2470e04670 (diff) |
spi: spi-fsl-dspi: Clear completion counter before initiating transfer
In target mode, extra interrupts can be received between the end of a
transfer and halting the module if the host continues sending more data.
If the interrupt from this occurs after the reinit_completion() then the
completion counter is left at a non-zero value. The next unrelated
transfer initiated by userspace will then complete immediately without
waiting for the interrupt or writing to the RX buffer.
Fix it by resetting the counter before the transfer so that lingering
values are cleared. This is done after clearing the FIFOs and the
status register but before the transfer is initiated, so no interrupts
should be received at this point resulting in other race conditions.
Fixes: 4f5ee75ea171 ("spi: spi-fsl-dspi: Replace interruptible wait queue with a simple completion")
Signed-off-by: James Clark <james.clark@linaro.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20250627-james-nxp-spi-dma-v4-1-178dba20c120@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions