crypto: caam - fix SEQ IN PTR command when RTO or PRE bit is set
SEQ IN PTR command does not require pointer if RTO or PRE bit is set Updated desc_constr.h accordingly. Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Reviewed-by: Phillips Kim-R1AAHA <Kim.Phillips@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
committed by
Herbert Xu
parent
74d24d838b
commit
e2d4ea9444
@ -1294,10 +1294,10 @@ struct sec4_sg_entry {
|
|||||||
#define SQOUT_SGF 0x01000000
|
#define SQOUT_SGF 0x01000000
|
||||||
|
|
||||||
/* Appends to a previous pointer */
|
/* Appends to a previous pointer */
|
||||||
#define SQOUT_PRE 0x00800000
|
#define SQOUT_PRE SQIN_PRE
|
||||||
|
|
||||||
/* Restore sequence with pointer/length */
|
/* Restore sequence with pointer/length */
|
||||||
#define SQOUT_RTO 0x00200000
|
#define SQOUT_RTO SQIN_RTO
|
||||||
|
|
||||||
/* Use extended length following pointer */
|
/* Use extended length following pointer */
|
||||||
#define SQOUT_EXT 0x00400000
|
#define SQOUT_EXT 0x00400000
|
||||||
|
@ -122,7 +122,8 @@ static inline void append_cmd_ptr_extlen(u32 *desc, dma_addr_t ptr,
|
|||||||
unsigned int len, u32 command)
|
unsigned int len, u32 command)
|
||||||
{
|
{
|
||||||
append_cmd(desc, command);
|
append_cmd(desc, command);
|
||||||
append_ptr(desc, ptr);
|
if (!(command & (SQIN_RTO | SQIN_PRE)))
|
||||||
|
append_ptr(desc, ptr);
|
||||||
append_cmd(desc, len);
|
append_cmd(desc, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,7 +187,10 @@ static inline void append_seq_##cmd##_ptr_intlen(u32 *desc, dma_addr_t ptr, \
|
|||||||
u32 options) \
|
u32 options) \
|
||||||
{ \
|
{ \
|
||||||
PRINT_POS; \
|
PRINT_POS; \
|
||||||
append_cmd_ptr(desc, ptr, len, CMD_SEQ_##op##_PTR | options); \
|
if (options & (SQIN_RTO | SQIN_PRE)) \
|
||||||
|
append_cmd(desc, CMD_SEQ_##op##_PTR | len | options); \
|
||||||
|
else \
|
||||||
|
append_cmd_ptr(desc, ptr, len, CMD_SEQ_##op##_PTR | options); \
|
||||||
}
|
}
|
||||||
APPEND_SEQ_PTR_INTLEN(in, IN)
|
APPEND_SEQ_PTR_INTLEN(in, IN)
|
||||||
APPEND_SEQ_PTR_INTLEN(out, OUT)
|
APPEND_SEQ_PTR_INTLEN(out, OUT)
|
||||||
|
Reference in New Issue
Block a user