Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3670858rdh; Mon, 27 Nov 2023 23:53:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IG0aRATJ9+0iMsbyzoZ0cBcS61BVV9ue79n4IAfq9UqFDhISEBWwyMxZ+RXYaifXRU7w0PR X-Received: by 2002:a17:902:e812:b0:1cc:5671:8d9 with SMTP id u18-20020a170902e81200b001cc567108d9mr24390947plg.27.1701157997498; Mon, 27 Nov 2023 23:53:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701157997; cv=pass; d=google.com; s=arc-20160816; b=lgG8qE1lC2P8XQLTzfbiP706FKspZNVlCSCgKZVFBD7psnv6EOg8sX4q6TsS93E/6a Y4T70kRnjgUWowlh48kFTDPT1vT8BvjRGGvgQzHGPP/jgB8Y3xFYMJ02p7eIjove5Cff CR2QIgqDHxZ6Tr84g4Hvbo/bJEHZ+gihPN4+vonuWR/HBeaZyt+Ht+v+hY268kG1w2p6 ELjDyZupclrwse59E9m6VMroge8/3o8zY6OWJE7A7ujnyvSSu8ngz/hWHW67ZfJ6FAM8 0gN2JDXHv7Iaw+4cRQiRoosPx73n6AtvqA0tfitRff8j02xrMWDxxufXekNBI4aVm3fj XIZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=ANZo0Yh6FASvCQick53ES7L5DfKDyCL1c9XKLCL5jPA=; fh=+sI6aN+l4b+kIAcl3+qRSsHxxZLiE4Ou84B6CaaV0ZI=; b=uT+FZuMjMJz6A8pUGoym+idtsiXz25AuIWhz6WfFR3vOnGVZxwBpqph+kmphNrGkjq TFKfYFOrS1ri9PeUtqfRtKRHA9TCCpELxqDdCY5yvolZkDuQbYdMHkEcO8JZHe0cDjlL Rr9r2phYnuFDBSzYR0IfuZ2aBzbVgmzSsSCr5y0H7UV/vlqs4w5AK8/3os21JgYSc0UY zbZrlXvhvdpJm9Ohkp/uPCyfjd7KCHAHBtFTmFRK1lbwl/BNJb1CPJFLz73GjmSjAqL4 i09njV7uHU4HSLDiblA6DMIQLHMqSMHIxBntxSSWwk6ztrDMZqRF9o5u8mXuXXvYpQho zAEg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=Ai0FHtEi; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=os.amperecomputing.com dmarc=pass fromdomain=os.amperecomputing.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amperecomputing.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id bj4-20020a170902850400b001cf88c15464si11337435plb.566.2023.11.27.23.53.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 23:53:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=Ai0FHtEi; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=os.amperecomputing.com dmarc=pass fromdomain=os.amperecomputing.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amperecomputing.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id CD39E805D559; Mon, 27 Nov 2023 23:53:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343907AbjK1Hw7 (ORCPT + 99 others); Tue, 28 Nov 2023 02:52:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229737AbjK1Hw6 (ORCPT ); Tue, 28 Nov 2023 02:52:58 -0500 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2137.outbound.protection.outlook.com [40.107.244.137]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F1CD99; Mon, 27 Nov 2023 23:53:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B+kr8gDrY7qUeyVN5W6kx/WjHkk63Y+2bc7iL1yxxeVyG+Qm7YTyXe98H/6cDw6VNyxE7qYtg4qzIUCt3j5QQ4n9r4053LWoVFHmhWfWcGpebJfZhqLavkhB/E5exPo9APDD8atUOGwuXOj5QxBgGq45xkFUUdlmteg1dcMpTaTiij64v8gS4iC2lSHwLzqOR1xz6hUETCX11fGdh9eagSxIPoFiJfVcxB+HCR8ybUzAb5yUHfx2KGDYwGOBTILpjukrHDiOpjdTofXU7UDqyjvtJh+zEIkgMgUHiYK2JUAWw/owhFX77ulf4EI1dGTjFoADxnSmb8ICqbYIsI46iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ANZo0Yh6FASvCQick53ES7L5DfKDyCL1c9XKLCL5jPA=; b=FXfc/7QPgdqhjqHdf3R3IMbKterScAq0c53tFWcfI2a8FEWrVjr3bptJ14iTylyG+peou3x4oK7E7RBvRcaRkBbfKSoNXJtlcnKXWkvPxYEqZfeyzPTtc/wmdUyZbA1hHvOJl5+zL46prj7X6ACtIHOqENeOErbDzGxQdxzcuiRhCiPsczL7IvCkNdsP8HEld8++nAGoqXz7vIa2/phmyWxg1Q1TYYe466uULtyq3IAqjW6YMtQKCc57yWXFn6G+r3HMs9lFYNZitjt1eCd7u4RZqp0e9sfK5lfjaYjaDu772oukLctIGeJVi6UQSrMV0eC0/ghXF0Z7ckyHTgJkeA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ANZo0Yh6FASvCQick53ES7L5DfKDyCL1c9XKLCL5jPA=; b=Ai0FHtEizM4aujCmScGJcA3B410IdKTdZsdkr2EeSHQlbqBjT7dM99lq7oIjMBf66J1jz5xmbcXXagO0N0nyImWdC5AUUmHfSktYzmDgHaZCTAGgF6Q63hOmzC8QOjL6XSWx32w5GYlQpJzqWmXR8iI/90hCChcj8CFQ0YGj0uU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from SN4PR01MB7455.prod.exchangelabs.com (2603:10b6:806:202::11) by PH0PR01MB7895.prod.exchangelabs.com (2603:10b6:510:28a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.29; Tue, 28 Nov 2023 07:52:58 +0000 Received: from SN4PR01MB7455.prod.exchangelabs.com ([fe80::5682:1d84:171a:1d68]) by SN4PR01MB7455.prod.exchangelabs.com ([fe80::5682:1d84:171a:1d68%3]) with mapi id 15.20.7025.022; Tue, 28 Nov 2023 07:52:58 +0000 From: Quan Nguyen To: Brendan Higgins , Benjamin Herrenschmidt , Joel Stanley , Andi Shyti , 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 Cc: Cosmo Chou , Open Source Submission , Phong Vo , "Thang Q . Nguyen" Subject: [PATCH v2 RESEND 0/2] i2c: aspeed: Late ack Tx done irqs and fix unhandled Tx done with NAK Date: Tue, 28 Nov 2023 14:52:34 +0700 Message-Id: <20231128075236.2724038-1-quan@os.amperecomputing.com> X-Mailer: git-send-email 2.35.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2P153CA0032.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::23) To SN4PR01MB7455.prod.exchangelabs.com (2603:10b6:806:202::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN4PR01MB7455:EE_|PH0PR01MB7895:EE_ X-MS-Office365-Filtering-Correlation-Id: c9a1de63-5b15-4a90-f891-08dbefe70950 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: I5BRHLogMh87+oXHmGN+BtXxNKltwX6IXz4CEMy8AcKjCGo78sc27awMku0kuiY8GDpICtZC6WnvdThH9z552SrF2+LkmNsKonnStuosokVAhmMCQRQhdmtsKeVFG3lo+jRyyEnHA1eJSOgpHB1FcZ8xIGAUmIGeVxDQlVK8bQZRBDSIPEg3TS/GqW2fTGTNod7HbcUCKIKGs10soe39KdT+45bDIaC9JJLZ1m89gTPNtgkCuRZgxpoMQT5s/0nQxjg8fGrkLIk5UBGxCs3siwS59oOBLnBBI3sTCyZaWaXmqI2i6Bju77UFWgKCpCRPM0q+5AHOGjthT0JhHl5AzJVp8Ps9r5EtwGbRpYMFNrpxbKwoAyvcAjKHQWxLMw8x5hE1sdtCRGOs8LQTTFOENi1kDcFe13BKp2cq7wRqTUIZ2FpzFdUAi/N55wSwAvRNJrs9jgaxBT2760xtzFFSqioWZVK4rup9lOdqnWpvNCUIIPiterGNjcq8Aimh2eZGFSyxv1+MBC44jFp5Pa0ENAJCP3PCiDLCOO+RNrpGBl+7Hp8eBLffFomXjtScnA8V3sqfTGG1Xz30lzIO/W+b6BJGA/Ot7VeKqxNj1IpF+NJLijx/5Ct93Ro9Vw+2x4Jj X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN4PR01MB7455.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(376002)(346002)(136003)(366004)(39850400004)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(4326008)(41300700001)(8936002)(2906002)(8676002)(6512007)(2616005)(6506007)(52116002)(86362001)(107886003)(316002)(66556008)(66476007)(921008)(66946007)(38350700005)(7416002)(54906003)(5660300002)(1076003)(478600001)(6666004)(26005)(6486002)(110136005)(966005)(83380400001)(38100700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eHFQVTF0TXlzMkVRTHhjYmIzMTZWVWlISFNGMlFrZ1dIN2JMYllBcmw3QUhK?= =?utf-8?B?Z3NQbVFFVE5Oazh6cU84cWlwSERWSVl1RDFva3NpSEZWb3NkY0tBSCs1MEgr?= =?utf-8?B?OFdHTHByaW1hVENVd29vK1FvT2JSNkd5OXNjVGx6ekNTa0lyRDQxcERBQUNz?= =?utf-8?B?SytIdkJrVmducisvTTQ3OUliZ2ZKRjdjMkhyQ2JPellIRjRWL2xsVWV0a1h4?= =?utf-8?B?Z0haNkhtS25RODFGOXFyd1A4Zmk2a0FCbjBMNEJPWnJJdVpJNEZZc25ySHZt?= =?utf-8?B?azcwZGJKV3dWdXYyZllvRk41bWFxcCt5NW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y9uNDY5a0ZuUHhNSUlSUHBBOWxUUy9iZ05TM1RtWGVr?= =?utf-8?Q?xoNJuPI0PObz8XFTbt0s7HE=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: c9a1de63-5b15-4a90-f891-08dbefe70950 X-MS-Exchange-CrossTenant-AuthSource: SN4PR01MB7455.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2023 07:52:58.0507 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xXWCxb/6gOoZy7TCGE+RliTSmEbv2+paS6ikLgBY2O/rmYGuufU7+hkcvsMxRx0OYZq6LBcZjUk8UsK2UT++hme76QPEfJchVucpnqZeBdQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR01MB7895 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 27 Nov 2023 23:53:15 -0800 (PST) Rebase on the v6.7-rc3 and resend the series as per discussion at https://lore.kernel.org/all/d0773df55a6fe8a5c9b1a3d7c8dd2e1343643272.camel@codeconstruct.com.au/ The prior discussion could be found at https://lore.kernel.org/all/20210616031046.2317-1-quan@os.amperecomputing.com/ This series consists of two patches to fix the below issues observed when testing with slave mode: + Unhandled Tx done with NAK + Early ack'ed of Tx done (ACK and NAK) causing "Unexpected Ack on read request". v2: + Split these patches to separate series [Joel] + Added the Fixes lines [Joel] + Fixed multiline comment [Joel] + Refactor irq clearing code [Joel, Guenter] + Revised commit message [Joel, Quan] v1: + These patches are first introduced from this disscusstion https://lore.kernel.org/all/20210519074934.20712-1-quan@os.amperecomputing.com/ Quan Nguyen (2): i2c: aspeed: Fix unhandled Tx done with NAK i2c: aspeed: Acknowledge Tx done with and without ACK irq late drivers/i2c/busses/i2c-aspeed.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) -- 2.35.1