diff options
Diffstat (limited to 'drivers/crypto/talitos.c')
| -rw-r--r-- | drivers/crypto/talitos.c | 9 | 
1 files changed, 5 insertions, 4 deletions
| diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 79791c690858..dff88838dce7 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -1756,9 +1756,9 @@ static int common_nonsnoop_hash(struct talitos_edesc *edesc,  		req_ctx->swinit = 0;  	} else {  		desc->ptr[1] = zero_entry; -		/* Indicate next op is not the first. */ -		req_ctx->first = 0;  	} +	/* Indicate next op is not the first. */ +	req_ctx->first = 0;  	/* HMAC key */  	if (ctx->keylen) @@ -1769,7 +1769,7 @@ static int common_nonsnoop_hash(struct talitos_edesc *edesc,  	sg_count = edesc->src_nents ?: 1;  	if (is_sec1 && sg_count > 1) -		sg_copy_to_buffer(areq->src, sg_count, edesc->buf, length); +		sg_copy_to_buffer(req_ctx->psrc, sg_count, edesc->buf, length);  	else  		sg_count = dma_map_sg(dev, req_ctx->psrc, sg_count,  				      DMA_TO_DEVICE); @@ -3057,7 +3057,8 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev,  		t_alg->algt.alg.hash.final = ahash_final;  		t_alg->algt.alg.hash.finup = ahash_finup;  		t_alg->algt.alg.hash.digest = ahash_digest; -		t_alg->algt.alg.hash.setkey = ahash_setkey; +		if (!strncmp(alg->cra_name, "hmac", 4)) +			t_alg->algt.alg.hash.setkey = ahash_setkey;  		t_alg->algt.alg.hash.import = ahash_import;  		t_alg->algt.alg.hash.export = ahash_export; |