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: 13470575 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0A352C07E98 for ; Tue, 28 Nov 2023 07:53:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=WB9/8vBAjDHUN6aTExqT6ymwbxQyVXX1I3BcgxRzqis=; b=lixjzlfQR5GAya eom5WZfTfVarWT9iVuBNKCxWiJ4pRRT/3Lo3UGE3GYODZLG5GkcUsebpbWlfBwc5Zt8ZcLnUR0nHd VomhwSsoT6DFzke9wNAAuq9MUNrFfIakb149PuA13yfwvqh7nAwUxRqAS48f0QAnrL/wJIKNR7WU5 aT9g1mwQnUd9CKszGwdCtw2Q2k8rMUgR3XArocbQrP72gtTXBjLfel4MCXPaD8+zH/rTXfSOPA5zM a+2xHHRYcRMtGVHZ4Cs28f9FqXcoBMuKNTZLc+rQhRhGZ17mbCeGpeluQP01EtkQ8A6hHc/NlJppO 3+dehH3EUNfL7bMpuzIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r7su6-004S2j-1A; Tue, 28 Nov 2023 07:53:10 +0000 Received: from mail-mw2nam12on20727.outbound.protection.outlook.com ([2a01:111:f400:fe5a::727] helo=NAM12-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r7su3-004S0r-1B for linux-arm-kernel@lists.infradead.org; Tue, 28 Nov 2023 07:53:08 +0000 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+y5lzbx7A7jBwDNm75CAADkDH7LTDIJgNdCmoo3aL?= =?utf-8?q?ZTQEJFAD8Fe195SSpC/BetZVoLjARrnPB0Gg8P5ZgLGKvedhgxx5Cx2jdhwRR+0mq?= =?utf-8?q?tYz/Cf6uS6N8axplIDhyIQQ8Bc7q/qsqUEOdcFlIs2WeyJPgOnf4u58NEtkQkn+jh?= =?utf-8?q?3CXfy5RHHnrtKRJ8qik7ZxRZiEtaH+cz8F062PF3x/cBuUPBZdl2hpjnf1MFmNY40?= =?utf-8?q?KVr8kNIoK4i8TKlDBM/vqm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Ip2+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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231127_235307_405664_A40E172E X-CRM114-Status: UNSURE ( 7.54 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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(-)