Commit 624e62cc authored by Wojciech Ziemba's avatar Wojciech Ziemba Committed by Herbert Xu

crypto: qat - update fw init admin msg

This patch tidies up the definition of init/admin request and response
messages by removing the icp_qat_fw_init_admin_resp_pars structure
and embedding it into icp_qat_fw_init_admin_resp.
Signed-off-by: default avatarWojciech Ziemba <wojciech.ziemba@intel.com>
Signed-off-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent c31b4ade
...@@ -152,7 +152,7 @@ static int adf_send_admin_cmd(struct adf_accel_dev *accel_dev, int cmd) ...@@ -152,7 +152,7 @@ static int adf_send_admin_cmd(struct adf_accel_dev *accel_dev, int cmd)
int i; int i;
memset(&req, 0, sizeof(struct icp_qat_fw_init_admin_req)); memset(&req, 0, sizeof(struct icp_qat_fw_init_admin_req));
req.init_admin_cmd_id = cmd; req.cmd_id = cmd;
if (cmd == ICP_QAT_FW_CONSTANTS_CFG) { if (cmd == ICP_QAT_FW_CONSTANTS_CFG) {
req.init_cfg_sz = 1024; req.init_cfg_sz = 1024;
...@@ -161,7 +161,7 @@ static int adf_send_admin_cmd(struct adf_accel_dev *accel_dev, int cmd) ...@@ -161,7 +161,7 @@ static int adf_send_admin_cmd(struct adf_accel_dev *accel_dev, int cmd)
for (i = 0; i < hw_device->get_num_aes(hw_device); i++) { for (i = 0; i < hw_device->get_num_aes(hw_device); i++) {
memset(&resp, 0, sizeof(struct icp_qat_fw_init_admin_resp)); memset(&resp, 0, sizeof(struct icp_qat_fw_init_admin_resp));
if (adf_put_admin_msg_sync(accel_dev, i, &req, &resp) || if (adf_put_admin_msg_sync(accel_dev, i, &req, &resp) ||
resp.init_resp_hdr.status) resp.status)
return -EFAULT; return -EFAULT;
} }
return 0; return 0;
......
...@@ -25,48 +25,73 @@ enum icp_qat_fw_init_admin_resp_status { ...@@ -25,48 +25,73 @@ enum icp_qat_fw_init_admin_resp_status {
struct icp_qat_fw_init_admin_req { struct icp_qat_fw_init_admin_req {
__u16 init_cfg_sz; __u16 init_cfg_sz;
__u8 resrvd1; __u8 resrvd1;
__u8 init_admin_cmd_id; __u8 cmd_id;
__u32 resrvd2; __u32 resrvd2;
__u64 opaque_data; __u64 opaque_data;
__u64 init_cfg_ptr; __u64 init_cfg_ptr;
__u64 resrvd3;
union {
struct {
__u16 ibuf_size_in_kb;
__u16 resrvd3;
};
__u32 idle_filter;
};
__u32 resrvd4;
}; };
struct icp_qat_fw_init_admin_resp_hdr { struct icp_qat_fw_init_admin_resp {
__u8 flags; __u8 flags;
__u8 resrvd1; __u8 resrvd1;
__u8 status; __u8 status;
__u8 init_admin_cmd_id; __u8 cmd_id;
}; union {
__u32 resrvd2;
struct icp_qat_fw_init_admin_resp_pars { struct {
__u16 version_minor_num;
__u16 version_major_num;
};
};
__u64 opaque_data;
union { union {
__u32 resrvd1[ICP_QAT_FW_NUM_LONGWORDS_4]; __u32 resrvd3[ICP_QAT_FW_NUM_LONGWORDS_4];
struct { struct {
__u32 version_patch_num; __u32 version_patch_num;
__u8 context_id; __u8 context_id;
__u8 ae_id; __u8 ae_id;
__u16 resrvd1; __u16 resrvd4;
__u64 resrvd2; __u64 resrvd5;
} s1; };
struct { struct {
__u64 req_rec_count; __u64 req_rec_count;
__u64 resp_sent_count; __u64 resp_sent_count;
} s2; };
} u;
};
struct icp_qat_fw_init_admin_resp {
struct icp_qat_fw_init_admin_resp_hdr init_resp_hdr;
union {
__u32 resrvd2;
struct { struct {
__u16 version_minor_num; __u16 compression_algos;
__u16 version_major_num; __u16 checksum_algos;
} s; __u32 deflate_capabilities;
} u; __u32 resrvd6;
__u64 opaque_data; __u32 lzs_capabilities;
struct icp_qat_fw_init_admin_resp_pars init_resp_pars; };
struct {
__u32 cipher_algos;
__u32 hash_algos;
__u16 keygen_algos;
__u16 other;
__u16 public_key_algos;
__u16 prime_algos;
};
struct {
__u64 timestamp;
__u64 resrvd7;
};
struct {
__u32 successful_count;
__u32 unsuccessful_count;
__u64 resrvd8;
};
};
}; };
#define ICP_QAT_FW_COMN_HEARTBEAT_OK 0 #define ICP_QAT_FW_COMN_HEARTBEAT_OK 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment