kernel: bump 4.14 to 4.14.114
authorKoen Vandeputte <koen.vandeputte@ncentric.com>
Mon, 29 Apr 2019 11:01:53 +0000 (13:01 +0200)
committerKoen Vandeputte <koen.vandeputte@ncentric.com>
Thu, 2 May 2019 10:59:26 +0000 (12:59 +0200)
Refreshed all patches.

Altered patches:
- 150-bridge_allow_receiption_on_disabled_port.patch
- 201-extra_optimization.patch

Remove upstreamed:
- 022-0006-crypto-crypto4xx-properly-set-IV-after-de-and-encryp.patch

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
38 files changed:
include/kernel-version.mk
target/linux/apm821xx/patches-4.14/020-0002-crypto-crypto4xx-remove-unused-definitions-and-write.patch
target/linux/apm821xx/patches-4.14/020-0003-crypto-crypto4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch
target/linux/apm821xx/patches-4.14/020-0005-crypto-crypto4xx-remove-double-assignment-of-pd_uinf.patch
target/linux/apm821xx/patches-4.14/020-0006-crypto-crypto4xx-fix-dynamic_sa_ctl-s-sa_contents-de.patch
target/linux/apm821xx/patches-4.14/020-0007-crypto-crypto4xx-move-and-refactor-dynamic_contents-.patch
target/linux/apm821xx/patches-4.14/020-0008-crypto-crypto4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch
target/linux/apm821xx/patches-4.14/020-0012-crypto-crypto4xx-pointer-arithmetic-overhaul.patch
target/linux/apm821xx/patches-4.14/020-0014-crypto-crypto4xx-fix-off-by-one-AES-OFB.patch
target/linux/apm821xx/patches-4.14/020-0017-crypto-crypto4xx-add-backlog-queue-support.patch
target/linux/apm821xx/patches-4.14/020-0018-crypto-crypto4xx-use-the-correct-LE32-format-for-IV-.patch
target/linux/apm821xx/patches-4.14/020-0019-crypto-crypto4xx-overhaul-crypto4xx_build_pd.patch
target/linux/apm821xx/patches-4.14/020-0020-crypto-crypto4xx-fix-various-warnings.patch
target/linux/apm821xx/patches-4.14/020-0021-crypto-crypto4xx-fix-stalls-under-heavy-load.patch
target/linux/apm821xx/patches-4.14/020-0022-crypto-crypto4xx-simplify-sa-and-state-context-acqui.patch
target/linux/apm821xx/patches-4.14/020-0023-crypto-crypto4xx-prepare-for-AEAD-support.patch
target/linux/apm821xx/patches-4.14/020-0024-crypto-crypto4xx-add-aes-ccm-support.patch
target/linux/apm821xx/patches-4.14/020-0025-crypto-crypto4xx-add-aes-gcm-support.patch
target/linux/apm821xx/patches-4.14/021-0001-crypto-crypto4xx-shuffle-iomap-in-front-of-request_i.patch
target/linux/apm821xx/patches-4.14/021-0002-crypto-crypto4xx-support-Revision-B-parts.patch
target/linux/apm821xx/patches-4.14/021-0003-crypto-crypto4xx-fix-missing-irq-devname.patch
target/linux/apm821xx/patches-4.14/021-0004-crypto-crypto4xx-kill-MODULE_NAME.patch
target/linux/apm821xx/patches-4.14/021-0005-crypto-crypto4xx-perform-aead-icv-check-in-the-drive.patch
target/linux/apm821xx/patches-4.14/022-0002-crypto-crypto4xx-performance-optimizations.patch
target/linux/apm821xx/patches-4.14/022-0003-crypto-crypto4xx-convert-to-skcipher.patch
target/linux/apm821xx/patches-4.14/022-0004-crypto-crypto4xx-avoid-VLA-use.patch
target/linux/apm821xx/patches-4.14/022-0005-crypto-crypto4xx-add-aes-ctr-support.patch
target/linux/apm821xx/patches-4.14/022-0006-crypto-crypto4xx-properly-set-IV-after-de-and-encryp.patch [deleted file]
target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch
target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch
target/linux/generic/backport-4.14/350-v4.18-ipv6-make-ip6_dst_mtu_forward-inline.patch
target/linux/generic/hack-4.14/207-disable-modorder.patch
target/linux/generic/hack-4.14/220-gc_sections.patch
target/linux/generic/hack-4.14/902-debloat_proc.patch
target/linux/generic/pending-4.14/150-bridge_allow_receiption_on_disabled_port.patch
target/linux/generic/pending-4.14/201-extra_optimization.patch
target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch

index 6a07ff3993f924edef7b3a233156214d32fdbf6a..66888aac7f9a202148f11201c1dcd8d163234151 100644 (file)
@@ -4,12 +4,12 @@ LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .136
 LINUX_VERSION-4.9 = .171
-LINUX_VERSION-4.14 = .113
+LINUX_VERSION-4.14 = .114
 LINUX_VERSION-4.19 = .36
 
 LINUX_KERNEL_HASH-3.18.136 = 48c8775013d23229462134f911bbb14c7935096fcccfb19ce28ecd5f7154f35c
 LINUX_KERNEL_HASH-4.9.171 = 431cd992bf74da9851dd5938dbe45ff7577219b84b237ae5e30067d483b57f01
-LINUX_KERNEL_HASH-4.14.113 = b24df2e37faaf2290999c507f9e29de98494f52429bcd35513c5b3e52eaddac2
+LINUX_KERNEL_HASH-4.14.114 = b75e1dcfabc8d18051a07cbf9b60eaee8ac470a2311fed20447fd0d022c19e15
 LINUX_KERNEL_HASH-4.19.36 = b808b508177f9d288d94a3b9df7b01d5eac9fcc1804a794c913b2144de63f2bc
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
index 466f0a0a78f75084c4fca5b11725f35f4fd37a28..b49bcaf88c9c2c6535d3f2c622e59e51360d17ac 100644 (file)
@@ -39,9 +39,9 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        sa = (struct dynamic_sa_ctl *) ctx->sa_in;
 -      ctx->hash_final = 0;
  
