linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] spi: tegra210-quad: Improve timeout handling under high system load
@ 2025-10-10 15:19 Vishwaroop A
  2025-10-10 15:20 ` [PATCH v1 1/2] spi: tegra210-quad: Fix timeout handling Vishwaroop A
  2025-10-10 15:20 ` [PATCH v1 2/2] spi: tegra210-quad: Check hardware status on timeout Vishwaroop A
  0 siblings, 2 replies; 4+ messages in thread
From: Vishwaroop A @ 2025-10-10 15:19 UTC (permalink / raw)
  To: Mark Brown, Thierry Reding, Jonathan Hunter, Sowjanya Komatineni,
	Laxman Dewangan, smangipudi, kyarlagadda
  Cc: Vishwaroop A, linux-spi, linux-tegra, linux-kernel

Hi,

This patch series addresses timeout handling issues in the Tegra QSPI driver
that occur under high system load conditions. We've observed that when CPUs
are saturated (due to error injection, RAS firmware activity, or general CPU
contention), QSPI interrupt handlers can be delayed, causing spurious transfer
failures even though the hardware completed the operation successfully.

Patch 1 fixes a stale pointer issue by ensuring curr_xfer is cleared on timeout
and checked when the IRQ thread finally runs. It also ensures interrupts are
properly cleared on failure paths.

Patch 2 adds hardware status checking on timeout. Before failing a transfer,
the driver now reads QSPI_TRANS_STATUS to verify if the hardware actually
completed the operation. If so, it manually invokes the completion handler
instead of failing the transfer. This distinguishes genuine hardware timeouts
from delayed/lost interrupts.

These changes have been tested in production environments under various high
load scenarios including RAS testing and CPU saturation workloads.

Testing:
- Verified normal operation under light load
- Tested under heavy CPU load with concurrent workloads
- Validated with RAS firmware activity and error injection
- Confirmed no regressions in existing timeout behavior

Thierry Reding (1):
  spi: tegra210-quad: Fix timeout handling

Vishwaroop A (1):
  spi: tegra210-quad: Check hardware status on timeout

 drivers/spi/spi-tegra210-quad.c | 195 ++++++++++++++++++++++++++------
 1 file changed, 138 insertions(+), 57 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-10-14 10:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-10 15:19 [PATCH v1 0/2] spi: tegra210-quad: Improve timeout handling under high system load Vishwaroop A
2025-10-10 15:20 ` [PATCH v1 1/2] spi: tegra210-quad: Fix timeout handling Vishwaroop A
2025-10-14 10:15   ` Thierry Reding
2025-10-10 15:20 ` [PATCH v1 2/2] spi: tegra210-quad: Check hardware status on timeout Vishwaroop A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).