From nobody Tue Aug 25 15:22:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85BE214ABE for ; Wed, 19 Aug 2026 05:08:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787116094; cv=none; b=Eg/IbNvXGUWUDxztsBrR5LbwBZc42mhfrQtXRwV4V4dH9EKQ2pL1igL0yw2IxfDiYezPbkrM/lLLoO+fn66B1yVGa5khgzJk8OqnZL+TsO40fa5m9lyHlVm7Ny29eBK7M1y97Hx1dc+piGlxE9GFR07wqv69C0UE8owQQIv9llE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787116094; c=relaxed/simple; bh=aJ2lZhyY7luhgltC9MD+fl7l/L0xBhMxTPtgDA9wWKc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Laq3kYzwCIxzS6iHESlXu56Ur6K7hAIBDBJjK6ziT+m+xhjtdM6YHfvq/Ppna4+cfw7jMD6qU6n3XBK3OIndU/LEtDQXzBx6MJJcAM7epmD0DWoJZIbdlv7Rf+w9EQzd6ajtBD8Pp0oaTjH+v7KK5P6UqJNLgYV74xMD9ZLiuJQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H4VOgsCP; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H4VOgsCP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B727F1F000E9; Wed, 19 Aug 2026 05:08:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787116093; bh=g7C0zv5x+jXfrhhnP6wqNhC3Gt8L1uXqmJbvBhKnPtI=; h=From:To:Cc:Subject:Date; b=H4VOgsCPuOJHj2g2SxzRTwzcjs45/8WfeenarELcdb9GSSXdNC2IqVgXhkzwFGqge kZpvuGa/hwUIAyyFdfj/rPwsCtZPMgIjDMTlKtQUQuES5z8RMxD3XvbmQ3e+bKcGML bkHXHW0qr4QJW0zcbqMxK8soXrME/76ybykEllK5I8FJsgRAWtPSGPnQkr24sGACPy xMwWeqkd9HC4hIusBeYcZFHCYVamIbMNbtnW1Qzpmo2yolK1y5CDgs5QA4qMyrU68Q EPUir1jjcUi6x7qMAF7jQWxGv7UNCQqTfGm2DtMrjOpDFwRlqgJS1CAI/GMyNnI9/v dFy9WOW60mFQw== From: Jisheng Zhang To: Alexandre Belloni , Frank Li Cc: linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3] i3c: dw: reduce do_daa time if there's no client Date: Wed, 19 Aug 2026 12:48:33 +0800 Message-ID: <20260819044833.32611-1-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" dw_i3c_master_daa() derives the number of newly assigned dynamic addresses from cmd->rx_len, the ISR sets it to the number of address slots ENTDAA left unassigned. It starts out as zero, which already means "every address was assigned", so a timed out transfer leaves that value in place and it gets used as a result. If there's no client connected, the addr assign cmd times out, then the driver calls i3c_master_add_i3c_dev_locked() to add devices that are not there, each costing about 1s, thus adds non necessary boot time up to (maxdev * 1)s. Start from maxdevs instead: no address is assigned before ENTDAA runs, and the existing rx_count >=3D maxdevs check then reports an empty bus. Signed-off-by: Jisheng Zhang Reviewed-by: Frank Li --- since v2: - rebase on the lastest i3c/next - collect Reviewed-by tag since v1: - use another method to remove the non-necessary calling of i3c_master_add_i3c_dev_locked() if there's no client - update commit msg drivers/i3c/master/dw-i3c-master.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c= -master.c index 0a3799a4ce87..4563d8761ba0 100644 --- a/drivers/i3c/master/dw-i3c-master.c +++ b/drivers/i3c/master/dw-i3c-master.c @@ -921,6 +921,7 @@ static int dw_i3c_master_daa(struct i3c_master_controll= er *m) goto rpm_out; } cmd =3D &xfer->cmds[0]; + cmd->rx_len =3D master->maxdevs; cmd->cmd_hi =3D COMMAND_PORT_TRANSFER_ARG; cmd->cmd_lo =3D COMMAND_PORT_DEV_COUNT(master->maxdevs - pos) | COMMAND_PORT_DEV_INDEX(pos) | --=20 2.51.0