From patchwork Tue Nov 28 07:52:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quan Nguyen X-Patchwork-Id: 17189 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3748379vqx; Mon, 27 Nov 2023 23:53:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEnzaswoF9xVTM+TT+A9F0MLU2ZqGcPaEm/KqGS8+oa7O7hITEOofWL2Jq82RbD3qBDmLgt X-Received: by 2002:a05:6a00:1914:b0:68b:e29c:b69 with SMTP id y20-20020a056a00191400b0068be29c0b69mr19751083pfi.9.1701157994441; Mon, 27 Nov 2023 23:53:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701157994; cv=pass; d=google.com; s=arc-20160816; b=gyABDWBTyH/5zAnJsF+WNhRJ4zBgFbOzh/6XfAfPNaz4HoGN08PhW71fNVP1uoHZVL o9Uh/1r4msBqhpaW1sKTvf+IRcE03xlOYyxg810T7rigGp0owApvixr6FuwK9RrZYQMB 0auKl9bjmAsSWmk2NYh7hKcv+gDJEkN4ZJV5earxRwSC5x1k0pgKKjuvywE9yA0Ri6eR BKxKJLQ4bXI2Wf6ojESY7jMISeyV2han0zNLtpzpaGZffFDpCPnTStU0r2pVRDcZhL/o q4HsAectmXCjYHLo0mSHhrFCujE6LJyd8S3gvfwtXKih0q07+IQ4feb/xZMjfspbYjYl z8Yw== 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 Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id fb16-20020a056a002d9000b006c69dfd3fbcsi11887637pfb.338.2023.11.27.23.53.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 23:53:14 -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 02D0780A58CC; Mon, 27 Nov 2023 23:53:09 -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 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?q?xqPU1tMys2EQLxcbb316VUiHHSF2?= =?utf-8?q?QkgWH7bLbYArl7AHJgsPmQETNNk8zqO8qipHDVIYuD1oksiHFVosdcKAH+50H+8WG?= =?utf-8?q?LprimaTCUwoo+QoObR6Gy9scTlzzCSkIrD41pDAACsK+HvBkVgnr+/M479IbgfJF7?= =?utf-8?q?c2HrCbOzYHF4V/llUetkXxgHZ6HmKnQ81F9qrwP8fi6kABn0L4BOZrIuZI4FYsnrH?= =?utf-8?q?vmk70dbJWwVuv2fYoFN5maqp+y5l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rHLBbIsAW2+9nBMImijJtSUuYigt8anPt/7knfX2mBQ3EmL?= =?utf-8?q?FpchDg8I+w5XImu+8WwhyYrMA5OnzjwcPrZOuaBM2bzydVqPOkEVNMoQw/PpXz3W5?= =?utf-8?q?sHQvIDHBy13ws3AZMjjTxuGOmmlojRkzfAOz87M+YDo1rIi0pjkYFGJnN5BmsX5OJ?= =?utf-8?q?BYr9RF2I8pHWwt5+mP0Lga+kBlQ+OArRV41Rrfjywcl49M0/SdOYt2Xa2dLhafVpd?= =?utf-8?q?3p2zJdKOSiHUOaQ13+nIp2+fpwun0M/QZhjChn71bLec8UyJjlcCbmf1osyamvvYI?= =?utf-8?q?ZsHTFVOHYJFtpgCJeLcnxy9zXm9rAp+1moiN8BS0vJ/F8E61KaEHaQI7Y8GQAdBM9?= =?utf-8?q?QCNqdJs0QrZPH6JNFUU6zIH+Oac8/IHnkTIoAC/OMUsMYVREj10c+/C/9+6vK90s7?= =?utf-8?q?/n469kFnPxMIIRPpA9lTS/bgNS3TmXekxoNJuPI0PObz8XFTbt0s7HE=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:09 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783793444873406501 X-GMAIL-MSGID: 1783793444873406501 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(-)