Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4292462rdb; Mon, 11 Dec 2023 15:03:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IGZky6P/Nurw8H2Zly8ojhYmLM1/qqD2rQTR2/Zn3rvZnQRAfitCP3BqVQVx8gs18nzUkjG X-Received: by 2002:a17:90a:db01:b0:286:64d:ad7 with SMTP id g1-20020a17090adb0100b00286064d0ad7mr2213882pjv.4.1702335823255; Mon, 11 Dec 2023 15:03:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702335823; cv=none; d=google.com; s=arc-20160816; b=JJT5tsY6yVEmGASlTSVC6Tzq1oQwiRHyCIeBF+uoch1gUbiCg3EWxrw9KH8sGzZs2y VFTWA0KpUN0OIZ8sDgcIRDe5E5Dci+PF+49zHArDnCy+/fguPKgMetlsInk+BoXW/y4Z ByX6F0QLNWYikxA3LI8HXtFBfI4qQcl9jwZn+5FEzQPh3k45aHFu4za/9X3aT11/SsLv G5X1fMbIn5bJ9ByvJSiJpQRyfLCT7EOAV9xQ+2X6ibeovB1AnDgELGFBImS0aL6VuDYA ChZqmYeIVhLo+FIT5HlD/1V7LOUSlewUG5OOIg2/JsemNhR+jhOIA1/maH46x/X4Sgxm 52XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=BOVT2lTKGgH9egB5ByYC/KQvKf3dxJNOB5Sb9X1V3lg=; fh=yDkQzEl6IxZLQSJVtYl4ZVgHjrQZ2Js7dKd11NaUo5c=; b=tzjfSP4/RmhbUrq06jHJEHTFuLYjKirQezGy9jeuTvHx12V6XxYlxv4Nylkel8e8gz 4xiWMKeWneagJKqZDLVSzNBu2qbqaN8FD6tmuFTDQYI4zONfJrYzXXdBao3SDZnmLqan 8ctrvrEvu+fdUbfAb3cFE1F3PsPq7klY4tttuLXuzD/9yGvdmGeU6vxOnEryURPKfRLd qVqoP2ns+XilQihqYRojkSC8XOijh2hMqkMMpph56aR0mA3HMyZkXZreiXvlWhx2MJwe JtC9uyeyOx7LRy9yjVtUBhQsmKgFS8owvQNg6P13Z8zFtN3GkpJAefF4wiUk2X2oT1Lj b8/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeconstruct.com.au header.s=2022a header.b=Vnl11pNq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codeconstruct.com.au Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id mz17-20020a17090b379100b00286aded8191si6877277pjb.122.2023.12.11.15.03.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 15:03:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@codeconstruct.com.au header.s=2022a header.b=Vnl11pNq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codeconstruct.com.au Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B018F8057E2F; Mon, 11 Dec 2023 15:03:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345246AbjLKXD0 (ORCPT + 99 others); Mon, 11 Dec 2023 18:03:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345166AbjLKXDZ (ORCPT ); Mon, 11 Dec 2023 18:03:25 -0500 Received: from codeconstruct.com.au (pi.codeconstruct.com.au [203.29.241.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D9E79A; Mon, 11 Dec 2023 15:03:29 -0800 (PST) Received: from [192.168.68.112] (ppp118-210-187-191.adl-adc-lon-bras34.tpg.internode.on.net [118.210.187.191]) by mail.codeconstruct.com.au (Postfix) with ESMTPSA id 75C2D20174; Tue, 12 Dec 2023 07:03:19 +0800 (AWST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeconstruct.com.au; s=2022a; t=1702335803; bh=BOVT2lTKGgH9egB5ByYC/KQvKf3dxJNOB5Sb9X1V3lg=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Vnl11pNqVaknKLnoVhbGozubdZ3eJ4ffOiKTxDa26vO/mQUcqUYexWAARoXmKxdD/ nhHAa1AmZYc/pabTKHy2uiaQ+rJrMt10YqOK77Y1Hizly5J2mOGPo7DQBV/RLaNf7C 4sG2/Gnul41zLgwugtK1sdHce9K/dlOtqKrYTfbGtVuULSb1yuLNMHzT7TQbGz1UfY ANTYBE2CQGNT5eZT4MlMtV2Z+0zDGaK8/DNuP+RB3lrWfNZUum4oyV8T2qxoY68hp5 r7dkn6iItEL74lMi5z3IXwI9ooQxqbwZZlJWXT1AUqQR4LDbMXbUmKO0KhSPSt/TXL aFcs377ED979Q== Message-ID: <2eab42cde34723a195e7a0287db08b25f8388a3b.camel@codeconstruct.com.au> Subject: Re: [PATCH v4 2/2] i2c: aspeed: Acknowledge Tx done with and without ACK irq late From: Andrew Jeffery To: Quan Nguyen , Brendan Higgins , Benjamin Herrenschmidt , Joel Stanley , Andi Shyti , 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 Cc: Cosmo Chou , Open Source Submission , Phong Vo , "Thang Q . Nguyen" Date: Tue, 12 Dec 2023 09:33:17 +1030 In-Reply-To: <20231211102217.2436294-3-quan@os.amperecomputing.com> References: <20231211102217.2436294-1-quan@os.amperecomputing.com> <20231211102217.2436294-3-quan@os.amperecomputing.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 11 Dec 2023 15:03:41 -0800 (PST) On Mon, 2023-12-11 at 17:22 +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. >=20 > 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. >=20 > Fixes: 2be6b47211e1 ("i2c: aspeed: Acknowledge most interrupts early in i= nterrupt handler") > Signed-off-by: Quan Nguyen Reviewed-by: Andrew Jeffery Thanks Quan!