crypto: qat - fix crypto capability detection for 4xxx
authorAdam Guerin <adam.guerin@intel.com>
Mon, 14 Aug 2023 15:52:30 +0000 (16:52 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 25 Aug 2023 10:46:55 +0000 (18:46 +0800)
commitfab9516f02b418e37d3cde6c21c316085262aece
treee1ac4a4e62f5379dd59dd1e09a707d4541f900bb
parentb0cc7491c98917f191f14efce7630b547f7ec419
crypto: qat - fix crypto capability detection for 4xxx

When extending the capability detection logic for 4xxx devices the
SMx algorithms were accidentally missed.
Enable these SMx capabilities by default for QAT GEN4 devices.

Check for device variants where the SMx algorithms are explicitly
disabled by the GEN4 hardware. This is indicated in fusectl1
register.
Mask out SM3 and SM4 based on a bit specific to those algorithms.
Mask out SM2 if the PKE slice is not present.

Fixes: 4b44d28c715d ("crypto: qat - extend crypto capability detection for 4xxx")
Signed-off-by: Adam Guerin <adam.guerin@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c
drivers/crypto/intel/qat/qat_common/icp_qat_hw.h