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 6D45D30D40B for ; Mon, 3 Aug 2026 14:22:42 +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=1785766963; cv=none; b=G5wzoZrQJIubaOhi+aIqtLwkM/PqCKb/wZtKD32bRDUAK0wiXxOysbp3dUa1pemf7Mb2/tMuWpVihvP6aOKXBvci2iSjNycbanlzs7RhvbxnoUzoszsXEilHZJzEeEy/nj6thrVM83/9WErr0sbEp7LslbCnnD5EXsS1KYKqFbw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785766963; c=relaxed/simple; bh=T0DpiB7ujPh5fLtoHG3T5kZFb53ajK0eK/8T52NLleg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KFER8C9fdV2G5dlMzp8yR3Tbgr0DUgiy3VRIbZMvbLidSK++1y9aA5olve7T6pysYrQgzB3UmG/gPSON3LZgVN7bliu3/iUBWI1xKfLhurGbT+22n/8b754XC/tXQC4bKphHlAZnI80ptny+CpUisYdfujIsdHih5WYXIEuFI4M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=F8KvxNj+; 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="F8KvxNj+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BFD21F00A3A; Mon, 3 Aug 2026 14:22:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785766962; bh=pqY1kCT9TX+fI7i2pqzn2wIK+Qoo1xsDXopsMjOyRy4=; h=From:To:Cc:Subject:Date; b=F8KvxNj+9gcBoeuLgHcBNEOovAJ12JnZjW2SsVvQHx7uEDH8s2iuDHZz5dyk6z/ot B9zAesF23Qcv9mOU7YvKeJ8JcYQHWpa/4P2kk/nztx9/odmKCmvfFTLjoVouGlUZt/ 1OnLNkyERMSALElJMq6lyshHJUp+Blkyj83LMecnDDgAHmRcZVuh04s7opn1yFW4/S 4ASa7oOin4sGWUJdUqadkCJpr6N2w/mCo1Rq4lX+lnPHylbuKsINn0Rxb9VNm6BER9 AVpl23aPBaKveAVAdTop7F/hHjaIEYX0ieCyu+do+37arkEWj2NH8X8Ww5WgfSt9/1 xaBzWH8wpfytw== From: Jisheng Zhang To: Alexandre Belloni , Frank Li Cc: linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] i3c: dw: reduce do_daa time if there's no client Date: Mon, 3 Aug 2026 22:03:07 +0800 Message-ID: <20260803140307.12665-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: 8bit 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; + } newdevs = GENMASK(master->maxdevs - cmd->rx_len - 1, 0); newdevs &= ~olddevs; -- 2.53.0