spi: tegra210-quad: Protect curr_xfer clearing in tegra_qspi_non_combined_seq_xfer

Protect the curr_xfer clearing in tegra_qspi_non_combined_seq_xfer()
with the spinlock to prevent a race with the interrupt handler that
reads this field to check if a transfer is in progress.

Fixes: b4e002d8a7ce ("spi: tegra210-quad: Fix timeout handling")
Signed-off-by: Breno Leitao <leitao@debian.org>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://patch.msgid.link/20260126-tegra_xfer-v2-5-6d2115e4f387@debian.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by Breno Leitao and committed by Mark Brown 6d7723e8 bf4528ab

+3
+3
drivers/spi/spi-tegra210-quad.c
··· 1288 struct spi_transfer *transfer; 1289 bool is_first_msg = true; 1290 int ret = 0, val = 0; 1291 1292 msg->status = 0; 1293 msg->actual_length = 0; ··· 1369 msg->actual_length += xfer->len + dummy_bytes; 1370 1371 complete_xfer: 1372 tqspi->curr_xfer = NULL; 1373 1374 if (ret < 0) { 1375 tegra_qspi_transfer_end(spi);
··· 1288 struct spi_transfer *transfer; 1289 bool is_first_msg = true; 1290 int ret = 0, val = 0; 1291 + unsigned long flags; 1292 1293 msg->status = 0; 1294 msg->actual_length = 0; ··· 1368 msg->actual_length += xfer->len + dummy_bytes; 1369 1370 complete_xfer: 1371 + spin_lock_irqsave(&tqspi->lock, flags); 1372 tqspi->curr_xfer = NULL; 1373 + spin_unlock_irqrestore(&tqspi->lock, flags); 1374 1375 if (ret < 0) { 1376 tegra_qspi_transfer_end(spi);