Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2164910rda; Tue, 24 Oct 2023 14:38:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFmwf1FkkJOOe2LDhLqJeIaSDwWmsSFlvj3b+7WFUhNWphyD8QCsCUab60eNHsaQcz6rIxi X-Received: by 2002:a05:6a21:6d94:b0:157:1b5:61ce with SMTP id wl20-20020a056a216d9400b0015701b561cemr4258032pzb.4.1698183535324; Tue, 24 Oct 2023 14:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698183535; cv=none; d=google.com; s=arc-20160816; b=YFBe7inb1/YOLdbWZjtnfx5Lx4DgXnkF/gdfHKoJddvLNPpcZuNlM6nJ0peZQduL5B nnvbiCI2WUo3pwHFeFw/yN8YCs13vY9o47zlnC7wi2epYlfAJuzJso/l34YMKdAlPGOm y+FSo1RYuxnlsMXmrFj0jqErfGD6ruLu8N3gT/RP4fRbLF6AciekeijBosu3l4CiIPFN fPQaeFbZYFkN3aimimXdmn0roVi1j7EHOgp/IFa4MzYSgxb0ejT8/gtzXvvwfl1p+VLP 002RX1hBEtCSOz/oBHa0of7552guj1kl1ukl0qlv6NRtnqu7Q1GY/at8Tj+VKqE2ShZh 0vYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=eiqUSweFbiHsHf8EP+dPhmtZxnrek+NID+hN/vJVr3c=; fh=SwXRDT3wef7eYr+GiOVvHhMXJPt0P6DhPR6I4tBQCDQ=; b=MVknPz5KJov1hqOlWvR/lptQSPCqHjk8o/0U1onVeyS5mF9n8Qmj3vpNQN1ok+87V5 Y/b9oibOULNmfs/1v+mtL8iCyt3kIXJoqvdc8v+UvnN31s6/9yo9ZxK9hNaHmVyBTsht bt7yavo8yxJRYM9i7dd8evZ55lp04Ss+nS8lTz/sSIbtKF87b4CV/sBzaHGDoCKCwhIR eCe9+0OnpFlmUDu7CYZDF75dnH9SezlD5md2jL2xLpZGFFYwJkXtJX1OW5AatVBJYBok 69sMPi4BIvP5uX/eGZAoBtdol+5aJ4lyz6H4/Ab1HAabDNTenei6V92gYzywTBKs0kRs IwoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="TIduF/TS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id k73-20020a633d4c000000b005b8f7bbeb92si870037pga.153.2023.10.24.14.38.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 14:38:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="TIduF/TS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id C90F38020C2F; Tue, 24 Oct 2023 14:38:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344379AbjJXVio (ORCPT + 99 others); Tue, 24 Oct 2023 17:38:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230458AbjJXVin (ORCPT ); Tue, 24 Oct 2023 17:38:43 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 905A2A6; Tue, 24 Oct 2023 14:38:41 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80C7FC433C8; Tue, 24 Oct 2023 21:38:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698183521; bh=d1cHPxa8Q9ehkeX+QuV6dbadawEB4NDSOLejXgMiipA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TIduF/TS/HZHCvb91BoMPY0RDfuQ3FC0eYBFqPVVF8PShBiiV2n20AIsZKc+ars4b NrpwX2AEGddVllamvLjBDVH00/3Y6/W+CcPRUlIEBkRrb6WqwP0CSc5oepA0I3Cewb 0j8BJHuMNX95eKq0rrxk5jALmkKeg2TKQrZ1mxiYh2i+nRkNskgb9upH4LpaY00kqU B/AF2nZZcItd9TrK6V4BpaZQJjNEnWB1eYjd/kjeniQelJuzOIp3KPPtSkOArjunza aHEFZ/OCS0eQ5bfkDz7ugOPeWLxFafFY8B9G4en0iNOtqR8ium0uHjicVd/XHPhHxZ M1B8EhIHnYobg== Date: Tue, 24 Oct 2023 23:38:37 +0200 From: Andi Shyti To: Huangzheng Lai Cc: Orson Zhai , Baolin Wang , Chunyan Zhang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, huangzheng lai , Xiongpeng Wu Subject: Re: [PATCH V2 6/7] i2c: sprd: Increase the waiting time for I2C transmission to avoid system crash issues Message-ID: <20231024213837.psfooptgrcawvuqs@zenone.zhora.eu> References: <20231023081158.10654-1-Huangzheng.Lai@unisoc.com> <20231023081158.10654-7-Huangzheng.Lai@unisoc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231023081158.10654-7-Huangzheng.Lai@unisoc.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 fry.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 (fry.vger.email [0.0.0.0]); Tue, 24 Oct 2023 14:38:53 -0700 (PDT) Hi Huangzheng, On Mon, Oct 23, 2023 at 04:11:57PM +0800, Huangzheng Lai wrote: > Due to the relatively low priority of the isr_thread, when the CPU > load is high, the execution of sprd_i2c_isr_thread will be delayed. > After the waiting time is exceeded, the I2C driver will perform > operations such as disabling the I2C controller. Later, when > sprd_i2c_isr_thread is called by the CPU, there will be kernel panic > caused by illegal access to the IIC register. After pressure testing, > we found that increasing the IIC waiting time to 10 seconds can > avoid this problem. > > Fixes: 0b884fe71f9e ("i2c: sprd: use a specific timeout to avoid system hang up issue") > Cc: # v5.11+ > Signed-off-by: Huangzheng Lai Acked-by: Andi Shyti Andi > --- > drivers/i2c/busses/i2c-sprd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/i2c/busses/i2c-sprd.c b/drivers/i2c/busses/i2c-sprd.c > index b65729ba7d5a..dbdac89ad482 100644 > --- a/drivers/i2c/busses/i2c-sprd.c > +++ b/drivers/i2c/busses/i2c-sprd.c > @@ -74,7 +74,7 @@ > /* timeout (ms) for pm runtime autosuspend */ > #define SPRD_I2C_PM_TIMEOUT 1000 > /* timeout (ms) for transfer message */ > -#define I2C_XFER_TIMEOUT 1000 > +#define I2C_XFER_TIMEOUT 10000 > /* dynamic modify clk_freq flag */ > #define I2C_3M4_FLAG 0x0100 > #define I2C_1M_FLAG 0x0080 > -- > 2.17.1 >