[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aJ4UH8fSWGODwnmO@lizhi-Precision-Tower-5810>
Date: Thu, 14 Aug 2025 12:51:43 -0400
From: Frank Li <Frank.li@....com>
To: James Clark <james.clark@...aro.org>
Cc: Mark Brown <broonie@...nel.org>, Clark Wang <xiaoning.wang@....com>,
Fugang Duan <B38611@...escale.com>, Gao Pan <pandy.gao@....com>,
Fugang Duan <fugang.duan@....com>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
Larisa Grigore <larisa.grigore@....nxp.com>,
Larisa Grigore <larisa.grigore@....com>,
Ghennadi Procopciuc <ghennadi.procopciuc@....com>,
Ciprianmarian Costea <ciprianmarian.costea@....com>, s32@....com,
linux-spi@...r.kernel.org, imx@...ts.linux.dev,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 03/13] spi: spi-fsl-lpspi: Reset FIFO and disable module
on transfer abort
On Thu, Aug 14, 2025 at 05:06:43PM +0100, James Clark wrote:
> From: Larisa Grigore <larisa.grigore@....com>
>
> In DMA mode fsl_lpspi_reset() is always called at the end, even when the
> transfer is aborted. When not using DMA, aborts skip the reset leaving
Nit: s/"When not using DMA"/In PIO mode
Reviewed-by: Frank Li <Frank.Li@....com>
> the FIFO filled and the module enabled.
>
> Fix it by always calling fsl_lpspi_reset().
>
> Fixes: a15dc3d657fa ("spi: lpspi: Fix CLK pin becomes low before one transfer")
> Signed-off-by: Larisa Grigore <larisa.grigore@....com>
> Signed-off-by: James Clark <james.clark@...aro.org>
> ---
> drivers/spi/spi-fsl-lpspi.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
> index c65eb6d31ee7..aab92ee7eb94 100644
> --- a/drivers/spi/spi-fsl-lpspi.c
> +++ b/drivers/spi/spi-fsl-lpspi.c
> @@ -734,12 +734,10 @@ static int fsl_lpspi_pio_transfer(struct spi_controller *controller,
> fsl_lpspi_write_tx_fifo(fsl_lpspi);
>
> ret = fsl_lpspi_wait_for_completion(controller);
> - if (ret)
> - return ret;
>
> fsl_lpspi_reset(fsl_lpspi);
>
> - return 0;
> + return ret;
> }
>
> static int fsl_lpspi_transfer_one(struct spi_controller *controller,
>
> --
> 2.34.1
>
Powered by blists - more mailing lists