Commit

195f3d74b5de98969dc4fad956393bb00787efd1

i2c: qcom-cci: Fix HALT_ACK reset request being dropped

A HALT_ACK interrupt indicates that the corresponding I2C master has
entered the halted state and must be reset before further operation.

The M0 and M1 HALT_ACK status bits may be asserted simultaneously in a
single interrupt. However, the interrupt handler currently overwrites
the reset mask when processing each HALT_ACK condition, causing the
first reset request to be lost if both events are reported together.

Accumulate reset requests instead of overwriting them so that both
masters are properly reset when M0 and M1 HALT_ACK events occur in the
same interrupt.

Fixes: e517526195de4 ("i2c: Add Qualcomm CCI I2C driver")
Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Cc: <stable@vger.kernel.org> # v5.8+
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://patch.msgid.link/20261012-cci-fixes-v1-1-8cd4eb1fc5f9@oss.qualcomm.com

Loic Poulain <loic.poulain@oss.qualcomm.com> · 2026-10-12 12:54 UTC · committed by Andi Shyti

Browse files
1 file changed, +2 −2
modified drivers/i2c/busses/i2c-qcom-cci.c
@@ -164,12 +164,12 @@ static irqreturn_t cci_isr(int irq, void *dev)
164 164 }
165 165
166 166 if (unlikely(val & CCI_IRQ_STATUS_0_I2C_M0_Q0Q1_HALT_ACK)) {
167 - reset = CCI_RESET_CMD_M0_MASK;
167 + reset |= CCI_RESET_CMD_M0_MASK;
168 168 ret = IRQ_HANDLED;
169 169 }
170 170
171 171 if (unlikely(val & CCI_IRQ_STATUS_0_I2C_M1_Q0Q1_HALT_ACK)) {
172 - reset = CCI_RESET_CMD_M1_MASK;
172 + reset |= CCI_RESET_CMD_M1_MASK;
173 173 ret = IRQ_HANDLED;
174 174 }
175 175