[v4,0/2] i2c: aspeed: Late ack Tx done irqs and handle coalesced start with stop conditions
Message ID | 20231211102217.2436294-1-quan@os.amperecomputing.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6946797vqy; Mon, 11 Dec 2023 02:22:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IFi30gofiKoiyRuBGMUmy+nzw13acmCEXCVN3tl7mPsEkx+ta21Tfpsc0WXhNMhU7mzS2d2 X-Received: by 2002:a05:6870:b48e:b0:1fa:fadc:4d1d with SMTP id y14-20020a056870b48e00b001fafadc4d1dmr4990470oap.53.1702290172522; Mon, 11 Dec 2023 02:22:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702290172; cv=pass; d=google.com; s=arc-20160816; b=VPj0wUAkweKY/dDpENpZUTn/O2qHHS5f66DCACw2OXA7LmEOlMB4jpgfkVrQ3CYz9i L82y5FmDgGlD+lpYyFfgJMFewIf4vWUaknLmau7ILohEWwew1O09rUsyKZ/wDaCfrJ+b 87xEQTTMaHfZDUC4WWO6qTdkCREDiEvcM8E36N+ZKnMSKkEAr+lHu2AhtbLNFr1XaRnJ kjIsKTcO+kHIygOns+7BEUP7GYAU2ZzTQ7TYrGIlWxxYFJVfAv3JyF1QF4+dHDyLe2gf 9HPzbgOSTSIVusWDpUf+chYkKzu6AUycBpPkX2tmfl0F+hl1bITrulKW4E/a5N32JYpO CGAg== 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=wkNVu8BCBYHj+9GrrTL1RInEeIlIgrqTWkAajkbyTKs=; fh=WFcqSubssMIwC0Dm7Plh6RRvLP+WIFWeZgWd743wkLo=; b=k/Sh+eulpN9UiiKCRbVvC6zUEg26gVQp9se4mgiiG1yXPjmOPPkPNIZqLDqgvljwRS Pha3k4sDfao6SEh3/m4Ow4CftEi/yIvrGMJfCbbswk9ei2eb+vcNLipLpizPHZ3XV2oP BVnI/zSqT/lAf60mfkBHnT/pR1qCPoEqOG0ZjobxIpcb2M/uOg/Zkpuiz7UIv4dyAG0J /yzIqTuZp7ZyWRuAI8Ig4SFHYoiU8Mn9Rm7EgtwKGD3FR1SpTeC69GAzvapl96S5NTAg QdM4TrapzJ3DoGOwpQ/N+Hs1zykWgDJtukGsrzstrnBVCJaXzx0Nudn+zi6miKjuH6ZO htwA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=G+RnZEIi; 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 m13-20020a65530d000000b005c69bfad7a0si5646601pgq.230.2023.12.11.02.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 02:22:52 -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=G+RnZEIi; 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 7585A809638E; Mon, 11 Dec 2023 02:22:47 -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 S234815AbjLKKWi (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Mon, 11 Dec 2023 05:22:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbjLKKWi (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 11 Dec 2023 05:22:38 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2100.outbound.protection.outlook.com [40.107.236.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A7C191; Mon, 11 Dec 2023 02:22:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sg4Rsou7wwcdZUWNR0ZD6ReRnhemirOOKRRvfVfa7WiNRrD27+RPj4RG2LDsX9kFeFOtMZTW/FhLoxSabsvFgOHtRejL455cyzb18+Dq70P7z/h3xYhmsBZhzt+QMvCoAPx4AU0kcIdS3e+LMjdml4Wqe8JGC3tN86VOaAW63Gm/OpWQBZ7ZHPyFXY+aLWhuQQeIlU7f/R6HvWuD1aJW61LbEx5gp7X15vzTWkZ/7nouHN/EFEmlp3E8PDPySeEwWxcU7POmKLFIrgztZ5qRaxVUyQrfE6wdj7CilRes8oVsrPO8V/8HW8PGOG50aEirAY3QccXHn2cPHVQxup8kwA== 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=wkNVu8BCBYHj+9GrrTL1RInEeIlIgrqTWkAajkbyTKs=; b=FjUR3gWzGBsP87X/WWZOcNpzHlALi52sb+5p+zjmeohonFFfscwwX/3uVD4gYa6MvXW9ms4e+o0M4ftpx3Sde/EBJiJwCYPaC1nUaylZGwVw/zOGEzCk7qavdkHdv+WRHm/BWntk+tY9gdqHvV6VRzXRaJNmU0kl+rpdo2mn8Rc4/q0mZ+YQzUccF7Q1HocfSbrOaZOTNwWtTYfsLN3jwiigY/5FVAK6dWt1vHf7OeztcESDS1d/oYQZ7Y4YfN3od3CYkZ1VtkxcB3FFmFcs+nw3r6EnBEE4ML05COaccWm8MdwD4YDEP78Xs1NAyIEUBQ6T7dfKx76fSjZpOCMbOA== 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=wkNVu8BCBYHj+9GrrTL1RInEeIlIgrqTWkAajkbyTKs=; b=G+RnZEIiJQQtHCP9OQA79+b12wuh6dWV4gSvLOuqIgvk7VoWKgh/x1qZl9tX7xm9rL4YroDl9NhoQ+kubRhNQy0GQXZEclGL1KmBzA/vif5ACylxucvXkUTtnQgBZikEiTS9Oai3R2gB5wV+e9FWY22N/90sgqRWdQSUAYrRvhE= 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 CO1PR01MB6568.prod.exchangelabs.com (2603:10b6:303:f9::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.33; Mon, 11 Dec 2023 10:22:39 +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.031; Mon, 11 Dec 2023 10:22:39 +0000 From: Quan Nguyen <quan@os.amperecomputing.com> To: Brendan Higgins <brendan.higgins@linux.dev>, Benjamin Herrenschmidt <benh@kernel.crashing.org>, Joel Stanley <joel@jms.id.au>, Andi Shyti <andi.shyti@kernel.org>, Andrew Jeffery <andrew@codeconstruct.com.au>, Wolfram Sang <wsa@kernel.org>, Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>, Guenter Roeck <linux@roeck-us.net>, 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 <chou.cosmo@gmail.com>, Open Source Submission <patches@amperecomputing.com>, Phong Vo <phong@os.amperecomputing.com>, "Thang Q . Nguyen" <thang@os.amperecomputing.com>, Quan Nguyen <quan@os.amperecomputing.com> Subject: [PATCH v4 0/2] i2c: aspeed: Late ack Tx done irqs and handle coalesced start with stop conditions Date: Mon, 11 Dec 2023 17:22:15 +0700 Message-Id: <20231211102217.2436294-1-quan@os.amperecomputing.com> X-Mailer: git-send-email 2.35.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2P153CA0007.APCP153.PROD.OUTLOOK.COM (2603:1096::17) To SN4PR01MB7455.prod.exchangelabs.com (2603:10b6:806:202::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN4PR01MB7455:EE_|CO1PR01MB6568:EE_ X-MS-Office365-Filtering-Correlation-Id: 800de197-143e-4aec-65a9-08dbfa3319b9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tY8UcZfQqGnOvz8i4bzN9Dh4Lmj1GVS+2ok8YWjTFCiB+nBPJtbn9nDpi2AYHb2iRUmnAJbRBRw8z8mo0P53wa7G3WzVOPkRvnQI3l+6Y0OMk9GSWV0rr6WSKw7Hh1syzHHZwCcljwTOKxbhkfK4R1JXq2HW3srm0bHyk2dnj4ak6a7c1lyDlz6V5FIYBAhC55EYdLnMiNZZqXmHimoYwtc069Bug1UcTqRiY1MtZekUj546VpomfqZtIqFGTHStMJ4cs3wnnrIW/sbrBtM5VQNcHZ0uKTVHGmtti8idkOur4ng1XhEkllfMPHHzjVvM6FaARub4f356w2hS3+MMWEa8wCbqkeqmTo3vVByFRAfYzUHcpRS7UwsdADVUKbftd/rjfC21bOvxIpLSQOqgCTmRG6XVfeqTJnDchJtLtB2NEMMvJQsw+y0NRjyT1s94YgN6Kv7kAOXmQkTsVxwbvDWoumlkmKF/XTDYOEVxlESEAJArrzSR7SFJ/y3hvXCoWClLt5sjt6xn7wmdaBR6nAKyxwOT9MJwqHI5H5ORnY2swdDOvmHfSjfyvrFIEVUe9MGDySOVdeFRywKbT7h4ZmZPhcHZhwWHjlPacvU6LgKeGJ1puktLQkc9v49Yum8Zl5Vfsgorf2vJFjvIAvUImg+Z6C3est8C9OpIjSL6OX4= 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)(376002)(39850400004)(136003)(396003)(346002)(366004)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(1076003)(26005)(107886003)(2616005)(6506007)(6512007)(6666004)(52116002)(83380400001)(5660300002)(7416002)(41300700001)(2906002)(4326008)(478600001)(966005)(6486002)(8676002)(8936002)(66946007)(110136005)(66556008)(316002)(66476007)(54906003)(86362001)(38100700002)(38350700005)(921008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiS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72d1F9SQK3cc5CC7d6cNrP9nVDrM70TuYuxNlsONqL6Fg/vuDB9/YUMhT1Ecs+TMCS8/SXvxWBgq+sfna2KdzaBncSXAp0qfFGDVAjxVGeeunSbtBepia5G67koAur9RQo+tyzdiQOAc+pIu3mvlGDOubE0oLkgdGc64rdbyJP/Rrjh/ryjLr3oHchTz6CWdCC7Es28aR8d/Esuo4Vy1P/hXHT67cSlnookhGmqrC8sMeiQ+bGsuNZ7Nm03+7e/9bmZ1gXW4u2LlgVsdkS+48WqdfzbgGgE2gHpm/YEvu4UFOVDjud8LBryAlIQPx41fe24uRXpDTotGp45bGOHKC46gB//EW1qdCpScHfMn5Eo6iYuEOf9jzGp1LyRp2Yxn30VMldPudAKittkCzzOJ4IQr2/HIfCZe+4+e6gvK4OHLlm3Cf3RRPNh28KiEhbLYV9VvI4yswhyjsJNqzwajYmI0xcfbiM1TaqBb+0hWN0fVaDRk2H/wtOar6+AbAxXtwQBbGLGwMMgvUWK9iibTNfL8RNo7/gevzs6Eh3DyfxOk2YifPjIGWLGI5gg5ZajcVCASmIwLTo1m7+xh9jrZ4xvMCzMFScvbc= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 800de197-143e-4aec-65a9-08dbfa3319b9 X-MS-Exchange-CrossTenant-AuthSource: SN4PR01MB7455.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2023 10:22:38.9219 (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: m2MEKC3BKOotvQ+Q0T+nxfOw1CndocZXpznfOpeFVsuKqkYkxOaZdwjqanGAeD0ks2drovNtvQHyaPEwk1t7ODSGnTqJI+cKXOnoL80xSYI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR01MB6568 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: <linux-kernel.vger.kernel.org> 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, 11 Dec 2023 02:22:47 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784980620235139514 X-GMAIL-MSGID: 1784980620235139514 |
Series |
i2c: aspeed: Late ack Tx done irqs and handle coalesced start with stop conditions
|
|
Message
Quan Nguyen
Dec. 11, 2023, 10:22 a.m. UTC
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/20231208033142.1673232-1-quan@os.amperecomputing.com/ v4: + Switch to use define macro instead of variable [Andrew] + Make the early ack conditionally to avoid unnecessary writel()/readl() [Quan] + Add an extra empty line before the comment in patch 1 [Andrew] 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 | 75 +++++++++++++++++++++++---------- 1 file changed, 52 insertions(+), 23 deletions(-)
Comments
On Mon, 11 Dec 2023 at 20:52, Quan Nguyen <quan@os.amperecomputing.com> wrote: > > 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". Looks good. I've reached out to a few people who use slave mode to ask for review and testing on hardware. As long as they don't come back with issues, we should get this merged and backported to stable. Reviewed-by: Joel Stanley <joel@jms.id.au> Cheers, Joel
On Tue, 2023-12-12 at 13:09 +1030, Joel Stanley wrote: > On Mon, 11 Dec 2023 at 20:52, Quan Nguyen <quan@os.amperecomputing.com> wrote: > > > > 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". > > Looks good. I've reached out to a few people who use slave mode to ask > for review and testing on hardware. As long as they don't come back > with issues, we should get this merged and backported to stable. > > Reviewed-by: Joel Stanley <joel@jms.id.au> I've dropped a build with the patches onto an AST2600 EVB and lightly exercised the affected paths using NVMe-MI over MCTP to a Micron 7450. Tested-by: Andrew Jeffery <andrew@codeconstruct.com.au> Andrew