diff options
Diffstat (limited to 'target/linux/apm821xx/patches-4.14/020-0023-crypto-crypto4xx-prepare-for-AEAD-support.patch')
-rw-r--r-- | target/linux/apm821xx/patches-4.14/020-0023-crypto-crypto4xx-prepare-for-AEAD-support.patch | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/target/linux/apm821xx/patches-4.14/020-0023-crypto-crypto4xx-prepare-for-AEAD-support.patch b/target/linux/apm821xx/patches-4.14/020-0023-crypto-crypto4xx-prepare-for-AEAD-support.patch index f883e5a995..aa99b17801 100644 --- a/target/linux/apm821xx/patches-4.14/020-0023-crypto-crypto4xx-prepare-for-AEAD-support.patch +++ b/target/linux/apm821xx/patches-4.14/020-0023-crypto-crypto4xx-prepare-for-AEAD-support.patch @@ -116,7 +116,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> #include <crypto/internal/skcipher.h> #include "crypto4xx_reg_def.h" #include "crypto4xx_core.h" -@@ -518,7 +520,7 @@ static void crypto4xx_ret_sg_desc(struct +@@ -514,7 +516,7 @@ static void crypto4xx_ret_sg_desc(struct } } @@ -125,7 +125,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> struct pd_uinfo *pd_uinfo, struct ce_pd *pd) { -@@ -552,11 +554,9 @@ static u32 crypto4xx_ablkcipher_done(str +@@ -548,11 +550,9 @@ static u32 crypto4xx_ablkcipher_done(str if (pd_uinfo->state & PD_ENTRY_BUSY) ablkcipher_request_complete(ablk_req, -EINPROGRESS); ablkcipher_request_complete(ablk_req, 0); @@ -138,7 +138,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> struct pd_uinfo *pd_uinfo) { struct crypto4xx_ctx *ctx; -@@ -572,20 +572,88 @@ static u32 crypto4xx_ahash_done(struct c +@@ -568,20 +568,88 @@ static u32 crypto4xx_ahash_done(struct c if (pd_uinfo->state & PD_ENTRY_BUSY) ahash_request_complete(ahash_req, -EINPROGRESS); ahash_request_complete(ahash_req, 0); @@ -234,7 +234,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> } static void crypto4xx_stop_all(struct crypto4xx_core_device *core_dev) -@@ -621,8 +689,10 @@ int crypto4xx_build_pd(struct crypto_asy +@@ -617,8 +685,10 @@ int crypto4xx_build_pd(struct crypto_asy const unsigned int datalen, const __le32 *iv, const u32 iv_len, const struct dynamic_sa_ctl *req_sa, @@ -246,7 +246,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> struct crypto4xx_device *dev = ctx->dev; struct dynamic_sa_ctl *sa; struct ce_gd *gd; -@@ -636,18 +706,25 @@ int crypto4xx_build_pd(struct crypto_asy +@@ -632,18 +702,25 @@ int crypto4xx_build_pd(struct crypto_asy unsigned int nbytes = datalen; size_t offset_to_sr_ptr; u32 gd_idx = 0; @@ -279,7 +279,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> if (sg_is_last(dst)) { num_sd = 0; } else { -@@ -733,6 +810,7 @@ int crypto4xx_build_pd(struct crypto_asy +@@ -729,6 +806,7 @@ int crypto4xx_build_pd(struct crypto_asy sa = pd_uinfo->sa_va; memcpy(sa, req_sa, sa_len * 4); @@ -287,7 +287,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> offset_to_sr_ptr = get_dynamic_sa_offset_state_ptr_field(sa); *(u32 *)((unsigned long)sa + offset_to_sr_ptr) = pd_uinfo->sr_pa; -@@ -839,7 +917,7 @@ int crypto4xx_build_pd(struct crypto_asy +@@ -835,7 +913,7 @@ int crypto4xx_build_pd(struct crypto_asy ((crypto_tfm_alg_type(req->tfm) == CRYPTO_ALG_TYPE_AHASH) | (crypto_tfm_alg_type(req->tfm) == CRYPTO_ALG_TYPE_AEAD) ? PD_CTL_HASH_FINAL : 0); @@ -296,7 +296,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> pd_uinfo->state = PD_ENTRY_INUSE | (is_busy ? PD_ENTRY_BUSY : 0); wmb(); -@@ -852,40 +930,68 @@ int crypto4xx_build_pd(struct crypto_asy +@@ -848,40 +926,68 @@ int crypto4xx_build_pd(struct crypto_asy /** * Algorithm Registration Functions */ @@ -385,7 +385,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> { struct crypto4xx_alg *alg; int i; -@@ -900,6 +1006,10 @@ int crypto4xx_register_alg(struct crypto +@@ -896,6 +1002,10 @@ int crypto4xx_register_alg(struct crypto alg->dev = sec_dev; switch (alg->alg.type) { @@ -396,7 +396,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> case CRYPTO_ALG_TYPE_AHASH: rc = crypto_register_ahash(&alg->alg.u.hash); break; -@@ -929,6 +1039,10 @@ static void crypto4xx_unregister_alg(str +@@ -925,6 +1035,10 @@ static void crypto4xx_unregister_alg(str crypto_unregister_ahash(&alg->alg.u.hash); break; @@ -407,7 +407,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> default: crypto_unregister_alg(&alg->alg.u.cipher); } -@@ -982,7 +1096,7 @@ static irqreturn_t crypto4xx_ce_interrup +@@ -978,7 +1092,7 @@ static irqreturn_t crypto4xx_ce_interrup /** * Supported Crypto Algorithms */ @@ -416,7 +416,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> /* Crypto AES modes */ { .type = CRYPTO_ALG_TYPE_ABLKCIPHER, .u.cipher = { .cra_name = "cbc(aes)", -@@ -994,8 +1108,8 @@ struct crypto4xx_alg_common crypto4xx_al +@@ -990,8 +1104,8 @@ struct crypto4xx_alg_common crypto4xx_al .cra_blocksize = AES_BLOCK_SIZE, .cra_ctxsize = sizeof(struct crypto4xx_ctx), .cra_type = &crypto_ablkcipher_type, @@ -427,7 +427,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> .cra_module = THIS_MODULE, .cra_u = { .ablkcipher = { -@@ -1018,8 +1132,8 @@ struct crypto4xx_alg_common crypto4xx_al +@@ -1014,8 +1128,8 @@ struct crypto4xx_alg_common crypto4xx_al .cra_blocksize = AES_BLOCK_SIZE, .cra_ctxsize = sizeof(struct crypto4xx_ctx), .cra_type = &crypto_ablkcipher_type, @@ -438,7 +438,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> .cra_module = THIS_MODULE, .cra_u = { .ablkcipher = { -@@ -1042,8 +1156,8 @@ struct crypto4xx_alg_common crypto4xx_al +@@ -1038,8 +1152,8 @@ struct crypto4xx_alg_common crypto4xx_al .cra_blocksize = AES_BLOCK_SIZE, .cra_ctxsize = sizeof(struct crypto4xx_ctx), .cra_type = &crypto_ablkcipher_type, @@ -449,7 +449,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> .cra_module = THIS_MODULE, .cra_u = { .ablkcipher = { -@@ -1068,8 +1182,8 @@ struct crypto4xx_alg_common crypto4xx_al +@@ -1064,8 +1178,8 @@ struct crypto4xx_alg_common crypto4xx_al .cra_blocksize = AES_BLOCK_SIZE, .cra_ctxsize = sizeof(struct crypto4xx_ctx), .cra_type = &crypto_ablkcipher_type, @@ -460,7 +460,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> .cra_module = THIS_MODULE, .cra_u = { .ablkcipher = { -@@ -1091,8 +1205,8 @@ struct crypto4xx_alg_common crypto4xx_al +@@ -1087,8 +1201,8 @@ struct crypto4xx_alg_common crypto4xx_al .cra_blocksize = AES_BLOCK_SIZE, .cra_ctxsize = sizeof(struct crypto4xx_ctx), .cra_type = &crypto_ablkcipher_type, @@ -471,7 +471,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> .cra_module = THIS_MODULE, .cra_u = { .ablkcipher = { -@@ -1158,6 +1272,7 @@ static int crypto4xx_probe(struct platfo +@@ -1154,6 +1268,7 @@ static int crypto4xx_probe(struct platfo core_dev->device = dev; spin_lock_init(&core_dev->lock); INIT_LIST_HEAD(&core_dev->dev->alg_list); |