Re: [PATCH v16 4/7] spi: pxa2xx: lock out runtime autosuspend for Intel LPSS SPI in PIO mode
Andy Shevchenko <[email protected]> Mon, 20 Jul 2026 22:55:26 +0300
| Newsgroups | org.kernel.vger.linux-spi,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel |
|---|---|
| Organization | Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo |
| Message-ID | <[email protected]> |
On Tue, Jul 21, 2026 at 12:21:13AM +0800, Shih-Yuan Lee wrote: > When operating in PIO mode on Intel LPSS SPI controllers, runtime PM > autosuspend clock-gates the hardware block when idle. On subsequent > transfers, MMIO accesses to trigger resume are performed before the runtime > PM state machine can wake the controller, causing PCIe Completion Timeouts. > This issue does not affect DMA mode, where the DMA engine holds the required > resources, nor does it affect non-LPSS controllers. > > Lock out runtime PM autosuspend for LPSS SPI controllers specifically > when operating in PIO mode. > > Acquire a runtime PM reference via pm_runtime_get_noresume() in > pxa2xx_spi_probe() after registration, and release it via > pm_runtime_put_noidle() in pxa2xx_spi_remove() before hardware teardown to > ensure the runtime PM reference held in probe is released without invoking > runtime_suspend on already-unclocked hardware. .runtime_suspend() // this is how we refer to the callbacks. ... > + /* Release the PM reference held in probe for LPSS PIO mode before > + * hardware teardown so the PM core does not invoke runtime_suspend > + * on already-unclocked hardware. > + */ /* * Keep the comment style as per SPI and many other subsystems * and as in this example. */ -- With Best Regards, Andy Shevchenko