crypto: qat - add retrieval of fw capabilities
authorDamian Muszynski <damian.muszynski@intel.com>
Fri, 20 Oct 2023 13:49:27 +0000 (15:49 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 27 Oct 2023 10:04:28 +0000 (18:04 +0800)
commitc7fd53796dbd09c3ef55032925bc7f8f238f9405
tree477c4b21c972a10a9e60a09ae3252449af1ea6a4
parent02e7f67c47269135f41650ac1b693034e3e8f507
crypto: qat - add retrieval of fw capabilities

The QAT firmware provides a mechanism to retrieve its capabilities
through the init admin interface.

Add logic to retrieve the firmware capability mask from the firmware
through the init/admin channel. This mask reports if the
power management, telemetry and rate limiting features are supported.

The fw capabilities are stored in the accel_dev structure and are used
to detect if a certain feature is supported by the firmware loaded
in the device.

This is supported only by devices which have an admin AE.

Signed-off-by: Damian Muszynski <damian.muszynski@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Tero Kristo <tero.kristo@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/intel/qat/qat_common/adf_accel_devices.h
drivers/crypto/intel/qat/qat_common/adf_admin.c
drivers/crypto/intel/qat/qat_common/icp_qat_fw_init_admin.h