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 A1277CD8CB2 for ; Wed, 10 Jun 2026 07:30:50 +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=suYJ5YUEeQtCP6i1WBkx/VqAhGuIVH7EcVZeiYtkFSg=; b=sVXc1S+HL9n/A1 FuB1wWGFtMiG9VN4SnoJBs9THmtw5T/bJbjRYUTHJn7OGxnZag5VkdhvI8/k/MG94AjxLrIyaaK4h 1GWxqx+D7lPtaBss92mKL0bkZ19ZfU3xzVhZKzkgVpb9fHg5CaToECMI7mXEN9pL5YTAga1sRPtCW vIAsiGy8L6dIBVmhhV+j05HmrP36dN4xPWsikVS9NMzqS8ATRCEzfpLdlQ0tgb675CQ+rZB6YpKc8 G4KHFPUFJmytKswOU67CY7mOzURNW32MTOOpW5160l0GudeWMDHKH1ZoHhkWY3dED25TdGseccwaT 07m3ZqkH6/U/KJRjbaIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wXDOj-00000006xYH-0wQZ; Wed, 10 Jun 2026 07:30:49 +0000 Received: from mgamail.intel.com ([192.198.163.19]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wXDOh-00000006xXu-1aUK for linux-i3c@lists.infradead.org; Wed, 10 Jun 2026 07:30:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1781076647; x=1812612647; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wQbGQYvGdWkBSwq6p0sFNZ0ic8rxEzin36muudEUeSk=; b=fg/wBfhG4QNW67h1uiQ0F3ON+RJg3vfulBsUD3gN+0BDjMsZHGZSaq4n irLCicbIEl42gPAiHZooUXdJKWpmpkWwHyQo0yXFvUvL+vNOlRGHfqtxK KyquWnbTY73PwfIOcFlT4NI+/eN8c8volrutjPcdq7F2qROrWhfiTfX7m twetGDFEjYrYlxnElDm+TMSNm/03y0DmiMjRU+wXvK8vhnVtU9Vpys7AA rhiKwD+9ln8mIpZcAS1WK62b+IqW7ODiT1mwn+Kbg1birJAhFs2N8J09q N8wB1R/dOmav5+HIXf01KTrZjZhDKreD/NuLJ9PiZSSR5eTTmgt4hT/3+ w==; X-CSE-ConnectionGUID: 7DmXCQwcSq+h6vp8birS4w== X-CSE-MsgGUID: vSBuh29kS2WOWMZRvc8XJg== X-IronPort-AV: E=McAfee;i="6800,10657,11812"; a="80878425" X-IronPort-AV: E=Sophos;i="6.24,197,1774335600"; d="scan'208";a="80878425" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2026 00:29:14 -0700 X-CSE-ConnectionGUID: aBvA2gy5RPSJMaR1SUe3lw== X-CSE-MsgGUID: ADZLGl3bQMaZmVBaIMTU9A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,197,1774335600"; d="scan'208";a="270103451" Received: from mkosciow-mobl1.ger.corp.intel.com (HELO ahunter6-desk) ([10.245.245.210]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2026 00:29:13 -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 V3 4/7] i3c: mipi-i3c-hci: Tolerate i3c_master_add_i3c_dev_locked() failures in DAA Date: Wed, 10 Jun 2026 10:28:49 +0300 Message-ID: <20260610072852.36934-5-adrian.hunter@intel.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260610072852.36934-1-adrian.hunter@intel.com> References: <20260610072852.36934-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-20260610_003047_432033_9F1C2BAD X-CRM114-Status: GOOD ( 10.36 ) 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 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.19]) (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 B6C57391E76 for ; Wed, 10 Jun 2026 07:30:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781076630; cv=none; b=WFlx6lf36kZDvfBcGaGvZS4jgK1v63ZqmASQ2HszKV3OEJvMuD0J5P1NjJwEVgKQF6FdO1IWHP+SDRXKahrtlNzUHQZ2ez7tTVnnK83iGaSKg0RrCE7ZInigxxVAGpBwlVxJd4WcpKs9w96Xo6revrKMlYebK7UeaAsdiEKqo4g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781076630; c=relaxed/simple; bh=wQbGQYvGdWkBSwq6p0sFNZ0ic8rxEzin36muudEUeSk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SkHhGOfQ17CIKEO+lX10Oj37tHGwlIWGAOJy1vHFofMQAc0fFWnSqK54pzWXsTOthjJJ8C1g0HvLXRcv5DA/4FdAodavNpZ5VBSY+l2HyvuJcd3nRx7/sxOYCgSqzf/NEr7UcEOPsjuZYrYQLW4JK97lCmP1U7HXOuMcl447cow= 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=lu2H3R5U; arc=none smtp.client-ip=192.198.163.19 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="lu2H3R5U" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1781076628; x=1812612628; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wQbGQYvGdWkBSwq6p0sFNZ0ic8rxEzin36muudEUeSk=; b=lu2H3R5UebLeiKQ5pnKhGo3iUINr3XsglSrxxMZ8RXQZe6qUZxrpffxO 0BWcPwSUQe0JI4AZbUOLKw478yurLfGvB6bI+CES5gxhKo1aIebhaF3Mh PS46T1Osm+88ZK6wKz0yds57nQESBzHROM8RnbvTgsyoqyIcahF7uEcD8 mcvGnh3/0ZyU45L0YWy/7/iBVw5MPQZaS7U+JV4EZLO6SxpijymYKhe/H 5HeEP6yYeKE7OMvF+rZypzcD9/NGVGDhW40V7RzUfXKUHtCPR6RwHPXGf WvezyhkFeUGE30H/DFeYeyPYL/dcOiuvXXdTHogkeINgMWeGh1zSQ4Uvo g==; X-CSE-ConnectionGUID: ycXT5fz/QBiZTPtv85B6Tw== X-CSE-MsgGUID: 2JJrNB0HTSGe1maRJVB+tA== X-IronPort-AV: E=McAfee;i="6800,10657,11812"; a="80878423" X-IronPort-AV: E=Sophos;i="6.24,197,1774335600"; d="scan'208";a="80878423" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2026 00:29:14 -0700 X-CSE-ConnectionGUID: aBvA2gy5RPSJMaR1SUe3lw== X-CSE-MsgGUID: ADZLGl3bQMaZmVBaIMTU9A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,197,1774335600"; d="scan'208";a="270103451" Received: from mkosciow-mobl1.ger.corp.intel.com (HELO ahunter6-desk) ([10.245.245.210]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2026 00:29:13 -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 V3 4/7] i3c: mipi-i3c-hci: Tolerate i3c_master_add_i3c_dev_locked() failures in DAA Date: Wed, 10 Jun 2026 10:28:49 +0300 Message-ID: <20260610072852.36934-5-adrian.hunter@intel.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260610072852.36934-1-adrian.hunter@intel.com> References: <20260610072852.36934-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 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