hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/crypto/amcc/crypto4xx_core.c
....@@ -522,7 +522,6 @@
522522 {
523523 struct skcipher_request *req;
524524 struct scatterlist *dst;
525
- dma_addr_t addr;
526525
527526 req = skcipher_request_cast(pd_uinfo->async_req);
528527
....@@ -531,8 +530,8 @@
531530 req->cryptlen, req->dst);
532531 } else {
533532 dst = pd_uinfo->dest_va;
534
- addr = dma_map_page(dev->core_dev->device, sg_page(dst),
535
- dst->offset, dst->length, DMA_FROM_DEVICE);
533
+ dma_unmap_page(dev->core_dev->device, pd->dest, dst->length,
534
+ DMA_FROM_DEVICE);
536535 }
537536
538537 if (pd_uinfo->sa_va->sa_command_0.bf.save_iv == SA_SAVE_IV) {
....@@ -557,10 +556,9 @@
557556 struct ahash_request *ahash_req;
558557
559558 ahash_req = ahash_request_cast(pd_uinfo->async_req);
560
- ctx = crypto_tfm_ctx(ahash_req->base.tfm);
559
+ ctx = crypto_ahash_ctx(crypto_ahash_reqtfm(ahash_req));
561560
562
- crypto4xx_copy_digest_to_dst(ahash_req->result, pd_uinfo,
563
- crypto_tfm_ctx(ahash_req->base.tfm));
561
+ crypto4xx_copy_digest_to_dst(ahash_req->result, pd_uinfo, ctx);
564562 crypto4xx_ret_sg_desc(dev, pd_uinfo);
565563
566564 if (pd_uinfo->state & PD_ENTRY_BUSY)