From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2C75DEB64D9 for ; Thu, 6 Jul 2023 19:33:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3sJR4P8yZEQMZ87x4srVByhdlN4e50r13gJ8bu1Z2oo=; b=f2Krkv/8JjVPXbxlolMDnATPzk 3D9C4G4m8m9jsXSg13u72fzz8Apmqms8STL7Yng8NBmMssDedWiApoKJkgSCBu29JB+TwErFsVOCi drccHU1orsgSXSr1O53sGJG27+B30nLjQyWyiEyYWu+8S9urw8vl6l38P2tvLdFJpqBoFhsAekf4h hZzkzG/FLX/I0Z2Y2I8RjK95reG7noAVF8Yn4RgLYum76cxcRDMS4k84ImN0geAn2dYZ2QtCoDZNU PZgu+gopxIL8c0YWheDl3k6LaO4Y13gL7La9zMmqFfcUn40DxgJkn+hs7kHR95/sGvhUEZ4gwQ5yq D81+AlaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHUj3-002Vrw-01; Thu, 06 Jul 2023 19:33:13 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHUiz-002Vr6-20 for linux-arm-kernel@lists.infradead.org; Thu, 06 Jul 2023 19:33:10 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DACFC61195; Thu, 6 Jul 2023 19:33:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 890C9C433C7; Thu, 6 Jul 2023 19:33:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688671987; bh=CsnSC10RfjKdYlfvukRrKP9eKP+HKwk939lx6aN6Jgg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dL9GpivXua1v5uWI99SysNTnNW4AmQXeElqgdamMMWH+BFB+U4MJ4KswDe4vWhbCY x/eOENNXfhGvfO7fu60lAnsBA9IzyxYa6SXOi1fXgIneN/8bbx1SKonepGxAG9A5Xi F+SmfLD6FrDWd6R7yHdru/qSou339rajf/gI0hJ+id33C7HXQHVuvPPHa6fX5opwP/ c2qRsITI3tuVSHrD+BMEDFiKKKQ6W4I7q9nJcShigZVoUfM4oV2vjBD5JipIxws/JP 4NE7LoAwEsXE+wLp8FfDFckuVNDDOP2lKgXQnZMhuzc3bJkvjHGU8Ow4tBhwZ3gbVO T0OFqTv2/wqnw== Date: Thu, 6 Jul 2023 21:33:03 +0200 From: Wolfram Sang To: Robert Hancock Cc: Michal Simek , Andi Shyti , Shubhrajyoti Datta , Marek Vasut , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] i2c: xiic: Don't try to handle more interrupt events after error Message-ID: Mail-Followup-To: Wolfram Sang , Robert Hancock , Michal Simek , Andi Shyti , Shubhrajyoti Datta , Marek Vasut , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230606182558.1301413-1-robert.hancock@calian.com> MIME-Version: 1.0 In-Reply-To: <20230606182558.1301413-1-robert.hancock@calian.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_123309_766403_6DA92177 X-CRM114-Status: GOOD ( 20.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============6774446936722091061==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============6774446936722091061== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="BSnkPnJjlpCTHXsL" Content-Disposition: inline --BSnkPnJjlpCTHXsL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 06, 2023 at 12:25:58PM -0600, Robert Hancock wrote: > In xiic_process, it is possible that error events such as arbitration > lost or TX error can be raised in conjunction with other interrupt flags > such as TX FIFO empty or bus not busy. Error events result in the > controller being reset and the error returned to the calling request, > but the function could potentially try to keep handling the other > events, such as by writing more messages into the TX FIFO. Since the > transaction has already failed, this is not helpful and will just cause > issues. >=20 > This problem has been present ever since: >=20 > commit 7f9906bd7f72 ("i2c: xiic: Service all interrupts in isr") >=20 > which allowed non-error events to be handled after errors, but became > more obvious after: >=20 > commit 743e227a8959 ("i2c: xiic: Defer xiic_wakeup() and > __xiic_start_xfer() in xiic_process()") >=20 > which reworked the code to add a WARN_ON which triggers if both the > xfer_more and wakeup_req flags were set, since this combination is > not supposed to happen, but was occurring in this scenario. >=20 > Skip further interrupt handling after error flags are detected to avoid > this problem. >=20 > Fixes: 7f9906bd7f72 ("i2c: xiic: Service all interrupts in isr") > Signed-off-by: Robert Hancock Applied to for-current, thanks! --BSnkPnJjlpCTHXsL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmSnFu8ACgkQFA3kzBSg Kba2xQ/+Pcz6zeU2cFQLSMQdjPWm8UwIcw3uONyWvVmSjN9pLX4T3iHkIYrmb/1W 3VGeySIlKSc1YVNOIf/qKjsyVjfuWeCRTtNoV5rU/MOrNbrFWFE9OOWYmp5oHmNm 5LKq933bX/WGvAPg5CZ+uBp9O/yHTnvcEDKjJYR/1MIel/9maAedsEVksLGlN6zW zQPdCbrK58Q78JwhD+fWN4ts+uEnzOuGJYLz7id0E+WpXn/jB+5mNEtP3//eqbDs C/RUXgfO3B33TgplWlFnedvF6Mskmt0pgrKIp42CgNw2WkYQmebouZDndy01ySih dHgJoAUpX8tLgt04D1R0WFAeH3bxmnh9WWHnJo+9etBFENDTj30OEiGlUq9OLMkx /OhltH48LGqeV5MCYSA0ZNIgyE8HvfEUhlMg9H2yEL1d5GhZF7p5jnknrRGgV4s7 3iH7l49GSsVUUcDjCOTV8zCeOcDSxtQQw+1RiN8k40bv+flmF8IN1olJIruiggX8 J01z48dMY/dvpqkweqSoJlKEOwMLTmgTz0zCw0rwqrrp5JId422ZcyKVGGms38AM JQQ8ep7aUGQHL+T2UuRE2Xa+kMAgB8FJebt09NWDE+s+YRk0mqMX6nX/aNSJy6ry XRmRQqJW9kmkigTDDdGFp4421m7AZUzC/mB8nP3TVCJGShwz4gE= =QO/L -----END PGP SIGNATURE----- --BSnkPnJjlpCTHXsL-- --===============6774446936722091061== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============6774446936722091061==--