Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3981308rdh; Fri, 29 Sep 2023 07:58:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHMbWDRxdI7zcyiMl6rUI7N3dwzShNieEG+HgQkdvbagqbelm/ozb0OyHQUWgcyg56o133y X-Received: by 2002:a05:6870:40c8:b0:1be:c87d:c670 with SMTP id l8-20020a05687040c800b001bec87dc670mr5300270oal.47.1695999510291; Fri, 29 Sep 2023 07:58:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695999510; cv=none; d=google.com; s=arc-20160816; b=zyuDcsqpSO+THoWJ4N7QnRyXT7+3a2uhHStEah91bzel6WWQYIx82me9IL8L2jmEZ3 cCE+eNdAkzJKQhO3MjVBvvJTI9PC/l3rQUhwX+83i8ySsFVy1lpElXJul4PaNxznZLVw FTXAnIf5EAtHe7NoCsXDSrUXMul/X+2R1zhR6q63N3WNhA0i1LJQSWp5YwOzparWdJJd MRYPSMlJVkyoGTFjGIUpcYvGCd3k3W+03SsSDRTdT8qHu/Q+sYk1jT5QnHrPXFyTQvCO 5RbG2INHjfQd2zO24de1SaZ6UyZuxynKGd7XbbZRpZhVOImJUE9pNgwHxriTo6kg0tht enJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=OcMCUbUSWApKYkc+qhjpI7CRCz1wVQjQyvPwRGTwtYs=; fh=D/N/7wbk2vteR7OuHqXLZ7aVE4yCwBKDKDJwtf2E2mY=; b=Yb7VMSno9oFFIxihgzlOlZmjIJPLIxgVl4Ew/+5X8S3PYBP6h2/65aZUGzgcaFKrTp 9MkOuUE+t11TMOJqaTqxRZzq7v4y5tpZhMMsswrt4Ts4+ulUoL/14GZqKYMlZDHlRX92 lhKdc8/jbPO/hl8w8w9Odj+Q01E9A6GUfvuloxcztFAMM+nrL0bD9Cnxf3cu1CfaKQD7 HuJ5VziO+hQlaT1pCgKEMg/pItH7GcJyci/FnQdVaUNuS5PA8DThOwW87NhA85pnLSUo u1V6kzk8nvpsFJytvgp/Ne87GPEQi5Xzh2PVNIbnOiXURIUKo/ap2IGMOi2pj0+7/fec DFnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O0Drq6UW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id r27-20020a63441b000000b005775c819f23si21624795pga.336.2023.09.29.07.58.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 07:58:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O0Drq6UW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 3CA2080310E6; Fri, 29 Sep 2023 06:43:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233375AbjI2Nnc (ORCPT + 99 others); Fri, 29 Sep 2023 09:43:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233266AbjI2Nna (ORCPT ); Fri, 29 Sep 2023 09:43:30 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92D9A1AB; Fri, 29 Sep 2023 06:43:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695995008; x=1727531008; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=96dT32PkgdFwEas9sw2UMEYPTGNvdBIo1204mmN2CYA=; b=O0Drq6UWLC+lr0DAMdNeYwi8XHzyr1Aq8s14QF7ruCAKCfo9ss1TozBy JMrmLA5XkhdeQksxvN4nQUGP0kASA3XKV6aY7OlH1YTbjMvbBPaAYgZgf Yr8P3jLSTAHyrOwYDUuUYStw60yq5iCtXNaWD+QAbOx+txHVOOcrk0RcZ kb4HE5XICflHG5rZoCDhQx23ZsdNI3F95chewb8HhrnF4vKcQPdbTnWnb HOEZyvsz8flmjtKXJ+/inTjFNHzByTGKGsxsIYHFDEuSqcks04Io8cyul o0H6qXpTlwNMHMw8Iy3c1oW6ML+2htwzSDEM0vvVxuqjqpttD5M50iG8U w==; X-IronPort-AV: E=McAfee;i="6600,9927,10848"; a="385116918" X-IronPort-AV: E=Sophos;i="6.03,187,1694761200"; d="scan'208";a="385116918" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2023 06:43:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10848"; a="699652390" X-IronPort-AV: E=Sophos;i="6.03,187,1694761200"; d="scan'208";a="699652390" Received: from mylly.fi.intel.com (HELO [10.237.72.66]) ([10.237.72.66]) by orsmga003.jf.intel.com with ESMTP; 29 Sep 2023 06:43:25 -0700 Message-ID: <29e57ece-032b-4b04-bbfc-14383c1f3c9a@linux.intel.com> Date: Fri, 29 Sep 2023 16:43:24 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] i2c: designware: Disable TX_EMPTY irq while waiting for block length byte Content-Language: en-US To: Tam Nguyen , linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org Cc: patches@amperecomputing.com, andriy.shevchenko@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: Jarkko Nikula In-Reply-To: <20230929035356.6435-1-tamnguyenchi@os.amperecomputing.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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]); Fri, 29 Sep 2023 06:43:59 -0700 (PDT) On 9/29/23 06:53, 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 > 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. > And it is none after applying the patch. > > Cc: stable@vger.kernel.org > Signed-off-by: Chuong Tran > Signed-off-by: Tam Nguyen > --- > drivers/i2c/busses/i2c-designware-master.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > Acked-by: Jarkko Nikula