Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6386556rdb; Thu, 14 Dec 2023 17:45:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IHx/Y0tH5dRMfNLkt+M1dHeAtMfasoo1kssFdxnJRad0GnMly9BIaaWrInPrI2irKrJA/nv X-Received: by 2002:a05:6214:301b:b0:67f:14b9:a5de with SMTP id ke27-20020a056214301b00b0067f14b9a5demr966789qvb.129.1702604716661; Thu, 14 Dec 2023 17:45:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702604716; cv=none; d=google.com; s=arc-20160816; b=s+RmYgiudiQXHMwV0mVS+vhGtx7a/PKyt3Gm6+L7fJuYAAkEEEMlLCTv07k/WGqR+1 5i/5MpHkTsy4u8vdjzHVYBLUh31tAmL9YT4vM2sghgPfr4ZIk+hE1yZH/FGG1mF8O9DQ xu6za+dUKR0NnF6E7l3sSjO9wZFyNU9OkosPJTpQ4zeo8g20gCbt0S9L76+fCOBWf3oI CMGUb2wMrvuNTBZcT9ABWmm4agRTTtSGh+iOPzX/OGH+Lk4uyZmffbbJ0Ujuo9fQM5Im U2pPBjNRDHlZrP9MKpOXHAtjLlQOMJozrwkxCme1vFUZLuP9s2zWUv5fu7Itgwjr2FSO vFVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lLuMjrOvnj4yrtj1dfh3EwA0NvOqzmBs44b7S2F/ns0=; fh=ABkbQnYy7mj1U0IlDg0dsudt5Oa+PeG9h2yzCz5KuJE=; b=w5Dpyd3Odb18A6klGDjsgSfdimoH9br0R066U2WM4Q5T6Pl96mTomxLTrDZorurZ17 RFcBOgr/24uaY0TQI3s+73AUZEt1Ys7gO5BKHQMVV2Uz8OHcWI0JS/5E+6MynBG9xLhR rDmVph2L5P3m2ZHddOZPrJ4Uh2zl5seHhjVCiVkI+lGymtBBgoitpP0NdfVlnegI/Ox3 WFEGmjG3ENzUP5oPSgKIRvAhDuY9SOE4+wvxYLsOgzeSHW/E22xCEaCYguZwmnkd4VeY i3DzKqSyyPYkxdSHqERwxyXYNgFPMHwgoIpjFjr0ZlWA1e5wVrNldjfLzerZN8idA+tM NOmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FH+0aW1i; spf=pass (google.com: domain of linux-kernel+bounces-323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-323-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id k7-20020a0cfa47000000b0067a4bad00bbsi16357091qvo.5.2023.12.14.17.45.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 17:45:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FH+0aW1i; spf=pass (google.com: domain of linux-kernel+bounces-323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-323-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 68D4A1C20DE9 for ; Fri, 15 Dec 2023 01:45:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E5CCA38; Fri, 15 Dec 2023 01:45:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FH+0aW1i" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7AF7B7EA; Fri, 15 Dec 2023 01:45:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B189C433C8; Fri, 15 Dec 2023 01:45:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702604708; bh=DHXxRklGa7FqMreUEnzq9tpUNw6e/U21hX/acHkDN4o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FH+0aW1i/MPE2ogPdf6OZsP2FWkBvGMIjq8LRGnHlJAlZSl7egpaLJlg1Mysb4LrX y5om6lZRX4lhE31RmTGkMzWAryHwRuNDAxJTvqwgwkdIhOZzBNO915doYPHlHcOm56 LCmVK6jMRRPBheO9XGzI3wBLh1xFEZum5EPlPfddpuT8Mzwmzd1w3e881RQGj7RPtb oOa7qheb9KcEixyApTN4jOFM4pnL/ENbHWO5f3T6iNLnVcuDZt0X56imK7rUl9dJ9I hr19rWMmUZhFe2S2cb4UQy5i2Lu4Zo7Qss7F5FcMIYFVWe4lshj3GRdyHi017DznP9 PjXmLgXCu9CAA== Date: Fri, 15 Dec 2023 02:45:05 +0100 From: Andi Shyti To: Quan Nguyen Cc: Brendan Higgins , Benjamin Herrenschmidt , Joel Stanley , Andrew Jeffery , Wolfram Sang , Jae Hyun Yoo , Guenter Roeck , linux-i2c@vger.kernel.org, openbmc@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, Cosmo Chou , Open Source Submission , Phong Vo , "Thang Q . Nguyen" Subject: Re: [PATCH v4 2/2] i2c: aspeed: Acknowledge Tx done with and without ACK irq late Message-ID: <20231215014505.he6ozzxd5jnjgvol@zenone.zhora.eu> References: <20231211102217.2436294-1-quan@os.amperecomputing.com> <20231211102217.2436294-3-quan@os.amperecomputing.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231211102217.2436294-3-quan@os.amperecomputing.com> Hi Quan, On Mon, Dec 11, 2023 at 05:22:17PM +0700, Quan Nguyen wrote: > Commit 2be6b47211e1 ("i2c: aspeed: Acknowledge most interrupts early in > interrupt handler") acknowledges most interrupts early before the slave > irq handler is executed, except for the "Receive Done Interrupt status" > which is acknowledged late in the interrupt. > However, it has been observed that the early acknowledgment of "Transmit > Done Interrupt Status" (with ACK or NACK) often causes the interrupt to > be raised in READ REQUEST state, that shows the > "Unexpected ACK on read request." complaint messages. > > Assuming that the "Transmit Done" interrupt should only be acknowledged > once it is truly processed, this commit fixes that issue by acknowledging > interrupts for both ACK and NACK cases late in the interrupt handler. > > Fixes: 2be6b47211e1 ("i2c: aspeed: Acknowledge most interrupts early in interrupt handler") > Signed-off-by: Quan Nguyen Reviewed-by: Andi Shyti Thanks, Andi