[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251205-abstract-acrid-markhor-f49e81-mkl@pengutronix.de>
Date: Fri, 5 Dec 2025 21:36:02 +0100
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Clark Wang <xiaoning.wang@....com>
Cc: Dhruva Gole <d-gole@...com>, "broonie@...nel.org" <broonie@...nel.org>,
"linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
kernel@...gutronix.de
Subject: Re: RE: [PATCH] spi: lpspi: disable lpspi module irq in DMA mode
On 05.05.2023 09:40:43, Clark Wang wrote:
> > > if (ret < 0)
> > > dev_err(&pdev->dev, "dma setup error %d, use pio\n", ret);
> > > + else
> > > + /*
> > > + * disable LPSPI module IRQ when enable DMA mode successfully,
> > > + * to prevent the unexpected LPSPI module IRQ events.
> > > + */
> > > + disable_irq(irq);
> >
> > Just wondering, have you actually seen any unexpected LPSPI module IRQ
> > events? If this was causing issues earlier then maybe add a fixes tag?
>
> Yes, I have observed this issue.
>
> The reason for this problem is that some older platforms
Can you elaborate which platforms are affected by this issue?
> are designed to combine LPSPI interrupt and LPSPI DMA channel
> interrupt into one shared interrupt number because the IRQ interrupt
> number is not enough.
You say that on these platforms the LPSPI interrupt and the LPSPI DMA
interrupt are combined into the same IRQ number, right?
How does the DMA work at all, if you disabled the shared IRQ number?
I'm asking because this breaks 24 bit per word mode, where DMA is not
used, so the driver falls back to PIO. And PIO doesn't work, as IRQs are
disabled.
> When the problem occurs, we can observe that if the interrupt comes
> too many times and too quickly, it will trigger the IRQ in the LPSPI
> driver while DMA is still processing the previous DMA request(through
> the shared dma channel interrupt), resulting in data messing.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists