[PATCH] mtd: rawnand: tegra: drain the IRQ before disabling the clock
Miquel Raynal
miquel.raynal at bootlin.com
Thu Nov 26 10:01:45 PST 2026
On 08/11/2026 at 14:05:55 -07, James Hilliard <james.hilliard1 at gmail.com> wrote:
> The managed IRQ handler remains installed until devres cleanup, after
> removal or a late probe failure has suspended the controller and disabled
> its clock. The handler can still be accessing registers at that point:
> it signals the command and DMA completions before its final register
> accesses, so waiting for a NAND operation does not drain the IRQ handler.
>
> Mask controller interrupts and release the managed IRQ before dropping
> the runtime PM reference. Apply the same ordering when chip initialization
> fails after the IRQ has been requested.
Can we instead include power mangement in the devres logic? In general
when one need to manually devm_remove/freee/unregister(), it means there
is problem and the solution is incorrect.
More information about the linux-mtd
mailing list