Thread (31 messages) 31 messages, 3 authors, 2015-06-18

Re: [PATCH v6 05/14] crypto: marvell/CESA: add TDMA support

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2015-06-18 09:38:32
Also in: linux-arm-kernel, linux-devicetree, lkml

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 [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help