From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758798AbbIVR3v (ORCPT ); Tue, 22 Sep 2015 13:29:51 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:46283 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758108AbbIVR3t (ORCPT ); Tue, 22 Sep 2015 13:29:49 -0400 Date: Tue, 22 Sep 2015 10:29:19 -0700 From: Mark Brown To: Jean-Michel Hautbois Cc: linux-spi@vger.kernel.org, linux-kernel Message-ID: <20150922172919.GK30445@sirena.org.uk> References: <20150919175614.GM30445@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CzAS06hjyJnpEZQC" Content-Disposition: inline In-Reply-To: X-Cookie: NOBODY EXPECTS THE SPANISH INQUISITION! User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 70.35.39.2 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: spi-imx: wait_for_completion should timeout even in non-DMA transfer cases X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --CzAS06hjyJnpEZQC Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 21, 2015 at 11:08:55AM +0200, Jean-Michel Hautbois wrote: > 2015-09-19 19:56 GMT+02:00 Mark Brown : > > A calculated timeout is probably best. > Well, it depends... > If you have a 20MHz clock, then you can transfer a byte in 4=B5s. > As most of the time pio_transfer is used for 8 to 32 bytes max, it > would be irrelevant to use such a small timeout. > I can obviously do it, but not sure if using a small (say, 100ms) > timeout would not be better. You want a minimum threashold, yes, but you also need to be able toc ope with larger transfers too so need to be able to raise that where appropriate. --CzAS06hjyJnpEZQC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWAY/qAAoJECTWi3JdVIfQ4HUH/2je3NMXhOip9ivAPoLICqx0 qDYlzUqrc8gS27d5Y/Zv75PZo4eFmmjxM0S4L72rj2uXSP2tBb82XW1OHDuEjx8Q Iedb3JW7VP8YVJvLGaXQKD3BgOJGfmgyXh/NVUJcF6ePA6ahKnrMgmPf2cepe5i9 vhKOGvrfDP7RI+qlqSjEwUVKnoM2i+YVS8AES+mGAud+HzXaSNAU3CUcIwo1eMCK C2JBXPHab2VjhG/oBAFwszP2PvMqTQTubPu9hiWXcS86u80GH7tudimjN0gaYPo1 ebazBS78Q3DYhcAFCYo3fSGXsWEi16ghRVKcYQ5IvW0CRTe7TOvzBKbSccmJCxA= =9hDZ -----END PGP SIGNATURE----- --CzAS06hjyJnpEZQC--