Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757324AbcLOLTR (ORCPT ); Thu, 15 Dec 2016 06:19:17 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:48698 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751214AbcLOLTL (ORCPT ); Thu, 15 Dec 2016 06:19:11 -0500 Date: Thu, 15 Dec 2016 11:17:27 +0000 From: Mark Brown To: Mason Cc: Vinod Koul , Sebastian Frias , Russell King , dmaengine@vger.kernel.org, Linus Walleij , Dan Williams , LKML , Linux ARM , Jon Mason , Lars-Peter Clausen , Lee Jones , Laurent Pinchart , Arnd Bergmann , Maxime Ripard , Dave Jiang , Peter Ujfalusi , Bartlomiej Zolnierkiewicz , Thibaud Cornic Message-ID: <20161215111727.35csnouwegedcmuu@sirena.org.uk> References: <20161208103921.GC6408@localhost> <91b0d10c-1bc2-c3e1-4088-f4ad9adcd6c0@free.fr> <20161208163755.GH6408@localhost> <20161209065955.GJ6408@localhost> <6ce1ea97-1d68-2203-c7b4-73315e801655@laposte.net> <20161209171727.GK6408@localhost> <20161209175606.GM6408@localhost> <7900ae24-6803-a271-944c-8830f718fef0@free.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cpyj5iqlt7ma35hb" Content-Disposition: inline In-Reply-To: <7900ae24-6803-a271-944c-8830f718fef0@free.fr> X-Cookie: I represent a sardine!! User-Agent: NeoMutt/20161126 (1.7.1) X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: Tearing down DMA transfer setup after DMA client has finished X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1588 Lines: 42 --cpyj5iqlt7ma35hb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Dec 09, 2016 at 07:23:17PM +0100, Mason wrote: > On 09/12/2016 18:56, Vinod Koul wrote: > > Right, but in that case the fallback would be PIO mode, and if that is > > not availble (IIRC some f your devices don't) then reject the usage with > > EAGAIN. > Maybe I'm missing something, but I don't see how that would help. > Take the NAND Flash controller driver, for instance. PIO is not > an option, because the ECC engine is tied to DMA. > And failing with -EAGAIN doesn't help the busy looping situation. > The caller should be put on some kind of queue to wait for a > "channel ready" event. Even without the tie into ECC being an issue it seems like falling back to PIO could produce poor results at the system level - it's likely that the PIO would be very expensive and take longer than waiting would've done, increasing the burden on the CPU and slowing things down overall for userspace. --cpyj5iqlt7ma35hb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEyBAABCAAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlhSe8YACgkQJNaLcl1U h9BI7Af2NVvePqcWAYuyrVvvThPK4wawp765AGJTfz2NRuZO74CJsXE8cYQlUpYN PGr3rfZrFsJglFsmGFsZ+Dy8uJClqapL/XGEU4kum/Vi4MPe+fkfB23N2oSFA+G1 iA87cVCtcUkl1x0BrVzTd00PCjzJ83C/zqQv/jU/zBgDFDz8paZqLT+ZQ7osmvfz LkB6WUkVCAVrKBGQruChBRekWDm0pjrMA47UjgW/t5m02DKFcfjl48yPlhlFEHm1 4mSPyBtf0ep1751f4j73KYidyItMOWCjHVrKl3u13Wm+cnldjXWHd/drpTcZHBP6 KfjUSoc8YBpLbaB3MNzbASj035jE =r+Rq -----END PGP SIGNATURE----- --cpyj5iqlt7ma35hb--