lkml.org 
[lkml]   [2026]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/3] i2c: qcom-geni: use dedicated completions for abort and reset events
From


On 7/8/2026 11:45 AM, Praveen Talari wrote:
> The driver uses the shared gi2c->done completion for transfer, abort,
shared => common completion event for transfer, abort and DMA reset
> and DMA reset operations. This allows unrelated completion events to
> prematurely wake abort and reset waiters, leading to incorrect
> synchronization.
Aren't they in sequence i.e. one after another ?
>
> Introduce dedicated completions for abort, TX reset, and RX reset
> operations, and signal them only from their respective interrupt
> events. This removes the dependency on shared completion state and
> eliminates the abort_done flag-based synchronization.
>
> Co-developed-by: Naresh Maramaina <naresh.maramaina@oss.qualcomm.com>
> Signed-off-by: Naresh Maramaina <naresh.maramaina@oss.qualcomm.com>
> Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
> ---
> drivers/i2c/busses/i2c-qcom-geni.c | 54 +++++++++++++++++++-------------------
> 1 file changed, 27 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
> index 15403edb355a..9490aee4928c 100644
> --- a/drivers/i2c/busses/i2c-qcom-geni.c
> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
> @@ -113,7 +113,10 @@ struct geni_i2c_dev {
> int err;
> struct i2c_adapter adap;
> struct completion done;
> + struct completion abort_done;
> struct completion cancel_done;
> + struct completion tx_reset_done;
> + struct completion rx_reset_done;
tx or rx, any one would be running. Not both right ?
if so, i suggest to keep common dma_reset_done.
> struct i2c_msg *cur;
> int cur_wr;
> int cur_rd;
> @@ -127,7 +130,6 @@ struct geni_i2c_dev {
[..]


\
 
 \ /
  Last update: 2026-07-08 09:40    [W:0.077 / U:37.682 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog