Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2252770rdg; Sun, 15 Oct 2023 19:51:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH91Ajr6HcFAalckF7ICbRrZ3a4o876d4D+FdikexcVYG/045SI25ivfPAyPAh3c7AVmGqg X-Received: by 2002:a05:6808:15a6:b0:3ae:4ca9:cae5 with SMTP id t38-20020a05680815a600b003ae4ca9cae5mr44242773oiw.21.1697424704947; Sun, 15 Oct 2023 19:51:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697424704; cv=pass; d=google.com; s=arc-20160816; b=jXSQvDTnMJYfgci/yU8ueuqAAZp9HnP7Kt1xq4Upxpgyy2yK2HRqEbz6HMy1JssfkH GogfQHKFPH2ZYEHDtp5wNoI7z0JIMLNfqwJGgHZuGl8OXYqw6ZCeXeddCMHJt4eZb1Dk Cdtqt12v+06Zo913RTpSvVWkkAWdLgnva9nKLRXRr9ikx457Q3+MU8G20E71awQIP1I7 Kdtb2kUgJPIhT0TMV2GME1dBOuyp5sMMPfYNUCLmmNmky+tnf0kt1Js9P4co3GylwSku NQHmIfLKrJLG2GYrisZys1h9zIMjIZ8kcSFZ2Ob4hmopaZmePD39NQ7TrHc3Q6nsi4Q6 zE9Q== 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=U0BYKBBr89xS2YbAar/mrVMgfL0OUf3YU1LP3o0vVrU=; fh=aycs0sfYdEGY00Mc4g40loDZvKecPFTOeHmLo8xZp6w=; b=Qmyp0E+5OOMlVEqBviinA/DRXa4UvK0bu1vvRLuOIlfb3kSDEeKFGRtapR8MtuOIu3 f92gY8wyY9OtoKQDfQharE5LWhR6PHPgPD74u1vQVHXU2ti/MXCfruAScLIV0WuK1Ikg N+50ukcYck/jo3fpjjWDqCVniw15tPNEJ9mvG82GWVPfvpCS/LxX8gaB3VC7Le4DVFt8 pTBR/zJow6Ekb3PyxibKo3oyGk/mn5EDuSqCv/9rcNcjdA/lt9fZeo2HIeyTIOskE1uR WNP0E3hBphSQ9a2FLm2NA6fgGQaO147qtmOdHs/CMPuKHt2zP/k9zmgZO4IhNagAt28q 8Smw== ARC-Authentication-Results: i=2; mx.google.com; dkim=temperror (no key for signature) header.i=@amperemail.onmicrosoft.com header.s=selector1-amperemail-onmicrosoft-com header.b=sKzMdwET; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=amperemail.onmicrosoft.com dmarc=pass fromdomain=amperemail.onmicrosoft.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 Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id w8-20020a63f508000000b00577f7b6e7b4si10486273pgh.624.2023.10.15.19.51.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Oct 2023 19:51:44 -0700 (PDT) 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=temperror (no key for signature) header.i=@amperemail.onmicrosoft.com header.s=selector1-amperemail-onmicrosoft-com header.b=sKzMdwET; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=amperemail.onmicrosoft.com dmarc=pass fromdomain=amperemail.onmicrosoft.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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E6994806139A; Sun, 15 Oct 2023 19:51:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230478AbjJPCvV (ORCPT + 99 others); Sun, 15 Oct 2023 22:51:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230451AbjJPCvU (ORCPT ); Sun, 15 Oct 2023 22:51:20 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2110.outbound.protection.outlook.com [40.107.237.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6547AB; Sun, 15 Oct 2023 19:51:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QKvji5hpMuR4gmA6aID9Hy+tk4RbJnC5w8VLYFwV+f7vjmoUdnIZ1IWnNlTzoglG4jIxUWz7oTTNI3oZGYISy60vLS252jRZ76cOSRMl8n+uni8Yo0BqtWkOh5eBh83C+D3aVJWPkWBbxKM7de4OumWTY/hKr0rYNBvl9nzmxzDj2cl4DaMvLLWJFc1HaHlR2o04FABGgsbiVeN7aF4lRuFfgco73W/w8+3G+hpP37rZNj2JCBfxpOuDkgS+xUcU3lK+KP/wheWWIjAabCdwXNemyALKCd6aQJFm049SoDnZxI4QO8ylSX//q9OqiwULyZzoU/iuzk0EsQ/gDlx5LA== 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=U0BYKBBr89xS2YbAar/mrVMgfL0OUf3YU1LP3o0vVrU=; b=UjGkXmrdy4qs+p95LqCcvg5/qMvHP4T+5/Eim2xaN8Z1haFdIds2XlL2tK7H2UEXfakXswNUaLxdtAMjB0eoZQhyZjOyF1xBnBfduyHgoQmq822zRB1fQECEFB2I16iGMboLGEub5kMaQf6onELWq8608+cGbdvuOwaDhmyf7tsRKx6OIZ09PaGdVZ0+4Vx+GDANPp2j6HejlNAhWVbz9jjoabZ5793IrxyFe8IpeSHU8TpwxJJYrWbTzYitKofxBC+3WZ5JZ1H7EFpJgObf8b9j2h6wCTC+hu3hKVYx8rgaBtbKHcHSkq9boN9+rl68CZqHvFgFV+uqRfKDHVI0Zw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=amperemail.onmicrosoft.com; dkim=pass header.d=amperemail.onmicrosoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amperemail.onmicrosoft.com; s=selector1-amperemail-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=U0BYKBBr89xS2YbAar/mrVMgfL0OUf3YU1LP3o0vVrU=; b=sKzMdwETpxIAvLX4yeBitzeEAiA44/jCPhjio33YJPto4axTb7+sJvM0BKLk6fwEGKO2R7FabrQyGDfL7cdzXvH7Le+LHOlSeUACl+XXfievUEY6vYk5K3IpTzpTP5p1TUFBRpIbM69dfEJIVTd93UJ8kUL1y5ogpluiR5yQtJg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amperemail.onmicrosoft.com; Received: from SA1PR01MB8131.prod.exchangelabs.com (2603:10b6:806:325::8) by CH0PR01MB7049.prod.exchangelabs.com (2603:10b6:610:10a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.35; Mon, 16 Oct 2023 02:51:15 +0000 Received: from SA1PR01MB8131.prod.exchangelabs.com ([fe80::5dd0:9039:f27d:884c]) by SA1PR01MB8131.prod.exchangelabs.com ([fe80::5dd0:9039:f27d:884c%7]) with mapi id 15.20.6863.043; Mon, 16 Oct 2023 02:51:15 +0000 Message-ID: Date: Mon, 16 Oct 2023 09:51:01 +0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v1] i2c: designware: Disable TX_EMPTY irq while waiting for block length byte Content-Language: en-US To: Andy Shevchenko , Tam Nguyen Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, patches@amperecomputing.com, jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com, jsd@semihalf.com, chuong@os.amperecomputing.com, darren@os.amperecomputing.com, stable@vger.kernel.org References: <20230929035356.6435-1-tamnguyenchi@os.amperecomputing.com> From: Tam Chi Nguyen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SGBP274CA0012.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::24) To SA1PR01MB8131.prod.exchangelabs.com (2603:10b6:806:325::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA1PR01MB8131:EE_|CH0PR01MB7049:EE_ X-MS-Office365-Filtering-Correlation-Id: faa681dc-db4d-4ff7-7434-08dbcdf2c366 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CNxfQI5vRFS8AqimSkh/y95EOtt2eNQPnOwxo4wCk9JjnsWfYR2pXW584q9HzYyeWHYKeLvvovdiMI6rTus9Ksdbrn+MJ2gA+ZObpYX1eqxKHHzXshwmPFvnqQ9hSkn/YoIwCVuXXztYM4BEDwK0v9oAY+4qvsoIFpgSgzIgAub2ThuRFpgrItrbl+OE3Z1oQ4gBeF07/0EyYpd+9CwXELA2mIUmdEdudwcRvTU4EegcrADBiMlj9pHbvS2DJDAR0nvVRects1OtnWDzPPzfBuIkMIoGCOSH8oVa6lfLQ+BFO7NMpb5cxdD3oVX6Pk+5mxN97pySHsiCH3wy16jhQep8yaqfc+ZGckuwVvMVEpn3Ww+cbsuJdd2yiguxLCC/gaDr0aU5Js/CKpQ+qGSjJTgbbrF1eZc/i81hTs0RJg+cFsmQGGB+v69EPWKyi1vGBbDyFZVPD+Qencnqz9Dvey0Z89X3OpQGlBVa/UJBq02UimBWuanMLXWQg+miTOO/c/fri2gXXzkX2F2hb44qDNyHfbaeoJyq7a4uErGu6CTA7CxvdMadAzOxSloDDBW6tOETw6rasq95U7bHa51cQRglf8lYwbHajLa2P1ggT9oNnESFopNPCRY6WjF7r1K2 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR01MB8131.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(39840400004)(366004)(376002)(346002)(136003)(396003)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(478600001)(6486002)(6666004)(66946007)(110136005)(66556008)(66476007)(316002)(26005)(42882007)(53546011)(2616005)(6506007)(6512007)(4326008)(8676002)(8936002)(2906002)(5660300002)(41300700001)(31696002)(83380400001)(83170400001)(38100700002)(31686004)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VGRnL0NZK3RJb205K1A1dktPa1UvV3ptenJHcmRIQ0lXbjZxTllrRTZ5T1lx?= =?utf-8?B?S2JncTJLeTY2Z0ZNdHptN0NGVTZMRnRFYXora3MyMkFsOFVBQXZETGVkbVB3?= =?utf-8?B?M3pKSjd2cHlkNXJVcXNuREhMaTZwSHJLZkwyNWZxcno3U2x3M1pXOHNKU2tK?= =?utf-8?B?RWgxR2pkbjNBT2xPN0tUdTR1ZmExRGZyRXBQNUNMdGNTWDU4VlpPOFdvZ2Y2?= =?utf-8?B?V1djUDhQbGRQTXhHK2xVVWwvTmROU1ZDcDRhL2E0a1cwVHNWWHgwVEJNd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3STlyb3dVWklFRVVEa1RMdjFyU1JzaDNIQzBvNzZz?= =?utf-8?B?bEFrMS9QK1R3RU9CVmNZVTBrcWNKaldIc0hWWmo3dm5sZ0twczFTOTJjUS96?= =?utf-8?Q?H8hCqnqMv8NAh1nJl05uOJSSx3mta6VDTBHd1xKeka+F?= X-OriginatorOrg: amperemail.onmicrosoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: faa681dc-db4d-4ff7-7434-08dbcdf2c366 X-MS-Exchange-CrossTenant-AuthSource: SA1PR01MB8131.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2023 02:51:15.0870 (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: Og65LKxj4MOFK5DTKCE97BH+xBKMlUaQSyvg6mEgH7oKwlHzAl6/vj859N0ZDKwnyHkI+7UdX07pmDeSyeSbGo29vp3bxudR9avcARnZEzqGtPWf7HxPBPHX2XTzsIlx X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR01MB7049 X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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]); Sun, 15 Oct 2023 19:51:25 -0700 (PDT) On 10/3/2023 15:57, Andy Shevchenko wrote: > On Fri, Sep 29, 2023 at 10:53:56AM +0700, Tam Nguyen wrote: >> During SMBus block data read process, we have seen high interrupt rate >> because of TX_EMPTY irq status while waiting for block length byte (the >> first data byte after the address phase). The interrupt handler does not >> do anything because the internal state is kept as STATUS_WRITE_IN_PROGRESS. >> Hence, we should disable TX_EMPTY irq until I2C DW receives first data > IRQ > DesignWare Got that. I will update in V2. >> byte from I2C device, then re-enable it. >> >> It takes 0.789 ms for host to receive data length from slave. >> Without the patch, i2c_dw_isr is called 99 times by TX_EMPTY interrupt. > i2c_dw_isr() Will update in V2. > >> And it is none after applying the patch. >> Cc: stable@vger.kernel.org >> Signed-off-by: Chuong Tran > Who is this guy? Do you need Co-developed-by tag? Right, that's my bad. I will update it with "Co-developed-by" tag >> Signed-off-by: Tam Nguyen > Other than that, agree with Serge's points. Thanks both of you. I totally agree with Serge's points and will update them in v2. >