Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3351463rdh; Thu, 28 Sep 2023 09:09:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEjOVcIAvVmwHfJVCk4GFI5URI4k+1FDnnHmbkXEeQJNREv4HZmb8NIkYBgfEy9aZjFZdsH X-Received: by 2002:a05:6a20:3ca1:b0:160:643f:ad54 with SMTP id b33-20020a056a203ca100b00160643fad54mr1775542pzj.20.1695917345102; Thu, 28 Sep 2023 09:09:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695917345; cv=none; d=google.com; s=arc-20160816; b=QjNTH1ooqhjnm4xXiwm4oNswsVCDkbn/VdO8uyTB6iqctH9nj9W5oHeCd1Oiix2KHO h5mlkBc0o0prKvMJYVen8UvhfNl3TSiyF+6rDlCvvc4Kcu47FtD6V+ph52wRLlXJtDDW rY0SEGu7R9XH9gUPuIqhLjCUNyGWyJvUSHpYNcSbNdOVMR1GAvRBxGKj96j+dMrvDE56 IMxfiVa6evHuipmfkW23idOMpH4Vnm9NqpcmCFZ3DyQIgTkfRFv6mq0g5hnGZ+wi8h1z lx27L1USBroLvyaEHJtXw8tWB//Urb59JE7WnYUBGzPFH5rvTe1+hh4aNAN+BxiX/hH/ 0Tww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:in-reply-to:references:mime-version:from :dkim-signature; bh=hy+mCITxqUKHaf6v9YLMzBge8DV4xA0bJDOMHOLkflo=; fh=oM4YZMiuMAFgfanlmqb502bXud+Ckt/gSKV7eWtX6F8=; b=QfWxSX0lgDMBbYiPRnNpnBHKuuo1b2jBxdIITUlPWx3CYMOs4IcbEKXqIYwBBldIQL Vdc6/w7A/KZh9vSg5jzpp49cmntlMnZBa8a86Gk3K5I1GbAC0VJX73j8a8PAtuqkHJ8/ X+glSm+mdNRnwTOgjt8zkq0TWFhCqXa3Fb7vDrkuTYPCGran89PTQN6xVb62C11uoo04 Fc2A+JL5vsR5KbYEgwRHc/2dsHtZLvZqxUUkdQnc7i0oFca9ZDNoJTwO8QPmpaCf5TYy hjOsF1magDNybSJYe2sESeS1YTg3VTsnT8AmUhso6ZSzrl4ujJpPBtFDE2j9lLO/Ol+a N88A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=YIZqZylN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id cp1-20020a170902e78100b001bbac6722e6si18013605plb.371.2023.09.28.09.09.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 09:09:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=YIZqZylN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 0108A82A8358; Thu, 28 Sep 2023 08:04:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231520AbjI1PEa (ORCPT + 99 others); Thu, 28 Sep 2023 11:04:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231540AbjI1PE2 (ORCPT ); Thu, 28 Sep 2023 11:04:28 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 031AD1B5 for ; Thu, 28 Sep 2023 08:04:25 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-277564f049dso6430363a91.1 for ; Thu, 28 Sep 2023 08:04:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1695913464; x=1696518264; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:in-reply-to :references:mime-version:from:from:to:cc:subject:date:message-id :reply-to; bh=hy+mCITxqUKHaf6v9YLMzBge8DV4xA0bJDOMHOLkflo=; b=YIZqZylNoOOKp2ilggVieH/kQo3Yv3Lak4IBKNCKTQaWliGoKgoSEKYbKLhHdTfq89 ckiZd1SPUqXikVgjDqcaenz8jK3oOreXiblrKqw1KeN0mQtWbRLEPtaHfMw9UuYAQupP pZj5ZAKAQ6j5I1qoxz3lFLaP7YQu1k6EnGD80b8e7rMhvtTkHWxSMAfpDB5SpCOv8IhY hTj5f8vUuLsdXQlK8mqgrU/APIjBBiMe3EeCwVP5Bvnw3SAS00vsQKBm49Tb+oAHpi9B omaTUtSj9R1yaKFm3Ht6CW0r0WDJxYpmAsoPr346nTW5XRXRL5z7wF6hWKhND0j6LU+f IEgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695913464; x=1696518264; h=content-transfer-encoding:cc:to:subject:message-id:date:in-reply-to :references:mime-version:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=hy+mCITxqUKHaf6v9YLMzBge8DV4xA0bJDOMHOLkflo=; b=Hlo0bHQhjJgBfNO/k1PLgV2t/D/4fkPOL52EE0XX84YmMptY8sKJMyYDrVaX7rly2G bnkDNAwztyYOCzslB71Dxy0ZkR0r9YqJ8SgibG9MFlS5RPNKwTshDSME+ahWKLsD9oZG a0dsgVCac4Wpcut/bwOvAMuguKlNAK/66XGEWG+4zWXIXFASMuR7NTw4GkVJNeFF3khU v1K0vXv0K/kWbsP02bCX3ew5DJ9AuLZiVMWBqr7OJVcCstUEjlyuJiK/LvUyrwkXxxkb 5WB5yJa4X4E1QnfvrP3PKLg7G4Dt9jy/q/NpFsdfqqsIPD7zTcZOhyizr6Ta5fD5ILoA IbKg== X-Gm-Message-State: AOJu0YwiX8ldVNxWJzTkj6sj+7Tysfr+Nm4qJYqFkThYgCVFyg1hH0d4 RqUI2y88h6u6BRwJfw6sFi+JRTAIybrN/gakFfME5SzcJlMI9+ViFyw= X-Received: by 2002:a17:90a:b28b:b0:273:ed60:ad52 with SMTP id c11-20020a17090ab28b00b00273ed60ad52mr1367512pjr.37.1695913464408; Thu, 28 Sep 2023 08:04:24 -0700 (PDT) Received: from 44278815321 named unknown by gmailapi.google.com with HTTPREST; Thu, 28 Sep 2023 11:04:23 -0400 From: Jian Zhang Mime-Version: 1.0 References: <20230927154244.3774670-1-zhangjian.3032@bytedance.com> <20230928145128.tjflbgvena4apivs@zenone.zhora.eu> In-Reply-To: <20230928145128.tjflbgvena4apivs@zenone.zhora.eu> Date: Thu, 28 Sep 2023 11:04:23 -0400 Message-ID: Subject: Re: [External] Re: [PATCH v2] i2c: aspeed: Fix i2c bus hang in slave read To: Andi Shyti Cc: brendan.higgins@linux.dev, benh@kernel.crashing.org, joel@jms.id.au, andrew@aj.id.au, zhangjian3032@gmail.com, yulei.sh@bytedance.com, xiexinnan@bytedance.com, Tommy Huang , Wolfram Sang , "open list:ARM/ASPEED I2C DRIVER" , "moderated list:ARM/ASPEED I2C DRIVER" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Thu, 28 Sep 2023 08:04:41 -0700 (PDT) > From: "Andi Shyti" > Date:=C2=A0 Thu, Sep 28, 2023, 22:51 > Subject:=C2=A0 [External] Re: [PATCH v2] i2c: aspeed: Fix i2c bus hang in= slave read > To: "Jian Zhang" > Cc: , , , , , , , "Tommy Huang", "W= olfram Sang", "open list:ARM/ASPEED I2C DRIVER", "moderated list:ARM/ASPEED I2C DRIVER", "moderated list:ARM/ASPEED MACHINE SUPPORT", "moderated list:ARM/ASPEED MACHINE SUPPORT", "open list" > Hi Jian, > > On Wed, Sep 27, 2023 at 11:42:43PM +0800, Jian Zhang wrote: > > When the `CONFIG_I2C_SLAVE` option is enabled and the device operates > > as a slave, a situation arises where the master sends a START signal > > without the accompanying STOP signal. This action results in a > > persistent I2C bus timeout. The core issue stems from the fact that > > the i2c controller remains in a slave read state without a timeout > > mechanism. As a consequence, the bus perpetually experiences timeouts. > > > > In this case, the i2c bus will be reset, but the slave_state reset is > > missing. > > > > Fixes: fee465150b45 ("i2c: aspeed: Reset the i2c controller when timeou= t occurs") > > Signed-off-by: Jian Zhang > > Why I'm failing to find your v1 patch? And where is the > changelog? Sorry, something was missing, v2: * remove the i2c slave reset and only move the `bus->slave_state =3D ASPEED_I2C_SLAVE_INACTIVE` to the aspeed_i2c_init [0]: https://lore.kernel.org/linux-arm-kernel/20230810072155.3726352-1-zhan= gjian.3032@bytedance.com/T/ Jian > > Andi