Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1158157rda; Mon, 23 Oct 2023 04:39:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEuDNWXmo9BfaiAeOqWnp/TKNUMsPLk0D+kMCGb7IVbOZOaT9dpTpozn7uyv9DGYwv3OknB X-Received: by 2002:a05:6a00:1a4f:b0:6bc:e7f8:821e with SMTP id h15-20020a056a001a4f00b006bce7f8821emr11217025pfv.10.1698061167406; Mon, 23 Oct 2023 04:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698061167; cv=none; d=google.com; s=arc-20160816; b=zk8Szgp03YHps5n/m6IkI9KOc3Kj0QBYUaIB05fSgn0v87XpM9pYkLTJRZo2EqJVaK YsKt8B7a0jrDZbtw2u45HPjlo6vghi6u20d7FH3Z7fXQsYP1EJExWoTUPYZ8afxiWTxY reTlmOwC6xtVve4M0iJ+4mJo9XTQGZntcBg3CMDU/YjbW2OW0msuN9MfEQYr3zXvvkaJ s2g4mVplaleioTu1s4JEqwnQb0+2UFMUM0pIYrUJDFlwKw8fl0LB1j1BGen90hUHqhYW MhT615QmdlStKZLHyb7NP+Qpz6GyJ9HxYBHjHH/NGlm3QtPFjSL1xj1pXlfOS34xp7/7 2Qnw== 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:subject:user-agent:mime-version:date:message-id; bh=7QP3f8oSQojyqZYBx61zFfX7OxcQHgmrWT+BREPXC3g=; fh=tr/fgHUcpLpbS4VIozjfnV7mG4hJKNrvAEbZeaGGeJc=; b=bJfA2l798pJIiZGhnzoVlWTb59hR5zqctcpbZ6c8xMFgr95aLzbKe75nUVX5GsnNf2 nV562ZB943FH5x7V/s+3x+/7tDhWY17zgZb/GO1urJP7xEila1HtPPnHWdYphpXH4j6j R5fyHN60H8tCzPWOkq/J/hEV/tzFtIjN+CN8H+9a8bmq7v8hRwFAd1sAiODrzpElDy83 huHrr5bqMcDaT5mEMOHqjZ8/dALeHaGSsHVmQji6uBVPe0+LPkxHWyIVD4d/qJ4+UpPh e6SSXqB3Wdo06kDujRnCfxw8jtUgVI68or9AvdJGGJcRbOPP/r7Iv+zbUuH7wVjm2gmS mgRg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id w8-20020a63f508000000b0059f0cebd052si641688pgh.436.2023.10.23.04.39.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 04:39:27 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 886358082916; Mon, 23 Oct 2023 04:39:24 -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 S234231AbjJWLjR (ORCPT + 99 others); Mon, 23 Oct 2023 07:39:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234218AbjJWLjQ (ORCPT ); Mon, 23 Oct 2023 07:39:16 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8BACDB; Mon, 23 Oct 2023 04:39:13 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R651e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0Vukt.sC_1698061147; Received: from 30.97.48.63(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0Vukt.sC_1698061147) by smtp.aliyun-inc.com; Mon, 23 Oct 2023 19:39:08 +0800 Message-ID: Date: Mon, 23 Oct 2023 19:39:24 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH V2 6/7] i2c: sprd: Increase the waiting time for I2C transmission to avoid system crash issues To: Huangzheng Lai , Andi Shyti Cc: Orson Zhai , Chunyan Zhang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, huangzheng lai , Xiongpeng Wu References: <20231023081158.10654-1-Huangzheng.Lai@unisoc.com> <20231023081158.10654-7-Huangzheng.Lai@unisoc.com> From: Baolin Wang In-Reply-To: <20231023081158.10654-7-Huangzheng.Lai@unisoc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY 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]); Mon, 23 Oct 2023 04:39:25 -0700 (PDT) On 10/23/2023 4:11 PM, 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 Looks reasonable to me. Reviewed-by: Baolin Wang > --- > 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