]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: tegra210-quad: Check hardware status on timeout
authorVishwaroop A <va@nvidia.com>
Tue, 28 Oct 2025 15:57:03 +0000 (15:57 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 4 Nov 2025 16:48:55 +0000 (16:48 +0000)
commit380fd29d57abe6679d87ec56babe65ddc5873a37
tree48e395a37cdc079598195cf6b23895ecec924de1
parent6022eacdda8b0b06a2e1d4122e5268099b62ff5d
spi: tegra210-quad: Check hardware status on timeout

Under high system load, QSPI interrupts can be delayed or blocked on the
target CPU, causing wait_for_completion_timeout() to report failure even
though the hardware successfully completed the transfer.

When a timeout occurs, check the QSPI_RDY bit in QSPI_TRANS_STATUS to
determine if the hardware actually completed the transfer. If so, manually
invoke the completion handler to process the transfer successfully instead
of failing it.

This distinguishes lost/delayed interrupts from real hardware timeouts,
preventing unnecessary failures of transfers that completed successfully.

Signed-off-by: Vishwaroop A <va@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://patch.msgid.link/20251028155703.4151791-4-va@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-tegra210-quad.c