re: [PATCH 3/3] mailbox: pcc: Fix command timeout due to missed interrupt

From: Adam Young

Date: Wed Jul 22 2026 - 23:16:37 EST



+ /*
+ * Set chan_in_use before ringing the doorbell so a fast completion
+ * interrupt is not mistaken for a shared interrupt from another
+ * subspace. Use WRITE_ONCE() for the lockless flag update. The
+ * ordered MMIO accessor used to ring the doorbell keeps this store
+ * visible before the platform is notified.
+ */
+ if (pchan->plat_irq > 0)
+ WRITE_ONCE(pchan->chan_in_use, true);
ret = pcc_chan_reg_read_modify_write(&pchan->db);
if (!ret && pchan->plat_irq > 0)
- pchan->chan_in_use = true;
+ WRITE_ONCE(pchan->chan_in_use, false);

return ret;
}
--
2.43.0
iAt the end of the above code,
WRITE_ONCE(pchan->chan_in_use, false);
should be
WRITE_ONCE(pchan->chan_in_use, true);

In order to keep the original semantics. The flag is cleared when the messages is ACKed, not here. This version causes a hang.