Skip to content

Commit f2e6b99

Browse files
Larisa Grigoregregkh
authored andcommitted
spi: spi-fsl-lpspi: Reset FIFO and disable module on transfer abort
[ Upstream commit e811b08 ] In DMA mode fsl_lpspi_reset() is always called at the end, even when the transfer is aborted. In PIO mode aborts skip the reset leaving the FIFO filled and the module enabled. Fix it by always calling fsl_lpspi_reset(). Fixes: a15dc3d ("spi: lpspi: Fix CLK pin becomes low before one transfer") Signed-off-by: Larisa Grigore <larisa.grigore@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: James Clark <james.clark@linaro.org> Link: https://patch.msgid.link/20250828-james-nxp-lpspi-v2-3-6262b9aa9be4@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 18fac61 commit f2e6b99

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/spi/spi-fsl-lpspi.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -705,12 +705,10 @@ static int fsl_lpspi_pio_transfer(struct spi_controller *controller,
705705
fsl_lpspi_write_tx_fifo(fsl_lpspi);
706706

707707
ret = fsl_lpspi_wait_for_completion(controller);
708-
if (ret)
709-
return ret;
710708

711709
fsl_lpspi_reset(fsl_lpspi);
712710

713-
return 0;
711+
return ret;
714712
}
715713

716714
static int fsl_lpspi_transfer_one(struct spi_controller *controller,

0 commit comments

Comments
 (0)