Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp537826yba; Wed, 3 Apr 2019 13:55:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzflp8f+HS3TZwqju+2v0Xo0N4E/Tw7AALnNxCGRUhArMKoYGk7LXVs0XV/8eRJ4w21oxHb X-Received: by 2002:a63:2ad4:: with SMTP id q203mr1814906pgq.43.1554324919802; Wed, 03 Apr 2019 13:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554324919; cv=none; d=google.com; s=arc-20160816; b=VIpgOxXnYWxNLLi/F+gR42hjbBml5zDYsPvaxg2KGV/KdJq5O9gFKogZa1DaanswJM zWFptcamlpos9OElhjxRO9cFk9qo5HSKzUFhXaP1+mk3xhSMRVwn4FLpy5HqJswVvGZd MOXVpiBVfR9No2Wjc+5IL9aqVaymOOBHP7t5Q0SHjDjdJ75NOtE3xhHFTwT4QeLqEgos dM4Awc45Jqs36Pde6ow5OZo4r83TFdvWquhyWd2yp40UM8jTgd4sEErBhpqR6N2eSBX4 HyClXxJU0dPiAy6aSkmh7iWu9J4TgLzfS+F11iazfYqYHn2dVt7K4S57EqyaSzy2mcbs q75A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Jao/DRI67OZYLOviNRcesG37QfSYQ2sHIyyKl1lcU18=; b=IINCenAUY+kVnZvg8O8gZ+XWOT2EGyck7EYOnW3WXzmPPDdG4uj+cCTtwSu2MgbceO TBhhrgu0T5ALDweAl4GiI/yMRpSm3V0bUsZ84ESSp/mY/JlcjDKH2m9ET6JdqK/0q22z w7bA3o/TwqvCj0vtA8OXZBib0cMBemwT5NRc7EJ5netUChhtPt62aU/llx1pGHKig0+b xBod36FUo9XbtZoI3U6vZ7AJjy2FFgq0m+0PZAqQ1zvqmte4wGFOE0z3s+xItr6tqcep XkdaTZ+P82cGGU2btcvXL4xSrbLZqY0Ol42ePH+NcOWV/2FltzmGI+B1RDAuIpKJ701K 25Mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10si14357545pgh.255.2019.04.03.13.55.04; Wed, 03 Apr 2019 13:55:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726565AbfDCUyG (ORCPT + 99 others); Wed, 3 Apr 2019 16:54:06 -0400 Received: from sauhun.de ([88.99.104.3]:51634 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726064AbfDCUyF (ORCPT ); Wed, 3 Apr 2019 16:54:05 -0400 Received: from localhost (p54B3311F.dip0.t-ipconnect.de [84.179.49.31]) by pokefinder.org (Postfix) with ESMTPSA id 0D4362C282F; Wed, 3 Apr 2019 22:54:03 +0200 (CEST) Date: Wed, 3 Apr 2019 22:54:02 +0200 From: Wolfram Sang To: "Adamski, Krzysztof (Nokia - PL/Wroclaw)" Cc: "linux-kernel@vger.kernel.org" , "linux-i2c@vger.kernel.org" , "Sverdlin, Alexander (Nokia - DE/Ulm)" Subject: Re: [PATCH] axxia-i2c: use auto cmd for last message Message-ID: <20190403205402.dr2uolmpew45xoxd@ninjato> References: <20190328111858.GA17086@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6l3yfohu3gsj3jo7" Content-Disposition: inline In-Reply-To: <20190328111858.GA17086@localhost.localdomain> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --6l3yfohu3gsj3jo7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Thu, Mar 28, 2019 at 11:19:45AM +0000, Adamski, Krzysztof (Nokia - PL/Wr= oclaw) wrote: > Some recent commits to this driver were trying to make sure the TSS > interrupt is not generated on busy system due to 25ms timer expiring > between commands. It can still happen, however if STOP command is not > issued on time at the end of the transmission. If wait_for_completion in > axxia_i2c_xfer_msg() would not return after 25ms of getting an > interrupt, TSS will be generated and idev->err_msg will be set to > -ETIMEDOUT which will be returned from the axxia_i2c_xfer_msg(), even > though the transfer did actually succeed (STOP is automatically issued > when TSS triggers). >=20 > Fortunately, apart from already used manual and sequence commands, the > controller also has so called auto command. It works just like manual > mode but it but an automatic STOP is issued when either transfer length > is met or NAK is received from slave device. >=20 > This patch changes the axxia_i2c_xfer_msg() function so that auto > command is used for last message in transaction letting hardware manage > issuing STOP. TSS is disabled just after command transferring last > message finishes. Auto command, just like sequence, ends with SS > interrupt instead of SNS so handling of both had to be unified. >=20 > The axxia_i2c_stop() is no longer needed as the transfer can only end > with following conditions: > - fully successful - then last message was send by AUTO command and STOP > was issued automatically > - NAK received - STOP is issued automatically by controller > - arbitration lost - STOP should not be issued as we don't control the > bus > - IP interrupt received - this is sent when transfer length is set to 0 > for auto/sequence command. The check for that is done before START is > send so no STOP is required > - TSS received between commands - STOP is issued by the controller I am not sure. Is this a bugfix (=3D for-current) or more a new feature (=3D for-next)? > Signed-off-by: Krzysztof Adamski > Reviewed-by: Alexander Sverdlin I trust you that Alexander gave the review, but it would be a tad more 'open development' if he could give it as a reply to your patch on the mailing list. Thanks, Wolfram --6l3yfohu3gsj3jo7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAlylHWoACgkQFA3kzBSg KbbsKQ/+P9zFtuRRIvAsHKTSBI0uhB4PfJGhVOi6dZdCkw/LKN5j77iixqkIMRZE dPXic+LoF7BycMHN+0WJF9qAhnBf9xAvoPCjBwTg15AnpsZlM/q79vqPVYuTmIe2 SsMWyWbtz+Et9jwRVKaIAkP+CWtZMrA1p0dB3w//blQ32/uE8qj54sugQgdjmRcg IHNUlv2s1RjrJM5UcU1HAYP0lU5UR6oTlDKa/MdOKcuPM8Aem4vE+ZPLG8CUPJvf Sa+DoUL3yjcmwfz2ghovfi6IhrID5+LY/laFacc3t+vkF3KoLFn2PrBUDqphM3Wj 8A/li8vEuGYL6uucveKzD1+96Y7tkVdWOSgBDlHX6LBkTWCj+r24QULm3WGmpltd XM/QUz7xHPdiQdY2dYbgF+yVpijUNLWS9KeBJFeA3wdXUbzIhBxk4AubVCbLrAKa b/j8DKZ4V4cHQEYQGyMvvnDSQ87+WGArvUWCnfcijaTd593emQ5dQ+/xUBHGZyy6 ojIw9V8aZcjLRaysBJxodmWZ8sRJk5IdCuCTET4DEpykxzRVpgybAVMg8xOg8O1c Ho0DrwRJuV3d8Lwv1s0QYPN+fS6SMXmP0SLm7gATuSxnq23KQsdE7GaeqrNdMPUs nA+qbM850iKZPfxuKntrQsqW7E9CoVdOOM6DdnsxwmW2plgN24Y= =J56r -----END PGP SIGNATURE----- --6l3yfohu3gsj3jo7--