From: Praveen Talari <praveen.talari@oss.qualcomm.com>
To: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>,
Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>,
Andi Shyti <andi.shyti@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org,
Praveen Talari <praveen.talari@oss.qualcomm.com>,
Naresh Maramaina <naresh.maramaina@oss.qualcomm.com>
Subject: [PATCH v2 0/3] i2c: qcom-geni: improve transfer error recovery and synchronization
Date: Thu, 09 Jul 2026 09:50:39 +0530 [thread overview]
Message-ID: <20260709-fix_cancel_sequence_on_failure_for_i2c-v2-0-1db178c695bb@oss.qualcomm.com> (raw)
The GENI I2C driver has few issues in its transfer recovery
and completion handling paths.
The timeout recovery flow directly aborts outstanding commands, while
GENI hardware requires command cancellation to be attempted before
issuing an abort. In addition, multiple operations share a common
completion object, which can allow unrelated events to wake waiters
prematurely and lead to incorrect synchronization.
The M_GP_IRQ_1 interrupt fires for both address-phase and data-phase
NACKs, but the driver treated them identically, triggering unnecessary
cancellation and reset operations even though the address-phase NACK
has already terminated the transfer without arming the DMA engine.
For an address NACK, the hardware requires no recovery since the DMA
engine was never armed. For a data NACK on a write transfer, the DMA
engine was active and the normal cancel and FSM reset path must run.
Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
---
Changes in v2:
- Fix typo: "signalled" -> "signaled" in patch 1 commit message
- Replace "shared" with "common completion event for transfer, abort
and DMA reset" in patch 2 commit message
- Fix "has a few issues" -> "has few issues" in cover letter
- Fix "cancel and reset operations" -> "cancellation and reset
operations" in cover letter
- Add geni_i2c_check_addr_data_nack() to correctly gate DMA FSM
reset and cancel per NACK type
- Link to v1: https://patch.msgid.link/20260708-fix_cancel_sequence_on_failure_for_i2c-v1-0-dd8f841f36a2@oss.qualcomm.com
---
Praveen Talari (3):
i2c: qcom-geni: use cancel command before abort on transfer timeout
i2c: qcom-geni: use dedicated completions for abort and reset events
i2c: qcom-geni: distinguish address-phase and data-phase NACK
drivers/i2c/busses/i2c-qcom-geni.c | 113 ++++++++++++++++++++++++-------------
1 file changed, 75 insertions(+), 38 deletions(-)
---
base-commit: 173f2099661309fd2a52fe94e6bcbbaf0d323dea
change-id: 20260703-fix_cancel_sequence_on_failure_for_i2c-a868571f77e0
Best regards,
--
Praveen Talari <praveen.talari@oss.qualcomm.com>
next reply other threads:[~2026-07-09 4:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 4:20 Praveen Talari [this message]
2026-07-09 4:20 ` [PATCH v2 1/3] i2c: qcom-geni: use cancel command before abort on transfer timeout Praveen Talari
2026-07-09 4:20 ` [PATCH v2 2/3] i2c: qcom-geni: use dedicated completions for abort and reset events Praveen Talari
2026-07-10 6:28 ` Mukesh Savaliya
2026-07-09 4:20 ` [PATCH v2 3/3] i2c: qcom-geni: distinguish address-phase and data-phase NACK Praveen Talari
2026-07-10 11:36 ` Mukesh Savaliya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260709-fix_cancel_sequence_on_failure_for_i2c-v2-0-1db178c695bb@oss.qualcomm.com \
--to=praveen.talari@oss.qualcomm.com \
--cc=andi.shyti@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mukesh.savaliya@oss.qualcomm.com \
--cc=naresh.maramaina@oss.qualcomm.com \
--cc=viken.dadhaniya@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®