Commit 27dddb67 authored by Koen Vandeputte's avatar Koen Vandeputte Committed by Hauke Mehrtens
Browse files

kernel: bump 4.14 to 4.14.159



Refreshed all patches.

Fixes:
- CVE-2019-19332

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx
Signed-off-by: default avatarKoen Vandeputte <koen.vandeputte@ncentric.com>
parent 8623b58c
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
LINUX_RELEASE?=1 LINUX_RELEASE?=1
LINUX_VERSION-4.9 = .206 LINUX_VERSION-4.9 = .206
LINUX_VERSION-4.14 = .158 LINUX_VERSION-4.14 = .159
LINUX_KERNEL_HASH-4.9.206 = 1df27899a9bc4dd874f3830ab9e7b638f0026dffd67a2e230444e5d2805ccad6 LINUX_KERNEL_HASH-4.9.206 = 1df27899a9bc4dd874f3830ab9e7b638f0026dffd67a2e230444e5d2805ccad6
LINUX_KERNEL_HASH-4.14.158 = 0d49ec72e273f6fc7462ad56849b2285f13fd5f4185e8f932a0074fc2eca1bb3 LINUX_KERNEL_HASH-4.14.159 = e8d42d3a1b85d180141e9bc11c4a0e87f8a413c0e989b0f24c1b7c40f8a826f2
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
......
...@@ -67,7 +67,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -67,7 +67,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
--- a/drivers/crypto/amcc/crypto4xx_core.c --- a/drivers/crypto/amcc/crypto4xx_core.c
+++ b/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c
@@ -973,7 +973,7 @@ u32 crypto4xx_build_pd(struct crypto_asy @@ -969,7 +969,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
sa->sa_command_1.bf.hash_crypto_offset = 0; sa->sa_command_1.bf.hash_crypto_offset = 0;
pd->pd_ctl.w = ctx->pd_ctl; pd->pd_ctl.w = ctx->pd_ctl;
......
...@@ -18,7 +18,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -18,7 +18,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
--- a/drivers/crypto/amcc/crypto4xx_core.c --- a/drivers/crypto/amcc/crypto4xx_core.c
+++ b/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c
@@ -1125,7 +1125,9 @@ struct crypto4xx_alg_common crypto4xx_al @@ -1121,7 +1121,9 @@ struct crypto4xx_alg_common crypto4xx_al
.cra_name = "cbc(aes)", .cra_name = "cbc(aes)",
.cra_driver_name = "cbc-aes-ppc4xx", .cra_driver_name = "cbc-aes-ppc4xx",
.cra_priority = CRYPTO4XX_CRYPTO_PRIORITY, .cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
......
...@@ -14,7 +14,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -14,7 +14,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
--- a/drivers/crypto/amcc/crypto4xx_core.c --- a/drivers/crypto/amcc/crypto4xx_core.c
+++ b/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c
@@ -1090,7 +1090,6 @@ static void crypto4xx_bh_tasklet_cb(unsi @@ -1086,7 +1086,6 @@ static void crypto4xx_bh_tasklet_cb(unsi
pd->pd_ctl.bf.pe_done = 0; pd->pd_ctl.bf.pe_done = 0;
crypto4xx_pd_done(core_dev->dev, tail); crypto4xx_pd_done(core_dev->dev, tail);
crypto4xx_put_pd_to_pdr(core_dev->dev, tail); crypto4xx_put_pd_to_pdr(core_dev->dev, tail);
......
...@@ -109,7 +109,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -109,7 +109,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
#include <crypto/sha.h> #include <crypto/sha.h>
#include "crypto4xx_reg_def.h" #include "crypto4xx_reg_def.h"
#include "crypto4xx_core.h" #include "crypto4xx_core.h"
@@ -1144,6 +1145,103 @@ struct crypto4xx_alg_common crypto4xx_al @@ -1140,6 +1141,103 @@ struct crypto4xx_alg_common crypto4xx_al
} }
} }
}}, }},
......
...@@ -27,7 +27,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -27,7 +27,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
#include "crypto4xx_reg_def.h" #include "crypto4xx_reg_def.h"
#include "crypto4xx_core.h" #include "crypto4xx_core.h"
#include "crypto4xx_sa.h" #include "crypto4xx_sa.h"
@@ -483,111 +484,44 @@ static inline struct ce_sd *crypto4xx_ge @@ -479,111 +480,44 @@ static inline struct ce_sd *crypto4xx_ge
return (struct ce_sd *)(dev->sdr + sizeof(struct ce_sd) * idx); return (struct ce_sd *)(dev->sdr + sizeof(struct ce_sd) * idx);
} }
......
...@@ -27,9 +27,9 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -27,9 +27,9 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
- dev->scatter_buffer_size * PPC4XX_NUM_SD, - dev->scatter_buffer_size * PPC4XX_NUM_SD,
+ PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD, + PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD,
&dev->scatter_buffer_pa, GFP_ATOMIC); &dev->scatter_buffer_pa, GFP_ATOMIC);
if (!dev->scatter_buffer_va) { if (!dev->scatter_buffer_va)
dma_free_coherent(dev->core_dev->device, return -ENOMEM;
@@ -412,7 +411,7 @@ static u32 crypto4xx_build_sdr(struct cr @@ -408,7 +407,7 @@ static u32 crypto4xx_build_sdr(struct cr
for (i = 0; i < PPC4XX_NUM_SD; i++) { for (i = 0; i < PPC4XX_NUM_SD; i++) {
sd_array[i].ptr = dev->scatter_buffer_pa + sd_array[i].ptr = dev->scatter_buffer_pa +
...@@ -38,7 +38,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -38,7 +38,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
} }
return 0; return 0;
@@ -427,7 +426,7 @@ static void crypto4xx_destroy_sdr(struct @@ -423,7 +422,7 @@ static void crypto4xx_destroy_sdr(struct
if (dev->scatter_buffer_va) if (dev->scatter_buffer_va)
dma_free_coherent(dev->core_dev->device, dma_free_coherent(dev->core_dev->device,
......
...@@ -171,9 +171,9 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -171,9 +171,9 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
/* alloc memory for scatter descriptor ring */ /* alloc memory for scatter descriptor ring */
dev->sdr = dma_alloc_coherent(dev->core_dev->device, dev->sdr = dma_alloc_coherent(dev->core_dev->device,
@@ -407,10 +403,8 @@ static u32 crypto4xx_build_sdr(struct cr @@ -403,10 +399,8 @@ static u32 crypto4xx_build_sdr(struct cr
if (!dev->scatter_buffer_va)
return -ENOMEM; return -ENOMEM;
}
- sd_array = dev->sdr; - sd_array = dev->sdr;
- -
...@@ -183,7 +183,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -183,7 +183,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
PPC4XX_SD_BUFFER_SIZE * i; PPC4XX_SD_BUFFER_SIZE * i;
} }
@@ -480,7 +474,7 @@ static inline struct ce_sd *crypto4xx_ge @@ -476,7 +470,7 @@ static inline struct ce_sd *crypto4xx_ge
{ {
*sd_dma = dev->sdr_pa + sizeof(struct ce_sd) * idx; *sd_dma = dev->sdr_pa + sizeof(struct ce_sd) * idx;
...@@ -192,7 +192,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -192,7 +192,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
} }
static void crypto4xx_copy_pkt_to_dst(struct crypto4xx_device *dev, static void crypto4xx_copy_pkt_to_dst(struct crypto4xx_device *dev,
@@ -529,11 +523,10 @@ static u32 crypto4xx_copy_digest_to_dst( @@ -525,11 +519,10 @@ static u32 crypto4xx_copy_digest_to_dst(
struct crypto4xx_ctx *ctx) struct crypto4xx_ctx *ctx)
{ {
struct dynamic_sa_ctl *sa = (struct dynamic_sa_ctl *) ctx->sa_in; struct dynamic_sa_ctl *sa = (struct dynamic_sa_ctl *) ctx->sa_in;
...@@ -206,7 +206,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -206,7 +206,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
SA_HASH_ALG_SHA1_DIGEST_SIZE); SA_HASH_ALG_SHA1_DIGEST_SIZE);
} }
@@ -616,11 +609,9 @@ static u32 crypto4xx_ahash_done(struct c @@ -612,11 +605,9 @@ static u32 crypto4xx_ahash_done(struct c
static u32 crypto4xx_pd_done(struct crypto4xx_device *dev, u32 idx) 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> ...@@ -220,7 +220,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
if (crypto_tfm_alg_type(pd_uinfo->async_req->tfm) == if (crypto_tfm_alg_type(pd_uinfo->async_req->tfm) ==
CRYPTO_ALG_TYPE_ABLKCIPHER) CRYPTO_ALG_TYPE_ABLKCIPHER)
return crypto4xx_ablkcipher_done(dev, pd_uinfo, pd); return crypto4xx_ablkcipher_done(dev, pd_uinfo, pd);
@@ -721,7 +712,6 @@ u32 crypto4xx_build_pd(struct crypto_asy @@ -717,7 +708,6 @@ u32 crypto4xx_build_pd(struct crypto_asy
unsigned long flags; unsigned long flags;
struct pd_uinfo *pd_uinfo = NULL; struct pd_uinfo *pd_uinfo = NULL;
unsigned int nbytes = datalen, idx; unsigned int nbytes = datalen, idx;
...@@ -228,7 +228,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -228,7 +228,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
u32 gd_idx = 0; u32 gd_idx = 0;
/* figure how many gd is needed */ /* figure how many gd is needed */
@@ -780,17 +770,15 @@ u32 crypto4xx_build_pd(struct crypto_asy @@ -776,17 +766,15 @@ u32 crypto4xx_build_pd(struct crypto_asy
} }
spin_unlock_irqrestore(&dev->core_dev->lock, flags); spin_unlock_irqrestore(&dev->core_dev->lock, flags);
...@@ -248,7 +248,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -248,7 +248,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
if (ctx->direction == DIR_INBOUND) if (ctx->direction == DIR_INBOUND)
memcpy(sa, ctx->sa_in, ctx->sa_len * 4); memcpy(sa, ctx->sa_in, ctx->sa_len * 4);
else else
@@ -800,14 +788,15 @@ u32 crypto4xx_build_pd(struct crypto_asy @@ -796,14 +784,15 @@ u32 crypto4xx_build_pd(struct crypto_asy
&pd_uinfo->sr_pa, 4); &pd_uinfo->sr_pa, 4);
if (iv_len) if (iv_len)
...@@ -267,7 +267,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -267,7 +267,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
} }
} }
pd->sa_len = ctx->sa_len; pd->sa_len = ctx->sa_len;
@@ -1015,9 +1004,8 @@ static void crypto4xx_bh_tasklet_cb(unsi @@ -1011,9 +1000,8 @@ static void crypto4xx_bh_tasklet_cb(unsi
while (core_dev->dev->pdr_head != core_dev->dev->pdr_tail) { while (core_dev->dev->pdr_head != core_dev->dev->pdr_tail) {
tail = core_dev->dev->pdr_tail; tail = core_dev->dev->pdr_tail;
......
...@@ -38,7 +38,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -38,7 +38,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
--- a/drivers/crypto/amcc/crypto4xx_core.c --- a/drivers/crypto/amcc/crypto4xx_core.c
+++ b/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c
@@ -1157,7 +1157,7 @@ struct crypto4xx_alg_common crypto4xx_al @@ -1153,7 +1153,7 @@ struct crypto4xx_alg_common crypto4xx_al
.min_keysize = AES_MIN_KEY_SIZE, .min_keysize = AES_MIN_KEY_SIZE,
.max_keysize = AES_MAX_KEY_SIZE, .max_keysize = AES_MAX_KEY_SIZE,
.ivsize = AES_IV_SIZE, .ivsize = AES_IV_SIZE,
......
...@@ -56,7 +56,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -56,7 +56,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
#include "crypto4xx_reg_def.h" #include "crypto4xx_reg_def.h"
#include "crypto4xx_core.h" #include "crypto4xx_core.h"
#include "crypto4xx_sa.h" #include "crypto4xx_sa.h"
@@ -582,8 +583,10 @@ static u32 crypto4xx_ablkcipher_done(str @@ -578,8 +579,10 @@ static u32 crypto4xx_ablkcipher_done(str
} }
crypto4xx_ret_sg_desc(dev, pd_uinfo); crypto4xx_ret_sg_desc(dev, pd_uinfo);
...@@ -69,7 +69,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -69,7 +69,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
return 0; return 0;
} }
@@ -600,9 +603,10 @@ static u32 crypto4xx_ahash_done(struct c @@ -596,9 +599,10 @@ static u32 crypto4xx_ahash_done(struct c
crypto4xx_copy_digest_to_dst(pd_uinfo, crypto4xx_copy_digest_to_dst(pd_uinfo,
crypto_tfm_ctx(ahash_req->base.tfm)); crypto_tfm_ctx(ahash_req->base.tfm));
crypto4xx_ret_sg_desc(dev, pd_uinfo); crypto4xx_ret_sg_desc(dev, pd_uinfo);
...@@ -83,7 +83,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -83,7 +83,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
return 0; return 0;
} }
@@ -713,6 +717,7 @@ u32 crypto4xx_build_pd(struct crypto_asy @@ -709,6 +713,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
struct pd_uinfo *pd_uinfo = NULL; struct pd_uinfo *pd_uinfo = NULL;
unsigned int nbytes = datalen, idx; unsigned int nbytes = datalen, idx;
u32 gd_idx = 0; u32 gd_idx = 0;
...@@ -91,7 +91,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -91,7 +91,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
/* figure how many gd is needed */ /* figure how many gd is needed */
num_gd = sg_nents_for_len(src, datalen); num_gd = sg_nents_for_len(src, datalen);
@@ -743,6 +748,31 @@ u32 crypto4xx_build_pd(struct crypto_asy @@ -739,6 +744,31 @@ u32 crypto4xx_build_pd(struct crypto_asy
* already got must be return the original place. * already got must be return the original place.
*/ */
spin_lock_irqsave(&dev->core_dev->lock, flags); spin_lock_irqsave(&dev->core_dev->lock, flags);
...@@ -123,7 +123,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -123,7 +123,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
if (num_gd) { if (num_gd) {
fst_gd = crypto4xx_get_n_gd(dev, num_gd); fst_gd = crypto4xx_get_n_gd(dev, num_gd);
if (fst_gd == ERING_WAS_FULL) { if (fst_gd == ERING_WAS_FULL) {
@@ -897,11 +927,12 @@ u32 crypto4xx_build_pd(struct crypto_asy @@ -893,11 +923,12 @@ u32 crypto4xx_build_pd(struct crypto_asy
sa->sa_command_1.bf.hash_crypto_offset = 0; sa->sa_command_1.bf.hash_crypto_offset = 0;
pd->pd_ctl.w = ctx->pd_ctl; pd->pd_ctl.w = ctx->pd_ctl;
pd->pd_ctl_len.w = 0x00400000 | datalen; pd->pd_ctl_len.w = 0x00400000 | datalen;
...@@ -138,7 +138,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -138,7 +138,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
} }
/** /**
@@ -1006,7 +1037,7 @@ static void crypto4xx_bh_tasklet_cb(unsi @@ -1002,7 +1033,7 @@ static void crypto4xx_bh_tasklet_cb(unsi
tail = core_dev->dev->pdr_tail; tail = core_dev->dev->pdr_tail;
pd_uinfo = &core_dev->dev->pdr_uinfo[tail]; pd_uinfo = &core_dev->dev->pdr_uinfo[tail];
pd = &core_dev->dev->pdr[tail]; pd = &core_dev->dev->pdr[tail];
......
...@@ -45,7 +45,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -45,7 +45,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
ctx->is_hash = 0; ctx->is_hash = 0;
--- a/drivers/crypto/amcc/crypto4xx_core.c --- a/drivers/crypto/amcc/crypto4xx_core.c
+++ b/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c
@@ -623,42 +623,6 @@ static u32 crypto4xx_pd_done(struct cryp @@ -619,42 +619,6 @@ static u32 crypto4xx_pd_done(struct cryp
return crypto4xx_ahash_done(dev, pd_uinfo); return crypto4xx_ahash_done(dev, pd_uinfo);
} }
...@@ -88,7 +88,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -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) static void crypto4xx_stop_all(struct crypto4xx_core_device *core_dev)
{ {
crypto4xx_destroy_pdr(core_dev->dev); crypto4xx_destroy_pdr(core_dev->dev);
@@ -818,8 +782,8 @@ u32 crypto4xx_build_pd(struct crypto_asy @@ -814,8 +778,8 @@ u32 crypto4xx_build_pd(struct crypto_asy
&pd_uinfo->sr_pa, 4); &pd_uinfo->sr_pa, 4);
if (iv_len) if (iv_len)
......
...@@ -263,7 +263,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -263,7 +263,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
/** /**
* alloc memory for the gather ring * alloc memory for the gather ring
* no need to alloc buf for the ring * no need to alloc buf for the ring
@@ -520,18 +514,16 @@ static void crypto4xx_copy_pkt_to_dst(st @@ -516,18 +510,16 @@ static void crypto4xx_copy_pkt_to_dst(st
} }
} }
...@@ -285,7 +285,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -285,7 +285,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
} }
static void crypto4xx_ret_sg_desc(struct crypto4xx_device *dev, static void crypto4xx_ret_sg_desc(struct crypto4xx_device *dev,
@@ -600,7 +592,7 @@ static u32 crypto4xx_ahash_done(struct c @@ -596,7 +588,7 @@ static u32 crypto4xx_ahash_done(struct c
ahash_req = ahash_request_cast(pd_uinfo->async_req); ahash_req = ahash_request_cast(pd_uinfo->async_req);
ctx = crypto_tfm_ctx(ahash_req->base.tfm); ctx = crypto_tfm_ctx(ahash_req->base.tfm);
...@@ -294,7 +294,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -294,7 +294,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto_tfm_ctx(ahash_req->base.tfm)); crypto_tfm_ctx(ahash_req->base.tfm));
crypto4xx_ret_sg_desc(dev, pd_uinfo); crypto4xx_ret_sg_desc(dev, pd_uinfo);
@@ -660,17 +652,17 @@ static u32 get_next_sd(u32 current) @@ -656,17 +648,17 @@ static u32 get_next_sd(u32 current)
return 0; return 0;
} }
...@@ -317,7 +317,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -317,7 +317,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
struct ce_gd *gd; struct ce_gd *gd;
struct ce_pd *pd; struct ce_pd *pd;
u32 num_gd, num_sd; u32 num_gd, num_sd;
@@ -678,8 +670,9 @@ u32 crypto4xx_build_pd(struct crypto_asy @@ -674,8 +666,9 @@ u32 crypto4xx_build_pd(struct crypto_asy
u32 fst_sd = 0xffffffff; u32 fst_sd = 0xffffffff;
u32 pd_entry; u32 pd_entry;
unsigned long flags; unsigned long flags;
...@@ -329,7 +329,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -329,7 +329,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
u32 gd_idx = 0; u32 gd_idx = 0;
bool is_busy; bool is_busy;
@@ -693,7 +686,7 @@ u32 crypto4xx_build_pd(struct crypto_asy @@ -689,7 +682,7 @@ u32 crypto4xx_build_pd(struct crypto_asy
num_gd = 0; num_gd = 0;
/* figure how many sd is needed */ /* figure how many sd is needed */
...@@ -338,7 +338,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -338,7 +338,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
num_sd = 0; num_sd = 0;
} else { } else {
if (datalen > PPC4XX_SD_BUFFER_SIZE) { if (datalen > PPC4XX_SD_BUFFER_SIZE) {
@@ -764,37 +757,27 @@ u32 crypto4xx_build_pd(struct crypto_asy @@ -760,37 +753,27 @@ u32 crypto4xx_build_pd(struct crypto_asy
} }
spin_unlock_irqrestore(&dev->core_dev->lock, flags); spin_unlock_irqrestore(&dev->core_dev->lock, flags);
...@@ -389,7 +389,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -389,7 +389,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
/* get first gd we are going to use */ /* get first gd we are going to use */
gd_idx = fst_gd; gd_idx = fst_gd;
pd_uinfo->first_gd = fst_gd; pd_uinfo->first_gd = fst_gd;
@@ -803,27 +786,30 @@ u32 crypto4xx_build_pd(struct crypto_asy @@ -799,27 +782,30 @@ u32 crypto4xx_build_pd(struct crypto_asy
pd->src = gd_dma; pd->src = gd_dma;
/* enable gather */ /* enable gather */
sa->sa_command_0.bf.gather = 1; sa->sa_command_0.bf.gather = 1;
...@@ -430,7 +430,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -430,7 +430,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
/* /*
* Disable gather in sa command * Disable gather in sa command
*/ */
@@ -834,25 +820,24 @@ u32 crypto4xx_build_pd(struct crypto_asy @@ -830,25 +816,24 @@ u32 crypto4xx_build_pd(struct crypto_asy
pd_uinfo->first_gd = 0xffffffff; pd_uinfo->first_gd = 0xffffffff;
pd_uinfo->num_gd = 0; pd_uinfo->num_gd = 0;
} }
...@@ -463,7 +463,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -463,7 +463,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
u32 sd_idx = fst_sd; u32 sd_idx = fst_sd;
nbytes = datalen; nbytes = datalen;
sa->sa_command_0.bf.scatter = 1; sa->sa_command_0.bf.scatter = 1;
@@ -866,7 +851,6 @@ u32 crypto4xx_build_pd(struct crypto_asy @@ -862,7 +847,6 @@ u32 crypto4xx_build_pd(struct crypto_asy
sd->ctl.done = 0; sd->ctl.done = 0;
sd->ctl.rdy = 1; sd->ctl.rdy = 1;
/* sd->ptr should be setup by sd_init routine*/ /* sd->ptr should be setup by sd_init routine*/
...@@ -471,7 +471,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -471,7 +471,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
if (nbytes >= PPC4XX_SD_BUFFER_SIZE) if (nbytes >= PPC4XX_SD_BUFFER_SIZE)
nbytes -= PPC4XX_SD_BUFFER_SIZE; nbytes -= PPC4XX_SD_BUFFER_SIZE;
else else
@@ -877,19 +861,23 @@ u32 crypto4xx_build_pd(struct crypto_asy @@ -873,19 +857,23 @@ u32 crypto4xx_build_pd(struct crypto_asy
/* setup scatter descriptor */ /* setup scatter descriptor */
sd->ctl.done = 0; sd->ctl.done = 0;
sd->ctl.rdy = 1; sd->ctl.rdy = 1;
......
...@@ -42,7 +42,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -42,7 +42,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
if (n >= PPC4XX_NUM_GD) if (n >= PPC4XX_NUM_GD)
return ERING_WAS_FULL; return ERING_WAS_FULL;
@@ -625,17 +626,6 @@ static void crypto4xx_stop_all(struct cr @@ -621,17 +622,6 @@ static void crypto4xx_stop_all(struct cr
kfree(core_dev); kfree(core_dev);
} }
......
...@@ -44,7 +44,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -44,7 +44,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
} }
/** /**
@@ -863,16 +866,16 @@ int crypto4xx_build_pd(struct crypto_asy @@ -859,16 +862,16 @@ int crypto4xx_build_pd(struct crypto_asy
} }
} }
...@@ -66,7 +66,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -66,7 +66,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
writel(1, dev->ce_base + CRYPTO4XX_INT_DESCR_RD); writel(1, dev->ce_base + CRYPTO4XX_INT_DESCR_RD);
return is_busy ? -EBUSY : -EINPROGRESS; return is_busy ? -EBUSY : -EINPROGRESS;
} }
@@ -973,23 +976,23 @@ static void crypto4xx_bh_tasklet_cb(unsi @@ -969,23 +972,23 @@ static void crypto4xx_bh_tasklet_cb(unsi
struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev); struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev);
struct pd_uinfo *pd_uinfo; struct pd_uinfo *pd_uinfo;
struct ce_pd *pd; struct ce_pd *pd;
......
...@@ -167,7 +167,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -167,7 +167,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
/** /**
* alloc memory for the gather ring * alloc memory for the gather ring
* no need to alloc buf for the ring * no need to alloc buf for the ring
@@ -892,8 +861,6 @@ static int crypto4xx_alg_init(struct cry @@ -888,8 +857,6 @@ static int crypto4xx_alg_init(struct cry
ctx->dev = amcc_alg->dev; ctx->dev = amcc_alg->dev;
ctx->sa_in = NULL; ctx->sa_in = NULL;
ctx->sa_out = NULL; ctx->sa_out = NULL;
...@@ -176,7 +176,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -176,7 +176,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
ctx->sa_len = 0; ctx->sa_len = 0;
switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) { switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) {
@@ -914,7 +881,6 @@ static void crypto4xx_alg_exit(struct cr @@ -910,7 +877,6 @@ static void crypto4xx_alg_exit(struct cr
struct crypto4xx_ctx *ctx = crypto_tfm_ctx(tfm); struct crypto4xx_ctx *ctx = crypto_tfm_ctx(tfm);
crypto4xx_free_sa(ctx); crypto4xx_free_sa(ctx);
......
...@@ -116,7 +116,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> ...@@ -116,7 +116,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
#include <crypto/internal/skcipher.h> #include <crypto/internal/skcipher.h>
#include "crypto4xx_reg_def.h" #include "crypto4xx_reg_def.h"
#include "crypto4xx_core.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> ...@@ -125,7 +125,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
struct pd_uinfo *pd_uinfo, struct pd_uinfo *pd_uinfo,
struct ce_pd *pd) 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) if (pd_uinfo->state & PD_ENTRY_BUSY)
ablkcipher_request_complete(ablk_req, -EINPROGRESS);