]> git.baikalelectronics.ru Git - kernel.git/commit
spi: spi: Fix queue hang if previous transfer failed
authorDavid Jander <david@protonic.nl>
Thu, 1 Sep 2022 12:36:30 +0000 (14:36 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 2 Sep 2022 12:27:48 +0000 (13:27 +0100)
commit15d7877b8b13465e20d0831d03501e65240dff5b
treed085075fb36e63922946ef1140526a7ff4edfd2c
parentb6246cf6ac919c527e3930d8db6e2a22492ccb73
spi: spi: Fix queue hang if previous transfer failed

The queue worker always needs to be kicked one final time after a transfer
is done in order to transition to idle (ctlr->busy = false).

Commit d657abb219cf ("spi: Ensure the io_mutex is held until
spi_finalize_current_message()") moved this code into
__spi_pump_messages(), but it was executed only if the transfer was
successful. This condition check causes ctlr-busy to stay true in case of
a failed transfer.
This in turn causes that no new work is ever scheduled to the work queue.

Fixes: d657abb219cf ("spi: Ensure the io_mutex is held until spi_finalize_current_message()")
Reported-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Signed-off-by: David Jander <david@protonic.nl>
Link: https://lore.kernel.org/r/20220901123630.1098433-1-david@protonic.nl
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c