]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
crypto: caam - Reintroduce DESC_MAX_USED_BYTES
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 18 Jun 2015 06:25:55 +0000 (14:25 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 19 Jun 2015 06:16:31 +0000 (14:16 +0800)
I incorrectly removed DESC_MAX_USED_BYTES when enlarging the size
of the shared descriptor buffers, thus making it four times larger
than what is necessary.  This patch restores the division by four
calculation.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg.c

index f206521d7525d5e99215bd0cc4469ab2beb168a7..789c385f2e47341efc7c6e2bb9d33c722f38e3cb 100644 (file)
 #define DESC_ABLKCIPHER_DEC_LEN                (DESC_ABLKCIPHER_BASE + \
                                         15 * CAAM_CMD_SZ)
 
-#define DESC_MAX_USED_LEN              (CAAM_DESC_BYTES_MAX - DESC_JOB_IO_LEN)
+#define DESC_MAX_USED_BYTES            (CAAM_DESC_BYTES_MAX - DESC_JOB_IO_LEN)
+#define DESC_MAX_USED_LEN              (DESC_MAX_USED_BYTES / CAAM_CMD_SZ)
 
 #ifdef DEBUG
 /* for print_hex_dumps with line references */