Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247805
b: refs/heads/master
c: ddbb808
h: refs/heads/master
i:
  247803: 65d82d2
v: v3
  • Loading branch information
Kim Phillips authored and Herbert Xu committed May 19, 2011
1 parent 182b3a4 commit e391f59
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2930d49768e5276da4fbed9d9cc1bd40ed25818e
refs/heads/master: ddbb80884a37601026ac3e5eaf176c4296231862
26 changes: 22 additions & 4 deletions trunk/drivers/crypto/caam/caamalg.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,27 @@ static int ipsec_esp(struct ipsec_esp_edesc *edesc, struct aead_request *areq,
/* copy iv from cipher/class1 input context to class2 infifo */
append_move(desc, MOVE_SRC_CLASS1CTX | MOVE_DEST_CLASS2INFIFO | ivsize);

/* start class 1 (cipher) operation */
append_operation(desc, ctx->class1_alg_type | OP_ALG_AS_INITFINAL |
encrypt);
if (!encrypt) {
u32 *jump_cmd, *uncond_jump_cmd;

/* JUMP if shared */
jump_cmd = append_jump(desc, JUMP_TEST_ALL | JUMP_COND_SHRD);

/* start class 1 (cipher) operation, non-shared version */
append_operation(desc, ctx->class1_alg_type |
OP_ALG_AS_INITFINAL);

uncond_jump_cmd = append_jump(desc, 0);

set_jump_tgt_here(desc, jump_cmd);

/* start class 1 (cipher) operation, shared version */
append_operation(desc, ctx->class1_alg_type |
OP_ALG_AS_INITFINAL | OP_ALG_AAI_DK);
set_jump_tgt_here(desc, uncond_jump_cmd);
} else
append_operation(desc, ctx->class1_alg_type |
OP_ALG_AS_INITFINAL | encrypt);

/* load payload & instruct to class2 to snoop class 1 if encrypting */
options = 0;
Expand Down Expand Up @@ -762,7 +780,7 @@ static int aead_authenc_decrypt(struct aead_request *req)
req->cryptlen -= ctx->authsize;

/* allocate extended descriptor */
edesc = ipsec_esp_edesc_alloc(req, 21 * sizeof(u32));
edesc = ipsec_esp_edesc_alloc(req, 24 * sizeof(u32));
if (IS_ERR(edesc))
return PTR_ERR(edesc);

Expand Down

0 comments on commit e391f59

Please sign in to comment.