Re: DWC eDMA weirdness

Niklas Cassel <[email protected]> Thu, 30 Jul 2026 17:31:33 +0200
Newsgroups org.kernel.vger.linux-pci
Message-ID <[email protected]>
On 30 July 2026 17:17:48 CEST, Koichiro Den <[email protected]> wrote:
>On Thu, Jul 30, 2026 at 12:43:20PM +0200, Niklas Cassel wrote:
>> On Thu, Jul 30, 2026 at 05:39:46PM +0900, Koichiro Den wrote:
>> > 
>> > I was struggling to reproduce this, but I think I figured out what triggers it.
>> > It happens when the 'dma' variant runs before DOORBELL_TEST, e.g. when running
>> > the full test suite with no arguments, or by running '-v dma' first.
>> > 
>> > I think the following patch fixes it:
>> > 
>> > diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c
>> > index 89a4c498a17b..ec097c68cf5f 100644
>> > --- a/drivers/dma/dw-edma/dw-edma-core.c
>> > +++ b/drivers/dma/dw-edma/dw-edma-core.c
>> > @@ -755,6 +755,7 @@ static int dw_edma_emul_irq_alloc(struct dw_edma *dw)
>> >                 return virq;
>> > 
>> >         irq_set_chip_and_handler(virq, &dw_edma_emul_irqchip, handle_level_irq);
>> > +       irq_set_status_flags(virq, IRQ_LEVEL);
>> >         irq_set_chip_data(virq, dw);
>> >         irq_set_noprobe(virq);
>> > 
>> > Could you test this?
>> 
>> That appears to fix my problem.
>
>Thanks for confirming. I'll send a fix for this. Sorry for the trouble.
>

Hello Koichiro,


I am just happy that we found this :)

Bad things can happen when IRQs are incorrectly marked as egde instead of level, and vice versa.

Hopefully your existing work on improving the eDMA driver will be more stable as a result.


Kind regards,
Niklas