Re: [PATCH v3 3/3] i2c: qcom-geni: distinguish address-phase and data-phase NACK
Mukesh Savaliya <[email protected]>
| Newsgroups | org.kernel.vger.linux-i2c,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 7/16/2026 12:08 PM, Praveen Talari wrote: > The M_GP_IRQ_1 interrupt signals a NACK condition, but does not > distinguish whether it occurred during the address phase or the data > phase. The driver always attempted cancel and DMA FSM reset on any > NACK, which is incorrect for an address NACK since the DMA engine was > never armed and the hardware requires no recovery. > > Add geni_i2c_check_addr_data_nack() to distinguish the two cases by > reading SE_GENI_M_GP_LENGTH after the NACK event. A zero value means > the address phase was NACKed (ADDR_NACK) and no DMA recovery is needed. > A non-zero value on a write transfer means a data byte was NACKed > (DATA_NACK) and the normal cancel and DMA FSM reset path must run. > > Co-developed-by: Naresh Maramaina <[email protected]> > Signed-off-by: Naresh Maramaina <[email protected]> > Signed-off-by: Praveen Talari <[email protected]> > --- > drivers/i2c/busses/i2c-qcom-geni.c | 29 ++++++++++++++++++++--------- > 1 file changed, 20 insertions(+), 9 deletions(-) Reviewed-by: Mukesh Kumar Savaliya <[email protected]>