Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4b66406 authored by Yashpal Dutta's avatar Yashpal Dutta Committed by Herbert Xu
Browse files

crypto: caam - fix start index for Protocol shared descriptors



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: default avatarYashpal Dutta <yashpal.dutta@freescale.com>
Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent a68d2595
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/*
 * caam descriptor construction helper functions
 *
 * Copyright 2008-2011 Freescale Semiconductor, Inc.
 * Copyright 2008-2012 Freescale Semiconductor, Inc.
 */

#include "desc.h"
@@ -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);
}