summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-tle62x0.c
diff options
context:
space:
mode:
authorDouglas Anderson <dianders@chromium.org>2020-12-18 01:29:12 +0300
committerMark Brown <broonie@kernel.org>2020-12-18 20:42:15 +0300
commit690d8b917bbe64772cb0b652311bcd50908aea6b (patch)
tree7d61a16d967026d4839b4da779d82268d20d4822 /drivers/spi/spi-tle62x0.c
parent4aa1464acbe3697710279a4bd65cb4801ed30425 (diff)
downloadlinux-690d8b917bbe64772cb0b652311bcd50908aea6b.tar.xz
spi: spi-geni-qcom: Fail new xfers if xfer/cancel/abort pending
If we got a timeout when trying to send an abort command then it means that we just got 3 timeouts in a row: 1. The original timeout that caused handle_fifo_timeout() to be called. 2. A one second timeout waiting for the cancel command to finish. 3. A one second timeout waiting for the abort command to finish. SPI is clocked by the controller, so nothing (aside from a hardware fault or a totally broken sequencer) should be causing the actual commands to fail in hardware. However, even though the hardware itself is not expected to fail (and it'd be hard to predict how we should handle things if it did), it's easy to hit the timeout case by simply blocking our interrupt handler from running for a long period of time. Obviously the system is in pretty bad shape if a interrupt handler is blocked for > 2 seconds, but there are certainly bugs (even bugs in other unrelated drivers) that can make this happen. Let's make things a bit more robust against this case. If we fail to abort we'll set a flag and then we'll block all future transfers until we have no more interrupts pending. Fixes: 561de45f72bd ("spi: spi-geni-qcom: Add SPI driver support for GENI based QUP") Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20201217142842.v3.2.Ibade998ed587e070388b4bf58801f1107a40eb53@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-tle62x0.c')
0 files changed, 0 insertions, 0 deletions