[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251126-loyal-lobster-of-virtuosity-0aa824-mkl@pengutronix.de>
Date: Wed, 26 Nov 2025 13:22:55 +0100
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Carlos Song <carlos.song@....com>
Cc: broonie@...nel.org, frank.li@....com, hawnguo@...nel.org,
s.hauer@...gutronix.de, kernel@...gutronix.de, festevam@...il.com,
linux-spi@...r.kernel.org, imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/6] spi: imx: support dynamic burst length for ECSPI DMA
mode
On 25.11.2025 18:06:17, Carlos Song wrote:
> static int spi_imx_pio_transfer(struct spi_device *spi,
> struct spi_transfer *transfer)
> {
> @@ -1780,9 +2112,14 @@ static int spi_imx_transfer_one(struct spi_controller *controller,
> * transfer, the SPI transfer has already been mapped, so we
> * have to do the DMA transfer here.
> */
> - if (spi_imx->usedma)
> - return spi_imx_dma_transfer(spi_imx, transfer);
> -
> + if (spi_imx->usedma) {
> + ret = spi_imx_dma_transfer(spi_imx, transfer);
> + if (transfer->error & SPI_TRANS_FAIL_NO_START) {
> + spi_imx->usedma = false;
> + return spi_imx_pio_transfer(spi, transfer);
> + }
> + return ret;
> + }
Why do you do this? AFAICS the framework already does this for you see:
spi_transfer_one_message().
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists