Re: [PATCH 0/4] dmaengine: dw-edma: Fix probe paths and register races
From: Koichiro Den
Date: Mon May 25 2026 - 02:05:22 EST
On Thu, May 21, 2026 at 11:21:49PM +0900, Koichiro Den wrote:
> Hi,
>
> This series fixes pre-existing dw-edma issues flagged by Sashiko in:
> https://lore.kernel.org/dmaengine/20260521063115.2842238-1-den@xxxxxxxxxxxxx/
>
> Note: Patch 4 was based on a patch Frank posted in January:
> https://lore.kernel.org/dmaengine/20260109-edma_ll-v2-1-5c0b27b2c664@xxxxxxx/
> Since it has not been merged, I included it here. Frank, please let me
> know if you prefer a different handling.
>
> Best regards,
> Koichiro
>
>
> Frank Li (1):
> dmaengine: dw-edma: Add spinlock to protect DONE_INT_MASK and
> ABORT_INT_MASK
>
> Koichiro Den (3):
> dmaengine: dw-edma-pcie: Free IRQ vectors on probe failures
> dmaengine: dw-edma-pcie: Reject devices without driver data
> dmaengine: dw-edma: Initialize IRQ data before requesting IRQs
Frank, thank you for reviewing.
Mani, Vinod, if there are no objections, could you please consider applying only
patches 2 and 4 from this series?
- Patch 1 should be dropped. As Frank pointed out, pcim_enable_device() already
manages IRQ vectors (i.e. sort of false-positive from Sashiko).
- Patch 2 still looks valid to me. After dropping patch 1, the new issue
reported by Sashiko no longer applies, and I think the remaining concern is a
false positive.
- Patch 3 should be dropped. I rechecked the initialization path and I no longer
think this patch is needed. See:
https://lore.kernel.org/dmaengine/kjslqii4bs3g4pi22mxh72hxnlm7nkesdd3va6zi5fhmjamerw@j7lbrlq5oszd/
- Patch 4 still looks valid to me as an independent fix. Sashiko's feedback
against patch 4 also revealed a broader in-use unbind issue, but Frank's
original path fixes a real race issue on its own. I am not sure whether we
should add in-use unbind support right now. See:
https://lore.kernel.org/dmaengine/ne76elxedfnngi7dilpyvpzwm7tghyj6kpg4ninwxecxsajkkx@zkarppyurl2s/
Best regards,
Koichiro
>
> drivers/dma/dw-edma/dw-edma-core.c | 3 +-
> drivers/dma/dw-edma/dw-edma-core.h | 2 +-
> drivers/dma/dw-edma/dw-edma-pcie.c | 42 +++++++++++++++++++--------
> drivers/dma/dw-edma/dw-edma-v0-core.c | 6 ++++
> 4 files changed, 39 insertions(+), 14 deletions(-)
>
> --
> 2.51.0
>
>