-       set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, SA_NOT_SAVE_IV,
-                                SA_LOAD_HASH_FROM_SA, SA_LOAD_IV_FROM_STATE,
-@@ -191,7 +188,6 @@ static int crypto4xx_hash_alg_init(struc
+       set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, (cm == CRYPTO_MODE_CBC ?
+                                SA_SAVE_IV : SA_NOT_SAVE_IV),
+@@ -192,7 +189,6 @@ static int crypto4xx_hash_alg_init(struc
  
        ctx->dev   = my_alg->dev;
        ctx->is_hash = 1;
@@ -49,7 +49,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
        /* Create SA */
        if (ctx->sa_in_dma_addr || ctx->sa_out_dma_addr)
-@@ -256,7 +252,6 @@ int crypto4xx_hash_update(struct ahash_r
+@@ -257,7 +253,6 @@ int crypto4xx_hash_update(struct ahash_r
        struct crypto4xx_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
  
        ctx->is_hash = 1;
@@ -57,7 +57,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        ctx->pd_ctl = 0x11;
        ctx->direction = DIR_INBOUND;
  
-@@ -274,7 +269,6 @@ int crypto4xx_hash_digest(struct ahash_r
+@@ -275,7 +270,6 @@ int crypto4xx_hash_digest(struct ahash_r
  {
        struct crypto4xx_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
  
@@ -67,7 +67,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -964,7 +964,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -973,7 +973,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
  
        sa->sa_command_1.bf.hash_crypto_offset = 0;
        pd->pd_ctl.w = ctx->pd_ctl;
index c195b88c2f8b41fab3a0128bf30eef09ea2fb6e7..ab2e730530d2762cb3c6e056977221ffdb734deb 100644 (file)
@@ -18,7 +18,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1116,7 +1116,9 @@ struct crypto4xx_alg_common crypto4xx_al
+@@ -1125,7 +1125,9 @@ struct crypto4xx_alg_common crypto4xx_al
                .cra_name       = "cbc(aes)",
                .cra_driver_name = "cbc-aes-ppc4xx",
                .cra_priority   = CRYPTO4XX_CRYPTO_PRIORITY,
index 03c402d975eee2b736f6213d73bf1783086de116..6f173ea6dc0e9040deccc12a969b2fe37af5a4c3 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1081,7 +1081,6 @@ static void crypto4xx_bh_tasklet_cb(unsi
+@@ -1090,7 +1090,6 @@ static void crypto4xx_bh_tasklet_cb(unsi
                        pd->pd_ctl.bf.pe_done = 0;
                        crypto4xx_pd_done(core_dev->dev, tail);
                        crypto4xx_put_pd_to_pdr(core_dev->dev, tail);
index 84063d3036949b1f14af317cea288f7e3d695193..db57f7b3a81c32beec0f3c30b5b40a471caf18f7 100644 (file)
@@ -18,7 +18,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_alg.c
 +++ b/drivers/crypto/amcc/crypto4xx_alg.c
-@@ -149,7 +149,7 @@ static int crypto4xx_setkey_aes(struct c
+@@ -150,7 +150,7 @@ static int crypto4xx_setkey_aes(struct c
                                 SA_NOT_COPY_HDR);
        crypto4xx_memcpy_le(ctx->sa_in + get_dynamic_sa_offset_key_field(ctx),
                            key, keylen);
@@ -27,7 +27,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        sa->sa_command_1.bf.key_len = keylen >> 3;
        ctx->is_hash = 0;
        ctx->direction = DIR_INBOUND;
-@@ -219,7 +219,7 @@ static int crypto4xx_hash_alg_init(struc
+@@ -220,7 +220,7 @@ static int crypto4xx_hash_alg_init(struc
                                 SA_NOT_COPY_PAD, SA_NOT_COPY_PAYLOAD,
                                 SA_NOT_COPY_HDR);
        ctx->direction = DIR_INBOUND;
index c7c32e5d36621224ee6f4603345fbcca80143ec7..20de0d1d7002b41fe3d8a1737685597a66fd60aa 100644 (file)
@@ -68,7 +68,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  }
  
  /**
-@@ -147,15 +147,15 @@ static int crypto4xx_setkey_aes(struct c
+@@ -148,15 +148,15 @@ static int crypto4xx_setkey_aes(struct c
                                 SA_SEQ_MASK_OFF, SA_MC_ENABLE,
                                 SA_NOT_COPY_PAD, SA_NOT_COPY_PAYLOAD,
                                 SA_NOT_COPY_HDR);
@@ -88,7 +88,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
        memcpy(ctx->sa_out, ctx->sa_in, ctx->sa_len * 4);
        sa = (struct dynamic_sa_ctl *) ctx->sa_out;
-@@ -225,7 +225,7 @@ static int crypto4xx_hash_alg_init(struc
+@@ -226,7 +226,7 @@ static int crypto4xx_hash_alg_init(struc
        memset(sa_in->inner_digest, 0, sizeof(sa_in->inner_digest));
        memset(sa_in->outer_digest, 0, sizeof(sa_in->outer_digest));
        sa_in->state_ptr = ctx->state_record_dma_addr;
index d19a41ec132c798442fa7ebe8f9d09328dd7f555..db1a718825da013c209ad428859ae92a3ca98118 100644 (file)
@@ -27,7 +27,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  #include "crypto4xx_reg_def.h"
  #include "crypto4xx_core.h"
  #include "crypto4xx_sa.h"
-@@ -171,6 +172,71 @@ int crypto4xx_setkey_aes_cbc(struct cryp
+@@ -172,6 +173,71 @@ int crypto4xx_setkey_aes_cbc(struct cryp
                                    CRYPTO_FEEDBACK_MODE_NO_FB);
  }
  
@@ -109,7 +109,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  #include <crypto/sha.h>
  #include "crypto4xx_reg_def.h"
  #include "crypto4xx_core.h"
-@@ -1135,6 +1136,103 @@ struct crypto4xx_alg_common crypto4xx_al
+@@ -1144,6 +1145,103 @@ struct crypto4xx_alg_common crypto4xx_al
                        }
                }
        }},
index ee7ee1191e0f60f7c71b5e882b6d0d5bde8ba76e..3d445f537bf248a904f8a83ad1aed9bfbe2eb50a 100644 (file)
@@ -25,9 +25,9 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
 -      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);
@@ -36,7 +36,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        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);
@@ -46,7 +46,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        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));
@@ -80,7 +80,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
        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;
  
@@ -206,7 +206,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                       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)
  {
@@ -220,7 +220,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        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;
@@ -228,7 +228,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        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);
  
@@ -248,7 +248,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                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)
@@ -267,7 +267,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                }
        }
        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;
index acded24bbb206e6f233a4cb6a4b0a2cb4907762f..b1786a2015780366286aa1aaf966cade8489267f 100644 (file)
@@ -38,7 +38,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1148,7 +1148,7 @@ struct crypto4xx_alg_common crypto4xx_al
+@@ -1157,7 +1157,7 @@ struct crypto4xx_alg_common crypto4xx_al
                                .min_keysize    = AES_MIN_KEY_SIZE,
                                .max_keysize    = AES_MAX_KEY_SIZE,
                                .ivsize         = AES_IV_SIZE,
index 046dd9c257cf892cc20c03cc5911db7330e8d670..4e644cf627af76fa7d2aa36139863c9a28c05479 100644 (file)
@@ -56,9 +56,9 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  #include "crypto4xx_reg_def.h"
  #include "crypto4xx_core.h"
  #include "crypto4xx_sa.h"
-@@ -573,8 +574,10 @@ static u32 crypto4xx_ablkcipher_done(str
-                                   dst->offset, dst->length, DMA_FROM_DEVICE);
+@@ -582,8 +583,10 @@ static u32 crypto4xx_ablkcipher_done(str
        }
        crypto4xx_ret_sg_desc(dev, pd_uinfo);
 -      if (ablk_req->base.complete != NULL)
 -              ablk_req->base.complete(&ablk_req->base, 0);
@@ -69,7 +69,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
        return 0;
  }
-@@ -591,9 +594,10 @@ static u32 crypto4xx_ahash_done(struct c
+@@ -600,9 +603,10 @@ static u32 crypto4xx_ahash_done(struct c
        crypto4xx_copy_digest_to_dst(pd_uinfo,
                                     crypto_tfm_ctx(ahash_req->base.tfm));
        crypto4xx_ret_sg_desc(dev, pd_uinfo);
@@ -83,7 +83,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
        return 0;
  }
-@@ -704,6 +708,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -713,6 +717,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
        struct pd_uinfo *pd_uinfo = NULL;
        unsigned int nbytes = datalen, idx;
        u32 gd_idx = 0;
@@ -91,7 +91,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
        /* figure how many gd is needed */
        num_gd = sg_nents_for_len(src, datalen);
-@@ -734,6 +739,31 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -743,6 +748,31 @@ u32 crypto4xx_build_pd(struct crypto_asy
         * already got must be return the original place.
         */
        spin_lock_irqsave(&dev->core_dev->lock, flags);
@@ -123,7 +123,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        if (num_gd) {
                fst_gd = crypto4xx_get_n_gd(dev, num_gd);
                if (fst_gd == ERING_WAS_FULL) {
-@@ -888,11 +918,12 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -897,11 +927,12 @@ u32 crypto4xx_build_pd(struct crypto_asy
        sa->sa_command_1.bf.hash_crypto_offset = 0;
        pd->pd_ctl.w = ctx->pd_ctl;
        pd->pd_ctl_len.w = 0x00400000 | datalen;
@@ -138,7 +138,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  }
  
  /**
-@@ -997,7 +1028,7 @@ static void crypto4xx_bh_tasklet_cb(unsi
+@@ -1006,7 +1037,7 @@ static void crypto4xx_bh_tasklet_cb(unsi
                tail = core_dev->dev->pdr_tail;
                pd_uinfo = &core_dev->dev->pdr_uinfo[tail];
                pd = &core_dev->dev->pdr[tail];
index 22d2a317f533213596f28eb91f7715ff3daf8011..347cea5010c996f49b0170d5fca76bdde7be71b3 100644 (file)
@@ -32,7 +32,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_alg.c
 +++ b/drivers/crypto/amcc/crypto4xx_alg.c
-@@ -149,8 +149,8 @@ static int crypto4xx_setkey_aes(struct c
+@@ -150,8 +150,8 @@ static int crypto4xx_setkey_aes(struct c
                                 SA_SEQ_MASK_OFF, SA_MC_ENABLE,
                                 SA_NOT_COPY_PAD, SA_NOT_COPY_PAYLOAD,
                                 SA_NOT_COPY_HDR);
@@ -45,7 +45,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        ctx->is_hash = 0;
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -614,42 +614,6 @@ static u32 crypto4xx_pd_done(struct cryp
+@@ -623,42 +623,6 @@ static u32 crypto4xx_pd_done(struct cryp
                return crypto4xx_ahash_done(dev, pd_uinfo);
  }
  
@@ -88,7 +88,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  static void crypto4xx_stop_all(struct crypto4xx_core_device *core_dev)
  {
        crypto4xx_destroy_pdr(core_dev->dev);
-@@ -809,8 +773,8 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -818,8 +782,8 @@ u32 crypto4xx_build_pd(struct crypto_asy
                        &pd_uinfo->sr_pa, 4);
  
                if (iv_len)
index 7b739c68cd6a07b1e1dac05fa9f76a52ec0898e7..023f63638fb5b1fd83be174d9c01d2b3b2d64953 100644 (file)
@@ -82,7 +82,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  }
  
  /**
-@@ -153,11 +155,6 @@ static int crypto4xx_setkey_aes(struct c
+@@ -154,11 +156,6 @@ static int crypto4xx_setkey_aes(struct c
                                 key, keylen);
        sa->sa_contents.w = SA_AES_CONTENTS | (keylen << 2);
        sa->sa_command_1.bf.key_len = keylen >> 3;
@@ -94,7 +94,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
        memcpy(ctx->sa_out, ctx->sa_in, ctx->sa_len * 4);
        sa = ctx->sa_out;
-@@ -206,7 +203,7 @@ int crypto4xx_setkey_rfc3686(struct cryp
+@@ -207,7 +204,7 @@ int crypto4xx_setkey_rfc3686(struct cryp
        if (rc)
                return rc;
  
@@ -103,7 +103,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                key + keylen - CTR_RFC3686_NONCE_SIZE, CTR_RFC3686_NONCE_SIZE);
  
        return 0;
-@@ -215,27 +212,29 @@ int crypto4xx_setkey_rfc3686(struct cryp
+@@ -216,27 +213,29 @@ int crypto4xx_setkey_rfc3686(struct cryp
  int crypto4xx_rfc3686_encrypt(struct ablkcipher_request *req)
  {
        struct crypto4xx_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
@@ -145,7 +145,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  }
  
  /**
-@@ -253,7 +252,6 @@ static int crypto4xx_hash_alg_init(struc
+@@ -254,7 +253,6 @@ static int crypto4xx_hash_alg_init(struc
        int rc;
  
        ctx->dev   = my_alg->dev;
@@ -153,7 +153,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
        /* Create SA */
        if (ctx->sa_in_dma_addr || ctx->sa_out_dma_addr)
-@@ -284,13 +282,9 @@ static int crypto4xx_hash_alg_init(struc
+@@ -285,13 +283,9 @@ static int crypto4xx_hash_alg_init(struc
                                 SA_SEQ_MASK_OFF, SA_MC_ENABLE,
                                 SA_NOT_COPY_PAD, SA_NOT_COPY_PAYLOAD,
                                 SA_NOT_COPY_HDR);
@@ -167,7 +167,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
        return 0;
  }
-@@ -306,23 +300,22 @@ int crypto4xx_hash_init(struct ahash_req
+@@ -307,23 +301,22 @@ int crypto4xx_hash_init(struct ahash_req
                        __crypto_ahash_cast(req->base.tfm));
        sa->sa_command_0.bf.digest_len = ds >> 2;
        sa->sa_command_0.bf.load_hash_state = SA_LOAD_HASH_FROM_SA;
@@ -199,7 +199,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  }
  
  int crypto4xx_hash_final(struct ahash_request *req)
-@@ -332,14 +325,16 @@ int crypto4xx_hash_final(struct ahash_re
+@@ -333,14 +326,16 @@ int crypto4xx_hash_final(struct ahash_re
  
  int crypto4xx_hash_digest(struct ahash_request *req)
  {
@@ -285,7 +285,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  }
  
  static void crypto4xx_ret_sg_desc(struct crypto4xx_device *dev,
-@@ -591,7 +583,7 @@ static u32 crypto4xx_ahash_done(struct c
+@@ -600,7 +592,7 @@ static u32 crypto4xx_ahash_done(struct c
        ahash_req = ahash_request_cast(pd_uinfo->async_req);
        ctx  = crypto_tfm_ctx(ahash_req->base.tfm);
  
@@ -294,7 +294,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                                     crypto_tfm_ctx(ahash_req->base.tfm));
        crypto4xx_ret_sg_desc(dev, pd_uinfo);
  
-@@ -651,17 +643,17 @@ static u32 get_next_sd(u32 current)
+@@ -660,17 +652,17 @@ static u32 get_next_sd(u32 current)
                return 0;
  }
  
@@ -317,7 +317,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        struct ce_gd *gd;
        struct ce_pd *pd;
        u32 num_gd, num_sd;
-@@ -669,8 +661,9 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -678,8 +670,9 @@ u32 crypto4xx_build_pd(struct crypto_asy
        u32 fst_sd = 0xffffffff;
        u32 pd_entry;
        unsigned long flags;
@@ -329,7 +329,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        u32 gd_idx = 0;
        bool is_busy;
  
-@@ -684,7 +677,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -693,7 +686,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
                num_gd = 0;
  
        /* figure how many sd is needed */
@@ -338,7 +338,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                num_sd = 0;
        } else {
                if (datalen > PPC4XX_SD_BUFFER_SIZE) {
-@@ -755,37 +748,27 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -764,37 +757,27 @@ u32 crypto4xx_build_pd(struct crypto_asy
        }
        spin_unlock_irqrestore(&dev->core_dev->lock, flags);
  
@@ -389,7 +389,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                /* get first gd we are going to use */
                gd_idx = fst_gd;
                pd_uinfo->first_gd = fst_gd;
-@@ -794,27 +777,30 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -803,27 +786,30 @@ u32 crypto4xx_build_pd(struct crypto_asy
                pd->src = gd_dma;
                /* enable gather */
                sa->sa_command_0.bf.gather = 1;
@@ -430,7 +430,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                /*
                 * Disable gather in sa command
                 */
-@@ -825,25 +811,24 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -834,25 +820,24 @@ u32 crypto4xx_build_pd(struct crypto_asy
                pd_uinfo->first_gd = 0xffffffff;
                pd_uinfo->num_gd = 0;
        }
@@ -463,7 +463,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                u32 sd_idx = fst_sd;
                nbytes = datalen;
                sa->sa_command_0.bf.scatter = 1;
-@@ -857,7 +842,6 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -866,7 +851,6 @@ u32 crypto4xx_build_pd(struct crypto_asy
                sd->ctl.done = 0;
                sd->ctl.rdy = 1;
                /* sd->ptr should be setup by sd_init routine*/
@@ -471,7 +471,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                if (nbytes >= PPC4XX_SD_BUFFER_SIZE)
                        nbytes -= PPC4XX_SD_BUFFER_SIZE;
                else
-@@ -868,19 +852,23 @@ u32 crypto4xx_build_pd(struct crypto_asy
+@@ -877,19 +861,23 @@ u32 crypto4xx_build_pd(struct crypto_asy
                        /* setup scatter descriptor */
                        sd->ctl.done = 0;
                        sd->ctl.rdy = 1;
index 8847d1fcc183513565a2c3ef13c0ce664412c53f..c58026d32a3b915f7f15feade8367e98a804fb55 100644 (file)
@@ -42,7 +42,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        if (n >= PPC4XX_NUM_GD)
                return ERING_WAS_FULL;
  
-@@ -616,17 +617,6 @@ static void crypto4xx_stop_all(struct cr
+@@ -625,17 +626,6 @@ static void crypto4xx_stop_all(struct cr
        kfree(core_dev);
  }
  
index aa621c52cebc3bd9c943a3c76773fecb0c988b7b..5e8ac96e16d1a5a08503ceb60fb7348eb01acb83 100644 (file)
@@ -44,7 +44,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  }
  
  /**
-@@ -854,16 +857,16 @@ int crypto4xx_build_pd(struct crypto_asy
+@@ -863,16 +866,16 @@ int crypto4xx_build_pd(struct crypto_asy
                }
        }
  
@@ -66,7 +66,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        writel(1, dev->ce_base + CRYPTO4XX_INT_DESCR_RD);
        return is_busy ? -EBUSY : -EINPROGRESS;
  }
-@@ -964,23 +967,23 @@ static void crypto4xx_bh_tasklet_cb(unsi
+@@ -973,23 +976,23 @@ static void crypto4xx_bh_tasklet_cb(unsi
        struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev);
        struct pd_uinfo *pd_uinfo;
        struct ce_pd *pd;
index 06ab798f5bc19408994fa806758d07cc3c99b9ca..55c85005afa3ce61d726cf1932bd0c674c53dcb0 100644 (file)
@@ -42,7 +42,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        /* Setup SA */
        sa = ctx->sa_in;
  
-@@ -203,8 +196,8 @@ int crypto4xx_setkey_rfc3686(struct cryp
+@@ -204,8 +197,8 @@ int crypto4xx_setkey_rfc3686(struct cryp
        if (rc)
                return rc;
  
@@ -53,7 +53,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
        return 0;
  }
-@@ -213,7 +206,7 @@ int crypto4xx_rfc3686_encrypt(struct abl
+@@ -214,7 +207,7 @@ int crypto4xx_rfc3686_encrypt(struct abl
  {
        struct crypto4xx_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
        __le32 iv[AES_IV_SIZE / 4] = {
@@ -62,7 +62,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                cpu_to_le32p((u32 *) req->info),
                cpu_to_le32p((u32 *) (req->info + 4)),
                cpu_to_le32(1) };
-@@ -227,7 +220,7 @@ int crypto4xx_rfc3686_decrypt(struct abl
+@@ -228,7 +221,7 @@ int crypto4xx_rfc3686_decrypt(struct abl
  {
        struct crypto4xx_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
        __le32 iv[AES_IV_SIZE / 4] = {
@@ -71,7 +71,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                cpu_to_le32p((u32 *) req->info),
                cpu_to_le32p((u32 *) (req->info + 4)),
                cpu_to_le32(1) };
-@@ -254,21 +247,13 @@ static int crypto4xx_hash_alg_init(struc
+@@ -255,21 +248,13 @@ static int crypto4xx_hash_alg_init(struc
        ctx->dev   = my_alg->dev;
  
        /* Create SA */
@@ -167,7 +167,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  /**
   * alloc memory for the gather ring
   * no need to alloc buf for the ring
-@@ -883,8 +852,6 @@ static int crypto4xx_alg_init(struct cry
+@@ -892,8 +861,6 @@ static int crypto4xx_alg_init(struct cry
        ctx->dev = amcc_alg->dev;
        ctx->sa_in = NULL;
        ctx->sa_out = NULL;
@@ -176,7 +176,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        ctx->sa_len = 0;
  
        switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) {
-@@ -905,7 +872,6 @@ static void crypto4xx_alg_exit(struct cr
+@@ -914,7 +881,6 @@ static void crypto4xx_alg_exit(struct cr
        struct crypto4xx_ctx *ctx = crypto_tfm_ctx(tfm);
  
        crypto4xx_free_sa(ctx);
index ff19c4f54edf2596525619fa7d3b7d69ebdc5cb1..f883e5a9955012f2639fc3b0c4bf1613a98c3df9 100644 (file)
@@ -44,7 +44,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  }
  
  /**
-@@ -213,7 +214,7 @@ int crypto4xx_rfc3686_encrypt(struct abl
+@@ -214,7 +215,7 @@ int crypto4xx_rfc3686_encrypt(struct abl
  
        return crypto4xx_build_pd(&req->base, ctx, req->src, req->dst,
                                  req->nbytes, iv, AES_IV_SIZE,
@@ -53,7 +53,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  }
  
  int crypto4xx_rfc3686_decrypt(struct ablkcipher_request *req)
-@@ -227,7 +228,7 @@ int crypto4xx_rfc3686_decrypt(struct abl
+@@ -228,7 +229,7 @@ int crypto4xx_rfc3686_decrypt(struct abl
  
        return crypto4xx_build_pd(&req->base, ctx, req->src, req->dst,
                                  req->nbytes, iv, AES_IV_SIZE,
@@ -62,7 +62,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  }
  
  /**
-@@ -239,11 +240,13 @@ static int crypto4xx_hash_alg_init(struc
+@@ -240,11 +241,13 @@ static int crypto4xx_hash_alg_init(struc
                                   unsigned char hm)
  {
        struct crypto_alg *alg = tfm->__crt_alg;
@@ -77,7 +77,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        ctx->dev   = my_alg->dev;
  
        /* Create SA */
-@@ -300,7 +303,7 @@ int crypto4xx_hash_update(struct ahash_r
+@@ -301,7 +304,7 @@ int crypto4xx_hash_update(struct ahash_r
  
        return crypto4xx_build_pd(&req->base, ctx, req->src, &dst,
                                  req->nbytes, NULL, 0, ctx->sa_in,
@@ -86,7 +86,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  }
  
  int crypto4xx_hash_final(struct ahash_request *req)
-@@ -319,7 +322,7 @@ int crypto4xx_hash_digest(struct ahash_r
+@@ -320,7 +323,7 @@ int crypto4xx_hash_digest(struct ahash_r
  
        return crypto4xx_build_pd(&req->base, ctx, req->src, &dst,
                                  req->nbytes, NULL, 0, ctx->sa_in,
@@ -95,7 +95,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  }
  
  /**
-@@ -330,5 +333,3 @@ int crypto4xx_sha1_alg_init(struct crypt
+@@ -331,5 +334,3 @@ int crypto4xx_sha1_alg_init(struct crypt
        return crypto4xx_hash_alg_init(tfm, SA_HASH160_LEN, SA_HASH_ALG_SHA1,
                                       SA_HASH_MODE_HASH);
  }
@@ -125,7 +125,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                                     struct pd_uinfo *pd_uinfo,
                                     struct ce_pd *pd)
  {
-@@ -543,11 +545,9 @@ static u32 crypto4xx_ablkcipher_done(str
+@@ -552,11 +554,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;
-@@ -563,20 +563,88 @@ static u32 crypto4xx_ahash_done(struct c
+@@ -572,20 +572,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)
-@@ -612,8 +680,10 @@ int crypto4xx_build_pd(struct crypto_asy
+@@ -621,8 +689,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;
-@@ -627,18 +697,25 @@ int crypto4xx_build_pd(struct crypto_asy
+@@ -636,18 +706,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 {
-@@ -724,6 +801,7 @@ int crypto4xx_build_pd(struct crypto_asy
+@@ -733,6 +810,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;
  
-@@ -830,7 +908,7 @@ int crypto4xx_build_pd(struct crypto_asy
+@@ -839,7 +917,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();
-@@ -843,40 +921,68 @@ int crypto4xx_build_pd(struct crypto_asy
+@@ -852,40 +930,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;
-@@ -891,6 +997,10 @@ int crypto4xx_register_alg(struct crypto
+@@ -900,6 +1006,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;
-@@ -920,6 +1030,10 @@ static void crypto4xx_unregister_alg(str
+@@ -929,6 +1039,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);
                }
-@@ -973,7 +1087,7 @@ static irqreturn_t crypto4xx_ce_interrup
+@@ -982,7 +1096,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)",
-@@ -985,8 +1099,8 @@ struct crypto4xx_alg_common crypto4xx_al
+@@ -994,8 +1108,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 = {
-@@ -1009,8 +1123,8 @@ struct crypto4xx_alg_common crypto4xx_al
+@@ -1018,8 +1132,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 = {
-@@ -1033,8 +1147,8 @@ struct crypto4xx_alg_common crypto4xx_al
+@@ -1042,8 +1156,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 = {
-@@ -1059,8 +1173,8 @@ struct crypto4xx_alg_common crypto4xx_al
+@@ -1068,8 +1182,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 = {
-@@ -1082,8 +1196,8 @@ struct crypto4xx_alg_common crypto4xx_al
+@@ -1091,8 +1205,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 = {
-@@ -1149,6 +1263,7 @@ static int crypto4xx_probe(struct platfo
+@@ -1158,6 +1272,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);
index 73283f650cddf66495ca5fdc5ae0b175819439aa..8f78f51cd8e34e904606efa55f53110f6aa37386 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_alg.c
 +++ b/drivers/crypto/amcc/crypto4xx_alg.c
-@@ -231,6 +231,191 @@ int crypto4xx_rfc3686_decrypt(struct abl
+@@ -232,6 +232,191 @@ int crypto4xx_rfc3686_decrypt(struct abl
                                  ctx->sa_out, ctx->sa_len, 0);
  }
  
@@ -209,7 +209,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
   */
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1210,6 +1210,29 @@ static struct crypto4xx_alg_common crypt
+@@ -1219,6 +1219,29 @@ static struct crypto4xx_alg_common crypt
                        }
                }
        } },
index 3a2ed310b30d8d569cc5bc4e128d3113e8b4d9e2..888f7b68d04ee848ca5451546cdb4dc558b518ea 100644 (file)
@@ -23,7 +23,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  #include <crypto/sha.h>
  #include <crypto/ctr.h>
  #include "crypto4xx_reg_def.h"
-@@ -417,6 +418,144 @@ int crypto4xx_setauthsize_aead(struct cr
+@@ -418,6 +419,144 @@ int crypto4xx_setauthsize_aead(struct cr
  }
  
  /**
@@ -178,7 +178,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  #include <crypto/sha.h>
  #include <crypto/scatterwalk.h>
  #include <crypto/internal/aead.h>
-@@ -1227,6 +1228,27 @@ static struct crypto4xx_alg_common crypt
+@@ -1236,6 +1237,27 @@ static struct crypto4xx_alg_common crypt
                        .cra_priority   = CRYPTO4XX_CRYPTO_PRIORITY,
                        .cra_flags      = CRYPTO_ALG_ASYNC |
                                          CRYPTO_ALG_NEED_FALLBACK |
index fc8df388673ef32fe0e05a17c4d75497aea2dc9b..1b13c345ccff26e4f93d9a009e09e6b9606b2da0 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1075,9 +1075,6 @@ static irqreturn_t crypto4xx_ce_interrup
+@@ -1084,9 +1084,6 @@ static irqreturn_t crypto4xx_ce_interrup
        struct device *dev = (struct device *)data;
        struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev);
  
@@ -27,7 +27,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
        writel(PPC4XX_INTERRUPT_CLR,
               core_dev->dev->ce_base + CRYPTO4XX_INT_CLR);
        tasklet_schedule(&core_dev->tasklet);
-@@ -1325,13 +1322,6 @@ static int crypto4xx_probe(struct platfo
+@@ -1334,13 +1331,6 @@ static int crypto4xx_probe(struct platfo
        tasklet_init(&core_dev->tasklet, crypto4xx_bh_tasklet_cb,
                     (unsigned long) dev);
  
@@ -41,7 +41,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
        core_dev->dev->ce_base = of_iomap(ofdev->dev.of_node, 0);
        if (!core_dev->dev->ce_base) {
                dev_err(dev, "failed to of_iomap\n");
-@@ -1339,6 +1329,13 @@ static int crypto4xx_probe(struct platfo
+@@ -1348,6 +1338,13 @@ static int crypto4xx_probe(struct platfo
                goto err_iomap;
        }
  
@@ -55,7 +55,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
        /* need to setup pdr, rdr, gdr and sdr before this */
        crypto4xx_hw_init(core_dev->dev);
  
-@@ -1352,11 +1349,11 @@ static int crypto4xx_probe(struct platfo
+@@ -1361,11 +1358,11 @@ static int crypto4xx_probe(struct platfo
        return 0;
  
  err_start_dev:
index 1adad96fe15e2af4104279a604a01c9f63ecbb99..453602a5aa9826585c03c3a92a5046b13a9d480b 100644 (file)
@@ -35,7 +35,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
  }
  
  int crypto4xx_alloc_sa(struct crypto4xx_ctx *ctx, u32 size)
-@@ -1070,18 +1077,29 @@ static void crypto4xx_bh_tasklet_cb(unsi
+@@ -1079,18 +1086,29 @@ static void crypto4xx_bh_tasklet_cb(unsi
  /**
   * Top Half of isr.
   */
@@ -68,7 +68,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
  /**
   * Supported Crypto Algorithms
   */
-@@ -1263,6 +1281,8 @@ static int crypto4xx_probe(struct platfo
+@@ -1272,6 +1290,8 @@ static int crypto4xx_probe(struct platfo
        struct resource res;
        struct device *dev = &ofdev->dev;
        struct crypto4xx_core_device *core_dev;
@@ -77,7 +77,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
  
        rc = of_address_to_resource(ofdev->dev.of_node, 0, &res);
        if (rc)
-@@ -1279,6 +1299,7 @@ static int crypto4xx_probe(struct platfo
+@@ -1288,6 +1308,7 @@ static int crypto4xx_probe(struct platfo
                       mfdcri(SDR0, PPC405EX_SDR0_SRST) | PPC405EX_CE_RESET);
                mtdcri(SDR0, PPC405EX_SDR0_SRST,
                       mfdcri(SDR0, PPC405EX_SDR0_SRST) & ~PPC405EX_CE_RESET);
@@ -85,7 +85,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
        } else if (of_find_compatible_node(NULL, NULL,
                        "amcc,ppc460sx-crypto")) {
                mtdcri(SDR0, PPC460SX_SDR0_SRST,
-@@ -1301,7 +1322,22 @@ static int crypto4xx_probe(struct platfo
+@@ -1310,7 +1331,22 @@ static int crypto4xx_probe(struct platfo
        if (!core_dev->dev)
                goto err_alloc_dev;
  
@@ -108,7 +108,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
        core_dev->device = dev;
        spin_lock_init(&core_dev->lock);
        INIT_LIST_HEAD(&core_dev->dev->alg_list);
-@@ -1331,7 +1367,9 @@ static int crypto4xx_probe(struct platfo
+@@ -1340,7 +1376,9 @@ static int crypto4xx_probe(struct platfo
  
        /* Register for Crypto isr, Crypto Engine IRQ */
        core_dev->irq = irq_of_parse_and_map(ofdev->dev.of_node, 0);
index a295fa4616bad9332ffdcd753cf219c8e49c2c61..ae82acc74782598d680bff0b1a9c3d55b4955ab7 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1370,7 +1370,7 @@ static int crypto4xx_probe(struct platfo
+@@ -1379,7 +1379,7 @@ static int crypto4xx_probe(struct platfo
        rc = request_irq(core_dev->irq, is_revb ?
                         crypto4xx_ce_interrupt_handler_revb :
                         crypto4xx_ce_interrupt_handler, 0,
index 87d7a3e67473701fb0223e840f26a4d8873169e0..d5e1a056eaf8e5d79b59302981ed8a2c3fe3fc75 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
 
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -1432,7 +1432,7 @@ MODULE_DEVICE_TABLE(of, crypto4xx_match)
+@@ -1441,7 +1441,7 @@ MODULE_DEVICE_TABLE(of, crypto4xx_match)
  
  static struct platform_driver crypto4xx_driver = {
        .driver = {
index 0dbd924e3c2826473c8e857e4ad5831704a01bc9..5470602bb1652193ace076a21ff3542c5f02c13f 100644 (file)
@@ -40,7 +40,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
 
 --- a/drivers/crypto/amcc/crypto4xx_alg.c
 +++ b/drivers/crypto/amcc/crypto4xx_alg.c
-@@ -256,10 +256,6 @@ static inline bool crypto4xx_aead_need_f
+@@ -257,10 +257,6 @@ static inline bool crypto4xx_aead_need_f
        if (is_ccm && !(req->iv[0] == 1 || req->iv[0] == 3))
                return true;
  
@@ -51,7 +51,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
        return false;
  }
  
-@@ -330,7 +326,7 @@ int crypto4xx_setkey_aes_ccm(struct cryp
+@@ -331,7 +327,7 @@ int crypto4xx_setkey_aes_ccm(struct cryp
        sa = (struct dynamic_sa_ctl *) ctx->sa_in;
        sa->sa_contents.w = SA_AES_CCM_CONTENTS | (keylen << 2);
  
@@ -62,7 +62,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
                                 SA_CIPHER_ALG_AES,
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -577,15 +577,14 @@ static void crypto4xx_aead_done(struct c
+@@ -586,15 +586,14 @@ static void crypto4xx_aead_done(struct c
                                struct pd_uinfo *pd_uinfo,
                                struct ce_pd *pd)
  {
@@ -83,7 +83,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
        if (pd_uinfo->using_sd) {
                crypto4xx_copy_pkt_to_dst(dev, pd, pd_uinfo,
                                          pd->pd_ctl_len.bf.pkt_len,
-@@ -597,38 +596,39 @@ static void crypto4xx_aead_done(struct c
+@@ -606,38 +605,39 @@ static void crypto4xx_aead_done(struct c
  
        if (pd_uinfo->sa_va->sa_command_0.bf.dir == DIR_OUTBOUND) {
                /* append icv at the end */
index f1035be52fc3c4e09d42af59fde920d9ba65bdc6..74d5ab2f60b35d3b5575d52be0f33bc0593b0dbb 100644 (file)
@@ -71,7 +71,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  /**
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -580,7 +580,7 @@ static void crypto4xx_aead_done(struct c
+@@ -589,7 +589,7 @@ static void crypto4xx_aead_done(struct c
        struct scatterlist *dst = pd_uinfo->dest_va;
        size_t cp_len = crypto_aead_authsize(
                crypto_aead_reqtfm(aead_req));
@@ -80,7 +80,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        int err = 0;
  
        if (pd_uinfo->using_sd) {
-@@ -595,7 +595,7 @@ static void crypto4xx_aead_done(struct c
+@@ -604,7 +604,7 @@ static void crypto4xx_aead_done(struct c
        if (pd_uinfo->sa_va->sa_command_0.bf.dir == DIR_OUTBOUND) {
                /* append icv at the end */
                crypto4xx_memcpy_from_le32(icv, pd_uinfo->sr_va->save_digest,
@@ -89,7 +89,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
                scatterwalk_map_and_copy(icv, dst, aead_req->cryptlen,
                                         cp_len, 1);
-@@ -605,7 +605,7 @@ static void crypto4xx_aead_done(struct c
+@@ -614,7 +614,7 @@ static void crypto4xx_aead_done(struct c
                        aead_req->assoclen + aead_req->cryptlen -
                        cp_len, cp_len, 0);
  
@@ -98,7 +98,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
                if (crypto_memneq(icv, pd_uinfo->sr_va->save_digest, cp_len))
                        err = -EBADMSG;
-@@ -1122,8 +1122,8 @@ static struct crypto4xx_alg_common crypt
+@@ -1131,8 +1131,8 @@ static struct crypto4xx_alg_common crypt
                                .max_keysize    = AES_MAX_KEY_SIZE,
                                .ivsize         = AES_IV_SIZE,
                                .setkey         = crypto4xx_setkey_aes_cbc,
@@ -109,7 +109,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                        }
                }
        }},
-@@ -1146,8 +1146,8 @@ static struct crypto4xx_alg_common crypt
+@@ -1155,8 +1155,8 @@ static struct crypto4xx_alg_common crypt
                                .max_keysize    = AES_MAX_KEY_SIZE,
                                .ivsize         = AES_IV_SIZE,
                                .setkey         = crypto4xx_setkey_aes_cfb,
@@ -120,7 +120,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                        }
                }
        } },
-@@ -1195,8 +1195,8 @@ static struct crypto4xx_alg_common crypt
+@@ -1204,8 +1204,8 @@ static struct crypto4xx_alg_common crypt
                                .min_keysize    = AES_MIN_KEY_SIZE,
                                .max_keysize    = AES_MAX_KEY_SIZE,
                                .setkey         = crypto4xx_setkey_aes_ecb,
@@ -131,7 +131,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                        }
                }
        } },
-@@ -1219,8 +1219,8 @@ static struct crypto4xx_alg_common crypt
+@@ -1228,8 +1228,8 @@ static struct crypto4xx_alg_common crypt
                                .max_keysize    = AES_MAX_KEY_SIZE,
                                .ivsize         = AES_IV_SIZE,
                                .setkey         = crypto4xx_setkey_aes_ofb,
index 291c4ef465a0c37c3fa7087aa61038f6c0e1905e..64c07d71275144a12495e355869882454f0feace 100644 (file)
@@ -96,7 +96,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                                CRYPTO_TFM_RES_BAD_KEY_LEN);
                return -EINVAL;
        }
-@@ -164,39 +165,38 @@ static int crypto4xx_setkey_aes(struct c
+@@ -165,39 +166,38 @@ static int crypto4xx_setkey_aes(struct c
        return 0;
  }
  
@@ -142,7 +142,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        int rc;
  
        rc = crypto4xx_setkey_aes(cipher, key, keylen - CTR_RFC3686_NONCE_SIZE,
-@@ -210,31 +210,33 @@ int crypto4xx_setkey_rfc3686(struct cryp
+@@ -211,31 +211,33 @@ int crypto4xx_setkey_rfc3686(struct cryp
        return 0;
  }
  
@@ -223,7 +223,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        } else {
                dst = pd_uinfo->dest_va;
                addr = dma_map_page(dev->core_dev->device, sg_page(dst),
-@@ -549,8 +548,8 @@ static void crypto4xx_ablkcipher_done(st
+@@ -558,8 +557,8 @@ static void crypto4xx_ablkcipher_done(st
        crypto4xx_ret_sg_desc(dev, pd_uinfo);
  
        if (pd_uinfo->state & PD_ENTRY_BUSY)
@@ -234,7 +234,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  }
  
  static void crypto4xx_ahash_done(struct crypto4xx_device *dev,
-@@ -641,8 +640,8 @@ static void crypto4xx_pd_done(struct cry
+@@ -650,8 +649,8 @@ static void crypto4xx_pd_done(struct cry
        struct pd_uinfo *pd_uinfo = &dev->pdr_uinfo[idx];
  
        switch (crypto_tfm_alg_type(pd_uinfo->async_req->tfm)) {
@@ -245,7 +245,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                break;
        case CRYPTO_ALG_TYPE_AEAD:
                crypto4xx_aead_done(dev, pd_uinfo, pd);
-@@ -936,15 +935,14 @@ static void crypto4xx_ctx_init(struct cr
+@@ -945,15 +944,14 @@ static void crypto4xx_ctx_init(struct cr
        ctx->sa_len = 0;
  }
  
@@ -264,7 +264,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        return 0;
  }
  
-@@ -953,9 +951,11 @@ static void crypto4xx_common_exit(struct
+@@ -962,9 +960,11 @@ static void crypto4xx_common_exit(struct
        crypto4xx_free_sa(ctx);
  }
  
@@ -278,7 +278,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  }
  
  static int crypto4xx_aead_init(struct crypto_aead *tfm)
-@@ -1012,7 +1012,7 @@ static int crypto4xx_register_alg(struct
+@@ -1021,7 +1021,7 @@ static int crypto4xx_register_alg(struct
                        break;
  
                default:
@@ -287,7 +287,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                        break;
                }
  
-@@ -1041,7 +1041,7 @@ static void crypto4xx_unregister_alg(str
+@@ -1050,7 +1050,7 @@ static void crypto4xx_unregister_alg(str
                        break;
  
                default:
@@ -296,7 +296,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
                }
                kfree(alg);
        }
-@@ -1103,126 +1103,109 @@ static irqreturn_t crypto4xx_ce_interrup
+@@ -1112,126 +1112,109 @@ static irqreturn_t crypto4xx_ce_interrup
   */
  static struct crypto4xx_alg_common crypto4xx_alg[] = {
        /* Crypto AES modes */
index a3e1b8c7df24dfbdbb657aa0444bfc03655671a3..a1e9b4b41a11476b88336c7a46811bb9212ce8a5 100644 (file)
@@ -26,7 +26,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
        if (ivlen)
                crypto4xx_memcpy_to_le32(iv, req->iv, ivlen);
-@@ -270,13 +270,7 @@ static inline bool crypto4xx_aead_need_f
+@@ -271,13 +271,7 @@ static inline bool crypto4xx_aead_need_f
  static int crypto4xx_aead_fallback(struct aead_request *req,
        struct crypto4xx_ctx *ctx, bool do_decrypt)
  {
@@ -41,7 +41,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
        aead_request_set_tfm(subreq, ctx->sw_cipher.aead);
        aead_request_set_callback(subreq, req->base.flags,
-@@ -377,7 +371,7 @@ static int crypto4xx_crypt_aes_ccm(struc
+@@ -378,7 +372,7 @@ static int crypto4xx_crypt_aes_ccm(struc
        struct crypto_aead *aead = crypto_aead_reqtfm(req);
        unsigned int len = req->cryptlen;
        __le32 iv[16];
@@ -50,7 +50,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        struct dynamic_sa_ctl *sa = (struct dynamic_sa_ctl *)tmp_sa;
  
        if (crypto4xx_aead_need_fallback(req, true, decrypt))
-@@ -386,7 +380,7 @@ static int crypto4xx_crypt_aes_ccm(struc
+@@ -387,7 +381,7 @@ static int crypto4xx_crypt_aes_ccm(struc
        if (decrypt)
                len -= crypto_aead_authsize(aead);
  
index e93a3d916b9f5bedef46d3d7de315877cb0aed7c..c916d5a212f625be12c1985664fddfe0d941b0c5 100644 (file)
@@ -39,7 +39,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
 
 --- a/drivers/crypto/amcc/crypto4xx_alg.c
 +++ b/drivers/crypto/amcc/crypto4xx_alg.c
-@@ -240,6 +240,85 @@ int crypto4xx_rfc3686_decrypt(struct skc
+@@ -241,6 +241,85 @@ int crypto4xx_rfc3686_decrypt(struct skc
                                  ctx->sa_out, ctx->sa_len, 0);
  }
  
@@ -125,7 +125,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  static inline bool crypto4xx_aead_need_fallback(struct aead_request *req,
                                                bool is_ccm, bool decrypt)
  {
-@@ -282,10 +361,10 @@ static int crypto4xx_aead_fallback(struc
+@@ -283,10 +362,10 @@ static int crypto4xx_aead_fallback(struc
                            crypto_aead_encrypt(subreq);
  }
  
@@ -140,7 +140,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  {
        int rc;
  
-@@ -313,7 +392,7 @@ int crypto4xx_setkey_aes_ccm(struct cryp
+@@ -314,7 +393,7 @@ int crypto4xx_setkey_aes_ccm(struct cryp
        struct dynamic_sa_ctl *sa;
        int rc = 0;
  
@@ -149,7 +149,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        if (rc)
                return rc;
  
-@@ -472,7 +551,7 @@ int crypto4xx_setkey_aes_gcm(struct cryp
+@@ -473,7 +552,7 @@ int crypto4xx_setkey_aes_gcm(struct cryp
                return -EINVAL;
        }
  
@@ -160,7 +160,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  
 --- a/drivers/crypto/amcc/crypto4xx_core.c
 +++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -941,6 +941,19 @@ static int crypto4xx_sk_init(struct cryp
+@@ -950,6 +950,19 @@ static int crypto4xx_sk_init(struct cryp
        struct crypto4xx_alg *amcc_alg;
        struct crypto4xx_ctx *ctx =  crypto_skcipher_ctx(sk);
  
@@ -180,7 +180,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        amcc_alg = container_of(alg, struct crypto4xx_alg, alg.u.cipher);
        crypto4xx_ctx_init(amcc_alg, ctx);
        return 0;
-@@ -956,6 +969,8 @@ static void crypto4xx_sk_exit(struct cry
+@@ -965,6 +978,8 @@ static void crypto4xx_sk_exit(struct cry
        struct crypto4xx_ctx *ctx =  crypto_skcipher_ctx(sk);
  
        crypto4xx_common_exit(ctx);
@@ -189,7 +189,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  }
  
  static int crypto4xx_aead_init(struct crypto_aead *tfm)
-@@ -1145,6 +1160,28 @@ static struct crypto4xx_alg_common crypt
+@@ -1154,6 +1169,28 @@ static struct crypto4xx_alg_common crypt
                .init = crypto4xx_sk_init,
                .exit = crypto4xx_sk_exit,
        } },
diff --git a/target/linux/apm821xx/patches-4.14/022-0006-crypto-crypto4xx-properly-set-IV-after-de-and-encryp.patch b/target/linux/apm821xx/patches-4.14/022-0006-crypto-crypto4xx-properly-set-IV-after-de-and-encryp.patch
deleted file mode 100644 (file)
index 1467f36..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-From fc340115ffb8235c1bbd200c28855e6373d0dd1a Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey@gmail.com>
-Date: Thu, 19 Apr 2018 18:41:55 +0200
-Subject: [PATCH 6/8] crypto: crypto4xx - properly set IV after de- and encrypt
-
-This patch fixes cts(cbc(aes)) test when cbc-aes-ppc4xx is used.
-alg: skcipher: Test 1 failed (invalid result) on encryption for cts(cbc-aes-ppc4xx)
-00000000: 4b 10 75 fc 2f 14 1b 6a 27 35 37 33 d1 b7 70 05
-00000010: 97
-alg: skcipher: Failed to load transform for cts(cbc(aes)): -2
-
-The CTS cipher mode expect the IV (req->iv) of skcipher_request
-to contain the last ciphertext block after the {en,de}crypt
-operation is complete.
-
-Fix this issue for the AMCC Crypto4xx hardware engine.
-The tcrypt test case for cts(cbc(aes)) is now correctly passed.
-
-name         : cts(cbc(aes))
-driver       : cts(cbc-aes-ppc4xx)
-module       : cts
-priority     : 300
-refcnt       : 1
-selftest     : passed
-internal     : no
-type         : skcipher
-async        : yes
-blocksize    : 16
-min keysize  : 16
-max keysize  : 32
-ivsize       : 16
-chunksize    : 16
-walksize     : 16
-
-Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
-Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
----
- drivers/crypto/amcc/crypto4xx_alg.c  | 3 ++-
- drivers/crypto/amcc/crypto4xx_core.c | 9 +++++++++
- 2 files changed, 11 insertions(+), 1 deletion(-)
-
---- a/drivers/crypto/amcc/crypto4xx_alg.c
-+++ b/drivers/crypto/amcc/crypto4xx_alg.c
-@@ -141,7 +141,8 @@ static int crypto4xx_setkey_aes(struct c
-       /* Setup SA */
-       sa = ctx->sa_in;
--      set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, SA_NOT_SAVE_IV,
-+      set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, (cm == CRYPTO_MODE_CBC ?
-+                               SA_SAVE_IV : SA_NOT_SAVE_IV),
-                                SA_LOAD_HASH_FROM_SA, SA_LOAD_IV_FROM_STATE,
-                                SA_NO_HEADER_PROC, SA_HASH_ALG_NULL,
-                                SA_CIPHER_ALG_AES, SA_PAD_TYPE_ZERO,
---- a/drivers/crypto/amcc/crypto4xx_core.c
-+++ b/drivers/crypto/amcc/crypto4xx_core.c
-@@ -545,6 +545,15 @@ static void crypto4xx_cipher_done(struct
-               addr = dma_map_page(dev->core_dev->device, sg_page(dst),
-                                   dst->offset, dst->length, DMA_FROM_DEVICE);
-       }
-+
-+      if (pd_uinfo->sa_va->sa_command_0.bf.save_iv == SA_SAVE_IV) {
-+              struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req);
-+
-+              crypto4xx_memcpy_from_le32((u32 *)req->iv,
-+                      pd_uinfo->sr_va->save_iv,
-+                      crypto_skcipher_ivsize(skcipher));
-+      }
-+
-       crypto4xx_ret_sg_desc(dev, pd_uinfo);
-       if (pd_uinfo->state & PD_ENTRY_BUSY)
index a819b91b42181f265c7673b2324836328191c425..4164c1e5930a62bbb9a6d0a0320ccf3a6d4f4f3a 100644 (file)
                return false;
  
        return true;
-@@ -634,13 +638,13 @@ static inline void ipv6_addr_set_v4mappe
+@@ -605,13 +609,13 @@ static inline void ipv6_addr_set_v4mappe
   */
  static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen)
  {
                if (xb)
                        return i * 32 + 31 - __fls(ntohl(xb));
        }
-@@ -809,17 +813,18 @@ static inline int ip6_default_np_autolab
+@@ -780,17 +784,18 @@ static inline int ip6_default_np_autolab
  static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass,
                                __be32 flowlabel)
  {
index 8666896ab7e700e06a57e8f6ff35e295f5790778..26ae3e4a713fc48109d53798a0bcb5436ef2b84a 100644 (file)
                return false;
  
        return true;
-@@ -634,13 +638,13 @@ static inline void ipv6_addr_set_v4mappe
+@@ -605,13 +609,13 @@ static inline void ipv6_addr_set_v4mappe
   */
  static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen)
  {
                if (xb)
                        return i * 32 + 31 - __fls(ntohl(xb));
        }
-@@ -809,17 +813,18 @@ static inline int ip6_default_np_autolab
+@@ -780,17 +784,18 @@ static inline int ip6_default_np_autolab
  static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass,
                                __be32 flowlabel)
  {
index 3e7db09068dae041bd1f187446a87db6a92ac981..02edd96d553acd8fc4b64dba7ea51a22e4ac6da1 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
 
 --- a/include/net/ipv6.h
 +++ b/include/net/ipv6.h
-@@ -889,6 +889,8 @@ static inline struct sk_buff *ip6_finish
+@@ -860,6 +860,8 @@ static inline struct sk_buff *ip6_finish
                              &inet6_sk(sk)->cork);
  }
  
index daa4d3b3d85897400fea7ef303e53b8601c9df51..dddc347436c9ca25c39f59459eaa2215e00dca41 100644 (file)
@@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #endif
 --- a/include/net/ipv6.h
 +++ b/include/net/ipv6.h
-@@ -889,8 +889,6 @@ static inline struct sk_buff *ip6_finish
+@@ -860,8 +860,6 @@ static inline struct sk_buff *ip6_finish
                              &inet6_sk(sk)->cork);
  }
  
index b45a8e3bc2c115a45df56ae5637502fccbd58689..6744cd726ed2b3c99d84cd038d8fc65ccfd4db43 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -1240,7 +1240,6 @@ all: modules
+@@ -1239,7 +1239,6 @@ all: modules
  
  PHONY += modules
  modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        @$(kecho) '  Building modules, stage 2.';
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
  
-@@ -1269,7 +1268,6 @@ _modinst_:
+@@ -1268,7 +1267,6 @@ _modinst_:
                rm -f $(MODLIB)/build ; \
                ln -s $(CURDIR) $(MODLIB)/build ; \
        fi
index d257232403995fa5c838478f139f7201fd1d346b..2f3f43c07f32e54637f784e2660ac139df358727 100644 (file)
@@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
  KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
  KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
-@@ -788,11 +793,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
+@@ -787,11 +792,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
  KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
  endif
  
index 99e3b5e3445e3718136d1ba35a44b1c9f74b9280..7a76f671b70bd961e6237877ca175645c6f0a18b 100644 (file)
@@ -243,7 +243,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  }
 --- a/mm/vmstat.c
 +++ b/mm/vmstat.c
-@@ -1955,10 +1955,12 @@ void __init init_mm_internals(void)
+@@ -1950,10 +1950,12 @@ void __init init_mm_internals(void)
        start_shepherd_timer();
  #endif
  #ifdef CONFIG_PROC_FS
index 9fcffdee06746202a67719e71efff26b6ecce7a6..4a53161477551b807c81d15c0e1095b8f52aa06a 100644 (file)
@@ -15,17 +15,19 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/bridge/br_input.c
 +++ b/net/bridge/br_input.c
-@@ -239,7 +239,8 @@ static int br_handle_local_finish(struct
+@@ -237,7 +237,10 @@ static void __br_handle_local_finish(str
+ /* note: already called with rcu_read_lock */
+ static int br_handle_local_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
  {
-       struct net_bridge_port *p = br_port_get_rcu(skb->dev);
 -      __br_handle_local_finish(skb);
++      struct net_bridge_port *p = br_port_get_rcu(skb->dev);
++
 +      if (p->state != BR_STATE_DISABLED)
 +              __br_handle_local_finish(skb);
  
-       BR_INPUT_SKB_CB(skb)->brdev = p->br->dev;
-       br_pass_frame_up(skb);
-@@ -327,6 +328,15 @@ rx_handler_result_t br_handle_frame(stru
+       /* return 1 to signal the okfn() was called so it's ok to use the skb */
+       return 1;
+@@ -332,6 +335,15 @@ rx_handler_result_t br_handle_frame(stru
  
  forward:
        switch (p->state) {
index c7790657fd69823abdd3c7a5340ea163fde3cc37..4a9c67269a782ebc5c70926522b83fb141f1e036 100644 (file)
@@ -14,12 +14,12 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -654,12 +654,12 @@ KBUILD_CFLAGS    += $(call cc-disable-warni
+@@ -653,12 +653,12 @@ KBUILD_CFLAGS    += $(call cc-disable-warni
+ KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias)
  
  ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
- KBUILD_CFLAGS += $(call cc-option,-Oz,-Os)
--KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,)
-+KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION)
+-KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
++KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) $(EXTRA_OPTIMIZATION)
  else
  ifdef CONFIG_PROFILE_ALL_BRANCHES
 -KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,)
index 05dafbb69f8c52050868556b7253c67b6c2ca5f9..fc1de9cbc3a6dc1500237808428314fe9509a02d 100644 (file)
@@ -84,7 +84,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
  {
        struct bonding *bond = netdev_priv(bond_dev);
        const struct net_device_ops *slave_ops = slave_dev->netdev_ops;
-@@ -3502,7 +3503,7 @@ static int bond_do_ioctl(struct net_devi
+@@ -3506,7 +3507,7 @@ static int bond_do_ioctl(struct net_devi
        switch (cmd) {
        case BOND_ENSLAVE_OLD:
        case SIOCBONDENSLAVE:
@@ -106,7 +106,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
        case '-':
 --- a/drivers/net/team/team.c
 +++ b/drivers/net/team/team.c
-@@ -1921,7 +1921,8 @@ static int team_netpoll_setup(struct net
+@@ -1947,7 +1947,8 @@ static int team_netpoll_setup(struct net
  }
  #endif