From patchwork Wed Mar 12 11:10:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 14013377 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 B2896C28B30 for ; Wed, 12 Mar 2025 11:19: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: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:In-Reply-To:References: List-Owner; bh=+Y0Gnf9EFQOI8vM6HhoPUUVvzaDzfxCEhJ5ezI3ScN4=; b=2Kiv/aXgHNOGXB 7yb7WUKp/FZcxsbRgy/NKXOeK4k8phQVeApQzZA7knaz3/ZpTvMJjWrZ7A8LgDT7FGRWsxnJ8qib6 Fqc9HKsOXA8Lu6bm1tU9f6nbFU1zmxWRZVKoiML5dSbrAuUhpCx/BRz3ddvjn46S3tLiENAWm6qHK l9Vf21y+u/xHRdqNfL4ohzmPXmuEYE5l34fUNN7wJA3t3kP2T6JnkfkFSkKhzcR/ZGkdCdH1sECJb b3O1WPuyQbgwq9Loyxlabsw6bGA4z16kKfFOSldtNvKYQcJPB8xI61soLNrv0X8m2TxU17n1GvBHt SWlsIHT5x/RQl6Mn0CGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tsK7q-00000008Edx-1z3Y; Wed, 12 Mar 2025 11:19:50 +0000 Received: from mgamail.intel.com ([192.198.163.15]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tsJzE-00000008DVP-2McD for linux-i3c@lists.infradead.org; Wed, 12 Mar 2025 11:10:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1741777857; x=1773313857; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=hq4UXwMOBm5dvNq+5c02cZiujjwWWd9RjymHfQFT4sE=; b=afkfrzoiMg2j1KmszyBfRT5rFlKS5XmGVLmqcJn/q4meGwt2Si1KGbpg CbfoE2xYU5Z09EXoaow/WGbXqJVAJq1oeG8aT9ycXc96GeSSigBmdouyn e5u/SYXOXY9Wwn65uFgBYIV11MbCD8hWnCgKZOicuLI9S4S3LkQ5xEvQZ E9BvD17VKv5aKYIqrrRh8WJulY3HS6SIxDH1eLl5mZtQTQ9uV4Ps1/IhV l/l4Kxe6f76T7Vb8RGcSVy5UGbbGGmMCVHesAFuYEBvLd+i5aIvP1raki oxSBp03VcQdSyv1zLu4NB4BC6iyniZUZGbjfpruGKkyIy/BW0tRFAttyP A==; X-CSE-ConnectionGUID: GRrUmc0zTge71/LGiU7u6Q== X-CSE-MsgGUID: 0WO1Jh4CRvOUTBgMSLOUHQ== X-IronPort-AV: E=McAfee;i="6700,10204,11370"; a="42983451" X-IronPort-AV: E=Sophos;i="6.14,241,1736841600"; d="scan'208";a="42983451" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2025 04:10:53 -0700 X-CSE-ConnectionGUID: ojEOe4g/QOKahq8KrjeKpA== X-CSE-MsgGUID: UpgR1se7QV6KM9R0c/LJuw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,241,1736841600"; d="scan'208";a="120310860" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.154]) by orviesa009.jf.intel.com with ESMTP; 12 Mar 2025 04:10:52 -0700 From: Jarkko Nikula To: linux-i3c@lists.infradead.org Cc: Alexandre Belloni , Frank Li , Jarkko Nikula Subject: [PATCH v2 1/4] i3c: mipi-i3c-hci: Allow only relevant INTR_STATUS bit updates Date: Wed, 12 Mar 2025 13:10:46 +0200 Message-ID: <20250312111049.197855-1-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.47.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250312_041056_627728_625D6B78 X-CRM114-Status: GOOD ( 11.06 ) 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: , Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org Since MIPI I3C HCI specification version v0.8 INTR_STATUS bits 9:0 are reserved. Version v0.5 has bits 9 and 5:0 in use but not handled by the current driver code and not needed in DMA transfers. PIO transfers with v0.5 would require changes to both core.c: i3c_hci_irq_handler() and pio.c: hci_pio_irq_handler() though. For these reasons don't enable signal updates from INTR_STATUS bits 9:0. This change gets rid of "unexpected INTR_STATUS" on old v0.5 IP version and is a no-op for later versions starting from v0.8. Signed-off-by: Jarkko Nikula Reviewed-by: Frank Li --- v2: Simplified the last sentence according to Frank Li's suggestion. --- 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 a71226d7ca59..e139d7e4d252 100644 --- a/drivers/i3c/master/mipi-i3c-hci/core.c +++ b/drivers/i3c/master/mipi-i3c-hci/core.c @@ -699,9 +699,10 @@ static int i3c_hci_init(struct i3c_hci *hci) if (ret) return -ENXIO; - /* Disable all interrupts and allow all signal updates */ + /* Disable all interrupts */ reg_write(INTR_SIGNAL_ENABLE, 0x0); - reg_write(INTR_STATUS_ENABLE, 0xffffffff); + /* Allow signal updates relevant to IP versions 0.8 and beyond */ + reg_write(INTR_STATUS_ENABLE, GENMASK(31, 10)); /* Make sure our data ordering fits the host's */ regval = reg_read(HC_CONTROL); From patchwork Wed Mar 12 11:10:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 14013378 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 68AB9C28B28 for ; Wed, 12 Mar 2025 11:19: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=Sjrovud1Zbz9PFvxR9tcrZplE/CV7nFnxDLlIB4NaBc=; b=zS+m6J7ynJb+aD 5Fcq2qDunr/ypMCRsJMXXLBNFGvpZSdItxHJnM0LtGbLuEZoxkroxn8AWkIq4/NBCnN9Vifk7y4VW guukTwUrLTtEKUj9je3RLJvmVUgpHf89vxzO/k3q/g7ObUwD8TVrxmELyMgR4o9PZSw7xDVzXwR42 Y3uTHXOTyk4T2Ub5X7NupQjOeGY4s98AWfxW53K4uCCZ8G8wF8B9m4kTpDn0knaPg3Svch2+/ZBxi FJP1ZwHpl8+B7gknNJnnY3Depl6I4QfYEiwcQLDboO3u3XFxrMCUA91ax1btY3MV/Hxj+ydLWJ917 sCQLREetPoHL28l1pvHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tsK7q-00000008EdR-0fUF; Wed, 12 Mar 2025 11:19:50 +0000 Received: from mgamail.intel.com ([192.198.163.15]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tsJzE-00000008DVQ-2Mi0 for linux-i3c@lists.infradead.org; Wed, 12 Mar 2025 11:10:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1741777857; x=1773313857; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PR9x/EnXUCNH4rosATTLiFNtLG+fgATAlLH3DW7HcWw=; b=JV4kdBWZneldaYYRyvZauV8kMwtcJ9dxwaMRQmF6eBkKqO61MRrRxCLc g8VbVVEnzI67fIGQlcsIoMnD3QXo05w1rpk87/jU5g9zEKQCN4Hs47RuT nBhvFgvQ79+r9WvW4an8c3prJTFChNaMyuIdvcL2AvkxFm6oJeejX5Gya 5Lxrgo4y5uQZtVyf0nUjRDrA544EyefPnYYqPJijod37A+y6PLgEBfouh Uo/dDlNYU1+8WiFDInbShDDEVBPA3eLMIYFbm86WehqRnD2WQSOQpeGVJ 91g5piDdoUVBo2LvAZ9gl3HMyayd2qaUTdGZuKXiDOUVEWNcy+Z1/IBkz A==; X-CSE-ConnectionGUID: COBI7szoSUKEMMyeN3XJAQ== X-CSE-MsgGUID: QIWU9sIRT1qGjA+UPX0K2Q== X-IronPort-AV: E=McAfee;i="6700,10204,11370"; a="42983455" X-IronPort-AV: E=Sophos;i="6.14,241,1736841600"; d="scan'208";a="42983455" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2025 04:10:54 -0700 X-CSE-ConnectionGUID: U6s7gWlnTIyygluKmY9tPg== X-CSE-MsgGUID: Qv2Ic3RGRkCHBt+3dWEpaA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,241,1736841600"; d="scan'208";a="120310865" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.154]) by orviesa009.jf.intel.com with ESMTP; 12 Mar 2025 04:10:53 -0700 From: Jarkko Nikula To: linux-i3c@lists.infradead.org Cc: Alexandre Belloni , Frank Li , Jarkko Nikula Subject: [PATCH v2 2/4] i3c: mipi-i3c-hci: Fix handling status of i3c_hci_irq_handler() Date: Wed, 12 Mar 2025 13:10:47 +0200 Message-ID: <20250312111049.197855-2-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250312111049.197855-1-jarkko.nikula@linux.intel.com> References: <20250312111049.197855-1-jarkko.nikula@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250312_041056_627906_CE6405B6 X-CRM114-Status: GOOD ( 11.70 ) 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: , Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org Return IRQ_HANDLED from the i3c_hci_irq_handler() only if some INTR_STATUS bit was set or if DMA/PIO handler handled it. Currently it returns IRQ_HANDLED in case INTR_STATUS is zero and IO handler returns false. Which could be the case if interrupt comes from other device or is spurious. Signed-off-by: Jarkko Nikula Reviewed-by: Frank Li --- drivers/i3c/master/mipi-i3c-hci/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c index e139d7e4d252..e5593b6e897e 100644 --- a/drivers/i3c/master/mipi-i3c-hci/core.c +++ b/drivers/i3c/master/mipi-i3c-hci/core.c @@ -594,6 +594,7 @@ static irqreturn_t i3c_hci_irq_handler(int irq, void *dev_id) if (val) { reg_write(INTR_STATUS, val); + result = IRQ_HANDLED; } if (val & INTR_HC_RESET_CANCEL) { @@ -605,12 +606,11 @@ static irqreturn_t i3c_hci_irq_handler(int irq, void *dev_id) val &= ~INTR_HC_INTERNAL_ERR; } - hci->io->irq_handler(hci); + if (hci->io->irq_handler(hci)) + result = IRQ_HANDLED; if (val) dev_err(&hci->master.dev, "unexpected INTR_STATUS %#x\n", val); - else - result = IRQ_HANDLED; return result; } From patchwork Wed Mar 12 11:10:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 14013379 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 0BC73C28B2F for ; Wed, 12 Mar 2025 11:19:51 +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=r3rn22Ma6AljhSGX5AF7bIa0lYyXbozl94/KFu/9NPM=; b=pwSTvRlZxU19nK Kq00PyWGHJabUdV5rwczKVoRFZ20KOInej8pwrTvX6qq11lPAUZqWGkvRIghqQBFnoEgQGGEhTCr6 gTc8rn4Ox+1dyYWj4KqY9okZz+PtnjBK3AFBLfkiiJwbqWPR+4duY6gInYYRTu3oPmqX9aeDyPsQ2 ReBO3f3m/d73SL2Nhwewtuz/ho214BxpWxcsptVMkVFCRJV1RfSy6OwaY6Rq3ovoumfELhtaBt3QM ERVxmvwDeR8R17m4cYOix9qek/ybuuKR3YmTkX9bOLjjs+rN0RWzoAMzIRAI2ZcGEeiD+zngT+0uL lDucS7ix//wpmERcfD+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tsK7q-00000008EeE-3DAo; Wed, 12 Mar 2025 11:19:50 +0000 Received: from mgamail.intel.com ([192.198.163.15]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tsJzF-00000008DVQ-2mqp for linux-i3c@lists.infradead.org; Wed, 12 Mar 2025 11:10:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1741777858; x=1773313858; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=egv/OiQTJ5Ecz1Ei26e/0uj7Ad0zFGpITVeF2p2MKbo=; b=idZfJJ6Nr1v147Bd7U95Q119BfAa6ZvH0SpkkzB/M1n1x8KkRz0z0cpe f7qdMBCNg6QIsnZwhzBGfzbdI2ZkjkJWycgWaugoQ9b5nhmdL9rAPpThk ojb/pSRNRm5qZpcs07ERdykJpiehYZdTdWkCAE14+juQDzb0lAzOKX0m1 YIRP7gDMOI+HohQhJCKE0e0/mtSpw3JEh7Tw2msy2rMedQcFPF+ZahzOh ZTNWlQT83GL5q9fLc62XOFSMoLiYPLytY2A1LkzwBQhdR45QgQpS78qWO FjL83WzG8A7F7RC/grDw0znVwYxE/c2yoPMCREH2TgJgInk0h0JG1aj9z Q==; X-CSE-ConnectionGUID: 4fAZjm7ETvCQOJSAT9uF6w== X-CSE-MsgGUID: S721YXa0S0C7jlw6siqfXQ== X-IronPort-AV: E=McAfee;i="6700,10204,11370"; a="42983460" X-IronPort-AV: E=Sophos;i="6.14,241,1736841600"; d="scan'208";a="42983460" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2025 04:10:56 -0700 X-CSE-ConnectionGUID: XU94ZA8EQ/KXxKaVZmQ3zA== X-CSE-MsgGUID: fjtSXebTTie2YM4UV0fAhQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,241,1736841600"; d="scan'208";a="120310866" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.154]) by orviesa009.jf.intel.com with ESMTP; 12 Mar 2025 04:10:55 -0700 From: Jarkko Nikula To: linux-i3c@lists.infradead.org Cc: Alexandre Belloni , Frank Li , Jarkko Nikula Subject: [PATCH v2 3/4] i3c: mipi-i3c-hci: Change name of INTR_STATUS bit 11 Date: Wed, 12 Mar 2025 13:10:48 +0200 Message-ID: <20250312111049.197855-3-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250312111049.197855-1-jarkko.nikula@linux.intel.com> References: <20250312111049.197855-1-jarkko.nikula@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250312_041057_712915_1CB7AF67 X-CRM114-Status: GOOD ( 10.50 ) 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: , Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org INTR_STATUS bit 11 INTR_HC_RESET_CANCEL was probably projected for the MIPI I3C HCI specification version 2 but was not ever implemented. This bit is first time specified in the v1.2 as HC_SEQ_CANCEL_STAT "Host Controller Cancelled Transaction Sequence". Update the definition and debug print of it accordingly. While at it, change DBG() print to dev_dbg(). Signed-off-by: Jarkko Nikula Reviewed-by: Frank Li --- drivers/i3c/master/mipi-i3c-hci/core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c index e5593b6e897e..84c372740020 100644 --- a/drivers/i3c/master/mipi-i3c-hci/core.c +++ b/drivers/i3c/master/mipi-i3c-hci/core.c @@ -78,7 +78,7 @@ #define INTR_SIGNAL_ENABLE 0x28 #define INTR_FORCE 0x2c #define INTR_HC_CMD_SEQ_UFLOW_STAT BIT(12) /* Cmd Sequence Underflow */ -#define INTR_HC_RESET_CANCEL BIT(11) /* HC Cancelled Reset */ +#define INTR_HC_SEQ_CANCEL BIT(11) /* HC Cancelled Transaction Sequence */ #define INTR_HC_INTERNAL_ERR BIT(10) /* HC Internal Error */ #define DAT_SECTION 0x30 /* Device Address Table */ @@ -597,9 +597,10 @@ static irqreturn_t i3c_hci_irq_handler(int irq, void *dev_id) result = IRQ_HANDLED; } - if (val & INTR_HC_RESET_CANCEL) { - DBG("cancelled reset"); - val &= ~INTR_HC_RESET_CANCEL; + if (val & INTR_HC_SEQ_CANCEL) { + dev_dbg(&hci->master.dev, + "Host Controller Cancelled Transaction Sequence\n"); + val &= ~INTR_HC_SEQ_CANCEL; } if (val & INTR_HC_INTERNAL_ERR) { dev_err(&hci->master.dev, "Host Controller Internal Error\n"); From patchwork Wed Mar 12 11:10:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 14013380 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 56510C35FF1 for ; Wed, 12 Mar 2025 11:19:51 +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=4Ooeqi0k8EfkCZ35fndKVoQT3irEh02/S4vE4iZceOM=; b=n5D3S9lw6gS9kN VfD6iPh7sUaMIAaCEw8eLlttws5j1Ll1y7TkJ7Eu1v4yEB+ZDN+e46c4WFFcfoqF8HEtX0/Tiu32h eSTYBac20vwgoILa0ysfCijo6eeGP8EVTxGDao94X8OWmL8CC2edNHR+EZQLm1qSzKBv4SDUE7Wcp 1/YyuB7VBRUMY2OjrsDbj3TSnKVBZQw/8plTJFHByY1RqJoBtCOoc0LmwdNW3eA1D9o3EorG+snHd 4fRLJ4xqwl/Vc+FNLtfkS4NWlTXnfNbjbJi94uZH7uiFXuR/KGLNGaDvp2sqBnQ+cduAwFK7hZHSz 4VPvdsTWsYHpH5udZUCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tsK7r-00000008EeZ-0FzE; Wed, 12 Mar 2025 11:19:51 +0000 Received: from mgamail.intel.com ([192.198.163.15]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tsJzH-00000008DWj-1Kqf for linux-i3c@lists.infradead.org; Wed, 12 Mar 2025 11:11:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1741777859; x=1773313859; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0EdTmmi4bN1yMd6d59q7QN3FwUKRg3xUHN58HKPrc2s=; b=kY2rzhI4NQPP4S1Kzhs0NCBYpn7ZuK873Ee6T5Ew3mnzx6FNwk6LkPJw H4Atks9lrSQbssIWunWPlp6F7+9qoV/5jhQS5cHM5UUYvJ8Up0TNhllAs 99OsLFLERYppl78rUEJzlAciEu7uLQIe1uwztyOgbpHX9ptGOBASF57uM Mprg0JSnSQfaS7h0ZVj9KUkQK7mVoHCY4BcwXqPVj/aBvrXOfIxo0V9pC F29fnGV4D/Qzy+RebGpTK8GlNMZUYp0hKoGzNHsv/dAC82gqpmEsi9bh8 nZNXTDHcjjNALHB568G8e4HOwW5Z2vVoEaGue/nKtny3a+U0OowdDYTBD g==; X-CSE-ConnectionGUID: vyV+LEYzSqGDQ8uqERtazQ== X-CSE-MsgGUID: cIiGU8bKTUmB9pvDIcUMuw== X-IronPort-AV: E=McAfee;i="6700,10204,11370"; a="42983467" X-IronPort-AV: E=Sophos;i="6.14,241,1736841600"; d="scan'208";a="42983467" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2025 04:10:59 -0700 X-CSE-ConnectionGUID: w+rgUXK4Q6WinkbUtiW/xA== X-CSE-MsgGUID: a2lAzYLASyuhb7OF0t23hw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,241,1736841600"; d="scan'208";a="120310869" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.154]) by orviesa009.jf.intel.com with ESMTP; 12 Mar 2025 04:10:56 -0700 From: Jarkko Nikula To: linux-i3c@lists.infradead.org Cc: Alexandre Belloni , Frank Li , Jarkko Nikula Subject: [PATCH v2 4/4] i3c: mipi-i3c-hci: Move unexpected INTR_STATUS print before IO handler Date: Wed, 12 Mar 2025 13:10:49 +0200 Message-ID: <20250312111049.197855-4-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250312111049.197855-1-jarkko.nikula@linux.intel.com> References: <20250312111049.197855-1-jarkko.nikula@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250312_041059_368354_E4D4B567 X-CRM114-Status: UNSURE ( 9.34 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org Move "unexpected INTR_STATUS" error print before calling the IO handler as it is more consistent that way. Otherwise it may be confusing if generic interrupt related prints are mixed with IO handler prints. Since this error print is more indication of missing code rather than runtime error downgrade it to dev_warn_once(). Reviewed-by: Frank Li Signed-off-by: Jarkko Nikula --- v2: Added Reviewed-by --- drivers/i3c/master/mipi-i3c-hci/core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c index 84c372740020..5c173249c0ac 100644 --- a/drivers/i3c/master/mipi-i3c-hci/core.c +++ b/drivers/i3c/master/mipi-i3c-hci/core.c @@ -607,12 +607,13 @@ static irqreturn_t i3c_hci_irq_handler(int irq, void *dev_id) val &= ~INTR_HC_INTERNAL_ERR; } + if (val) + dev_warn_once(&hci->master.dev, + "unexpected INTR_STATUS %#x\n", val); + if (hci->io->irq_handler(hci)) result = IRQ_HANDLED; - if (val) - dev_err(&hci->master.dev, "unexpected INTR_STATUS %#x\n", val); - return result; }