diff --git a/Makefile b/Makefile index 42948fa..8f343c7 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION = 2017 PATCHLEVEL = 06 -SUBLEVEL = 0 +SUBLEVEL = 2 EXTRAVERSION = NAME = None diff --git a/crypto/digest.c b/crypto/digest.c index 7a8c3c0..bc6de0b 100644 --- a/crypto/digest.c +++ b/crypto/digest.c @@ -272,6 +272,9 @@ goto out_free; size -= now; len += now; + + if (!flags) + buf += now; } if (sig) diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c index 31a9273..51c267e 100644 --- a/drivers/crypto/caam/caamrng.c +++ b/drivers/crypto/caam/caamrng.c @@ -203,8 +203,6 @@ init_job_desc_shared(desc, ctx->sh_desc_dma, sh_len, HDR_SHARE_DEFER | HDR_REVERSE); - bd->addr = (dma_addr_t)bd->buf; - append_seq_out_ptr_intlen(desc, bd->addr, RN_BUF_SIZE, 0); #ifdef DEBUG print_hex_dump(KERN_ERR, "rng job desc@: ", DUMP_PREFIX_OFFSET, 16, 4, @@ -218,7 +216,7 @@ struct buf_data *bd = &ctx->bufs[buf_id]; int err; - bd->buf = dma_alloc(RN_BUF_SIZE); + bd->buf = dma_alloc_coherent(RN_BUF_SIZE, &bd->addr); err = rng_create_job_desc(ctx, buf_id); if (err)