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 B1213CD98DB for ; Fri, 12 Jun 2026 08:01:36 +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=pEsi1maIUKOy/A49JLAxAFS8WA6GMfWZmHbUiBO8Ijc=; b=ACqrsCNkx/SEOR 4Ory3Q+4cUMP/3CLWOlTPLdIocXKOlFf7UcCu5kVLXWUNofbF1JKJiID/L3H9Voi8aYDXwCeefNoA uzyeHoAeC6YQ6J0JuYx9kUJ4WNP0QhDR9ZkLT3qzc0tdMDjbgsk71GvDhmwB/XmYFrCNiM7NXbOFV DO9B5uMAkzM3fz212+lCyCLhbGVfOmqv302FeMeGBG5VOgADAzs4YEN4gP6JUW7FCunrLXpFZpoe2 dHPXtIRFj+bILobMAYrz3UllW9+X3qECgSxYDlb7JLCoroQrXA9MJcSs5jWnH8hVuPp6/jWZsbzKy nLKe8NmCyP5NGg/rRVKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wXwpc-0000000AXCg-1tEQ; Fri, 12 Jun 2026 08:01:36 +0000 Received: from mgamail.intel.com ([192.198.163.15]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wXwpa-0000000AX8b-0oRT for linux-i3c@lists.infradead.org; Fri, 12 Jun 2026 08:01:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1781251294; x=1812787294; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=k84rv3Xnyg4D/Yols7ebbAZiUKu8nCcY2V+K2fYDOwI=; b=MfB7JAELlUo/Ys42180FZQCbvAI1MrPUX7qfos9zkIviSZN5HQZBXtED ruCPOWnPAmT9WTgTPaRqjRm/C2TJwRrVfH6E4v/oqMNQMnn81qrLJ6+Zv Pdwqbm560CPk/w2Xe7gy7xaGdoqNNFfAxWJ6xOeOOU8mLeIbWeHpwivDV rifbJYVLrfZPeZeCIYA+mNrmhV0Kwo6ncuWVBhCO4evDloB93dKtwupgt GRVW3zwYze43JMVbS49NsLAdVSNhZ6kYe/vlOJL9oUdjzzUWQj1AvtnTe 8/1xp5XRHbFAd/pBo8E0fivf6Z1QIuUYcWZJ6VsPieICKhSz+l4rXqS2z g==; X-CSE-ConnectionGUID: /ajebKCIQUmsslnn4P62FQ== X-CSE-MsgGUID: 0IY4b/qFRe2cKx+bfYusUg== X-IronPort-AV: E=McAfee;i="6800,10657,11813"; a="82186749" X-IronPort-AV: E=Sophos;i="6.24,200,1774335600"; d="scan'208";a="82186749" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2026 01:01:26 -0700 X-CSE-ConnectionGUID: pJgDCCnfS3ScllKPkgAsMg== X-CSE-MsgGUID: DcvOtPMWTASL/PVIslygOg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,200,1774335600"; d="scan'208";a="246630360" Received: from vpanait-mobl.ger.corp.intel.com (HELO ahunter6-desk) ([10.245.245.41]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2026 01:01:24 -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 V4 4/7] i3c: mipi-i3c-hci: Tolerate i3c_master_add_i3c_dev_locked() failures in DAA Date: Fri, 12 Jun 2026 11:01:04 +0300 Message-ID: <20260612080107.11606-5-adrian.hunter@intel.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260612080107.11606-1-adrian.hunter@intel.com> References: <20260612080107.11606-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-20260612_010134_287359_FFAEDFC1 X-CRM114-Status: GOOD ( 10.33 ) 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 Reviewed-by: Frank Li --- Changes in V4: None Changes in V3: Add Frank's Rev'd-by Changes in V2: None 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 164EE367F48 for ; Fri, 12 Jun 2026 08:01:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781251300; cv=none; b=mcHL3Q+Td4SRgcebT++HbGDwrKmHFX58irZgi2dyXjTLoRJ8dwPeVNdr2kstHV2UolRlZ4kN2UWAPLxOhPpUL1V0a4mx8czVdPtMzqcwtt9CLI4DrRf7DuYUnSVvy/P6nLdegxWmkUZwgV2y/qIeL9fxL7TPkcgcOn6+vUGUHR4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781251300; c=relaxed/simple; bh=k84rv3Xnyg4D/Yols7ebbAZiUKu8nCcY2V+K2fYDOwI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gtTP9ez1PIB0uOZhmumus5bPU8E6xoN73XU6qAK3HH2AuieIJ6iZtMvlfVfMrZ+Y4VVuNt0uLd7NleFxSK8KkvZKIcR0mByaRPCahkERiZPBwJ12wPExRgfoEsUDwxZ06d777scqEAp9MyLr7yd99MX/GtCqBWxp6BwYgU9UT+A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Vt0DfvAz; arc=none smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Vt0DfvAz" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1781251297; x=1812787297; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=k84rv3Xnyg4D/Yols7ebbAZiUKu8nCcY2V+K2fYDOwI=; b=Vt0DfvAzdA7UDeu/IGibyOfJcDrgaMH2IYGxBN2J+OFBmjtxwE7AA3dL wOgB4aG1006LZrjUojj2+RG00qUut+WxVFIaExMrznYJ45G5b4ZmetLKR t2ws3RLGfjeWLHJIksg9qLncRPfMjFwl0Sv49KnDNyKj+YXR/UQZ2BXIE gwktemJQTQczZ3fcgquvO80ujt898Q9ba2gjUFxhDbwp5i60TYc6TkEBe BxuPc4JCy8BAOIEuuPeUWpJ6g6IbU3UaYtyi5KIzMSIJd/3QO0xtQyMCb 2MavotGmBknOHQft5Sqrh63HuB856tvWa6f8auU8w5vlg/laQMU5mUMc0 Q==; X-CSE-ConnectionGUID: zfFBIjTLT4KE5xZxLp16RA== X-CSE-MsgGUID: QI7s4apKSMetppPaD06ifg== X-IronPort-AV: E=McAfee;i="6800,10657,11813"; a="82186747" X-IronPort-AV: E=Sophos;i="6.24,200,1774335600"; d="scan'208";a="82186747" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2026 01:01:26 -0700 X-CSE-ConnectionGUID: pJgDCCnfS3ScllKPkgAsMg== X-CSE-MsgGUID: DcvOtPMWTASL/PVIslygOg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,200,1774335600"; d="scan'208";a="246630360" Received: from vpanait-mobl.ger.corp.intel.com (HELO ahunter6-desk) ([10.245.245.41]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2026 01:01:24 -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 V4 4/7] i3c: mipi-i3c-hci: Tolerate i3c_master_add_i3c_dev_locked() failures in DAA Date: Fri, 12 Jun 2026 11:01:04 +0300 Message-ID: <20260612080107.11606-5-adrian.hunter@intel.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260612080107.11606-1-adrian.hunter@intel.com> References: <20260612080107.11606-1-adrian.hunter@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Frank Li --- Changes in V4: None Changes in V3: Add Frank's Rev'd-by Changes in V2: None 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