Re: [PATCH] crypto: sa2ul: Fix DMA mapping API usage

2020-09-23 Thread Peter Ujfalusi
On 23/09/2020 9.02, Christoph Hellwig wrote: > On Mon, Sep 21, 2020 at 02:38:46PM +0300, Peter Ujfalusi wrote: >> Make sure that we call the dma_unmap_sg on the correct scatterlist on >> completion with the correct sg_nents. >> >> We also should be calling dma_sync_sg_for_device() on the tx buff

Re: [PATCH] crypto: sa2ul: Fix DMA mapping API usage

2020-09-22 Thread Christoph Hellwig
On Mon, Sep 21, 2020 at 02:38:46PM +0300, Peter Ujfalusi wrote: > Make sure that we call the dma_unmap_sg on the correct scatterlist on > completion with the correct sg_nents. > > We also should be calling dma_sync_sg_for_device() on the tx buffer before > giving it to the DMA and the dma_sync_sg_

[PATCH] crypto: sa2ul: Fix DMA mapping API usage

2020-09-21 Thread Peter Ujfalusi
Make sure that we call the dma_unmap_sg on the correct scatterlist on completion with the correct sg_nents. We also should be calling dma_sync_sg_for_device() on the tx buffer before giving it to the DMA and the dma_sync_sg_for_cpu() should be called on the scatterlist we received the data back.