[PATCH 2/4] crypto: iaa - take the WQ from the request in the submit helpers
From: Vinicius Costa Gomes
Date: Mon Oct 19 2026 - 19:08:56 EST
iaa_compress(), iaa_compress_verify() and iaa_decompress() take the WQ
to submit to as a parameter, and also find the iaa_wq in the request
context. Nothing ties the two together.
Drop the parameter and use the request's iaa_wq->wq.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@xxxxxxxxx>
---
drivers/crypto/intel/iaa/iaa_crypto_main.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/crypto/intel/iaa/iaa_crypto_main.c b/drivers/crypto/intel/iaa/iaa_crypto_main.c
index 0f5bd244b00a..7b02d3836623 100644
--- a/drivers/crypto/intel/iaa/iaa_crypto_main.c
+++ b/drivers/crypto/intel/iaa/iaa_crypto_main.c
@@ -1049,7 +1049,6 @@ static int iaa_remap_for_verify(struct device *dev, struct iaa_wq *iaa_wq,
dma_addr_t *src_addr, dma_addr_t *dst_addr);
static int iaa_compress_verify(struct crypto_tfm *tfm, struct acomp_req *req,
- struct idxd_wq *wq,
dma_addr_t src_addr, unsigned int slen,
dma_addr_t dst_addr, unsigned int *dlen);
@@ -1134,7 +1133,7 @@ static void iaa_desc_complete(struct idxd_desc *idxd_desc,
goto out;
}
- ret = iaa_compress_verify(ctx->tfm, ctx->req, iaa_wq->wq, src_addr,
+ ret = iaa_compress_verify(ctx->tfm, ctx->req, src_addr,
ctx->req->slen, dst_addr, &ctx->req->dlen);
if (ret) {
dev_dbg(dev, "%s: compress verify failed ret=%d\n", __func__, ret);
@@ -1162,7 +1161,6 @@ static void iaa_desc_complete(struct idxd_desc *idxd_desc,
}
static int iaa_compress(struct crypto_tfm *tfm, struct acomp_req *req,
- struct idxd_wq *wq,
dma_addr_t src_addr, unsigned int slen,
dma_addr_t dst_addr, unsigned int *dlen)
{
@@ -1175,10 +1173,12 @@ static int iaa_compress(struct crypto_tfm *tfm, struct acomp_req *req,
struct idxd_device *idxd;
struct iaa_wq *iaa_wq;
struct pci_dev *pdev;
+ struct idxd_wq *wq;
struct device *dev;
int ret = 0;
iaa_wq = req_ctx->iaa_wq;
+ wq = iaa_wq->wq;
iaa_device = iaa_wq->iaa_device;
idxd = iaa_device->idxd;
pdev = idxd->pdev;
@@ -1313,7 +1313,6 @@ static int iaa_remap_for_verify(struct device *dev, struct iaa_wq *iaa_wq,
}
static int iaa_compress_verify(struct crypto_tfm *tfm, struct acomp_req *req,
- struct idxd_wq *wq,
dma_addr_t src_addr, unsigned int slen,
dma_addr_t dst_addr, unsigned int *dlen)
{
@@ -1326,10 +1325,12 @@ static int iaa_compress_verify(struct crypto_tfm *tfm, struct acomp_req *req,
struct idxd_device *idxd;
struct iaa_wq *iaa_wq;
struct pci_dev *pdev;
+ struct idxd_wq *wq;
struct device *dev;
int ret = 0;
iaa_wq = req_ctx->iaa_wq;
+ wq = iaa_wq->wq;
iaa_device = iaa_wq->iaa_device;
idxd = iaa_device->idxd;
pdev = idxd->pdev;
@@ -1400,7 +1401,6 @@ static int iaa_compress_verify(struct crypto_tfm *tfm, struct acomp_req *req,
}
static int iaa_decompress(struct crypto_tfm *tfm, struct acomp_req *req,
- struct idxd_wq *wq,
dma_addr_t src_addr, unsigned int slen,
dma_addr_t dst_addr, unsigned int *dlen)
{
@@ -1413,10 +1413,12 @@ static int iaa_decompress(struct crypto_tfm *tfm, struct acomp_req *req,
struct idxd_device *idxd;
struct iaa_wq *iaa_wq;
struct pci_dev *pdev;
+ struct idxd_wq *wq;
struct device *dev;
int ret = 0;
iaa_wq = req_ctx->iaa_wq;
+ wq = iaa_wq->wq;
iaa_device = iaa_wq->iaa_device;
idxd = iaa_device->idxd;
pdev = idxd->pdev;
@@ -1582,8 +1584,7 @@ static int iaa_comp_acompress(struct acomp_req *req)
dev_dbg(dev, "map dst %llx req->dst %p dlen %d sg_len %d\n", dst_addr,
req->dst, req->dlen, sg_dma_len(req->dst));
- ret = iaa_compress(tfm, req, wq, src_addr, req->slen, dst_addr,
- &req->dlen);
+ ret = iaa_compress(tfm, req, src_addr, req->slen, dst_addr, &req->dlen);
if (ret == -EINPROGRESS)
return ret;
@@ -1594,7 +1595,7 @@ static int iaa_comp_acompress(struct acomp_req *req)
goto out;
}
- ret = iaa_compress_verify(tfm, req, wq, src_addr, req->slen,
+ ret = iaa_compress_verify(tfm, req, src_addr, req->slen,
dst_addr, &req->dlen);
if (ret)
dev_dbg(dev, "asynchronous compress verification failed ret=%d\n", ret);
@@ -1719,8 +1720,8 @@ static int iaa_comp_adecompress(struct acomp_req *req)
dev_dbg(dev, "map dst %llx req->dst %p dlen %d sg_len %d\n", dst_addr,
req->dst, req->dlen, sg_dma_len(req->dst));
- ret = iaa_decompress(tfm, req, wq, src_addr, req->slen,
- dst_addr, &req->dlen);
+ ret = iaa_decompress(tfm, req, src_addr, req->slen, dst_addr,
+ &req->dlen);
if (ret == -EINPROGRESS)
return ret;
--
2.56.0