Re: [PATCH v8 8/9] dmaengine: dw-axi-dmac: require an IRQ before registering the controller
From: Frank Li
Date: Thu Nov 19 2026 - 11:47:55 EST
On Thu, Nov 19, 2026 at 09:01:03AM -0700, James Hilliard wrote:
> If the interrupt controller is not ready, the DMA driver can bind
> without an IRQ handler. Clients can then submit transfers but never
> receive completion callbacks. platform_irq_count() returns -EPROBE_DEFER
> in this case, which skips the IRQ request loop just like a zero count.
>
> Propagate the error so the driver core retries probe when the IRQ
> provider is ready. Return -ENXIO if there are no IRQs.
>
> Fixes: e32634f466a9 ("dma: dw-axi-dmac: support per channel interrupt")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: James Hilliard <james.hilliard1@xxxxxxxxx>
> ---
Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
> drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> index 2eeb902eaad3..531705f8f89b 100644
> --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> @@ -1518,6 +1518,10 @@ static int axi_req_irqs(struct platform_device *pdev, struct axi_dma_chip *chip)
> int irq_count = platform_irq_count(pdev);
> int ret;
>
> + if (irq_count <= 0)
> + return dev_err_probe(chip->dev, irq_count ?: -ENXIO,
> + "failed to get controller IRQs\n");
> +
> for (int i = 0; i < irq_count; i++) {
> chip->irq[i] = platform_get_irq(pdev, i);
> if (chip->irq[i] < 0)
>
> --
> 2.53.0
>