qcedev: check crypto status before unlocking

Whenever there is a crypto error, the pipe is reset which
in turn resets the crypto core. When the pipe is reset wait
for it to complete by monitoring the crypto status.

Change-Id: Id79838e517df491b8062ec379baff2407fea500c
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
This commit is contained in:
Gaurav Kashyap
2023-05-24 14:33:38 -07:00
parent ed0eab9c68
commit e0e07de5fd
2 changed files with 19 additions and 6 deletions

View File

@@ -49,7 +49,7 @@
* This is temporary, and we can use the 1500 value once the
* core irqs are enabled.
*/
#define MAX_OFFLOAD_CRYPTO_WAIT_TIME 25
#define MAX_OFFLOAD_CRYPTO_WAIT_TIME 20
#define MAX_REQUEST_TIME 5000
@@ -841,12 +841,10 @@ static int submit_req(struct qcedev_async_req *qcedev_areq,
}
return 0;
}
spin_lock_irqsave(&podev->lock, flags);
ret = qce_manage_timeout(podev->qce, current_req_info);
if (ret)
pr_err("%s: error during manage timeout", __func__);
spin_unlock_irqrestore(&podev->lock, flags);
req_done((unsigned long) podev);
if (qcedev_areq->offload_cipher_op_req.err !=
QCEDEV_OFFLOAD_NO_ERROR)