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 68068C982D2 for ; Thu, 17 Sep 2026 19:14:23 +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=krvxk00XTXK7arnpfk++iyzxZs15hzED6vUj8nT4eaA=; b=X0sONpLiZnsxWo cZMobuLSW9dhuL9eBW6CBPOvcS9F14JrLrojDJ+fj2h1r/7B4qIrJh6FSQ/gVxuN0nfp0OTk1494a 0MAyysV0/CZzvEXD29JkjQ2FKQlw5NpfxnJMehplrWePH15QTZYSaYb92lZVrPPp7AS1d0MHwz7gV QlviFvwmf+jrQ5nIq53AoAMkX5OzsNrkliNUeyHflo0WfoH7CwBZPNVXKxiUu8JcXUmB8Z1gzDRDR Mp1Fg0NFUw/yJk/tO9HGqnpC+UTY3qSUIx2u3Lv0Jik3eOU69xWETKmMswNFNSoyL8d21WQB9J7zc 9W3orThm8PPG7AwiXjoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x7HYt-0000000CJNP-0c92; Thu, 17 Sep 2026 19:14:23 +0000 Received: from mgamail.intel.com ([192.198.163.4]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x7HYq-0000000CJFz-2Bpu for linux-i3c@lists.infradead.org; Thu, 17 Sep 2026 19:14:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1789672460; x=1821208460; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zo0PaQvv5GZxszScqqbpKXsVnZVd98Zu3pcfugDqtRI=; b=chgdUmPq2GguP9hWsVT3m3jTad1rg3J6eZMdosOuvLTabP55AyARA/G1 bL/4FCUIbNW1Bk6pmQ/FnCQ2Z5a3TzOHesLDELMY1nIkg/f+DvtWT8xUS tS2Ewk+xzlDNFW0tOXSzrwuVffmiXRKSNdDWnwceUAiz5GzT4itT7vdif c7GKTCUbaV7Dex/2y/S0krAiIRuMAP+2IRWjNdZdCVCCrEUAXadCyJecA bVia925uAMhtW1Ojj8Vl+KikkqWMEUhkAOCv5cEO/0+41eYP5Cuv2SK6Z y6xZe41LvKlWnZekjEY0KlFN6xxJYiOSSSNzaiXcNz0GzLt9A+HQ3C2LP A==; X-CSE-ConnectionGUID: /3Xeec7JQnChRQiaFJe4jw== X-CSE-MsgGUID: f4LRtXJaQ5SjLJvjMXNU/w== X-IronPort-AV: E=McAfee;i="6800,10657,11905"; a="639923" X-IronPort-AV: E=Sophos;i="6.27,103,1787036400"; d="scan'208";a="639923" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa114.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2026 12:14:20 -0700 X-CSE-ConnectionGUID: I40QUd+KTOOcSn1zzG2E1A== X-CSE-MsgGUID: xqef9yJcQ4mGGJ3gYlvd0w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,103,1787036400"; d="scan'208";a="270271975" Received: from fpallare-mobl4.ger.corp.intel.com (HELO ahunter6-desk) ([10.245.245.5]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2026 12:14:18 -0700 From: Adrian Hunter To: alexandre.belloni@bootlin.com Cc: Frank.Li@nxp.com, billy_tsai@aspeedtech.com, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 07/17] i3c: mipi-i3c-hci: Send DISEC before disabling IBIs in hardware Date: Thu, 17 Sep 2026 22:13:46 +0300 Message-ID: <20260917191356.133242-8-adrian.hunter@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260917191356.133242-1-adrian.hunter@intel.com> References: <20260917191356.133242-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-20260917_121420_569970_7D12C554 X-CRM114-Status: GOOD ( 11.62 ) 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 Reorder i3c_hci_disable_ibi() so that DISEC is sent before IBIs are disabled at the controller. This matches the sequence used by other I3C controller drivers. It also avoids dropping an IBI that races with the disable operation: an IBI received after DISEC is issued but before the controller disables IBIs can still be processed normally. Once DISEC has been sent, the hardware can be updated to NACK subsequent IBIs and complete the teardown. No functional change is intended beyond aligning the ordering with other drivers and handling the race window consistently. Signed-off-by: Adrian Hunter Reviewed-by: Frank Li --- Changes in V2: Added Frank Li's Reviewed-by tag. drivers/i3c/master/mipi-i3c-hci/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c index 166d9f70f435..f6a34ce7a295 100644 --- a/drivers/i3c/master/mipi-i3c-hci/core.c +++ b/drivers/i3c/master/mipi-i3c-hci/core.c @@ -719,13 +719,14 @@ static int i3c_hci_disable_ibi(struct i3c_dev_desc *dev) struct i3c_master_controller *m = i3c_dev_get_master(dev); struct i3c_hci *hci = to_i3c_hci(m); - __i3c_hci_disable_ibi(hci, dev); /* - * The DAT entry is now set to NACK and DISEC this target's IBIs, so + * The DAT entry will be set to NACK and DISEC this target's IBIs, so * the IBI teardown can proceed even if DISEC below fails, so ignore * errors. */ i3c_master_disec_locked(m, dev->info.dyn_addr, I3C_CCC_EVENT_SIR); + + __i3c_hci_disable_ibi(hci, dev); return 0; } -- 2.53.0 -- linux-i3c mailing list linux-i3c@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-i3c