Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2096118rdb; Thu, 7 Dec 2023 19:33:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IEX33zdksfcSXxC/pXtNr0nhLvDsK670gD/QoUpjbwkWJ4NDjXqkbV99vsjMZD/QBhqkMdp X-Received: by 2002:a05:6a00:218c:b0:6ce:daed:5d7 with SMTP id h12-20020a056a00218c00b006cedaed05d7mr236997pfi.48.1702006393588; Thu, 07 Dec 2023 19:33:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702006393; cv=pass; d=google.com; s=arc-20160816; b=Ih5tmlad5Z9QNe4Aq8e5eMyIWgagRDMK8rKuxqWanypf/yqF0xBP+olDrUejujBLK+ qxtEjBBMQpy+bVUSmrXkRLuYNlF4bh8yNrztfMb7pMD9JkQTSR8p1l5HJeMAEUbJrwRn Ls15TWy24FmY+92QOVNtz35fbSkph1yZXL81vxRQATg68Sh7kVbZvosJnCf7/5BjA+8J 1Vy3RN+uvAg5MWLcxQ3ktRooyzq+vS/asqWXWUDJnPlAvIDIvG+WI2axdxS4wBZ1bItt VFpsNTBTlvSQUkvHCloZbwwL6AH/eIDSld1icNAqW0ChI61cBO8d8OlFyDChOB4W0+QY dlDQ== 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=bajVwD4ZdB8aHc53zXPQvLjOm7ZP5I+zY7TytJ7jANY=; fh=WFcqSubssMIwC0Dm7Plh6RRvLP+WIFWeZgWd743wkLo=; b=tm7lWg3sWHsPX97xoXh/0WO8veYHXVnoEiOGb0EwSMqZFqzEehPZr6D5rfffIW2MFu 3IeflyiaKcwxG1WXIx7RGBzHZPTSS6xO3Zv+9qDrO5V0xdTvghLW6Aea7NL8Tx1FjKa/ R7kdMtkjQziRcZyHI96DbQ8cqDhrSEC1bcMuFDKIIBp0/hMZUJjB/i94lSOOwP2TDbgg nfyUauTkLTA0tO/h2TcoYh9qToBuvjtcGBdgmNIJ3r9162/E5EsdFkfpC3lOfw6wzMcG Axw5p0gPctGGNLy07y/Znx4o3UCJ60p1nSmcGMH5uB8qnNXSSokLpb8sjezWOshd9lEc Mm+g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=gZVuvMGJ; 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 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id bj17-20020a056a02019100b005c65ed0f688si817391pgb.296.2023.12.07.19.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 19:33:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=gZVuvMGJ; 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 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 902F3806532A; Thu, 7 Dec 2023 19:32:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235643AbjLHDcI (ORCPT + 99 others); Thu, 7 Dec 2023 22:32:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230225AbjLHDcG (ORCPT ); Thu, 7 Dec 2023 22:32:06 -0500 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2134.outbound.protection.outlook.com [40.107.100.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D74F1738; Thu, 7 Dec 2023 19:32:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nqE0mp5M5tXq36mV/G9bswn9WAnp6dW4FGpD3mOx/wzPglpH09xhmPB4a+wlCj89D28HuV91KEr9nxIEEDcxoHWu5XBQ6U6UCOCILY90ltmDx7R0tNLVDO7yq4+Z7RVaP9VkKIOvPTzgfThvIrF/oFC+3Fu1KavJYAGW2euIEiVGAcQvnWmn5GHgWGL077v2fHRAVIxVO+WV9CoewvAnbGiEMpNT+qcSw6RPaeamql6WLC69WE+wQaG2WV9MOfzwAGKkWjcApbqXMZq/oDsau35DyGbrYIRH2kwT5KRdg+lW6EeBhpkSNNZ0IBkrDNT+jX5lP2EnE7ed369uuAKyeQ== 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=bajVwD4ZdB8aHc53zXPQvLjOm7ZP5I+zY7TytJ7jANY=; b=X9VPOnCTTF8hFjuzd8PvsX62qd7l7YOXcGaJPwBEMIBBWCIGD/qz/evz81VGMjISEiQ5icmRZBbuarEUwmnuOJ1EbRWNxH05Su+E005oUqt3QiO/0UNGO0/Di/sX2YrzVjNEWjtLxNE1794zxiN1u8XGjwswkObBrIi4BR+V/zGbXtBCOJdjM5bysqOkdp9RbuU99QXOBElZX/k6jgolfQLKAuxWwMxroZP0Dov+2xeQtfP9X/MKK3so37A5TeHlCBn8Nbe0aKEHMOrYgOOzmwhYr9VSh1orZvYjBRrh1TqCxalHPnTnbYo6PEnbO9lnj3teTkFDUTxoU820OT41UQ== 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=bajVwD4ZdB8aHc53zXPQvLjOm7ZP5I+zY7TytJ7jANY=; b=gZVuvMGJ+WsNomkHO/cvWuHU8Ox4KNF9zAQ267wpUe2oBDMFUNXGZqW4GWrfeEtngYDosLjkXgNOSV0GLG6ZNaqmU81Gnp5crCidem5ABYFthCmpmBZxF6iYVDVfXJ/wA6sWFORqeRHQiRQVyroBKfsGCf5U8IR8blgHjMPINlo= 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 DS7PR01MB7784.prod.exchangelabs.com (2603:10b6:8:7f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.27; Fri, 8 Dec 2023 03:32:03 +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.7068.028; Fri, 8 Dec 2023 03:32:03 +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" , Quan Nguyen Subject: [PATCH v3 0/2] i2c: aspeed: Late ack Tx done irqs and handle coalesced start with stop conditions Date: Fri, 8 Dec 2023 10:31:40 +0700 Message-Id: <20231208033142.1673232-1-quan@os.amperecomputing.com> X-Mailer: git-send-email 2.35.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) To SN4PR01MB7455.prod.exchangelabs.com (2603:10b6:806:202::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN4PR01MB7455:EE_|DS7PR01MB7784:EE_ X-MS-Office365-Filtering-Correlation-Id: be53e5db-e957-4c65-4f3f-08dbf79e3ed8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 18Pn6TKD6ak7Zhp+wWSSQ6OU40KmzlFjG/niXRfh/vkarDdKMKuHfNOW58dq2ZG9/vSeRM9OfY/Aa3lUpnlxC1dlB2I5h7Z2b8VxWBItFddUEjbgB+CYhaIUgOIpLGv+dxTYMRmoODnyqaow4DMg309cwX6n41a1vZBJ0Awsq/i38D9qVqyE/1DdLokzoHlwXGWEJWwX7LYWHdOqLUmkRpa/KX+mYYCiVsvCsp7NOwZvvFDQEdnFgxuncGXmNOz0ZLQYfCS/4ahSsuBdBJhN9MflQ+7jqT5/aDt1V1OuDborvJa45vJuGaio7KQG18312rxjwwBEsx56DgJTYRNyeh2wcVkcImNKmEH70thq37erqe5e/rpFDncZWk3wA8qbsT2NKTxX1EOTj/kal4OKkIIg83FaIMaebnEspkXzlNroego9wWjRlOgUUodyKfLYwfM4j+YJMX5I3/1TSLRstGwYp1decqUg37RkDuO9edg9Aeq13rOBtGgJXUlTPpB1s8LsXRb1vvFKXmLEMNGVo10HIUH113kAl7NnxVChVA2EAJekhdEHH5J2QK3i9yKfs5Sp5mKuN/FDf8FAoUqyypQP30RLv1V6Z8xcunqrPBpW00y0JZgZ9a21y/QaAjFXniWuYeXjw9LP5bTKwYzduVO5vCOY9S6Y5ZKlFfgnMOA= 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)(346002)(376002)(366004)(39850400004)(136003)(396003)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(38100700002)(41300700001)(7416002)(5660300002)(2906002)(8676002)(38350700005)(316002)(4326008)(921008)(1076003)(110136005)(478600001)(6512007)(6666004)(6506007)(52116002)(2616005)(66476007)(86362001)(66556008)(54906003)(26005)(66946007)(107886003)(8936002)(83380400001)(966005)(6486002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?X1xR5eN0pHZh1uAhSSyXy0A5LWj7k4hl7WRijPJlme6viubNkPgymyHLtvbC?= =?us-ascii?Q?Ur9x/9tVF7PuE3UfM39W8HnmJPAaAcOiTLx0+mB7Vx1zSYqT6bsh8x+lqOtA?= =?us-ascii?Q?UjojgQ6djk36tFulp0FlgAmHiI4ayDXNPMUmCXhsBW5kewOzFS+1O/rrp9Kk?= =?us-ascii?Q?pti3ct6cVGG7SYAmrePej5ZzExMfqvMXFn+Kluw501cny8ukfvkOw758zte6?= =?us-ascii?Q?hfXO2xgYCLCBBj2jbseuDpnDpxrhfPwsyc3HXbsdVWj+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HAiuVRsLfXH+F6Qe6Jj5sWIRr3VHQgiwwv?= =?us-ascii?Q?JNuQjuws/f00lwmS00qBZgMP+48nLM/kQ84BZvI00KzPut31cyAMYEfbrBoi?= =?us-ascii?Q?vLazwEqYg7hCu6ZuUAqldEH1AZr0GeNGQsWZot3fSUKygVu3I5V/Esbms14D?= =?us-ascii?Q?m0yLgJiqgDWvp7EJdQQ6tC73t84A9SHIsfIiCh742ol+D44mgi/j9OCGlQy9?= =?us-ascii?Q?fRfgJ4az3YByOLbmnjXZPmkpdfOcJOmxsrGO3SPNXZg2ZcMiRaHjnnzrqi22?= =?us-ascii?Q?lBLB7hYiFJRpxdrkd7o7PV49T0VUbxjJ/q9BjDFiXlXm/ufWvtaVqZPKANS6?= =?us-ascii?Q?Qb65RO5wKX8ga5WXf8rnLmJr+WvviBC28jxzUN2YQ4rV3g+nddu7xicVpk8a?= =?us-ascii?Q?Thy3tihiN8ai1bh5YxdecgB+4J9JHiFh2z3G4BHjbnViC4AKi+kqLUX6AqMu?= =?us-ascii?Q?pMKa/jr2s1/Gj3AqEj7fGr0=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: be53e5db-e957-4c65-4f3f-08dbf79e3ed8 X-MS-Exchange-CrossTenant-AuthSource: SN4PR01MB7455.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2023 03:32:03.7359 (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: reYVh9vf0Ut9jJckx0NRMM/OP1S08MqYWorP4HMiT7wpxEoxRDltJ1p3rckgmPjzGA10Im3YF/bb4XOA+aFV9m8/p47GGX+ECkVbWfVkVs0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR01MB7784 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 07 Dec 2023 19:32:23 -0800 (PST) This series consists of two patches to handle the below issues observed when testing with slave mode: + The coalesced stop condition with the start conditions + Early ack'ed of Tx done (ACK and NAK) causing "Unexpected Ack on read request". This series was verified with ast2500 and ast2600. The prior discussion could be found at: https://lore.kernel.org/all/20231128075236.2724038-1-quan@os.amperecomputing.com/ v3: + Fix the unconditional write when ack the irqs [Andrew] + Handle the coalesced stop condition with the start conditions [Andrew] + Refactor the code to enhance code readability [Quan] + Revised commit message [Quan] 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: Handle the coalesced stop conditions with the start conditions. i2c: aspeed: Acknowledge Tx done with and without ACK irq late drivers/i2c/busses/i2c-aspeed.c | 68 +++++++++++++++++++++------------ 1 file changed, 44 insertions(+), 24 deletions(-) -- 2.35.1