[PATCH] mtd: spi-nor: Unprepare legacy controllers upon RWW wait interruption

Miquel Raynal miquel.raynal at bootlin.com
Wed Aug 12 03:02:17 PDT 2026


On 12/08/2026 at 12:52:48 +03, Tudor Ambarus <tudor.ambarus at linaro.org> wrote:

> On 8/11/26 6:56 PM, Miquel Raynal wrote:
>> All the parallel locking helpers (spi_nor_prep_and_lock(),
>> spi_nor_prep_and_lock_pe() and spi_nor_prep_and_lock_rd()) call
>> spi_nor_prep() then wait with a killable sleep. If the sleep gets
>> killed, we leave the controller in its prepared state.
>> 
>> Call ->unprepare() in these cases.
>
>
> We don't even care about SPI NOR controllers. I stopped adding/accepting
> new support for them few years ago, so that we encourage people to update
> the drivers to use SPI MEM.

Yeah, totally agreed.

> The alternative is to drop prep unprep entirely.

That's indeed what we aim for, but in order to "fix" that report, the
current solution is to call ->unprepare(). Hopefully we can remove them
at some point.

>
> Anyway, all good, regardless the path chosen:
>
> Acked-by: Tudor Ambarus <tudor.ambarus at linaro.org>

Thanks,
Miquèl



More information about the linux-mtd mailing list