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 X-Spam-Level: X-Spam-Status: No, score=-9.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64BCFC4727D for ; Mon, 5 Oct 2020 08:16:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08EE920776 for ; Mon, 5 Oct 2020 08:16:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601885807; bh=Y+4/OTAGP1UzABKUO+6NPw0ZwNRfR0vGq0IKYFkmjrc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=F98yhe24qPeiJOZowEq0kus13g+IwFeCb7OC9UznhaBSZVilDTI35LxG1z5fNB8Nm lMDJ6mlNkLctHnCKJmDiZtoZJyX91UW8BaOaIrFeSLizreZo2G0tf8hqWWkP6UXvhw w2Qr6TA6NxWjryzlWswDqV+Agwvt6Pj8FoSU9g7Q= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725970AbgJEIQq (ORCPT ); Mon, 5 Oct 2020 04:16:46 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:55265 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725880AbgJEIQp (ORCPT ); Mon, 5 Oct 2020 04:16:45 -0400 Received: by mail-wm1-f65.google.com with SMTP id p15so3132612wmi.4; Mon, 05 Oct 2020 01:16:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=so3Q2iStLANQzUsWPJtNOkoc+zx5z4LsFtN/g7RdwuA=; b=Yb1QZxxkooLudEnk8XN6HPSfmEsrM9EL59bf2/392ELo2GDinoakbX9PgcBJjbI5st xxr3lcdNiWhjHtghgEAjwQmyfe3aCWtaJM+mMO4K3BX3d6Z5eaU5jx0W8ZR8/jvSffEd XnjVHyd0XkQ6BUR6kMQvm394XVa1oQbQCWldRigxltOR4n5chjMbPaFzW3poN+YQpiaJ qU4j9kmCxMjyaz0O4K/i0PK9lNDkjHuVRackFUekA/AQ2oiGGdHe1dAI+vWkIFpy0FZR /Z97mF9MMchmOqxVu0nsqhsnao2HzD+O/X+RlxAnuBman4qgU7I0qp0nadjm2MSRR6r6 J8+A== X-Gm-Message-State: AOAM533YN76uQDYP+/GNqwOsIgQGnJlbpTONyxXdszuZTbsU6iH3/uBT /ajAyb3efunjvk5Se8ndjTw= X-Google-Smtp-Source: ABdhPJy1FDIel9WhtFJmJd9CyAQEOlK6fIY5XuLZ0pflqjU2ZvCyXQDazBGV4roSAtjoCmXu+DoPFw== X-Received: by 2002:a1c:4b0f:: with SMTP id y15mr16442283wma.165.1601885803104; Mon, 05 Oct 2020 01:16:43 -0700 (PDT) Received: from kozik-lap ([194.230.155.194]) by smtp.googlemail.com with ESMTPSA id c130sm873401wma.17.2020.10.05.01.16.41 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Oct 2020 01:16:41 -0700 (PDT) Date: Mon, 5 Oct 2020 10:16:39 +0200 From: Krzysztof Kozlowski To: Christian Eggers Cc: Oleksij Rempel , Shawn Guo , Sascha Hauer , Fabio Estevam , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Pengutronix Kernel Team , NXP Linux Team , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2 3/3] i2c: imx: Don't generate STOP condition if arbitration has been lost Message-ID: <20201005081639.GA7431@kozik-lap> References: <20201002152305.4963-1-ceggers@arri.de> <20201002152305.4963-4-ceggers@arri.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20201002152305.4963-4-ceggers@arri.de> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 02, 2020 at 05:23:05PM +0200, Christian Eggers wrote: > If arbitration is lost, the master automatically changes to slave mode. > I2SR_IBB may or may not be reset by hardware. Raising a STOP condition > by resetting I2CR_MSTA has no effect and will not clear I2SR_IBB. > > So calling i2c_imx_bus_busy() is not required and would busy-wait until > timeout. > > Signed-off-by: Christian Eggers > Cc: stable@vger.kernel.org # Requires trivial backporting, simple remove > # the 3rd argument from the calls to > # i2c_imx_bus_busy(). > --- > drivers/i2c/busses/i2c-imx.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > Tested (not extensively) on Vybrid VF500 (Toradex VF50): Tested-by: Krzysztof Kozlowski The I2C on Vybrid VF500 still works fine (also bigger transfers). I did not test this actual condition (arbitration) but only a regular I2C driver (BQ27xxx fuel gauge). Obviously this only proves that regular operation is not broken... Best regards, Krzysztof 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 X-Spam-Level: X-Spam-Status: No, score=-9.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C339C4363A for ; Mon, 5 Oct 2020 08:18:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BE1AE2075A for ; Mon, 5 Oct 2020 08:18:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="th4FULfg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE1AE2075A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iB+eySDCdfOJroH+kmiu5XXKqv38Ae/O2C6gP55KgYQ=; b=th4FULfgy/x/KQKrZf4lFe3a6 rH/VXEUyQZX9Vb4Tx0rIOlMvwrgzXXWUm8WANYi+9q47gdBGvAMAohICmgAHDBXy0WlR+vLcoUXIv jRih5cHBtY3LEqWjqkkM518uln1XTyp7qerzeA/QMm2B4uN/hABPEuvlPJ8asKQLTOFDoA8dwXLAN KlEGSiki5EIfVsVl4KUDVMaqzPKNmnJGko3hciKugHK9U/PzDWUgTvSZqdhBZeh1EMMNMc9PgaNYc u2NIb8aIcCjVgw7TZrPc6w2KZZXROJJbd7+HPBeAPPusxZpAr+mf53C2g8gDICXbmnor6kzO8oc6e Y+EUbPO2Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPLfq-0005JZ-Rc; Mon, 05 Oct 2020 08:16:46 +0000 Received: from mail-wm1-f65.google.com ([209.85.128.65]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPLfo-0005Iw-67 for linux-arm-kernel@lists.infradead.org; Mon, 05 Oct 2020 08:16:45 +0000 Received: by mail-wm1-f65.google.com with SMTP id d81so2570203wmc.1 for ; Mon, 05 Oct 2020 01:16:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=so3Q2iStLANQzUsWPJtNOkoc+zx5z4LsFtN/g7RdwuA=; b=snGJ3dWNJS9Sgy82fRQBnmPpbKYLWOtBzkWrH/hd4WyhbSrS+i6lkWfjFD+C239DIe +oYisnOn0zcRLld0cp8WDxC9YkZxtZLKbbxC7kdOkOLA1rOmJr/j2WEa3kjpEJ2Cd+NZ ikYZE6UApwrCbCgFwL6L3EvgGKjmTeJqnKiSq6UXo429n2dStIO85j+iE7hTpL5/46TQ /Fe1R0ND2eLxS3hI+y2wdi4LwibEMEt6NAWCVBXGUyEHByvdapBzOqVtg5qArlj//qD6 FJgFdHmpV39kA35ubrkMpbqpLSvpfz/LJ3UIIBiDdpAIPIbVSIhX78ArHhmeYWCBSWSh BdPQ== X-Gm-Message-State: AOAM532zgPWqZWfLMVbRa6lDaQQBzAAVnfqs2IhngtdVIIpILGbWaTpK txqZITjkseGs/J7wEyOm59A= X-Google-Smtp-Source: ABdhPJy1FDIel9WhtFJmJd9CyAQEOlK6fIY5XuLZ0pflqjU2ZvCyXQDazBGV4roSAtjoCmXu+DoPFw== X-Received: by 2002:a1c:4b0f:: with SMTP id y15mr16442283wma.165.1601885803104; Mon, 05 Oct 2020 01:16:43 -0700 (PDT) Received: from kozik-lap ([194.230.155.194]) by smtp.googlemail.com with ESMTPSA id c130sm873401wma.17.2020.10.05.01.16.41 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Oct 2020 01:16:41 -0700 (PDT) Date: Mon, 5 Oct 2020 10:16:39 +0200 From: Krzysztof Kozlowski To: Christian Eggers Subject: Re: [PATCH v2 3/3] i2c: imx: Don't generate STOP condition if arbitration has been lost Message-ID: <20201005081639.GA7431@kozik-lap> References: <20201002152305.4963-1-ceggers@arri.de> <20201002152305.4963-4-ceggers@arri.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201002152305.4963-4-ceggers@arri.de> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201005_041644_414476_06F7647F X-CRM114-Status: GOOD ( 16.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Shawn Guo , Sascha Hauer , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Oleksij Rempel , NXP Linux Team , Pengutronix Kernel Team , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Fabio Estevam , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 02, 2020 at 05:23:05PM +0200, Christian Eggers wrote: > If arbitration is lost, the master automatically changes to slave mode. > I2SR_IBB may or may not be reset by hardware. Raising a STOP condition > by resetting I2CR_MSTA has no effect and will not clear I2SR_IBB. > > So calling i2c_imx_bus_busy() is not required and would busy-wait until > timeout. > > Signed-off-by: Christian Eggers > Cc: stable@vger.kernel.org # Requires trivial backporting, simple remove > # the 3rd argument from the calls to > # i2c_imx_bus_busy(). > --- > drivers/i2c/busses/i2c-imx.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > Tested (not extensively) on Vybrid VF500 (Toradex VF50): Tested-by: Krzysztof Kozlowski The I2C on Vybrid VF500 still works fine (also bigger transfers). I did not test this actual condition (arbitration) but only a regular I2C driver (BQ27xxx fuel gauge). Obviously this only proves that regular operation is not broken... Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel