public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@nxp.com>
To: Carlos Song <carlos.song@nxp.com>
Cc: broonie@kernel.org, hawnguo@kernel.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de, festevam@gmail.com,
	linux-spi@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] spi: imx: avoid dmaengine_terminate_all() on TX prep failure
Date: Tue, 25 Nov 2025 10:42:13 -0500	[thread overview]
Message-ID: <aSXOVabiKux8T1QU@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20251125100618.2159770-4-carlos.song@nxp.com>

On Tue, Nov 25, 2025 at 06:06:15PM +0800, Carlos Song wrote:
> If dmaengine_prep_slave_sg() fails, no descriptor is submitted to the TX
> channel and DMA is never started. Therefore, calling
> dmaengine_terminate_all() for the TX DMA channel is unnecessary.
>
> Signed-off-by: Carlos Song <carlos.song@nxp.com>

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

> ---
>  drivers/spi/spi-imx.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
> index 012f5bcbf73f..186963d3d2e0 100644
> --- a/drivers/spi/spi-imx.c
> +++ b/drivers/spi/spi-imx.c
> @@ -1468,7 +1468,6 @@ static int spi_imx_dma_submit(struct spi_imx_data *spi_imx,
>  					  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_all(controller->dma_rx);
>  		return -EINVAL;
>  	}
> --
> 2.34.1
>


  reply	other threads:[~2025-11-25 15:42 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25 10:06 [PATCH 0/6] Support ECSPI dynamic burst feature for DMA mode Carlos Song
2025-11-25 10:06 ` [PATCH 1/6] spi: imx: group spi_imx_dma_configure() with spi_imx_dma_transfer() Carlos Song
2025-11-25 15:32   ` Frank Li
2025-11-25 10:06 ` [PATCH 2/6] spi: imx: introduce helper to clear DMA mode logic Carlos Song
2025-11-25 15:41   ` Frank Li
2025-11-25 10:06 ` [PATCH 3/6] spi: imx: avoid dmaengine_terminate_all() on TX prep failure Carlos Song
2025-11-25 15:42   ` Frank Li [this message]
2025-11-25 10:06 ` [PATCH 4/6] spi: imx: handle DMA submission errors with dma_submit_error() Carlos Song
2025-11-25 15:45   ` Frank Li
2025-11-25 10:06 ` [PATCH 5/6] spi: imx: support dynamic burst length for ECSPI DMA mode Carlos Song
2025-11-25 12:10   ` Marc Kleine-Budde
2025-11-26  7:42     ` Carlos Song
2025-11-26  8:31       ` Marc Kleine-Budde
2025-11-26  9:51         ` [EXT] " Carlos Song
2025-11-26 11:17         ` Carlos Song
2025-11-26 12:36           ` Marc Kleine-Budde
2025-11-27  2:36             ` [EXT] " Carlos Song
2025-11-26  8:11   ` Marc Kleine-Budde
2025-11-26  8:18     ` [EXT] " Carlos Song
2025-11-26  8:20   ` Marc Kleine-Budde
2025-11-26  8:34     ` [EXT] " Carlos Song
2025-11-26  8:44       ` Marc Kleine-Budde
2025-11-26  8:27   ` Marc Kleine-Budde
2025-11-26  8:43     ` [EXT] " Carlos Song
2025-11-26 12:22   ` Marc Kleine-Budde
2025-11-26 12:29     ` [EXT] " Carlos Song
2025-11-26 12:52       ` Marc Kleine-Budde
2025-11-27  2:58         ` Carlos Song
2025-11-25 10:06 ` [PATCH 6/6] spi: imx: enable DMA mode for target operation Carlos Song
2025-11-25 16:05   ` Frank Li
2025-11-26  2:11     ` Carlos Song
2025-12-02  7:00     ` Carlos Song
2025-11-26 12:18   ` Marc Kleine-Budde
2025-11-26 12:30     ` [EXT] " Carlos Song

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=aSXOVabiKux8T1QU@lizhi-Precision-Tower-5810 \
    --to=frank.li@nxp.com \
    --cc=broonie@kernel.org \
    --cc=carlos.song@nxp.com \
    --cc=festevam@gmail.com \
    --cc=hawnguo@kernel.org \
    --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