Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp365733rdg; Tue, 10 Oct 2023 12:34:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFSg5eEfTj7ZSCcLgG8dzRaPXLrJrSNAQdTV0H22pAoFQg9gdUGRE4WP88Dpe0+SC8Gbyma X-Received: by 2002:a17:90a:db8a:b0:274:945b:6979 with SMTP id h10-20020a17090adb8a00b00274945b6979mr17138659pjv.16.1696966486684; Tue, 10 Oct 2023 12:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696966486; cv=none; d=google.com; s=arc-20160816; b=eVoKiKmbl1xHqkj7V2s21QtlTzUD720mmjb7b1OqiBkMUm00Irwnft1izxaBLwAfsY X7GPYJcnWtRDKyc1EKyrnoWJFfXvCrStMJOy1jAHQuow7WbtyYIr8+aU97w6sN07Und6 +o3/XmtXPLzbn6gZw4ANX5SJHfUMbF3qrg81IKYMzKwW7qsR8zgWh6HjmWxCzLNUbr5T EueOzirljI57jJDoWjxhqF6FUZ0YNiFxAfx1V41/bsN0Vft49pnPZ91Fi24K2NpeeNlL m/NcFwm1H0geLr8JOO8F0U5bJjLqhagVI4Fxg2ZtdL7/z0hZXAfmoHoKhZhmnNRZPgB7 vwnQ== 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:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=fdAjM/1OHOG19BZ3uAI1dllH2avLjsk/EooV7MDjJgY=; fh=QiUDi3msRnEp+kHw7ksIitqPp8G0NB6Ka6pGmGTXSoE=; b=JmIk6d/5Rd/K2KAf8QTqDiATRy4YCy2qQ7Vs/zy9egOZZjM1fVJEnyROme0Sucw+1E 31HHfqAOwKvUe9vPURZCqiXnGvA3SxzkcuJZpXnPLSf+bPcbZ5fDhrIO4n21YNF7Vu+9 VuJOZW5m33zkbplWl1YtdmJXaie194nVlxk1uWUFgauuaAb+RWd+4POuBklnH7DDSmft 5LnxOvdjp4lLrdah/YPTfLAA6s2VPRZv+FhO2GIfKmT0Iw1TDriEBucOLl5BHLqo2exP tuyEGOk+d7KZpWCkflFHH+z2fvWzyCL7NvvHWGW0ngWm6cWxMLZsF1oew+VeGSPAnkuG hrqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sjEUUrCL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id n17-20020a17090ac69100b002777ca0d151si2143716pjt.165.2023.10.10.12.34.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 12:34:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sjEUUrCL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id 628D080739E6; Tue, 10 Oct 2023 12:34:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234244AbjJJTe2 (ORCPT + 99 others); Tue, 10 Oct 2023 15:34:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230195AbjJJTe1 (ORCPT ); Tue, 10 Oct 2023 15:34:27 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A599299; Tue, 10 Oct 2023 12:34:24 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81378C433C7; Tue, 10 Oct 2023 19:34:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696966464; bh=fdAjM/1OHOG19BZ3uAI1dllH2avLjsk/EooV7MDjJgY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sjEUUrCLTkOqda/EDGq3rqFQL27cCC0sWlwDYfWSn0D0EiFxkgUEZC5+sVWcfMh6p 6iNtYYozsc1ijRS8K7FaaJjhnVK7M51VTwu5wmQx83UCRnOgcj2HIt6jblVzbfiVoz NMNqpg/ySEJf5MswnHewO3sVfbuUYq/T7WPTq24hz0scNpmcTtXemEjc5kSBdsjafs L3wpY6LcnNxEq6RolngYppPelbkzXnSBL8w5TSShgNwe7YoNScyBYeZESJstmkaa1H mV5JDhLEcLcxXN+3SBj16wf7U5DmLFRq6YdX6YHkP+wfbX1j1Z0OP8/kEzN1HYVouk 6tTHvPaeoIGqA== Date: Tue, 10 Oct 2023 21:34:20 +0200 From: Wolfram Sang To: Jian Zhang 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, Andi Shyti , Andrew Jeffery , Tommy Huang , "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 Subject: Re: [PATCH v3] i2c: aspeed: Fix i2c bus hang in slave read Message-ID: Mail-Followup-To: Wolfram Sang , Jian Zhang , 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, Andi Shyti , Andrew Jeffery , Tommy Huang , "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 References: <20231006022233.3963590-1-zhangjian.3032@bytedance.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="h+tNCvmT9ovOY6AN" Content-Disposition: inline In-Reply-To: <20231006022233.3963590-1-zhangjian.3032@bytedance.com> X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Tue, 10 Oct 2023 12:34:44 -0700 (PDT) X-Spam-Level: ** --h+tNCvmT9ovOY6AN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 06, 2023 at 10:22:33AM +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. >=20 > In this case, the i2c bus will be reset, but the slave_state reset is > missing. >=20 > Fixes: fee465150b45 ("i2c: aspeed: Reset the i2c controller when timeout = occurs") > Signed-off-by: Jian Zhang > Acked-by: Andi Shyti > Tested-by: Andrew Jeffery > Reviewed-by: Andrew Jeffery >=20 Applied to for-current, thanks! --h+tNCvmT9ovOY6AN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmUlpzgACgkQFA3kzBSg KbZ/7RAAihe3k0z4CpvqtiXFm+M8WD2j0iyfOzn0Q3Rv+NN+Y7hVMAxsDs0hTUiJ 81zj8PMMrBkMnEPhv0ytT7QKrv8N65H2ONXGmWtOPLinn2UsMSMtM53zNLg2iR5M ASKLLr5gSqaTjJao9FCYKWP7G5rwYqF8gEcmp/S0aA2ElyGfkvOf9J3n92iwMRaV CO859fdKlSaINuHIEw1Uh7q8ThdXAdON94vVDAREXPWax3Qle2fAMFjxEQQaBrbL uUlBJuRwExDegv56w6RPmbA0CQ6M/BxEviFm2thICeg6Q94UAFXTQWg6Wyirdhrz ufVHS8JZf1481aK4iUw3IFrIgRV7tTFfO8WVoQUn5EJZTZ2K1KB16RUgPdrUJebg 9sAxLJ6u4H+Hu0FeL/k8zd7IcQJkoJlUm3IkEsHSWGc/tGQ0kolAAKbQjLs8778/ LLo6c9qyVnhFyh60WaOAzppRyK/R1+UmJWYZYSozwk8lZ8OkUsrWHLH5hWa7tMyW ZkoBrjSvGWjAfib9kLvpgtalcNwlOLr//RP9bT27IblhWiz63VUT8p2G1gqND5p8 jcyodY25zHqFDIpy/AdMVjzqupmSw3upInMOgnJqyeMCEigh2OdL8voL6dxBAQ0m 2rhGFIrH4BzpaUun1KA3zSjwuY84qDYGB54Rz9ng01MTh/9G1bs= =VdsG -----END PGP SIGNATURE----- --h+tNCvmT9ovOY6AN--