Re: [PATCH] i3c: dw: reduce do_daa time if there's no client

Frank Li <[email protected]>
Newsgroups org.infradead.lists.linux-i3c,org.kernel.vger.linux-kernel
Message-ID <anOXjxCRfW4qfPaM@lizhi-Precision-Tower-5810>
On Mon, Aug 03, 2026 at 10:03:07PM +0800, Jisheng Zhang wrote:
> 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 <[email protected]>
> ---
>  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;

not sure why save 6s. timeout already happen, does register i3c device
takes 6s?

And if do_daa find 3 devices, then timeout, you skip register found 3
devices.

Frank

> +	}
>
>  	newdevs = GENMASK(master->maxdevs - cmd->rx_len - 1, 0);
>  	newdevs &= ~olddevs;
> --
> 2.53.0
>

-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.