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: 773851 Received: from TWMBX01.aspeed.com (211-20-114-70.hinet-ip.hinet.net [211.20.114.70]) (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 9BC151BC57; Fri, 16 Feb 2024 12:10:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.70 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708085408; cv=none; b=ZJhb+p89WiHBmHs5H5FaY7fcGcDBtaIkopY02HcN2tv1nAZ8OuMtA4X/vlFdP9oCqnQvrSUlyqnE1OfA5+rrkoJKOkmqxrfFcFvUP4Zq/n92m+pECEIwT+txvWor5qtDRKxeB6DKgCbLudilthEsbhxccG902bqfcJvTYG7g3Ik= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708085408; c=relaxed/simple; bh=/Cn0GaGjavwprH4dlcyGZLnvLz0zGHMC+umQ8K0F/5I=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=D61lMLhr+Gj0rSHpqftP8OJEvn9yAQcJnNQcsyFekZdvgJMNba0IeJ+sOuYzADMAm5ke0As0r7HukmOA1KAVsggJm6LnAkUwBJtP72VMM9PuCzANiHRiHweJFnSTcHwjkSF1NHyYQEDks9zv1y2hLrVBO6SQjFcExZn2e+GBEnY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=aspeedtech.com; spf=fail smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=aspeedtech.com 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 Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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;