Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3744466rdb; Sun, 10 Dec 2023 20:09:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IFvDEDlH0T4DtyCjqAhz0A4CrCyen0Jh+qdHyLv2Kg0PDSa6xT5FE/cIl2Xams0P4snb0aM X-Received: by 2002:a05:6e02:1a08:b0:35d:6335:ce49 with SMTP id s8-20020a056e021a0800b0035d6335ce49mr6536083ild.53.1702267762763; Sun, 10 Dec 2023 20:09:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702267762; cv=pass; d=google.com; s=arc-20160816; b=LiDcM5zAFuGkjL9KJlVkAuqZZ9+CJmQgMPZZvyTsgGYDKqgInu2tEF8Kw8bv8lXpY8 T6R2nL4EGLX744kdlMcxQcnMlf9TQFCkaHi/8S74lbJo71tq4kNKe1p1qsxI5TTVEOEA go5Wzk6DaIScCVhSnDOVD42oK0FkNB1OIXWN14fxx6uanInEdLl9eaEIelJWIGQSnAq2 WJ1gwAqRwYUzZDhOE+sTPMZfKoubZLwt3fQf5iLGQOa6V57vUWEv7KqeZtlHresNNpNn dgGA5/MQpyAFmkSaD//h8RhMgBicPTokuxCvYXPASYcLKhN2tOL8/nf3m97B+iM9E0sM L9Rg== 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 :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=r5lwL2o5gQzDdQLlj7xI/AzAXitXF9gphRtqEM0UIGQ=; fh=yJZOZD7aiBFw4ig/RBNVIxk/Q/EMSnX+j62jGsqzG5g=; b=KBHPGBsgQfjln0o4osaH88XtDr6K3fQ7TjEg5y2X2kFmGcdNoneWGwcZjcuNWuDjUI LOy2mfwTiRFw1oZjej/OLq/+lCU6mbpIXjSjLOX/ueoKpLNpi78E85AxwChj96Xa5fph FHEa4LzFOmzaSWwsqt841bxniORmHvKiGxJo739bsSfemTOcovGA2KvSo7TuLAW4GUS2 jon727Bj6c2dYIQu4HEs8Xj0NouMUJn+YRsFos6FuH/AAoNtbEihXHJko3xFzBZb+gGE Y73n5PkpTyYnUU0JpPuTSWp5yKIhD27IfyxRfKvAdqC3zwQWXcXqLk8vmiVsYdihzWl9 8QYQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=sSmTozzP; 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.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id k9-20020a170902c40900b001d0bcb62f98si5763214plk.368.2023.12.10.20.09.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 20:09:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=sSmTozzP; 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.34 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 howler.vger.email (Postfix) with ESMTP id EDC848057D81; Sun, 10 Dec 2023 20:09:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229448AbjLKEJF (ORCPT + 99 others); Sun, 10 Dec 2023 23:09:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232910AbjLKEJC (ORCPT ); Sun, 10 Dec 2023 23:09:02 -0500 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2133.outbound.protection.outlook.com [40.107.243.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89CD0F2; Sun, 10 Dec 2023 20:09:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WerzbFX1P4No0qNpMr2ZeIH+PPt0oMMdQR+dGHZYhjK6mYtvSd7onEZ63/Yn3GnjT86Py8mZ8uTKJlxYSReXfzCld0Q0y8HMr+0XZPvh2wWY1WPZDQNBCd6v1/ttaK/4OG8KD620TIiJOroEFpzNySNSelYQHFKDlP90t8IbeMipJRaOZm3u+QGfNWJPo8JcGkfPGs+j2rNWt9A05/Jn2pqXoP15DsuW2yyJ6U56PZtlelHT2TL6yp+lXvhMcyKMafF7cEwjrccOtoDNT8ua4wbSkJcaMw3tX7Hs9xW0ZFKEaREqqnUvZd5wwHM/5/4i5xRIT8yhhb8L26HV6yclRg== 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=r5lwL2o5gQzDdQLlj7xI/AzAXitXF9gphRtqEM0UIGQ=; b=SPz7QxTeUb8e/cMkMkNO053KnlrzqQjQxnt6HK5KuTBHdUn+kL1SBWynKa3ZkIdl/w/y4Ld6TFZ8jJN5xVju6IOzNGezaMOQRh+4TZ9OAmDxKdn7wdX9cEQv2TkCE9bCqbZv8oC1DkH0Z161psbSlLsjftRQmEZ09AhO+xA0dp0MPGeagu9TUNQgobZbOmlxlib2c8QYIQ6Wxp1LTIeSNT9l7/Hv0NOfqFg29rp0zsyM+/W1D8x9zXP0G8GM6YNmtU5sqeZtBfqODAwh/t5amslAVaTmsev7/WmfT7jrW+a5G/ldW55oCNnA3wA2kpz2RpwrWA2ObDCAkXDndBIyxA== 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=r5lwL2o5gQzDdQLlj7xI/AzAXitXF9gphRtqEM0UIGQ=; b=sSmTozzPMsNoE/IFv2xtvITZZTpLuV+O/GBUPLsN9iiwmYQo2GzEch972CPJBgI77MgJTcCw3NhJDTVgQHVy050uJp58eGyHnAe0Jw27w7c0DCVpnA7lZa8RDOJ8I7bsqlQv6VBz8JJFEPTMACcwfG+C07imcJ6X4MpOMWYQbiY= 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 PH7PR01MB7821.prod.exchangelabs.com (2603:10b6:510:1d9::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.32; Mon, 11 Dec 2023 04:09:05 +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 04:09:04 +0000 Message-ID: <43c99449-8a4b-4db5-8b1e-bc7ae920db76@os.amperecomputing.com> Date: Mon, 11 Dec 2023 11:08:52 +0700 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/2] i2c: aspeed: Handle the coalesced stop conditions with the start conditions. Content-Language: en-CA To: Andrew Jeffery , Brendan Higgins , Benjamin Herrenschmidt , Joel Stanley , Andi Shyti , 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" References: <20231208033142.1673232-1-quan@os.amperecomputing.com> <20231208033142.1673232-2-quan@os.amperecomputing.com> <79ce9162faeb113ecb13efeb58d95f8a71e1a060.camel@codeconstruct.com.au> From: Quan Nguyen In-Reply-To: <79ce9162faeb113ecb13efeb58d95f8a71e1a060.camel@codeconstruct.com.au> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: CH0PR03CA0307.namprd03.prod.outlook.com (2603:10b6:610:118::8) To SN4PR01MB7455.prod.exchangelabs.com (2603:10b6:806:202::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN4PR01MB7455:EE_|PH7PR01MB7821:EE_ X-MS-Office365-Filtering-Correlation-Id: 82ef1e47-897c-46eb-4f9a-08dbf9fee9f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZFTIY/AwYLZgHmI1omXYrxmO04kyWTrVIkeCXvK+uaW+PrqvTWVygvxUXNlD6otCyQaCRA7mjoZ6iyU0UBO+Lu6pPaZCnG1rTAKLgCqY5O73yiASoSUoXxFloQWQBXqFdPb5NjJ/6hF6MQSF1YjmTbvTViu+dr1o2stWfw1s4WvCnuKvgEfNMBUA2TJ9Wz6bBfrTXwOy19AUCfaCU5cJ99m/SL7FqMrPJUEocqdPitV8ggG51GS+VZrK/o6mXICJNSGE15vGDQAp/JNNFJZ3Fti1QqyINmkZ80Kc1fdBupDubnaIo3ldhfeKHQPI3hiTMc7GzS3XkYrO98A5kaqw03zhYJNoXcLuDDDpNdAy6h7//14aS5ucZ+5Fk/LPq12MyY8cHIpjFO2ZEG069ZU+AtV9Rg3lLu/aAhxcz77Y0tTis2zDlSAoV64egbL4c8pTQrt4W/3Ij6xql1fy/XkhxiQxiXQ3OhTA7eInqQO8MIQYz8HyHjorF4aLl7JqzmXffFxpHErEswzFCR56EErFR6boMsdw2y/tsF7qXZPH1Z4hAJFLn0ZYraizRXVBt+U5GjyUTqnOIY+Rg0mgbvWMwcgwwysUM7AI8Y3ZY4j+JuXmAAzSM5ZqOJx9q8ZFFwVg 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)(366004)(396003)(136003)(376002)(39850400004)(346002)(230922051799003)(451199024)(64100799003)(1800799012)(186009)(6512007)(6506007)(53546011)(5660300002)(26005)(2616005)(107886003)(7416002)(54906003)(66476007)(66556008)(66946007)(6486002)(966005)(2906002)(83380400001)(31686004)(921008)(41300700001)(478600001)(86362001)(8676002)(8936002)(4326008)(31696002)(110136005)(316002)(38100700002)(6666004)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MW53TDdEUGpQbE9IRVg4VDI1cVlERVBZZVhTNmVuN2NKTzY0T0FPYXgxcDd1?= =?utf-8?B?L2tCMENRYzhQMDRLWGF4N3FiaVVDZ1JwTFR4SnVERWwxL2hDbUl4SGtXNXJY?= =?utf-8?B?eFJya09SK3ZPVHVwZVpHU3I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=?utf-8?B?blNITGEzMGJoczc1ZEdtWWtJNHB5d2FqaTdkbWhaTHUySHR6M0dWa1huaFFS?= =?utf-8?B?bWV2SUVLdEFaYXQ4S1lxQUN5V3ZRcllOYUlUdXI2c09oTzd2R3l3WUsxY2Yy?= =?utf-8?B?d3R5ZWlGQy82WDk1VXUzQ2JwTzUrM0FvNTdDVTdPQ3prc2hIVWZQNG1WUDdP?= =?utf-8?B?TkxRZmZLQTIvenljdXpDemdKUkxMY1F4S0xZVUpEdzM2ZFVPNWlqM2dqZm02?= =?utf-8?Q?A8WVQ9QdXcDGjin1k7gnI1U=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82ef1e47-897c-46eb-4f9a-08dbf9fee9f7 X-MS-Exchange-CrossTenant-AuthSource: SN4PR01MB7455.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2023 04:09:04.7167 (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: HpvyiMmHLT3NruOPdaRuYpgmh51jmVyA3C+uFWaYBVn2KY2ZYlN+s3FX2DY4uOFKcdRosQfYRk87WT6jbyQTnIYSp3X8WrstMcOAVMBsPP4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR01MB7821 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 howler.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 (howler.vger.email [0.0.0.0]); Sun, 10 Dec 2023 20:09:20 -0800 (PST) On 08/12/2023 10:56, Andrew Jeffery wrote: > On Fri, 2023-12-08 at 10:31 +0700, Quan Nguyen wrote: >> Some masters may drive the transfers with low enough latency between >> the nak/stop phase of the current command and the start/address phase >> of the following command that the interrupts are coalesced by the >> time we process them. >> Handle the stop conditions before processing SLAVE_MATCH to fix the >> complaints that sometimes occur below. >> >> "aspeed-i2c-bus 1e78a040.i2c-bus: irq handled != irq. Expected >> 0x00000086, but was 0x00000084" >> >> Fixes: f9eb91350bb2 ("i2c: aspeed: added slave support for Aspeed I2C driver") >> Signed-off-by: Quan Nguyen >> --- >> v3: >> + Change to handle the coalesced stop condition with the start >> conditions [Andrew] >> + Revised commit message [Quan] >> >> v2: >> + Split to separate series [Joel] >> + Added the Fixes line [Joel] >> + Revised commit message [Quan] >> >> v1: >> + First introduced in >> https://lore.kernel.org/all/20210519074934.20712-1-quan@os.amperecomputing.com/ >> --- >> drivers/i2c/busses/i2c-aspeed.c | 47 ++++++++++++++++++++++----------- >> 1 file changed, 31 insertions(+), 16 deletions(-) >> >> diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c >> index 28e2a5fc4528..1c2a4f4c4e1b 100644 >> --- a/drivers/i2c/busses/i2c-aspeed.c >> +++ b/drivers/i2c/busses/i2c-aspeed.c >> @@ -249,18 +249,45 @@ static u32 aspeed_i2c_slave_irq(struct aspeed_i2c_bus *bus, u32 irq_status) >> if (!slave) >> return 0; >> >> - command = readl(bus->base + ASPEED_I2C_CMD_REG); >> + /* >> + * Handle stop conditions early, prior to SLAVE_MATCH. Some masters may drive >> + * transfers with low enough latency between the nak/stop phase of the current >> + * command and the start/address phase of the following command that the >> + * interrupts are coalesced by the time we process them. >> + */ >> + if (irq_status & ASPEED_I2CD_INTR_NORMAL_STOP) { >> + irq_handled |= ASPEED_I2CD_INTR_NORMAL_STOP; >> + bus->slave_state = ASPEED_I2C_SLAVE_STOP; >> + } >> >> - /* Slave was requested, restart state machine. */ >> + if (irq_status & ASPEED_I2CD_INTR_TX_NAK && >> + bus->slave_state == ASPEED_I2C_SLAVE_READ_PROCESSED) { >> + irq_handled |= ASPEED_I2CD_INTR_TX_NAK; >> + bus->slave_state = ASPEED_I2C_SLAVE_STOP; >> + } >> + >> + /* Propagate any stop conditions to the slave implementation. */ >> + if (bus->slave_state == ASPEED_I2C_SLAVE_STOP) { >> + i2c_slave_event(slave, I2C_SLAVE_STOP, &value); >> + bus->slave_state = ASPEED_I2C_SLAVE_INACTIVE; >> + } >> + /* > > If there's a reason to do a v4 then an extra empty line above the > comment would be nice. But let's not get hung up on that if everyone > else is happy. > > Thanks for the fixes! > > Reviewed-by: Andrew Jeffery > Thanks Andrew, I'll add your Reviewed-by in my v4 with that extra empty lime before the comment. Thanks for the review - Quan