Skip to content

Commit 12cbd15

Browse files
nxpfranklialexandrebelloni
authored andcommitted
i3c: master: svc: skip address resend on repeat START
According to the I3C specification, address arbitration only happens during the START. Repeated START do not initiate arbitration, and In-Band Interrupts (IBIs) cannot occur at this stage. Resending the address upon a NACK in a repeat START is therefore redundant and unnecessary. Avoid redundant retries, improving efficiency and ensuring protocol compliance. Signed-off-by: Frank Li <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 81f2a9a commit 12cbd15

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/i3c/master/svc-i3c-master.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,9 +1277,9 @@ static int svc_i3c_master_write(struct svc_i3c_master *master,
12771277
static int svc_i3c_master_xfer(struct svc_i3c_master *master,
12781278
bool rnw, unsigned int xfer_type, u8 addr,
12791279
u8 *in, const u8 *out, unsigned int xfer_len,
1280-
unsigned int *actual_len, bool continued)
1280+
unsigned int *actual_len, bool continued, bool repeat_start)
12811281
{
1282-
int retry = 2;
1282+
int retry = repeat_start ? 1 : 2;
12831283
u32 reg;
12841284
int ret;
12851285

@@ -1464,7 +1464,7 @@ static void svc_i3c_master_start_xfer_locked(struct svc_i3c_master *master)
14641464
ret = svc_i3c_master_xfer(master, cmd->rnw, xfer->type,
14651465
cmd->addr, cmd->in, cmd->out,
14661466
cmd->len, &cmd->actual_len,
1467-
cmd->continued);
1467+
cmd->continued, i > 0);
14681468
/* cmd->xfer is NULL if I2C or CCC transfer */
14691469
if (cmd->xfer)
14701470
cmd->xfer->actual_len = cmd->actual_len;

0 commit comments

Comments
 (0)