Skip to content

Commit

Permalink
crypto: caam - fix start index for Protocol shared descriptors
Browse files Browse the repository at this point in the history
In case of protocol acceleration descriptors, Shared descriptor header must
carry size of header length + PDB length in words which will be skipped by
DECO while processing descriptor to provide first command word offset

Signed-off-by: Yashpal Dutta <yashpal.dutta@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Yashpal Dutta authored and Herbert Xu committed Jun 27, 2012
1 parent a68d259 commit c4b6640
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/crypto/caam/desc_constr.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* caam descriptor construction helper functions
*
* Copyright 2008-2011 Freescale Semiconductor, Inc.
* Copyright 2008-2012 Freescale Semiconductor, Inc.
*/

#include "desc.h"
Expand Down Expand Up @@ -64,7 +64,7 @@ static inline void init_sh_desc_pdb(u32 *desc, u32 options, size_t pdb_bytes)
{
u32 pdb_len = pdb_bytes / CAAM_CMD_SZ + 1;

init_sh_desc(desc, ((pdb_len << HDR_START_IDX_SHIFT) + pdb_len) |
init_sh_desc(desc, (((pdb_len + 1) << HDR_START_IDX_SHIFT) + pdb_len) |
options);
}

Expand Down

0 comments on commit c4b6640

Please sign in to comment.