From: Frank.Li@oss.nxp.com
To: Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
Dan Williams <djbw@kernel.org>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-crypto@vger.kernel.org, imx@lists.linux.dev,
Frank Li <Frank.Li@nxp.com>, Frank Li <frank.li@nxp.com>
Subject: [PATCH 2/3] async_tx: use dmaengine_prep_dma_pq(_val)() instead of direct callback
Date: Mon, 21 Sep 2026 19:09:04 -0400 [thread overview]
Message-ID: <20260921-dmaengine_prep_dma_pq-v1-2-9563ed448260@nxp.com> (raw)
In-Reply-To: <20260921-dmaengine_prep_dma_pq-v1-0-9563ed448260@nxp.com>
From: Frank Li <Frank.Li@nxp.com>
Replace direct device_prep_dma_pq() and device_prep_dma_pq_val() callback
invocations with the new dmaengine_prep_dma_pq() and
dmaengine_prep_dma_pq_val() wrapper API, consistent with how other
dmaengine operations use their wrapper helpers.
Assisted-by: LLM
Signed-off-by: Frank Li <frank.li@nxp.com>
---
crypto/async_tx/async_pq.c | 22 +++++++++++-----------
crypto/async_tx/async_raid6_recov.c | 8 ++++----
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/crypto/async_tx/async_pq.c b/crypto/async_tx/async_pq.c
index 27f99349e310b..1087a478447ce 100644
--- a/crypto/async_tx/async_pq.c
+++ b/crypto/async_tx/async_pq.c
@@ -76,11 +76,11 @@ do_async_gen_syndrome(struct dma_chan *chan,
for (;;) {
dma_dest[0] = unmap->addr[disks - 2];
dma_dest[1] = unmap->addr[disks - 1];
- tx = dma->device_prep_dma_pq(chan, dma_dest,
- &unmap->addr[src_off],
- pq_src_cnt,
- &scfs[src_off], unmap->len,
- dma_flags);
+ tx = dmaengine_prep_dma_pq(chan, dma_dest,
+ &unmap->addr[src_off],
+ pq_src_cnt,
+ &scfs[src_off], unmap->len,
+ dma_flags);
if (likely(tx))
break;
async_tx_quiesce(&submit->depend_tx);
@@ -357,12 +357,12 @@ async_syndrome_val(struct page **blocks, unsigned int *offsets, int disks,
if (submit->flags & ASYNC_TX_FENCE)
dma_flags |= DMA_PREP_FENCE;
for (;;) {
- tx = device->device_prep_dma_pq_val(chan, pq,
- unmap->addr,
- src_cnt,
- coefs,
- len, pqres,
- dma_flags);
+ tx = dmaengine_prep_dma_pq_val(chan, pq,
+ unmap->addr,
+ src_cnt,
+ coefs,
+ len, pqres,
+ dma_flags);
if (likely(tx))
break;
async_tx_quiesce(&submit->depend_tx);
diff --git a/crypto/async_tx/async_raid6_recov.c b/crypto/async_tx/async_raid6_recov.c
index e53870d84bc55..27909afda694a 100644
--- a/crypto/async_tx/async_raid6_recov.c
+++ b/crypto/async_tx/async_raid6_recov.c
@@ -52,8 +52,8 @@ async_sum_product(struct page *dest, unsigned int d_off,
pq[1] = unmap->addr[2];
unmap->len = len;
- tx = dma->device_prep_dma_pq(chan, pq, unmap->addr, 2, coef,
- len, dma_flags);
+ tx = dmaengine_prep_dma_pq(chan, pq, unmap->addr, 2, coef,
+ len, dma_flags);
if (tx) {
dma_set_unmap(tx, unmap);
async_tx_submit(chan, tx, submit);
@@ -120,8 +120,8 @@ async_mult(struct page *dest, unsigned int d_off, struct page *src,
* dma_dest[1] and ignores dma_dest[0] as a dest
* due to DMA_PREP_PQ_DISABLE_P
*/
- tx = dma->device_prep_dma_pq(chan, dma_dest, unmap->addr,
- 1, &coef, len, dma_flags);
+ tx = dmaengine_prep_dma_pq(chan, dma_dest, unmap->addr,
+ 1, &coef, len, dma_flags);
if (tx) {
dma_set_unmap(tx, unmap);
--
2.43.0
next prev parent reply other threads:[~2026-09-21 23:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 23:09 [PATCH 0/3] dmaengine: Add dmaengine_prep_dma_pq(_val)() API to avoid call DMA Engine callback directly Frank.Li
2026-09-21 23:09 ` [PATCH 1/3] dmaengine: add dmaengine_prep_dma_pq(_val)() API Frank.Li
2026-09-21 23:09 ` Frank.Li [this message]
2026-09-21 23:09 ` [PATCH 3/3] async_tx: use dma_async_issue_pending() instead of direct callback Frank.Li
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=20260921-dmaengine_prep_dma_pq-v1-2-9563ed448260@nxp.com \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=davem@davemloft.net \
--cc=djbw@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=imx@lists.linux.dev \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoul@kernel.org \
/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
all inboxes | Powered by JetHome®