From: Christoph Hellwig <hch@infradead.org>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: herbert@gondor.apana.org.au, t-kristo@ti.com,
davem@davemloft.net, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org, j-keerthy@ti.com
Subject: Re: [PATCH] crypto: sa2ul: Fix DMA mapping API usage
Date: Wed, 23 Sep 2020 07:02:46 +0100 [thread overview]
Message-ID: <20200923060246.GA11550@infradead.org> (raw)
In-Reply-To: <20200921113846.6973-1-peter.ujfalusi@ti.com>
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_for_cpu() should be called on the
> scatterlist we received the data back.
You might want to look into using struct sg_table and the DMA mapping
helpers using it to simplify this a bit.
next prev parent reply other threads:[~2020-09-23 6:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-21 11:38 [PATCH] crypto: sa2ul: Fix DMA mapping API usage Peter Ujfalusi
2020-09-23 6:02 ` Christoph Hellwig [this message]
2020-09-23 7:48 ` Peter Ujfalusi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200923060246.GA11550@infradead.org \
--to=hch@infradead.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=j-keerthy@ti.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.ujfalusi@ti.com \
--cc=t-kristo@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox