Skip to content

Commit 6768188

Browse files
Larisa Grigoregregkh
authored andcommitted
spi: spi-fsl-lpspi: Fix transmissions when using CONT
[ Upstream commit 782a7c7 ] Commit 6a13044 ("spi: lpspi: Fix wrong transmission when don't use CONT") breaks transmissions when CONT is used. The TDIE interrupt should not be disabled in all cases. If CONT is used and the TX transfer is not yet completed yet, but the interrupt handler is called because there are characters to be received, TDIE is replaced with FCIE. When the transfer is finally completed, SR_TDF is set but the interrupt handler isn't called again. Fixes: 6a13044 ("spi: lpspi: Fix wrong transmission when don't use CONT") Signed-off-by: Larisa Grigore <larisa.grigore@nxp.com> Signed-off-by: James Clark <james.clark@linaro.org> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20250828-james-nxp-lpspi-v2-1-6262b9aa9be4@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 28cd1a1 commit 6768188

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/spi/spi-fsl-lpspi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Freescale i.MX7ULP LPSPI driver
44
//
55
// Copyright 2016 Freescale Semiconductor, Inc.
6-
// Copyright 2018 NXP Semiconductors
6+
// Copyright 2018, 2023, 2025 NXP
77

88
#include <linux/clk.h>
99
#include <linux/completion.h>
@@ -786,7 +786,7 @@ static irqreturn_t fsl_lpspi_isr(int irq, void *dev_id)
786786
if (temp_SR & SR_MBF ||
787787
readl(fsl_lpspi->base + IMX7ULP_FSR) & FSR_TXCOUNT) {
788788
writel(SR_FCF, fsl_lpspi->base + IMX7ULP_SR);
789-
fsl_lpspi_intctrl(fsl_lpspi, IER_FCIE);
789+
fsl_lpspi_intctrl(fsl_lpspi, IER_FCIE | (temp_IER & IER_TDIE));
790790
return IRQ_HANDLED;
791791
}
792792

0 commit comments

Comments
 (0)