summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorTobias Schramm <t.schramm@manjaro.org>2020-08-04 22:51:36 +0300
committerMark Brown <broonie@kernel.org>2020-08-05 18:53:48 +0300
commitae1ba50f1e706dfd7ce402ac52c1f1f10becad68 (patch)
tree5d1ed35dd0443895af9c0275b6589a75a95aaae3 /drivers/spi
parentddf75be47ca748f8b12d28ac64d624354fddf189 (diff)
downloadlinux-ae1ba50f1e706dfd7ce402ac52c1f1f10becad68.tar.xz
spi: stm32: clear only asserted irq flags on interrupt
Previously the stm32h7 interrupt thread cleared all non-masked interrupts. If an interrupt was to occur during the handling of another interrupt its flag would be unset, resulting in a lost interrupt. This patches fixes the issue by clearing only the currently set interrupt flags. Signed-off-by: Tobias Schramm <t.schramm@manjaro.org> Link: https://lore.kernel.org/r/20200804195136.1485392-1-t.schramm@manjaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-stm32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
index 4c643dfc7fbb..4a21feae0103 100644
--- a/drivers/spi/spi-stm32.c
+++ b/drivers/spi/spi-stm32.c
@@ -966,7 +966,7 @@ static irqreturn_t stm32h7_spi_irq_thread(int irq, void *dev_id)
if (!spi->cur_usedma && (spi->rx_buf && (spi->rx_len > 0)))
stm32h7_spi_read_rxfifo(spi, false);
- writel_relaxed(mask, spi->base + STM32H7_SPI_IFCR);
+ writel_relaxed(sr & mask, spi->base + STM32H7_SPI_IFCR);
spin_unlock_irqrestore(&spi->lock, flags);