The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] i3c: dw: reduce do_daa time if there's no client
@ 2026-08-03 14:03 Jisheng Zhang
  2026-08-05 20:05 ` Frank Li
  0 siblings, 1 reply; 2+ messages in thread
From: Jisheng Zhang @ 2026-08-03 14:03 UTC (permalink / raw)
  To: Alexandre Belloni, Frank Li; +Cc: linux-i3c, linux-kernel

If there's no client, wait for completion will timeout, then there's no
need to add i3c dev at all. This can save boot time by ~6s if there's
no client connected to the i3c interface.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/i3c/master/dw-i3c-master.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
index 0625587f1527..18ebf304029a 100644
--- a/drivers/i3c/master/dw-i3c-master.c
+++ b/drivers/i3c/master/dw-i3c-master.c
@@ -885,8 +885,10 @@ static int dw_i3c_master_daa(struct i3c_master_controller *m)
 		      COMMAND_PORT_ROC;
 
 	dw_i3c_master_enqueue_xfer(master, xfer);
-	if (!wait_for_completion_timeout(&xfer->comp, XFER_TIMEOUT))
+	if (!wait_for_completion_timeout(&xfer->comp, XFER_TIMEOUT)) {
 		dw_i3c_master_dequeue_xfer(master, xfer);
+		goto rpm_out;
+	}
 
 	newdevs = GENMASK(master->maxdevs - cmd->rx_len - 1, 0);
 	newdevs &= ~olddevs;
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-05 20:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03 14:03 [PATCH] i3c: dw: reduce do_daa time if there's no client Jisheng Zhang
2026-08-05 20:05 ` Frank Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox