From 6a09a20d7257dca0c43026e57e3bd2dc8273b776 Mon Sep 17 00:00:00 2001 From: Kim Phillips Date: Fri, 22 Jun 2012 19:42:38 -0500 Subject: [PATCH] --- yaml --- r: 318362 b: refs/heads/master c: 991c569c5df68609b24a0aba5e5fd4879225c4cf h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/crypto/caam/desc_constr.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index af3204d7cd23..8032d05eee24 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c4b664063ea5c007f05d2d23aa6edc9cfd385aa3 +refs/heads/master: 991c569c5df68609b24a0aba5e5fd4879225c4cf diff --git a/trunk/drivers/crypto/caam/desc_constr.h b/trunk/drivers/crypto/caam/desc_constr.h index 0d31e27b18ea..8e1056fac681 100644 --- a/trunk/drivers/crypto/caam/desc_constr.h +++ b/trunk/drivers/crypto/caam/desc_constr.h @@ -51,7 +51,7 @@ static inline void *sh_desc_pdb(u32 *desc) static inline void init_desc(u32 *desc, u32 options) { - *desc = options | HDR_ONE | 1; + *desc = (options | HDR_ONE) + 1; } static inline void init_sh_desc(u32 *desc, u32 options) @@ -62,7 +62,7 @@ static inline void init_sh_desc(u32 *desc, u32 options) static inline void init_sh_desc_pdb(u32 *desc, u32 options, size_t pdb_bytes) { - u32 pdb_len = pdb_bytes / CAAM_CMD_SZ + 1; + u32 pdb_len = (pdb_bytes + CAAM_CMD_SZ - 1) / CAAM_CMD_SZ; init_sh_desc(desc, (((pdb_len + 1) << HDR_START_IDX_SHIFT) + pdb_len) | options);