Skip to content
This repository has been archived by the owner on Nov 7, 2021. It is now read-only.

Commit

Permalink
crypto: msm: update QTI crypto drivers for msm-4.14
Browse files Browse the repository at this point in the history
Fix compilation issues for QTI crypto driver on msm-4.14,
this change does code clean up to remove unsupported SMMU
attribute, allocate qcedev_async_req from heap instead of
stack, and add NULL pointer check for ota_async_req.

Change-Id: I5cabcb6993d8855275f3b38c7de6eafb77f8cbf4
Signed-off-by: Zhen Kong <[email protected]>
Link: https://source.codeaurora.org/quic/la/kernel/msm-4.14/commit/?id=b269cc277318a03ab1563a563a064e4196fb1bb0
Signed-off-by: Nathan Chancellor <[email protected]>
[kras: apply to complete commit 534ad92]
Signed-off-by: Albert I <[email protected]>
  • Loading branch information
Zhen Kong authored and johnmart19 committed Feb 10, 2021
1 parent cf9c3a9 commit 5b84e34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
8 changes: 5 additions & 3 deletions drivers/crypto/msm/ota_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,11 @@ static void req_done(unsigned long data)
pqce->active_command = new_req;
spin_unlock_irqrestore(&podev->lock, flags);

new_req->err = 0;
/* start a new request */
ret = start_req(pqce, new_req);
if (new_req) {
new_req->err = 0;
/* start a new request */
ret = start_req(pqce, new_req);
}
if (unlikely(new_req && ret)) {
new_req->err = ret;
complete(&new_req->complete);
Expand Down
7 changes: 0 additions & 7 deletions drivers/crypto/msm/qce50.c
Original file line number Diff line number Diff line change
Expand Up @@ -5983,13 +5983,6 @@ static int qce_smmu_init(struct qce_device *pce_dev)
goto ext_fail_set_attr;
}

ret = iommu_domain_set_attr(mapping->domain,
DOMAIN_ATTR_UPSTREAM_IOVA_ALLOCATOR, &attr);
if (ret < 0) {
pr_err("Set UPSTREAM_IOVA_ALLOCATOR failed, err = %d\n", ret);
goto ext_fail_set_attr;
}

ret = arm_iommu_attach_device(pce_dev->pdev, mapping);
if (ret < 0) {
pr_err("Attach device failed, err = %d\n", ret);
Expand Down

0 comments on commit 5b84e34

Please sign in to comment.