aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Ciocoi Radulescu <valentin.ciocoi@nxp.com>2019-06-20 14:11:17 +0300
committerDaniel Thompson <daniel@redfelineninja.org.uk>2019-09-17 16:03:06 +0100
commit979a1229f6ab427af98786315fc55e0902e79f07 (patch)
treecd6adb36fff0072c27083c2c464575e6ed04cc57
parent5c1237451c6106c0f0514756fa4ea995953404af (diff)
downloadlinux-979a1229f6ab427af98786315fc55e0902e79f07.tar.gz
Revert "crypto: caam - fix concurrency issue in givencrypt descriptor"
This reverts commit c9411038a43d32258785e8cd0e2c18b76c4c82e4, because it introduced a regression. Signed-off-by: Valentin Ciocoi Radulescu <valentin.ciocoi@nxp.com>
-rw-r--r--drivers/crypto/caam/caamalg_desc.c9
-rw-r--r--drivers/crypto/caam/caamalg_desc.h2
2 files changed, 1 insertions, 10 deletions
diff --git a/drivers/crypto/caam/caamalg_desc.c b/drivers/crypto/caam/caamalg_desc.c
index 28b4a4fac0b6..944eefcfa6eb 100644
--- a/drivers/crypto/caam/caamalg_desc.c
+++ b/drivers/crypto/caam/caamalg_desc.c
@@ -510,7 +510,6 @@ void cnstr_shdsc_aead_givencap(u32 * const desc, struct alginfo *cdata,
const bool is_qi, int era)
{
u32 geniv, moveiv;
- u32 *wait_cmd;
/* Note: Context registers are saved. */
init_sh_desc_key_aead(desc, cdata, adata, is_rfc3686, nonce, era);
@@ -608,14 +607,6 @@ copy_iv:
append_math_add(desc, VARSEQINLEN, SEQINLEN, REG0, CAAM_CMD_SZ);
append_seq_fifo_load(desc, 0, FIFOLD_CLASS_BOTH | KEY_VLF |
FIFOLD_TYPE_MSG1OUT2 | FIFOLD_TYPE_LASTBOTH);
-
- /*
- * Wait for IV transfer (ofifo -> class2) to finish before starting
- * ciphertext transfer (ofifo -> external memory).
- */
- wait_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | JUMP_COND_NIFP);
- set_jump_tgt_here(desc, wait_cmd);
-
append_seq_fifo_store(desc, 0, FIFOST_TYPE_MESSAGE_DATA | KEY_VLF);
/* Write ICV */
diff --git a/drivers/crypto/caam/caamalg_desc.h b/drivers/crypto/caam/caamalg_desc.h
index 8f4b53e6ef45..711eeb08f956 100644
--- a/drivers/crypto/caam/caamalg_desc.h
+++ b/drivers/crypto/caam/caamalg_desc.h
@@ -12,7 +12,7 @@
#define DESC_AEAD_BASE (4 * CAAM_CMD_SZ)
#define DESC_AEAD_ENC_LEN (DESC_AEAD_BASE + 11 * CAAM_CMD_SZ)
#define DESC_AEAD_DEC_LEN (DESC_AEAD_BASE + 15 * CAAM_CMD_SZ)
-#define DESC_AEAD_GIVENC_LEN (DESC_AEAD_ENC_LEN + 8 * CAAM_CMD_SZ)
+#define DESC_AEAD_GIVENC_LEN (DESC_AEAD_ENC_LEN + 7 * CAAM_CMD_SZ)
#define DESC_QI_AEAD_ENC_LEN (DESC_AEAD_ENC_LEN + 3 * CAAM_CMD_SZ)
#define DESC_QI_AEAD_DEC_LEN (DESC_AEAD_DEC_LEN + 3 * CAAM_CMD_SZ)
#define DESC_QI_AEAD_GIVENC_LEN (DESC_AEAD_GIVENC_LEN + 3 * CAAM_CMD_SZ)