Re: [PATCH 12/12] crypto: caam - add crypto_engine support for HASH algorithms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/18/2019 12:31 AM, Iuliana Prodan wrote:
> @@ -1150,20 +1201,19 @@ static int ahash_final_no_ctx(struct ahash_request *req)
>  			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
>  			     1);
>  
> -	jrentry = &edesc->jrentry;
> +	state->ahash_op_done = ahash_done;
>  
> -	ret = caam_jr_enqueue(jrdev, desc, ahash_done, jrentry);
> -	if (ret != -EINPROGRESS) {
> +	ret = caam_jr_enqueue(jrdev, desc, ahash_done, &edesc->jrentry);
> +	if ((ret != -EINPROGRESS) && (ret != -EBUSY)) {
>  		ahash_unmap_ctx(jrdev, edesc, req, digestsize, DMA_FROM_DEVICE);
>  		kfree(edesc);
>  	}
>  
>  	return ret;
> - unmap:
> +unmap:
>  	ahash_unmap(jrdev, edesc, req, digestsize);
>  	kfree(edesc);
>  	return -ENOMEM;
> -
>  }
Unrelated whitespace changes.

> @@ -1294,7 +1344,7 @@ static int ahash_update_no_ctx(struct ahash_request *req)
>  			     1);
>  
>  	return ret;
> - unmap_ctx:
> +unmap_ctx:
Same here.

> @@ -1509,6 +1558,7 @@ static int ahash_init(struct ahash_request *req)
>  	state->update = ahash_update_first;
>  	state->finup = ahash_finup_first;
>  	state->final = ahash_final_no_ctx;
> +	state->ahash_op_done = ahash_done;
>  
Is this initialization really needed?

Horia





[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux