From: Niklas Cassel <cassel@kernel.org>
To: Koichiro Den <den@valinux.co.jp>
Cc: linux-pci@vger.kernel.org,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>
Subject: Re: DWC eDMA weirdness
Date: Thu, 30 Jul 2026 12:43:20 +0200 [thread overview]
Message-ID: <amsqyOvAHU8uD2Wa@ryzen> (raw)
In-Reply-To: <egai6rd3umstjhkuelrnemr2ywjlfccfk4tipaxodav426wxex@kuu76gvznusa>
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.
We have had a ton of DWC problems related to IRQs.
IIRC, most DWC IRQs, e.g. the embedded MSI controller on the PCIe controller
itself, works using level triggered IRQs.
However, e.g. MSIs themselves are by definition edge triggered, so there is
a difference of how you mark the IRQ handler in the DWC driver, and how you
configure the IRQ domain that you configure to the MSI/IRQ kernel code:
https://patchew.org/linux/20250205151635.v2.1.Id60295bee6aacf44aa3664e702012cb4710529c3@changeid/
Since this is for an IRQ within the PCIe controller, I think this is correct.
We've also seen problems where we've been clearing the level IRQ too
late, see e.g.
ca1658921b63 ("PCI: designware: Fix missing MSI IRQs")
which caused us to miss IRQs when two MSIs came very close after one another.
Kind regards,
Niklas
next prev parent reply other threads:[~2026-07-30 10:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 20:28 [PATCH] misc: pci_endpoint_test: Add WARN_ON() to detect broken EPC drivers Niklas Cassel
2026-07-29 20:38 ` sashiko-bot
2026-07-30 12:02 ` Niklas Cassel
2026-07-30 12:15 ` Niklas Cassel
2026-07-29 20:49 ` DWC eDMA weirdness Niklas Cassel
2026-07-30 4:32 ` Manivannan Sadhasivam
2026-07-30 10:01 ` Niklas Cassel
2026-07-30 8:39 ` Koichiro Den
2026-07-30 10:43 ` Niklas Cassel [this message]
2026-07-30 15:17 ` Koichiro Den
2026-07-30 15:31 ` Niklas Cassel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=amsqyOvAHU8uD2Wa@ryzen \
--to=cassel@kernel.org \
--cc=bhelgaas@google.com \
--cc=den@valinux.co.jp \
--cc=kwilczynski@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mani@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox