Skip to contentSkip to conversation

crypto: qat - extend configuration for 4xxx

PATCH In review Adam Guerin 2 participants 6 messages Jun 9, 2023 – Jun 16, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover crypto: qat - extend configuration for 4xxx

This set extends the configuration of the device to accept more variations of the configurable services and the device is configured correctly based on the configured service. Refactoring the FW config logic to avoid duplication. Loading the correct FW based on the type and configuration of the device also reporting the correct capabilities for the configured service.

Adam Guerin (2):
crypto: qat - move returns to default case
crypto: qat - extend configuration for 4xxx

Giovanni Cabiddu (2):
crypto: qat - make fw images name constant
crypto: qat - refactor fw config logic for 4xxx

 Documentation/ABI/testing/sysfs-driver-qat    |  11 +
 .../intel/qat/qat_4xxx/adf_4xxx_hw_data.c     | 229 +++++++++++++-----
 drivers/crypto/intel/qat/qat_4xxx/adf_drv.c   |  33 +++
 .../intel/qat/qat_common/adf_accel_devices.h  |   2 +-
 .../intel/qat/qat_common/adf_accel_engine.c   |   2 +-
 .../intel/qat/qat_common/adf_cfg_strings.h    |   7 +
 .../intel/qat/qat_common/adf_common_drv.h     |   2 +-
 .../crypto/intel/qat/qat_common/adf_sysfs.c   |   7 +
 .../crypto/intel/qat/qat_common/qat_algs.c    |   1 -
 .../crypto/intel/qat/qat_common/qat_uclo.c    |   8 +-
 10 files changed, 231 insertions(+), 71 deletions(-)

base-commit: 6b5755b35497de5e8ed17772f7b0dd1bbe19cbee

Signature · 1 line
2.40.1
#1 lore raw

PATCH 1/4 crypto: qat - move returns to default case

Make use of the default statements by changing the pattern:

	switch(condition) {
	case COND_A:
	...
		break;
	case COND_b:
	...
		break;
	}
	return ret;

in

	switch(condition) {
	case COND_A:
	...
		break;
	case COND_b:
	...
		break;
	default:
		return ret;
	}
---
 .../intel/qat/qat_4xxx/adf_4xxx_hw_data.c     | 20 +++++++++----------
 .../crypto/intel/qat/qat_common/qat_algs.c    |  1 -
 2 files changed, 10 insertions(+), 11 deletions(-)
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c +10 -10
index d7d5850af703..c961fa6ce5aa 100644
@@ -215,9 +215,9 @@ static u32 get_accel_cap(struct adf_accel_dev *accel_dev)
 		return capabilities_cy;
 	case SVC_DC:
 		return capabilities_dc;
+	default:
+		return 0;
 	}
-
-	return 0;
 }
 
 static enum dev_sku_info get_sku(struct adf_hw_device_data *self)
@@ -232,9 +232,9 @@ static const u32 *adf_get_arbiter_mapping(struct adf_accel_dev *accel_dev)
 		return thrd_to_arb_map_cy;
 	case SVC_DC:
 		return thrd_to_arb_map_dc;
+	default:
+		return NULL;
 	}
-
-	return NULL;
 }
 
 static void get_arb_info(struct arb_info *arb_info)
@@ -319,9 +319,9 @@ static char *uof_get_name_4xxx(struct adf_accel_dev *accel_dev, u32 obj_num)
 		return adf_4xxx_fw_cy_config[obj_num].obj_name;
 	case SVC_DC:
 		return adf_4xxx_fw_dc_config[obj_num].obj_name;
+	default:
+		return NULL;
 	}
-
-	return NULL;
 }
 
 static char *uof_get_name_402xx(struct adf_accel_dev *accel_dev, u32 obj_num)
@@ -331,9 +331,9 @@ static char *uof_get_name_402xx(struct adf_accel_dev *accel_dev, u32 obj_num)
 		return adf_402xx_fw_cy_config[obj_num].obj_name;
 	case SVC_DC:
 		return adf_402xx_fw_dc_config[obj_num].obj_name;
+	default:
+		return NULL;
 	}
-
-	return NULL;
 }
 
 static u32 uof_get_ae_mask(struct adf_accel_dev *accel_dev, u32 obj_num)
@@ -343,9 +343,9 @@ static u32 uof_get_ae_mask(struct adf_accel_dev *accel_dev, u32 obj_num)
 		return adf_4xxx_fw_cy_config[obj_num].ae_mask;
 	case SVC_DC:
 		return adf_4xxx_fw_dc_config[obj_num].ae_mask;
+	default:
+		return 0;
 	}
-
-	return 0;
 }
 
 void adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 dev_id)
drivers/crypto/intel/qat/qat_common/qat_algs.c +0 -1
index 538dcbfbcd26..3c4bba4a8779 100644
@@ -106,7 +106,6 @@ static int qat_get_inter_state_size(enum icp_qat_hw_auth_algo qat_hash_alg)
 	default:
 		return -EFAULT;
 	}
-	return -EFAULT;
 }
 
 static int qat_alg_do_precomputes(struct icp_qat_hw_auth_algo_blk *hash,
Signature · 1 line
2.40.1
#2 lore raw

PATCH 2/4 crypto: qat - make fw images name constant

In reply to Adam Guerin

From: Giovanni Cabiddu <[email protected]>

Update fw image names to be constant throughout the driver.

---
 drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c    | 6 +++---
 drivers/crypto/intel/qat/qat_common/adf_accel_devices.h | 2 +-
 drivers/crypto/intel/qat/qat_common/adf_accel_engine.c  | 2 +-
 drivers/crypto/intel/qat/qat_common/adf_common_drv.h    | 2 +-
 drivers/crypto/intel/qat/qat_common/qat_uclo.c          | 8 ++++----
 5 files changed, 10 insertions(+), 10 deletions(-)
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c +3 -3
index c961fa6ce5aa..7a2f56567298 100644
@@ -14,7 +14,7 @@
 
 struct adf_fw_config {
 	u32 ae_mask;
-	char *obj_name;
+	const char *obj_name;
 };
 
 static struct adf_fw_config adf_4xxx_fw_cy_config[] = {
@@ -312,7 +312,7 @@ static u32 uof_get_num_objs(void)
 	return ARRAY_SIZE(adf_4xxx_fw_cy_config);
 }
 
-static char *uof_get_name_4xxx(struct adf_accel_dev *accel_dev, u32 obj_num)
+static const char *uof_get_name_4xxx(struct adf_accel_dev *accel_dev, u32 obj_num)
 {
 	switch (get_service_enabled(accel_dev)) {
 	case SVC_CY:
@@ -324,7 +324,7 @@ static char *uof_get_name_4xxx(struct adf_accel_dev *accel_dev, u32 obj_num)
 	}
 }
 
-static char *uof_get_name_402xx(struct adf_accel_dev *accel_dev, u32 obj_num)
+static const char *uof_get_name_402xx(struct adf_accel_dev *accel_dev, u32 obj_num)
 {
 	switch (get_service_enabled(accel_dev)) {
 	case SVC_CY:
drivers/crypto/intel/qat/qat_common/adf_accel_devices.h +1 -1
index 93938bb0fca0..5240185a023e 100644
@@ -204,7 +204,7 @@ struct adf_hw_device_data {
 	int (*ring_pair_reset)(struct adf_accel_dev *accel_dev, u32 bank_nr);
 	void (*reset_device)(struct adf_accel_dev *accel_dev);
 	void (*set_msix_rttable)(struct adf_accel_dev *accel_dev);
-	char *(*uof_get_name)(struct adf_accel_dev *accel_dev, u32 obj_num);
+	const char *(*uof_get_name)(struct adf_accel_dev *accel_dev, u32 obj_num);
 	u32 (*uof_get_num_objs)(void);
 	u32 (*uof_get_ae_mask)(struct adf_accel_dev *accel_dev, u32 obj_num);
 	int (*dev_config)(struct adf_accel_dev *accel_dev);
drivers/crypto/intel/qat/qat_common/adf_accel_engine.c +1 -1
index 4ce2b666929e..6be064dc64c8 100644
@@ -13,7 +13,7 @@ static int adf_ae_fw_load_images(struct adf_accel_dev *accel_dev, void *fw_addr,
 	struct adf_fw_loader_data *loader_data = accel_dev->fw_loader;
 	struct adf_hw_device_data *hw_device = accel_dev->hw_device;
 	struct icp_qat_fw_loader_handle *loader;
-	char *obj_name;
+	const char *obj_name;
 	u32 num_objs;
 	u32 ae_mask;
 	int i;
drivers/crypto/intel/qat/qat_common/adf_common_drv.h +1 -1
index 2c2ac4dc9753..9976cfe65488 100644
@@ -188,7 +188,7 @@ void qat_uclo_del_obj(struct icp_qat_fw_loader_handle *handle);
 int qat_uclo_wr_mimage(struct icp_qat_fw_loader_handle *handle, void *addr_ptr,
 		       int mem_size);
 int qat_uclo_map_obj(struct icp_qat_fw_loader_handle *handle,
-		     void *addr_ptr, u32 mem_size, char *obj_name);
+		     void *addr_ptr, u32 mem_size, const char *obj_name);
 int qat_uclo_set_cfg_ae_mask(struct icp_qat_fw_loader_handle *handle,
 			     unsigned int cfg_ae_mask);
 int adf_init_misc_wq(void);
drivers/crypto/intel/qat/qat_common/qat_uclo.c +4 -4
index 3ba8ca20b3d7..ce837bcc1cab 100644
@@ -1685,7 +1685,7 @@ static void qat_uclo_del_mof(struct icp_qat_fw_loader_handle *handle)
 }
 
 static int qat_uclo_seek_obj_inside_mof(struct icp_qat_mof_handle *mobj_handle,
-					char *obj_name, char **obj_ptr,
+					const char *obj_name, char **obj_ptr,
 					unsigned int *obj_size)
 {
 	struct icp_qat_mof_objhdr *obj_hdr = mobj_handle->obj_table.obj_hdr;
@@ -1837,8 +1837,8 @@ static int qat_uclo_check_mof_format(struct icp_qat_mof_file_hdr *mof_hdr)
 
 static int qat_uclo_map_mof_obj(struct icp_qat_fw_loader_handle *handle,
 				struct icp_qat_mof_file_hdr *mof_ptr,
-				u32 mof_size, char *obj_name, char **obj_ptr,
-				unsigned int *obj_size)
+				u32 mof_size, const char *obj_name,
+				char **obj_ptr, unsigned int *obj_size)
 {
 	struct icp_qat_mof_chunkhdr *mof_chunkhdr;
 	unsigned int file_id = mof_ptr->file_id;
@@ -1888,7 +1888,7 @@ static int qat_uclo_map_mof_obj(struct icp_qat_fw_loader_handle *handle,
 }
 
 int qat_uclo_map_obj(struct icp_qat_fw_loader_handle *handle,
-		     void *addr_ptr, u32 mem_size, char *obj_name)
+		     void *addr_ptr, u32 mem_size, const char *obj_name)
 {
 	char *obj_addr;
 	u32 obj_size;
Signature · 1 line
2.40.1
#3 lore raw

PATCH 3/4 crypto: qat - refactor fw config logic for 4xxx

In reply to Adam Guerin

From: Giovanni Cabiddu <[email protected]>

The data structure adf_fw_config is used to select which firmware image is loaded on a certain set of accelerator engines.
When support for 402xx was added, the adf_fw_config arrays were duplicated in order to select different firmware images.

Since the configurations are the same regardless of the QAT GEN4 flavour, in preparation for adding support for multiple configurations, refactor the logic that retrieves the firmware names in the 4xxx driver. The structure adf_fw_config has been changed to contain a firmware object id that is then mapped to a firmware name depending of the device type.

---
 .../intel/qat/qat_4xxx/adf_4xxx_hw_data.c     | 96 +++++++++++--------
 1 file changed, 58 insertions(+), 38 deletions(-)
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c +58 -38
index 7a2f56567298..bd55c938f7eb 100644
@@ -12,35 +12,46 @@
 #include "adf_4xxx_hw_data.h"
 #include "icp_qat_hw.h"
 
-struct adf_fw_config {
-	u32 ae_mask;
-	const char *obj_name;
+enum adf_fw_objs {
+	ADF_FW_SYM_OBJ,
+	ADF_FW_ASYM_OBJ,
+	ADF_FW_DC_OBJ,
+	ADF_FW_ADMIN_OBJ,
+};
+
+static const char * const adf_4xxx_fw_objs[] = {
+	[ADF_FW_SYM_OBJ] =  ADF_4XXX_SYM_OBJ,
+	[ADF_FW_ASYM_OBJ] =  ADF_4XXX_ASYM_OBJ,
+	[ADF_FW_DC_OBJ] =  ADF_4XXX_DC_OBJ,
+	[ADF_FW_ADMIN_OBJ] = ADF_4XXX_ADMIN_OBJ,
 };
 
-static struct adf_fw_config adf_4xxx_fw_cy_config[] = {
-	{0xF0, ADF_4XXX_SYM_OBJ},
-	{0xF, ADF_4XXX_ASYM_OBJ},
-	{0x100, ADF_4XXX_ADMIN_OBJ},
+static const char * const adf_402xx_fw_objs[] = {
+	[ADF_FW_SYM_OBJ] =  ADF_402XX_SYM_OBJ,
+	[ADF_FW_ASYM_OBJ] =  ADF_402XX_ASYM_OBJ,
+	[ADF_FW_DC_OBJ] =  ADF_402XX_DC_OBJ,
+	[ADF_FW_ADMIN_OBJ] = ADF_402XX_ADMIN_OBJ,
 };
 
-static struct adf_fw_config adf_4xxx_fw_dc_config[] = {
-	{0xF0, ADF_4XXX_DC_OBJ},
-	{0xF, ADF_4XXX_DC_OBJ},
-	{0x100, ADF_4XXX_ADMIN_OBJ},
+struct adf_fw_config {
+	u32 ae_mask;
+	enum adf_fw_objs obj;
 };
 
-static struct adf_fw_config adf_402xx_fw_cy_config[] = {
-	{0xF0, ADF_402XX_SYM_OBJ},
-	{0xF, ADF_402XX_ASYM_OBJ},
-	{0x100, ADF_402XX_ADMIN_OBJ},
+static const struct adf_fw_config adf_fw_cy_config[] = {
+	{0xF0, ADF_FW_SYM_OBJ},
+	{0xF, ADF_FW_ASYM_OBJ},
+	{0x100, ADF_FW_ADMIN_OBJ},
 };
 
-static struct adf_fw_config adf_402xx_fw_dc_config[] = {
-	{0xF0, ADF_402XX_DC_OBJ},
-	{0xF, ADF_402XX_DC_OBJ},
-	{0x100, ADF_402XX_ADMIN_OBJ},
+static const struct adf_fw_config adf_fw_dc_config[] = {
+	{0xF0, ADF_FW_DC_OBJ},
+	{0xF, ADF_FW_DC_OBJ},
+	{0x100, ADF_FW_ADMIN_OBJ},
 };
 
+static_assert(ARRAY_SIZE(adf_fw_cy_config) == ARRAY_SIZE(adf_fw_dc_config));
+
 /* Worker thread to service arbiter mappings */
 static const u32 thrd_to_arb_map_cy[ADF_4XXX_MAX_ACCELENGINES] = {
 	0x5555555, 0x5555555, 0x5555555, 0x5555555,
@@ -305,44 +316,53 @@ static int adf_init_device(struct adf_accel_dev *accel_dev)
 
 static u32 uof_get_num_objs(void)
 {
-	BUILD_BUG_ON_MSG(ARRAY_SIZE(adf_4xxx_fw_cy_config) !=
-			 ARRAY_SIZE(adf_4xxx_fw_dc_config),
-			 "Size mismatch between adf_4xxx_fw_*_config arrays");
-
-	return ARRAY_SIZE(adf_4xxx_fw_cy_config);
+	return ARRAY_SIZE(adf_fw_cy_config);
 }
 
-static const char *uof_get_name_4xxx(struct adf_accel_dev *accel_dev, u32 obj_num)
+static const char *uof_get_name(struct adf_accel_dev *accel_dev, u32 obj_num,
+				const char * const fw_objs[], int num_objs)
 {
+	int id;
+
 	switch (get_service_enabled(accel_dev)) {
 	case SVC_CY:
-		return adf_4xxx_fw_cy_config[obj_num].obj_name;
+		id = adf_fw_cy_config[obj_num].obj;
+		break;
 	case SVC_DC:
-		return adf_4xxx_fw_dc_config[obj_num].obj_name;
+		id = adf_fw_dc_config[obj_num].obj;
+		break;
 	default:
-		return NULL;
+		id = -EINVAL;
+		break;
 	}
+
+	if (id < 0 || id > num_objs)
+		return NULL;
+
+	return fw_objs[id];
+}
+
+static const char *uof_get_name_4xxx(struct adf_accel_dev *accel_dev, u32 obj_num)
+{
+	int num_fw_objs = ARRAY_SIZE(adf_4xxx_fw_objs);
+
+	return uof_get_name(accel_dev, obj_num, adf_4xxx_fw_objs, num_fw_objs);
 }
 
 static const char *uof_get_name_402xx(struct adf_accel_dev *accel_dev, u32 obj_num)
 {
-	switch (get_service_enabled(accel_dev)) {
-	case SVC_CY:
-		return adf_402xx_fw_cy_config[obj_num].obj_name;
-	case SVC_DC:
-		return adf_402xx_fw_dc_config[obj_num].obj_name;
-	default:
-		return NULL;
-	}
+	int num_fw_objs = ARRAY_SIZE(adf_402xx_fw_objs);
+
+	return uof_get_name(accel_dev, obj_num, adf_402xx_fw_objs, num_fw_objs);
 }
 
 static u32 uof_get_ae_mask(struct adf_accel_dev *accel_dev, u32 obj_num)
 {
 	switch (get_service_enabled(accel_dev)) {
 	case SVC_CY:
-		return adf_4xxx_fw_cy_config[obj_num].ae_mask;
+		return adf_fw_cy_config[obj_num].ae_mask;
 	case SVC_DC:
-		return adf_4xxx_fw_dc_config[obj_num].ae_mask;
+		return adf_fw_dc_config[obj_num].ae_mask;
 	default:
 		return 0;
 	}
Signature · 1 line
2.40.1
#4 lore raw

PATCH 4/4 crypto: qat - extend configuration for 4xxx

In reply to Adam Guerin

A QAT GEN4 device can be currently configured for crypto (sym;asym) or compression (dc).

This patch extends the configuration to support more variations of these services, download the correct FW images on the device and report the correct capabilities on the device based on the configured service.

The device can now be configured with the following services:
"sym", "asym", "dc", "sym;asym", "asym;sym", "sym;dc", "dc;sym", "asym;dc", "dc;asym".

With this change, the configuration "sym", "asym", "sym;dc", "dc;sym", "asym;dc", "dc;asym" will be accessible only via userspace, i.e. the driver for those configurations will not register into the crypto framework. Support for such configurations in kernel will be enabled in a later patch.

The pairs "sym;asym" and "asym;sym" result in identical device config. As do "sym;dc", "dc;sym", and "asym;dc", "dc;asym".

---
 Documentation/ABI/testing/sysfs-driver-qat    |  11 ++
 .../intel/qat/qat_4xxx/adf_4xxx_hw_data.c     | 127 +++++++++++++++---
 drivers/crypto/intel/qat/qat_4xxx/adf_drv.c   |  33 +++++
 .../intel/qat/qat_common/adf_cfg_strings.h    |   7 +
 .../crypto/intel/qat/qat_common/adf_sysfs.c   |   7 +
 5 files changed, 163 insertions(+), 22 deletions(-)
Documentation/ABI/testing/sysfs-driver-qat +11 -0
index 087842b1969e..e6d427c41bee 100644
@@ -27,7 +27,18 @@ Description:	(RW) Reports the current configuration of the QAT device.
 
 		* sym;asym: the device is configured for running crypto
 		  services
+		* asym;sym: identical to sym;asym
 		* dc: the device is configured for running compression services
+		* sym: the device is configured for running symmetric crypto
+		  services
+		* asym: the device is configured for running asymmetric crypto
+		  services
+		* asym;dc: the device is configured for running asymmetric
+		  crypto services and compression services
+		* dc;asym: identical to asym;dc
+		* sym;dc: the device is configured for running symmetric crypto
+		  services and compression services
+		* dc;sym: identical to sym;dc
 
 		It is possible to set the configuration only if the device
 		is in the `down` state (see /sys/bus/pci/devices/<BDF>/qat/state)
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c +105 -22

210 lines not on this page · raw message

drivers/crypto/intel/qat/qat_4xxx/adf_drv.c +33 -0
index 3ecc19087780..1a15600361d0 100644
@@ -25,11 +25,25 @@ MODULE_DEVICE_TABLE(pci, adf_pci_tbl);
 enum configs {
 	DEV_CFG_CY = 0,
 	DEV_CFG_DC,
+	DEV_CFG_SYM,
+	DEV_CFG_ASYM,
+	DEV_CFG_ASYM_SYM,
+	DEV_CFG_ASYM_DC,
+	DEV_CFG_DC_ASYM,
+	DEV_CFG_SYM_DC,
+	DEV_CFG_DC_SYM,
 };
 
 static const char * const services_operations[] = {
 	ADF_CFG_CY,
 	ADF_CFG_DC,
+	ADF_CFG_SYM,
+	ADF_CFG_ASYM,
+	ADF_CFG_ASYM_SYM,
+	ADF_CFG_ASYM_DC,
+	ADF_CFG_DC_ASYM,
+	ADF_CFG_SYM_DC,
+	ADF_CFG_DC_SYM,
 };
 
 static void adf_cleanup_accel(struct adf_accel_dev *accel_dev)
@@ -242,6 +256,21 @@ static int adf_comp_dev_config(struct adf_accel_dev *accel_dev)
 	return ret;
 }
 
+static int adf_no_dev_config(struct adf_accel_dev *accel_dev)
+{
+	unsigned long val;
+	int ret;
+
+	val = 0;
+	ret = adf_cfg_add_key_value_param(accel_dev, ADF_KERNEL_SEC, ADF_NUM_DC,
+					  &val, ADF_DEC);
+	if (ret)
+		return ret;
+
+	return adf_cfg_add_key_value_param(accel_dev, ADF_KERNEL_SEC, ADF_NUM_CY,
+					  &val, ADF_DEC);
+}
+
 int adf_gen4_dev_config(struct adf_accel_dev *accel_dev)
 {
 	char services[ADF_CFG_MAX_VAL_LEN_IN_BYTES] = {0};
@@ -266,11 +295,15 @@ int adf_gen4_dev_config(struct adf_accel_dev *accel_dev)
 
 	switch (ret) {
 	case DEV_CFG_CY:
+	case DEV_CFG_ASYM_SYM:
 		ret = adf_crypto_dev_config(accel_dev);
 		break;
 	case DEV_CFG_DC:
 		ret = adf_comp_dev_config(accel_dev);
 		break;
+	default:
+		ret = adf_no_dev_config(accel_dev);
+		break;
 	}
 
 	if (ret)
drivers/crypto/intel/qat/qat_common/adf_cfg_strings.h +7 -0
index 5d8c3bdb258c..b6a9abe6d98c 100644
@@ -25,6 +25,13 @@
 #define ADF_DC "Dc"
 #define ADF_CFG_DC "dc"
 #define ADF_CFG_CY "sym;asym"
+#define ADF_CFG_SYM "sym"
+#define ADF_CFG_ASYM "asym"
+#define ADF_CFG_ASYM_SYM "asym;sym"
+#define ADF_CFG_ASYM_DC "asym;dc"
+#define ADF_CFG_DC_ASYM "dc;asym"
+#define ADF_CFG_SYM_DC "sym;dc"
+#define ADF_CFG_DC_SYM "dc;sym"
 #define ADF_SERVICES_ENABLED "ServicesEnabled"
 #define ADF_ETRMGR_COALESCING_ENABLED "InterruptCoalescingEnabled"
 #define ADF_ETRMGR_COALESCING_ENABLED_FORMAT \
drivers/crypto/intel/qat/qat_common/adf_sysfs.c +7 -0
index 3eb6611ab1b1..b2ec92322dd8 100644
@@ -78,6 +78,13 @@ static ssize_t state_store(struct device *dev, struct device_attribute *attr,
 static const char * const services_operations[] = {
 	ADF_CFG_CY,
 	ADF_CFG_DC,
+	ADF_CFG_SYM,
+	ADF_CFG_ASYM,
+	ADF_CFG_ASYM_SYM,
+	ADF_CFG_ASYM_DC,
+	ADF_CFG_DC_ASYM,
+	ADF_CFG_SYM_DC,
+	ADF_CFG_DC_SYM,
 };
 
 static ssize_t cfg_services_show(struct device *dev, struct device_attribute *attr,
Signature · 1 line
2.40.1
maintainer
#5 lore raw
In reply to Adam Guerin
Quoted 28 lines · Adam Guerin

This set extends the configuration of the device to accept more variations of the configurable services and the device is configured correctly based on the configured service. Refactoring the FW config logic to avoid duplication. Loading the correct FW based on the type and configuration of the device also reporting the correct capabilities for the configured service.

Adam Guerin (2):
crypto: qat - move returns to default case
crypto: qat - extend configuration for 4xxx

Giovanni Cabiddu (2):
crypto: qat - make fw images name constant
crypto: qat - refactor fw config logic for 4xxx

 Documentation/ABI/testing/sysfs-driver-qat    |  11 +
 .../intel/qat/qat_4xxx/adf_4xxx_hw_data.c     | 229 +++++++++++++-----
 drivers/crypto/intel/qat/qat_4xxx/adf_drv.c   |  33 +++
 .../intel/qat/qat_common/adf_accel_devices.h  |   2 +-
 .../intel/qat/qat_common/adf_accel_engine.c   |   2 +-
 .../intel/qat/qat_common/adf_cfg_strings.h    |   7 +
 .../intel/qat/qat_common/adf_common_drv.h     |   2 +-
 .../crypto/intel/qat/qat_common/adf_sysfs.c   |   7 +
 .../crypto/intel/qat/qat_common/qat_algs.c    |   1 -
 .../crypto/intel/qat/qat_common/qat_uclo.c    |   8 +-
 10 files changed, 231 insertions(+), 71 deletions(-)
Quoted 3 lines

base-commit: 6b5755b35497de5e8ed17772f7b0dd1bbe19cbee

Signature · 1 line
2.40.1

All applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt