mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@oss.nxp.com>
To: "Carlos Song (OSS)" <carlos.song@oss.nxp.com>
Cc: broonie@kernel.org, Frank.Li@nxp.com, s.hauer@pengutronix.de,
	kernel@pengutronix.de, festevam@gmail.com, carlos.song@nxp.com,
	linux-spi@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: imx: replace dmaengine_terminate_all with dmaengine_terminate_sync
Date: Fri, 24 Jul 2026 15:35:23 -0400	[thread overview]
Message-ID: <amO-e2ThPaB-nqC9@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20260519104659.2794476-1-carlos.song@oss.nxp.com>

On Tue, May 19, 2026 at 06:46:59PM +0800, Carlos Song (OSS) wrote:
> From: Carlos Song <carlos.song@nxp.com>
>
> The terminate API dmaengine_terminate_all() has been deprecated, improve
> driver with dmaengine_terminate_sync().
>
> Fixes: ba9b28652c75 ("spi: imx: enable DMA mode for target operation")
> Fixes: a450c8b77f92 ("spi: imx: handle DMA submission errors with dma_submit_error()")
> Signed-off-by: Carlos Song <carlos.song@nxp.com>

Reviewed-by: Frank Li <Frank.Li@nxp.com>

> ---
>  drivers/spi/spi-imx.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
> index 480d1e8b281f..ae9912905c67 100644
> --- a/drivers/spi/spi-imx.c
> +++ b/drivers/spi/spi-imx.c
> @@ -1774,8 +1774,8 @@ static int spi_imx_dma_submit(struct spi_imx_data *spi_imx,
>  							transfer_timeout);
>  		if (!time_left) {
>  			dev_err(spi_imx->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);
>  			return -ETIMEDOUT;
>  		}
>
> @@ -1784,7 +1784,7 @@ static int spi_imx_dma_submit(struct spi_imx_data *spi_imx,
>  		if (!time_left) {
>  			dev_err(&controller->dev, "I/O Error in DMA RX\n");
>  			spi_imx->devtype_data->reset(spi_imx);
> -			dmaengine_terminate_all(controller->dma_rx);
> +			dmaengine_terminate_sync(controller->dma_rx);
>  			return -ETIMEDOUT;
>  		}
>  	} else {
> @@ -1793,15 +1793,15 @@ static int spi_imx_dma_submit(struct spi_imx_data *spi_imx,
>  		if (wait_for_completion_interruptible(&spi_imx->dma_tx_completion) ||
>  		    READ_ONCE(spi_imx->target_aborted)) {
>  			dev_dbg(spi_imx->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);
>  			return -EINTR;
>  		}
>
>  		if (wait_for_completion_interruptible(&spi_imx->dma_rx_completion) ||
>  		    READ_ONCE(spi_imx->target_aborted)) {
>  			dev_dbg(spi_imx->dev, "I/O Error in DMA RX interrupted\n");
> -			dmaengine_terminate_all(controller->dma_rx);
> +			dmaengine_terminate_sync(controller->dma_rx);
>  			return -EINTR;
>  		}
>
> @@ -1818,9 +1818,9 @@ static int spi_imx_dma_submit(struct spi_imx_data *spi_imx,
>  	return 0;
>
>  dmaengine_terminate_tx:
> -	dmaengine_terminate_all(controller->dma_tx);
> +	dmaengine_terminate_sync(controller->dma_tx);
>  dmaengine_terminate_rx:
> -	dmaengine_terminate_all(controller->dma_rx);
> +	dmaengine_terminate_sync(controller->dma_rx);
>
>  	return -EINVAL;
>  }
> --
> 2.43.0
>

      reply	other threads:[~2026-07-24 19:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19 10:46 Carlos Song (OSS)
2026-07-24 19:35 ` Frank Li [this message]

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=amO-e2ThPaB-nqC9@lizhi-Precision-Tower-5810 \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=broonie@kernel.org \
    --cc=carlos.song@nxp.com \
    --cc=carlos.song@oss.nxp.com \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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®