]> git.baikalelectronics.ru Git - kernel.git/commit
spi: spi-zynq-qspi: use wait_for_completion_timeout to make zynq_qspi_exec_mem_op...
authorQuanyang Wang <quanyang.wang@windriver.com>
Thu, 26 Aug 2021 00:59:30 +0000 (08:59 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 26 Aug 2021 12:42:44 +0000 (13:42 +0100)
commita9c5bde3d7f945280f53d11d02ad92fc497a10e0
tree5659d0f725f952f5f93bd0bea4309f83dd7e713d
parent8e3e8c43e078b5651bc93058d5f200d5bdff178e
spi: spi-zynq-qspi: use wait_for_completion_timeout to make zynq_qspi_exec_mem_op not interruptible

The function wait_for_completion_interruptible_timeout will return
-ERESTARTSYS immediately when receiving SIGKILL signal which is sent
by "jffs2_gcd_mtd" during umounting jffs2. This will break the SPI memory
operation because the data transmitting may begin before the command or
address transmitting completes. Use wait_for_completion_timeout to prevent
the process from being interruptible.

Fixes: 89e15eda2b0b ("spi: spi-mem: Add support for Zynq QSPI controller")
Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
Link: https://lore.kernel.org/r/20210826005930.20572-1-quanyang.wang@windriver.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-zynq-qspi.c