Re: [PATCH] ata: pata_ep93xx: fix PIO fallback when DMA init fails

From: Niklas Cassel

Date: Tue Jun 02 2026 - 08:10:23 EST


On Mon, Jun 01, 2026 at 12:07:49PM -0700, Rosen Penev wrote:
> ep93xx_pata_dma_init() returns an error when dma_request_chan() fails,
> which causes ep93xx_pata_probe() to abort entirely. The probe function
> already has a PIO fallback path (it checks both channel pointers before
> enabling UDMA), so the DMA init should not fail the probe on non-fatal
> errors.
>
> Treat only -EPROBE_DEFER as a fatal error. For all other failures
> (ENODEV, ENXIO, configuration errors), release any allocated channels,
> NULL the pointers, warn, and return 0 so the driver continues in PIO mode.

This patch looks correct to me, but I do think that the commit message,
which refers to -EPROBE_DEFER as a fatal error, is very misleading.

Better phrasing would be something like:
Propagate -EPROBE_DEFER, such that we allow the DMA controller driver
to load, in case we got probed before the DMA controller driver.
For all other failures (e.g. -ENODEV when the DMA controller is missing
in the device tree), fall back to PIO.


Kind regards,
Niklas