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 ADEFDC433F5 for ; Tue, 30 Nov 2021 15:56:18 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=E+1jTXcLOPljfPj7UeTNelbyLe7qCak9w1ZkQCmMvIE=; b=qAtEbj+bWN1r4E 1WrbRAUaeSL3Djul7uZiLVF+s2U4ZO6lBGvhc6Kv1SAeuvoXw6zdN3BhrPc+rOZrPIjupOD+9Tegn 10DjW+ZM8ytfvixGcX7Xe+o7wYL1kAnuRLVO768Ecrd/hKIjFm8QukIIladj2yzHm4YIpvF8+GOb6 29K+KXIpXwfumeSfcTe2W/6js8JNgP/uo5NAB1F9Zgr+iGQVOxDfstGdN928ptRDaJv8XUNBQgrY4 59wpMcw6qMEQ2/yfq0KbTthZAyuafkPB4E+7iGspnEZD3Lmx3WwK654CLDjsTAd3B8/nmNuAE0uDQ jWcafxsCPqOdW7VC0d0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ms5T3-0060lO-Ug; Tue, 30 Nov 2021 15:54:54 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ms5Sz-0060kb-Br; Tue, 30 Nov 2021 15:54:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1638287684; bh=Bt8TsQsfm9hCyCEvynPEZD/qLlYwuHKwqHtrdOoZu6E=; h=Date:From:To:Subject:X-My-GPG-KeyId:References:From; b=d2QEBY5Ao71Bg9wh60cU4Mv2soCzaVEPXrpDULM3JD2HOcrmqoqDBKqeixB48Hbpw 1KneMzUHUDkb82sBUIMKI43cII8J90ZH292Lt2Mb//oxDS+1mJzAtap+C1Kr7fHDf7 t2ZC/6e9IHvK+Yr0Zif82Lk14WdHtJPX+3cTieAw= Date: Tue, 30 Nov 2021 16:54:43 +0100 From: =?utf-8?Q?Ond=C5=99ej?= Jirman To: Wolfram Sang , Heiko Stuebner , Krzysztof Kozlowski , "moderated list:ARM/Rockchip SoC support" , "open list:ARM/Rockchip SoC support" , "open list:I2C SUBSYSTEM HOST DRIVERS" , open list Subject: Re: [RESEND PATCH] i2c: rk3x: Handle a spurious start completion interrupt flag Message-ID: <20211130155443.sbvpirzj6moikxl2@core> Mail-Followup-To: =?utf-8?Q?Ond=C5=99ej?= Jirman , Wolfram Sang , Heiko Stuebner , Krzysztof Kozlowski , "moderated list:ARM/Rockchip SoC support" , "open list:ARM/Rockchip SoC support" , "open list:I2C SUBSYSTEM HOST DRIVERS" , open list X-My-GPG-KeyId: EBFBDDE11FB918D44D1F56C1F9F0A873BE9777ED References: <20210924111528.2924251-1-megous@megous.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211130_075449_761012_0019DC1D X-CRM114-Status: GOOD ( 11.13 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 29, 2021 at 10:37:43AM +0100, Wolfram Sang wrote: > > > This causes I2C transfer being aborted in polled mode from a stop completion > > handler: > > I wonder why this only happens in polling mode? The question behind that > is: is it really a spurious irq from the HW or is it maybe a race in the > driver? Because polling uses the same interrupt handler but just > periodically polls it. Spurious interupt happens in both modes. Abort only happens in polled mode, becase polling executes the irq handler before the stop condition interrupt fires. In that case rk3x_i2c_irq will execute rk3x_i2c_handle_stop, which will terminate the transfer, becasuse it's executed without STOP completion interrupt flag being set. In interrupt mode, the interrupt handler alwyas executes after the stop condition, so the spurious START interrupt is ignored in this case. kind regards, o. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel