Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754518AbbFRJic (ORCPT ); Thu, 18 Jun 2015 05:38:32 -0400 Received: from helcar.hengli.com.au ([209.40.204.226]:44915 "EHLO helcar.hengli.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753950AbbFRJiX (ORCPT ); Thu, 18 Jun 2015 05:38:23 -0400 Date: Thu, 18 Jun 2015 17:37:30 +0800 From: Herbert Xu To: Russell King - ARM Linux Cc: Boris Brezillon , Lior Amsalem , Andrew Lunn , Nadav Haklai , Mark Rutland , Tawfik Bayouk , Eran Ben-Avi , Jason Gunthorpe , Sebastian Hesselbarth , devicetree@vger.kernel.org, Jason Cooper , Pawel Moll , Ian Campbell , Arnaud Ebalard , Rob Herring , Gregory CLEMENT , linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, Kumar Gala , Imre Kaloz , "David S. Miller" Subject: Re: [PATCH v6 05/14] crypto: marvell/CESA: add TDMA support Message-ID: <20150618093730.GA29911@gondor.apana.org.au> References: <1434527142-3609-1-git-send-email-boris.brezillon@free-electrons.com> <1434527142-3609-6-git-send-email-boris.brezillon@free-electrons.com> <20150617095001.GA11538@gondor.apana.org.au> <20150618090400.GG7557@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150618090400.GG7557@n2100.arm.linux.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1103 Lines: 24 On Thu, Jun 18, 2015 at 10:04:00AM +0100, Russell King - ARM Linux wrote: > > If dma_map_sg() coalesces scatterlist entries, then ret will be smaller > than src_nents, and ret indicates how many scatterlist entries to be > walked during DMA - you should not use src_nents for that. I couldn't > see where the driver used that information. In fact, the driver seems > to be capable of walking more than src_nents/ret numbers of scatterlist > entries: it just keeps going with sg_next() until it hits the end of > the allocated scatterlist. I think he should be OK even though he throws away the return value because he's stopping his walk once the sum of sg_dma_length reaches his end goal. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/