From patchwork Fri Feb 16 12:04:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommy Huang X-Patchwork-Id: 13559963 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 285A3C48260 for ; Fri, 16 Feb 2024 12:05:26 +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=VE8GdHmOnBPTuOANb9iyynukUxlt1BWxiEnLYG50cDA=; b=FwhfP7/502kzJL 6cP0JGIxrbBbNE4wyEHU5z/ie7UnVCFZVvvHy5JrKUvMHZ0a2MlX+OozmT+7EULtw8TzN/TaeJ/Kp 4gV87fjzV04OuqtdPS74zwRYk+SJNyUT/ie+Mfzfyn1xjTCC9Q9eENjyrb8hT516pzf1bz34IVn1G XfXZJvID1HY3uYd+qSF+Ox2t+NVOslaz/2KVJKPkPs4wdMFEIRPHRsnwPu2V4H9Zn/A7ufVlaVdfj IustPLFj+b2m74Lp2kAVoNBR8iYZ6lm43AlYEyo+f63SF4NCOz1IJu3x9YYi4SnPAxex2wYwEtTDd BrQVfYM1xc2iUjPIifzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rawxo-00000002F9L-47wt; Fri, 16 Feb 2024 12:05:08 +0000 Received: from 211-20-114-70.hinet-ip.hinet.net ([211.20.114.70] helo=TWMBX01.aspeed.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rawxl-00000002F7n-2W8g for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 12:05:08 +0000 Received: from TWMBX02.aspeed.com (192.168.0.24) by TWMBX01.aspeed.com (192.168.0.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1258.12; Fri, 16 Feb 2024 20:05:44 +0800 Received: from twmbx02.aspeed.com (192.168.10.10) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 16 Feb 2024 20:04:57 +0800 From: Tommy Huang To: , , , , CC: , , , , , , Subject: [PATCH] i2c: aspeed: Fix the dummy irq expected print Date: Fri, 16 Feb 2024 20:04:55 +0800 Message-ID: <20240216120455.4138642-1-tommy_huang@aspeedtech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240216_040505_661007_C5FC44AC X-CRM114-Status: UNSURE ( 7.21 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When the i2c error condition occurred and master state was not idle, the master irq function will goto complete state without any other interrupt handling. It would cause dummy irq expected print. Under this condition, assign the irq_status into irq_handle. Signed-off-by: Tommy Huang --- drivers/i2c/busses/i2c-aspeed.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c index 5511fd46a65e..ce8c4846b7fa 100644 --- a/drivers/i2c/busses/i2c-aspeed.c +++ b/drivers/i2c/busses/i2c-aspeed.c @@ -445,6 +445,7 @@ static u32 aspeed_i2c_master_irq(struct aspeed_i2c_bus *bus, u32 irq_status) irq_status); irq_handled |= (irq_status & ASPEED_I2CD_INTR_MASTER_ERRORS); if (bus->master_state != ASPEED_I2C_MASTER_INACTIVE) { + irq_handled = irq_status; bus->cmd_err = ret; bus->master_state = ASPEED_I2C_MASTER_INACTIVE; goto out_complete;