summaryrefslogtreecommitdiffstats
path: root/lib/842/842.h
diff options
context:
space:
mode:
authorHaren Myneni <haren@linux.vnet.ibm.com>2015-10-08 13:45:51 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2015-10-14 22:23:17 +0800
commitea0b3984c1cc8b28de27a3bec285102b4e366a4c (patch)
treeb0134466a5b790d4091dc16065257a00ea24bf00 /lib/842/842.h
parentf5128432b08c3e263e1a7ce709d686b1ded51131 (diff)
downloadop-kernel-dev-ea0b3984c1cc8b28de27a3bec285102b4e366a4c.zip
op-kernel-dev-ea0b3984c1cc8b28de27a3bec285102b4e366a4c.tar.gz
crypto: 842 - Add CRC and validation support
This patch adds CRC generation and validation support for nx-842. Add CRC flag so that nx842 coprocessor includes CRC during compression and validates during decompression. Also changes in 842 SW compression to append CRC value at the end of template and checks during decompression. Signed-off-by: Haren Myneni <haren@us.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'lib/842/842.h')
-rw-r--r--lib/842/842.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/842/842.h b/lib/842/842.h
index 7c20003..e0a122bc 100644
--- a/lib/842/842.h
+++ b/lib/842/842.h
@@ -76,6 +76,7 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/bitops.h>
+#include <linux/crc32.h>
#include <asm/unaligned.h>
#include <linux/sw842.h>
@@ -98,6 +99,7 @@
#define I2_BITS (8)
#define I4_BITS (9)
#define I8_BITS (8)
+#define CRC_BITS (32)
#define REPEAT_BITS_MAX (0x3f)
#define SHORT_DATA_BITS_MAX (0x7)
OpenPOWER on IntegriCloud