crypto: inside-secure - Fix hangup during probing for EIP97 engine
authorPascal van Leeuwen <pascalvanl@gmail.com>
Wed, 6 Nov 2019 15:13:07 +0000 (16:13 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 17 Nov 2019 00:37:29 +0000 (08:37 +0800)
Fixed mask used for CFSIZE and RFSIZE fields of HIA_OPTIONS register,
these were all 1 bit too wide. Which caused the probing of a standard
EIP97 to actually hang due to assume way too large descriptor FIFO's.

Signed-off-by: Pascal van Leeuwen <pvanleeuwen@verimatrix.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/inside-secure/safexcel.h

index ba03e4daf64c7959c0305f59ef18c9490de345d6..b4624b5687ce81c65b1b3f557791af059d9bef57 100644 (file)
 #define EIP197_CFSIZE_OFFSET                   9
 #define EIP197_CFSIZE_ADJUST                   4
 #define EIP97_CFSIZE_OFFSET                    8
-#define EIP197_CFSIZE_MASK                     GENMASK(3, 0)
-#define EIP97_CFSIZE_MASK                      GENMASK(4, 0)
+#define EIP197_CFSIZE_MASK                     GENMASK(2, 0)
+#define EIP97_CFSIZE_MASK                      GENMASK(3, 0)
 #define EIP197_RFSIZE_OFFSET                   12
 #define EIP197_RFSIZE_ADJUST                   4
 #define EIP97_RFSIZE_OFFSET                    12
-#define EIP197_RFSIZE_MASK                     GENMASK(3, 0)
-#define EIP97_RFSIZE_MASK                      GENMASK(4, 0)
+#define EIP197_RFSIZE_MASK                     GENMASK(2, 0)
+#define EIP97_RFSIZE_MASK                      GENMASK(3, 0)
 
 /* EIP197_HIA_AIC_R_ENABLE_CTRL */
 #define EIP197_CDR_IRQ(n)                      BIT((n) * 2)