Torsten Duwe 5b9452
From 0eaa51543273fd0f4ba9bea83638f7033436e5eb Mon Sep 17 00:00:00 2001
Torsten Duwe 5b9452
From: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Torsten Duwe 5b9452
Date: Thu, 7 Apr 2022 17:54:41 +0100
Torsten Duwe 5b9452
Subject: [PATCH] crypto: qat - set COMPRESSION capability for DH895XCC
Torsten Duwe 5b9452
Git-commit: 0eaa51543273fd0f4ba9bea83638f7033436e5eb
Torsten Duwe 5b9452
Patch-mainline: v5.19-rc1
Torsten Duwe 5b9452
References: jsc#PED-1073
Torsten Duwe 5b9452
Torsten Duwe 5b9452
The capability detection logic clears bits for the features that are
Torsten Duwe 5b9452
disabled in a certain SKU. For example, if the bit associate to
Torsten Duwe 5b9452
compression is not present in the LEGFUSE register, the correspondent
Torsten Duwe 5b9452
bit is cleared in the capability mask.
Torsten Duwe 5b9452
This change adds the compression capability to the mask as this was
Torsten Duwe 5b9452
missing in the commit that enhanced the capability detection logic.
Torsten Duwe 5b9452
Torsten Duwe 5b9452
Fixes: cfe4894eccdc ("crypto: qat - set COMPRESSION capability for QAT GEN2")
Torsten Duwe 5b9452
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Torsten Duwe 5b9452
Signed-off-by: Marco Chiappero <marco.chiappero@intel.com>
Torsten Duwe 5b9452
Reviewed-by: Marco Chiappero <marco.chiappero@intel.com>
Torsten Duwe 5b9452
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Torsten Duwe 5b9452
Signed-off-by: Torsten Duwe <duwe@suse.de>
Torsten Duwe 5b9452
Torsten Duwe 5b9452
---
Torsten Duwe 5b9452
 drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c | 3 ++-
Torsten Duwe 5b9452
 1 file changed, 2 insertions(+), 1 deletion(-)
Torsten Duwe 5b9452
Torsten Duwe 5b9452
diff --git a/drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c b/drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c
Torsten Duwe 5b9452
index ff13047772e34..61d5467e0d92b 100644
Torsten Duwe 5b9452
--- a/drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c
Torsten Duwe 5b9452
+++ b/drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c
Torsten Duwe 5b9452
@@ -59,7 +59,8 @@ static u32 get_accel_cap(struct adf_accel_dev *accel_dev)
Torsten Duwe 5b9452
 	capabilities = ICP_ACCEL_CAPABILITIES_CRYPTO_SYMMETRIC |
Torsten Duwe 5b9452
 		       ICP_ACCEL_CAPABILITIES_CRYPTO_ASYMMETRIC |
Torsten Duwe 5b9452
 		       ICP_ACCEL_CAPABILITIES_AUTHENTICATION |
Torsten Duwe 5b9452
-		       ICP_ACCEL_CAPABILITIES_CIPHER;
Torsten Duwe 5b9452
+		       ICP_ACCEL_CAPABILITIES_CIPHER |
Torsten Duwe 5b9452
+		       ICP_ACCEL_CAPABILITIES_COMPRESSION;
Torsten Duwe 5b9452
 
Torsten Duwe 5b9452
 	/* Read accelerator capabilities mask */
Torsten Duwe 5b9452
 	pci_read_config_dword(pdev, ADF_DEVICE_LEGFUSE_OFFSET, &legfuses);
Torsten Duwe 5b9452
-- 
Torsten Duwe 5b9452
2.35.3
Torsten Duwe 5b9452