crypto: qat - fix default value of WDT timer
authorLucas Segarra Fernandez <lucas.segarra.fernandez@intel.com>
Thu, 25 Aug 2022 10:32:16 +0000 (12:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:35:24 +0000 (12:35 +0200)
[ Upstream commit cc40b04c08400d86d2d6ea0159e0617e717f729c ]

The QAT HW supports an hardware mechanism to detect an accelerator hang.
The reporting of a hang occurs after a watchdog timer (WDT) expires.

The value of the WDT set previously was too small and was causing false
positives.
Change the default value of the WDT to 0x7000000ULL to avoid this.

Fixes: 1c4d9d5bbb5a ("crypto: qat - enable detection of accelerators hang")
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Lucas Segarra Fernandez <lucas.segarra.fernandez@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/qat/qat_common/adf_gen4_hw_data.h

index b8fca1ff7aab0fd1c97817cec2e340fcc1be2178..0b7086cae00bd8e6a67f8d60f7949c17b02297a7 100644 (file)
@@ -99,7 +99,7 @@ do { \
  * Timeout is in cycles. Clock speed may vary across products but this
  * value should be a few milli-seconds.
  */
-#define ADF_SSM_WDT_DEFAULT_VALUE      0x200000
+#define ADF_SSM_WDT_DEFAULT_VALUE      0x7000000ULL
 #define ADF_SSM_WDT_PKE_DEFAULT_VALUE  0x8000000
 #define ADF_SSMWDTL_OFFSET             0x54
 #define ADF_SSMWDTH_OFFSET             0x5C