Re: [PATCH v5 3/3] spi: tegra210-quad: Check hardware status on timeout

From: Thierry Reding
Date: Mon Nov 03 2025 - 09:17:02 EST


On Tue, Oct 28, 2025 at 03:57:03PM +0000, Vishwaroop A wrote:
> 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@xxxxxxxxxx>
> ---
> drivers/spi/spi-tegra210-quad.c | 100 +++++++++++++++++++++++++-------
> 1 file changed, 80 insertions(+), 20 deletions(-)

Acked-by: Thierry Reding <treding@xxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature