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

Herbert Xu herbert at gondor.apana.org.au
Thu Jun 18 02:37:30 PDT 2015


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 <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



More information about the linux-arm-kernel mailing list