[PATCH] mtd: rawnand: gpmi: terminate the DMA chain on completion timeout

Miquel Raynal miquel.raynal at bootlin.com
Fri Oct 30 08:00:23 PDT 2026


Hello,

> diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
> index 527165ccc..a8106de2c 100644
> --- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
> +++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
> @@ -2659,6 +2659,8 @@ static int gpmi_nfc_exec_op(struct nand_chip *chip,
>  	if (!to) {
>  		dev_err(this->dev, "DMA timeout, last DMA\n");
>  		gpmi_dump_info(this);
> +		/* Retire the APBH chain before its buffers are unmapped. */

Please drop this comment.

Otherwise fine.

> +		dmaengine_terminate_sync(get_dma_chan(this));
>  		ret = -ETIMEDOUT;
>  		goto unmap;
>  	}
>
> base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907

Thanks,
Miquèl



More information about the linux-mtd mailing list