Re: [PATCH v2] ASoC: es9356: defer IRQ readiness until cache replay
From: Mark Brown
Date: Thu Oct 15 2026 - 07:36:34 EST
On Wed, Oct 14, 2026 at 11:23:34AM +0800, Pengpeng Hou wrote:
> For a SoundWire peripheral that remained attached, resume clears
> disable_irq before waiting for initialization and replaying the cache.
> That can permit deferred interrupt work before register restoration has
> succeeded.
> Move this attached-device IRQ readiness update after successful cache
> replay and protect it with disable_irq_lock. Preserve the entry-time
> unattach_request condition because sdw_slave_wait_for_init() clears it.
> The reattachment initialization path keeps its separate behavior.
> Return cache replay errors with cache-only mode restored and the cache
> marked dirty. Use explicit braces around the scoped guard so its internal
> control flow cannot bind an else from the surrounding condition.
You're shifting the disable_irq to after the register cache has been
restored which makes sense but I'm not seeing what ensures that any
interrupts that arrive before then are processed - for example one that
arrives while the cache is being replayed. I think scheduling the
interrupt handler should kick things but I didn't check carefully.
Attachment:
signature.asc
Description: PGP signature