Re: [PATCH v16 4/7] spi: pxa2xx: lock out runtime autosuspend for Intel LPSS SPI in PIO mode
From: Shih-Yuan Lee (FourDollars)
Date: Sun Jul 26 2026 - 07:18:58 EST
On Tue, Jul 21, 2026 at 3:55 AM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxx> wrote:
>
> 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.
Hi Andy,
Thanks for the feedback.
>
> .runtime_suspend()
>
> // this is how we refer to the callbacks.
Updated the commit message to format PM callbacks as .runtime_suspend().
>
>
> ...
>
> > + /* 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.
> */
Updated the multi-line comment in pxa2xx_spi_remove() to adhere to the
standard Linux kernel multi-line comment style with an empty starting
line.
Thanks,
Shih-Yuan