aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorFrank Li <Frank.Li@nxp.com>2025-04-29 01:42:34 -0400
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2025-05-15 11:56:09 +0200
commit12cbd157344848b1bd726ecadce27532d79b785a (patch)
treea7aa31522fd72bcc41c3c966800d6ce7a9f5cc94
parenti3c: master: svc: Emit STOP asap in the IBI transaction (diff)
downloadwireguard-linux-12cbd157344848b1bd726ecadce27532d79b785a.tar.xz
wireguard-linux-12cbd157344848b1bd726ecadce27532d79b785a.zip
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 <Frank.Li@nxp.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20250429054234.4013929-1-Frank.Li@nxp.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r--drivers/i3c/master/svc-i3c-master.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index 9b23239ad8db..279268a180e1 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -1277,9 +1277,9 @@ static int svc_i3c_master_write(struct svc_i3c_master *master,
static int svc_i3c_master_xfer(struct svc_i3c_master *master,
bool rnw, unsigned int xfer_type, u8 addr,
u8 *in, const u8 *out, unsigned int xfer_len,
- unsigned int *actual_len, bool continued)
+ unsigned int *actual_len, bool continued, bool repeat_start)
{
- int retry = 2;
+ int retry = repeat_start ? 1 : 2;
u32 reg;
int ret;
@@ -1464,7 +1464,7 @@ static void svc_i3c_master_start_xfer_locked(struct svc_i3c_master *master)
ret = svc_i3c_master_xfer(master, cmd->rnw, xfer->type,
cmd->addr, cmd->in, cmd->out,
cmd->len, &cmd->actual_len,
- cmd->continued);
+ cmd->continued, i > 0);
/* cmd->xfer is NULL if I2C or CCC transfer */
if (cmd->xfer)
cmd->xfer->actual_len = cmd->actual_len;