From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1A4ADCD4F54 for ; Wed, 27 May 2026 11:28:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=o1yJ5ELjhuohrHx0VpTM2WaFOXV1gRHyF2cKfA3vKrs=; b=I0jAridReoRGMy pfURBSsyRJVuKfUjz1zM5+GXJnswVJBzngSrtfc5ENqeMiUH9RH13Flc+SGwxuNK4s/Lo+q4OmOv6 zr7ZmD38A0Qc1t7ZI1O9x4IFhNN1iejpEN7jvJEIqgObDiTrGq2Mu9+a5wUAghdISTCEOxX1dE1d4 fXaWazRHE8Rfr0ZD38nZYH75y6c1SJYzCsvFTkw08j4tgn5/+nnczkPgphceVJRhOEqF6n83pdpqW q9aayLnUynFsB+kVFXz7CEh0Xh0e2eOHRS/YUPIAZjPqZjRgvYfXG6gxYuYLSdArEbqN+Fv5OGrRL h2R3o886LHY0S5UZtiYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wSCQu-000000040B6-03h5; Wed, 27 May 2026 11:28:20 +0000 Received: from mgamail.intel.com ([198.175.65.9]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wSCQr-0000000407g-1j4A for linux-i3c@lists.infradead.org; Wed, 27 May 2026 11:28:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1779881297; x=1811417297; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=D+sNiNu3mk4ysboxx0F4qpoHM50NqDvDv7x3LmoHKsY=; b=MsVv3H4zq1PpPxX+HjrUzrvMz1A2bAq4+DtnwkZnRLZ9UoDeETn9V8g0 D0AD4npGwXe3ZTbAt8wh9s3NKvMqhTqV4DQI9E1UphxQNdQK5Ax2NyLuc /BSP9g8b1kE0shsZ1CCnw+gpT4syJ5QZxOIvcuBE8b1VjdS6X9fnDI8vw JfJvGKLz8FUweOWmTmJk4w1IOvnlle7EFI9NSBEByd4qnA08kFsQe5i9R baTZFYEMRWhs389E7eX2ffaAt7O/BBfRb6HIkI6LuC/ozfDJAmajKnp0c LPlZ2iTdHOpblltH4oMsmvKTCijEIHPrs/f4ePzFdjGbB6M/VJfbdwN7d Q==; X-CSE-ConnectionGUID: /oyfutZETFK0ej9fAZ6qRA== X-CSE-MsgGUID: U4hCdAdMQ1WBwcF2uOX90w== X-IronPort-AV: E=McAfee;i="6800,10657,11798"; a="103381722" X-IronPort-AV: E=Sophos;i="6.24,171,1774335600"; d="scan'208";a="103381722" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2026 04:28:17 -0700 X-CSE-ConnectionGUID: AeHr2tGzTtqhR6eEJu0n4A== X-CSE-MsgGUID: 4yqdNaoISkqSQBNAmlDfAQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,171,1774335600"; d="scan'208";a="246238634" Received: from smoticic-mobl1.ger.corp.intel.com (HELO ahunter6-desk) ([10.245.244.228]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2026 04:28:16 -0700 From: Adrian Hunter To: alexandre.belloni@bootlin.com Cc: Frank.Li@nxp.com, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] i3c: mipi-i3c-hci: Tolerate i3c_master_add_i3c_dev_locked() failures in DAA Date: Wed, 27 May 2026 14:27:55 +0300 Message-ID: <20260527112758.38530-5-adrian.hunter@intel.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260527112758.38530-1-adrian.hunter@intel.com> References: <20260527112758.38530-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260527_042817_519834_060B4D62 X-CRM114-Status: GOOD ( 10.42 ) X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org i3c_master_add_i3c_dev_locked() no longer leaves the address marked as free on failure, so aborting the DAA sequence on its error is unnecessary. Failure to register a discovered device does not invalidate the entire Dynamic Address Assignment (DAA) procedure. Align with the behavior of other I3C master drivers by ignoring errors from i3c_master_add_i3c_dev_locked() and continuing enumeration. Signed-off-by: Adrian Hunter --- drivers/i3c/master/mipi-i3c-hci/cmd_v1.c | 4 +--- drivers/i3c/master/mipi-i3c-hci/cmd_v2.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/i3c/master/mipi-i3c-hci/cmd_v1.c b/drivers/i3c/master/mipi-i3c-hci/cmd_v1.c index 75d452d7f6af..3b9345718d27 100644 --- a/drivers/i3c/master/mipi-i3c-hci/cmd_v1.c +++ b/drivers/i3c/master/mipi-i3c-hci/cmd_v1.c @@ -358,9 +358,7 @@ static int hci_cmd_v1_daa(struct i3c_hci *hci) * TODO: Extend the subsystem layer to allow for registering * new device and provide BCR/DCR/PID at the same time. */ - ret = i3c_master_add_i3c_dev_locked(&hci->master, next_addr); - if (ret) - break; + i3c_master_add_i3c_dev_locked(&hci->master, next_addr); } if (dat_idx >= 0) diff --git a/drivers/i3c/master/mipi-i3c-hci/cmd_v2.c b/drivers/i3c/master/mipi-i3c-hci/cmd_v2.c index 39eec26a363c..8d93748e858d 100644 --- a/drivers/i3c/master/mipi-i3c-hci/cmd_v2.c +++ b/drivers/i3c/master/mipi-i3c-hci/cmd_v2.c @@ -296,9 +296,7 @@ static int hci_cmd_v2_daa(struct i3c_hci *hci) * TODO: Extend the subsystem layer to allow for registering * new device and provide BCR/DCR/PID at the same time. */ - ret = i3c_master_add_i3c_dev_locked(&hci->master, next_addr); - if (ret) - break; + i3c_master_add_i3c_dev_locked(&hci->master, next_addr); } hci_free_xfer(xfer, 2); -- 2.51.0 -- linux-i3c mailing list linux-i3c@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-i3c