From mboxrd@z Thu Jan 1 00:00:00 1970 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 6A59C38886F for ; Thu, 13 Aug 2026 05:15:51 +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=1786598164; cv=none; b=tx3Bf2CXHW5ltVpENXAjfLP3cUTNe9ejfuqRm3E5ecFOhHK/3POUBpBSfWLSw756A7dtub5AuO/KH7xf0Cvo2Dpx7LU9FfUbdDkx33i1uvZIKT0H6NGh2iP41q76rkCcfC9Sl0p/JjZthJJsJWIwHkaEwm/SFlQd3bJRh4v1p7I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786598164; c=relaxed/simple; bh=1rYvLlxhldVOJDbPXgSvz1QME9ESVHRc7B5fAm2O3ZE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=deMV0VQUctToUYdlPZmBFdaAwGcereNDcS6MRyYJ6QQiITNh32IR+cAp+/OWPV3g1USja6Q/qMAC5QMVG1SaMqWktXJ3U/DiG+c5bKOhpwSKZcSbd2eCGPyts99bIM9LexkiIToZ89xkRy0+vUDPN+pgFvULaoAZZI6TrBR4Olk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=h+zpEqvV; 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="h+zpEqvV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A1C61F000E9; Thu, 13 Aug 2026 05:15:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786598148; bh=WKuvTnxNoz0vSgFictYA5xVedVGpl4eFCS3zf+hHlCg=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=h+zpEqvVEqES2fAcvIQe5fa2Xkt8z/G0H2kCSMdLYQahVfkQxaKm/oHFV4FqP8sbR VKHgYw43QdKAH/+TycoCdPjrIdfCqH9aAkJ0BV+n5LEciN2PG6Kope9A3j3vMR9ZlX yle678XrFfinkKvQ3Sw6+YS7jyOfbHudIm/c/sbypiU9mcguSVdW13ZaN1GJCtK34O c57sutHMUpl0cnLuuKG9LLd6a+xY5uSjRLY/XmAeds3MGspJuXCemkqn/UtC7v5feh mpc2PTxLe8/lffNj2cRwQXjk+P/Fzqg2ccBKdmsD++L9aMX7iLJwiAxc1B//6LEqQX IWiVNFyBsfuGg== Date: Thu, 13 Aug 2026 12:56:09 +0800 From: Jisheng Zhang To: Frank Li Cc: Alexandre Belloni , Frank Li , linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] i3c: dw: reduce do_daa time if there's no client Message-ID: References: <20260803140307.12665-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Wed, Aug 05, 2026 at 04:05:35PM -0400, Frank Li wrote: > 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 > > --- > > 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? sorry, typo, s/6/4 For example if the maxdev == 4, when there's no i3c device connected, the max cmd->rx_len = 0 after timeout, then newdevs = 0xf, then go through the i3c_master_add_i3c_dev_locked(), each take ~1s, so adds up to 4s > > And if do_daa find 3 devices, then timeout, you skip register found 3 > devices. It's the addr assign cmd timeout, so if 3 devices respond, the addr assign cmd won't timeout. > > Frank > > > + } > > > > newdevs = GENMASK(master->maxdevs - cmd->rx_len - 1, 0); > > newdevs &= ~olddevs; > > -- > > 2.53.0 > >