- sa = (struct dynamic_sa_ctl *) ctx->sa_in;
+ sa = ctx->sa_in;
- set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, SA_NOT_SAVE_IV,
- SA_LOAD_HASH_FROM_SA, SA_LOAD_IV_FROM_STATE,
-@@ -159,7 +159,7 @@ static int crypto4xx_setkey_aes(struct c
+ set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, (cm == CRYPTO_MODE_CBC ?
+ SA_SAVE_IV : SA_NOT_SAVE_IV),
+@@ -160,7 +160,7 @@ static int crypto4xx_setkey_aes(struct c
ctx->offset_to_sr_ptr = get_dynamic_sa_offset_state_ptr_field(sa);
memcpy(ctx->sa_out, ctx->sa_in, ctx->sa_len * 4);
sa->sa_command_0.bf.dir = DIR_OUTBOUND;
return 0;
-@@ -248,8 +248,7 @@ static int crypto4xx_hash_alg_init(struc
+@@ -249,8 +249,7 @@ static int crypto4xx_hash_alg_init(struc
struct crypto_alg *alg = tfm->__crt_alg;
struct crypto4xx_alg *my_alg = crypto_alg_to_crypto4xx_alg(alg);
struct crypto4xx_ctx *ctx = crypto_tfm_ctx(tfm);
int rc;
ctx->dev = my_alg->dev;
-@@ -273,25 +272,24 @@ static int crypto4xx_hash_alg_init(struc
+@@ -274,25 +273,24 @@ static int crypto4xx_hash_alg_init(struc
crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
sizeof(struct crypto4xx_ctx));
return 0;
}
-@@ -302,7 +300,7 @@ int crypto4xx_hash_init(struct ahash_req
+@@ -303,7 +301,7 @@ int crypto4xx_hash_init(struct ahash_req
int ds;
struct dynamic_sa_ctl *sa;
SA_HASH_ALG_SHA1_DIGEST_SIZE);
}
-@@ -607,11 +600,9 @@ static u32 crypto4xx_ahash_done(struct c
+@@ -616,11 +609,9 @@ static u32 crypto4xx_ahash_done(struct c
static u32 crypto4xx_pd_done(struct crypto4xx_device *dev, u32 idx)
{
if (crypto_tfm_alg_type(pd_uinfo->async_req->tfm) ==
CRYPTO_ALG_TYPE_ABLKCIPHER)
return crypto4xx_ablkcipher_done(dev, pd_uinfo, pd);
-@@ -712,7 +703,6 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -721,7 +712,6 @@ u32 crypto4xx_build_pd(struct crypto_asy
unsigned long flags;
struct pd_uinfo *pd_uinfo = NULL;
unsigned int nbytes = datalen, idx;
u32 gd_idx = 0;
/* figure how many gd is needed */
-@@ -771,17 +761,15 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -780,17 +770,15 @@ u32 crypto4xx_build_pd(struct crypto_asy
}
spin_unlock_irqrestore(&dev->core_dev->lock, flags);
if (ctx->direction == DIR_INBOUND)
memcpy(sa, ctx->sa_in, ctx->sa_len * 4);
else
-@@ -791,14 +779,15 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -800,14 +788,15 @@ u32 crypto4xx_build_pd(struct crypto_asy
&pd_uinfo->sr_pa, 4);
if (iv_len)
}
}
pd->sa_len = ctx->sa_len;
-@@ -1006,9 +995,8 @@ static void crypto4xx_bh_tasklet_cb(unsi
+@@ -1015,9 +1004,8 @@ static void crypto4xx_bh_tasklet_cb(unsi
while (core_dev->dev->pdr_head != core_dev->dev->pdr_tail) {
tail = core_dev->dev->pdr_tail;