From: Frank Li <Frank.li@nxp.com>
To: "Carlos Song (OSS)" <carlos.song@oss.nxp.com>
Cc: broonie@kernel.org, xiaoning.wang@nxp.com, Fugang.duan@nxp.com,
linux-spi@vger.kernel.org, imx@lists.linux.dev,
linux-kernel@vger.kernel.org, Carlos Song <carlos.song@nxp.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v2 1/2] spi: fsl-lpspi: replace dmaengine_terminate_all with dmaengine_terminate_sync
Date: Wed, 20 May 2026 12:52:34 -0400 [thread overview]
Message-ID: <ag3m0tCvttHAatdd@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20260520094308.2882892-2-carlos.song@oss.nxp.com>
On Wed, May 20, 2026 at 05:43:07PM +0800, Carlos Song (OSS) wrote:
subject dmaengine_terminate_all() and dmaengine_terminate_sync(),
all function need add ()
> From: Carlos Song <carlos.song@nxp.com>
>
> The terminate API dmaengine_terminate_all() has been deprecated, improve
> driver with dmaengine_terminate_sync().
Nit: replace it with dmaengine_terminate_sync()
Frank
>
> Fixes: 09c04466ce7e ("spi: lpspi: add dma mode support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Carlos Song <carlos.song@nxp.com>
> ---
> Change for V2:
> - No change in v2.
> ---
> drivers/spi/spi-fsl-lpspi.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
> index e201309f8aae..1a94a42fac31 100644
> --- a/drivers/spi/spi-fsl-lpspi.c
> +++ b/drivers/spi/spi-fsl-lpspi.c
> @@ -647,7 +647,7 @@ static int fsl_lpspi_dma_transfer(struct spi_controller *controller,
> tx->sgl, tx->nents, DMA_MEM_TO_DEV,
> DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
> if (!desc_tx) {
> - dmaengine_terminate_all(controller->dma_tx);
> + dmaengine_terminate_sync(controller->dma_tx);
> return -EINVAL;
> }
>
> @@ -668,8 +668,8 @@ static int fsl_lpspi_dma_transfer(struct spi_controller *controller,
> transfer_timeout);
> if (!time_left) {
> dev_err(fsl_lpspi->dev, "I/O Error in DMA TX\n");
> - dmaengine_terminate_all(controller->dma_tx);
> - dmaengine_terminate_all(controller->dma_rx);
> + dmaengine_terminate_sync(controller->dma_tx);
> + dmaengine_terminate_sync(controller->dma_rx);
> fsl_lpspi_reset(fsl_lpspi);
> return -ETIMEDOUT;
> }
> @@ -678,8 +678,8 @@ static int fsl_lpspi_dma_transfer(struct spi_controller *controller,
> transfer_timeout);
> if (!time_left) {
> dev_err(fsl_lpspi->dev, "I/O Error in DMA RX\n");
> - dmaengine_terminate_all(controller->dma_tx);
> - dmaengine_terminate_all(controller->dma_rx);
> + dmaengine_terminate_sync(controller->dma_tx);
> + dmaengine_terminate_sync(controller->dma_rx);
> fsl_lpspi_reset(fsl_lpspi);
> return -ETIMEDOUT;
> }
> @@ -688,8 +688,8 @@ static int fsl_lpspi_dma_transfer(struct spi_controller *controller,
> fsl_lpspi->target_aborted) {
> dev_dbg(fsl_lpspi->dev,
> "I/O Error in DMA TX interrupted\n");
> - dmaengine_terminate_all(controller->dma_tx);
> - dmaengine_terminate_all(controller->dma_rx);
> + dmaengine_terminate_sync(controller->dma_tx);
> + dmaengine_terminate_sync(controller->dma_rx);
> fsl_lpspi_reset(fsl_lpspi);
> return -EINTR;
> }
> @@ -698,8 +698,8 @@ static int fsl_lpspi_dma_transfer(struct spi_controller *controller,
> fsl_lpspi->target_aborted) {
> dev_dbg(fsl_lpspi->dev,
> "I/O Error in DMA RX interrupted\n");
> - dmaengine_terminate_all(controller->dma_tx);
> - dmaengine_terminate_all(controller->dma_rx);
> + dmaengine_terminate_sync(controller->dma_tx);
> + dmaengine_terminate_sync(controller->dma_rx);
> fsl_lpspi_reset(fsl_lpspi);
> return -EINTR;
> }
> --
> 2.43.0
>
next prev parent reply other threads:[~2026-05-20 16:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 9:43 [PATCH v2 0/2] spi: fsl-lpspi: fix DMA termination issues Carlos Song (OSS)
2026-05-20 9:43 ` [PATCH v2 1/2] spi: fsl-lpspi: replace dmaengine_terminate_all with dmaengine_terminate_sync Carlos Song (OSS)
2026-05-20 16:52 ` Frank Li [this message]
2026-05-20 9:43 ` [PATCH v2 2/2] spi: fsl-lpspi: fix missing RX DMA termination on TX prepare failure Carlos Song (OSS)
2026-05-20 16:57 ` Frank Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ag3m0tCvttHAatdd@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=Fugang.duan@nxp.com \
--cc=broonie@kernel.org \
--cc=carlos.song@nxp.com \
--cc=carlos.song@oss.nxp.com \
--cc=imx@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=xiaoning.wang@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®