@@ -275,12 +275,11 @@ static int cc_queues_status(struct cc_drvdata *drvdata,
275
275
* \param len The crypto sequence length
276
276
* \param add_comp If "true": add an artificial dout DMA to mark completion
277
277
*
278
- * \return int Returns -EINPROGRESS or error code
279
278
*/
280
- static int cc_do_send_request (struct cc_drvdata * drvdata ,
281
- struct cc_crypto_req * cc_req ,
282
- struct cc_hw_desc * desc , unsigned int len ,
283
- bool add_comp )
279
+ static void cc_do_send_request (struct cc_drvdata * drvdata ,
280
+ struct cc_crypto_req * cc_req ,
281
+ struct cc_hw_desc * desc , unsigned int len ,
282
+ bool add_comp )
284
283
{
285
284
struct cc_req_mgr_handle * req_mgr_h = drvdata -> request_mgr_handle ;
286
285
unsigned int used_sw_slots ;
@@ -328,9 +327,6 @@ static int cc_do_send_request(struct cc_drvdata *drvdata,
328
327
/* Update the free slots in HW queue */
329
328
req_mgr_h -> q_free_slots -= total_seq_len ;
330
329
}
331
-
332
- /* Operation still in process */
333
- return - EINPROGRESS ;
334
330
}
335
331
336
332
static void cc_enqueue_backlog (struct cc_drvdata * drvdata ,
@@ -390,16 +386,10 @@ static void cc_proc_backlog(struct cc_drvdata *drvdata)
390
386
return ;
391
387
}
392
388
393
- rc = cc_do_send_request (drvdata , & bli -> creq , bli -> desc ,
394
- bli -> len , false);
395
-
389
+ cc_do_send_request (drvdata , & bli -> creq , bli -> desc , bli -> len ,
390
+ false);
396
391
spin_unlock (& mgr -> hw_lock );
397
392
398
- if (rc != - EINPROGRESS ) {
399
- cc_pm_put_suspend (dev );
400
- creq -> user_cb (dev , req , rc );
401
- }
402
-
403
393
/* Remove ourselves from the backlog list */
404
394
spin_lock (& mgr -> bl_lock );
405
395
list_del (& bli -> list );
@@ -452,8 +442,10 @@ int cc_send_request(struct cc_drvdata *drvdata, struct cc_crypto_req *cc_req,
452
442
return - EBUSY ;
453
443
}
454
444
455
- if (!rc )
456
- rc = cc_do_send_request (drvdata , cc_req , desc , len , false);
445
+ if (!rc ) {
446
+ cc_do_send_request (drvdata , cc_req , desc , len , false);
447
+ rc = - EINPROGRESS ;
448
+ }
457
449
458
450
spin_unlock_bh (& mgr -> hw_lock );
459
451
return rc ;
@@ -493,14 +485,8 @@ int cc_send_sync_request(struct cc_drvdata *drvdata,
493
485
reinit_completion (& drvdata -> hw_queue_avail );
494
486
}
495
487
496
- rc = cc_do_send_request (drvdata , cc_req , desc , len , true);
488
+ cc_do_send_request (drvdata , cc_req , desc , len , true);
497
489
spin_unlock_bh (& mgr -> hw_lock );
498
-
499
- if (rc != - EINPROGRESS ) {
500
- cc_pm_put_suspend (dev );
501
- return rc ;
502
- }
503
-
504
490
wait_for_completion (& cc_req -> seq_compl );
505
491
return 0 ;
506
492
}
0 commit comments