diff options
author | Tadeusz Struk <tadeusz.struk@intel.com> | 2014-07-25 18:55:52 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-08-01 10:36:08 -0400 |
commit | 689917211cb9d4ca6f90765eeb228ac2727f5dbc (patch) | |
tree | 9ad0d26276189b2ac3116b9a2bba4bb5384998ff /drivers/crypto/qat/qat_common | |
parent | 9a147cb3232fd8dbd44ed4628c6c0d05033d4c61 (diff) |
crypto: qat - Updated print outputs
Updated pr_err output to make it more consistent.
Signed-off-by: Pingchao Yang <pingchao.yang@intel.com>
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/qat/qat_common')
-rw-r--r-- | drivers/crypto/qat/qat_common/adf_accel_engine.c | 4 | ||||
-rw-r--r-- | drivers/crypto/qat/qat_common/adf_init.c | 2 | ||||
-rw-r--r-- | drivers/crypto/qat/qat_common/qat_hal.c | 3 | ||||
-rw-r--r-- | drivers/crypto/qat/qat_common/qat_uclo.c | 18 |
4 files changed, 13 insertions, 14 deletions
diff --git a/drivers/crypto/qat/qat_common/adf_accel_engine.c b/drivers/crypto/qat/qat_common/adf_accel_engine.c index 25801fe3c375..c77453b900a3 100644 --- a/drivers/crypto/qat/qat_common/adf_accel_engine.c +++ b/drivers/crypto/qat/qat_common/adf_accel_engine.c | |||
@@ -67,11 +67,11 @@ int adf_ae_fw_load(struct adf_accel_dev *accel_dev) | |||
67 | uof_size = loader_data->uof_fw->size; | 67 | uof_size = loader_data->uof_fw->size; |
68 | uof_addr = (void *)loader_data->uof_fw->data; | 68 | uof_addr = (void *)loader_data->uof_fw->data; |
69 | if (qat_uclo_map_uof_obj(loader_data->fw_loader, uof_addr, uof_size)) { | 69 | if (qat_uclo_map_uof_obj(loader_data->fw_loader, uof_addr, uof_size)) { |
70 | pr_err("QAT: Failed to map uof\n"); | 70 | pr_err("QAT: Failed to map UOF\n"); |
71 | goto out_err; | 71 | goto out_err; |
72 | } | 72 | } |
73 | if (qat_uclo_wr_all_uimage(loader_data->fw_loader)) { | 73 | if (qat_uclo_wr_all_uimage(loader_data->fw_loader)) { |
74 | pr_err("QAT: Failed to map uof\n"); | 74 | pr_err("QAT: Failed to map UOF\n"); |
75 | goto out_err; | 75 | goto out_err; |
76 | } | 76 | } |
77 | return 0; | 77 | return 0; |
diff --git a/drivers/crypto/qat/qat_common/adf_init.c b/drivers/crypto/qat/qat_common/adf_init.c index 5c3d6f12951a..5c0e47a00a87 100644 --- a/drivers/crypto/qat/qat_common/adf_init.c +++ b/drivers/crypto/qat/qat_common/adf_init.c | |||
@@ -136,7 +136,7 @@ int adf_dev_start(struct adf_accel_dev *accel_dev) | |||
136 | set_bit(ADF_STATUS_AE_INITIALISED, &accel_dev->status); | 136 | set_bit(ADF_STATUS_AE_INITIALISED, &accel_dev->status); |
137 | 137 | ||
138 | if (adf_ae_fw_load(accel_dev)) { | 138 | if (adf_ae_fw_load(accel_dev)) { |
139 | pr_err("Failed to load acceleration FW\n"); | 139 | pr_err("QAT: Failed to load acceleration FW\n"); |
140 | adf_ae_fw_release(accel_dev); | 140 | adf_ae_fw_release(accel_dev); |
141 | return -EFAULT; | 141 | return -EFAULT; |
142 | } | 142 | } |
diff --git a/drivers/crypto/qat/qat_common/qat_hal.c b/drivers/crypto/qat/qat_common/qat_hal.c index da9626b6b6b4..8d686a2edde6 100644 --- a/drivers/crypto/qat/qat_common/qat_hal.c +++ b/drivers/crypto/qat/qat_common/qat_hal.c | |||
@@ -849,8 +849,7 @@ static int qat_hal_exec_micro_inst(struct icp_qat_fw_loader_handle *handle, | |||
849 | unsigned int ctxarb_ctl, ctx_enables; | 849 | unsigned int ctxarb_ctl, ctx_enables; |
850 | 850 | ||
851 | if ((inst_num > handle->hal_handle->max_ustore) || !micro_inst) { | 851 | if ((inst_num > handle->hal_handle->max_ustore) || !micro_inst) { |
852 | pr_err("QAT: invalid instructs inst_num=%d, micro_inst=0x%p\n ", | 852 | pr_err("QAT: invalid instruction num %d\n", inst_num); |
853 | inst_num, micro_inst); | ||
854 | return -EINVAL; | 853 | return -EINVAL; |
855 | } | 854 | } |
856 | /* save current context */ | 855 | /* save current context */ |
diff --git a/drivers/crypto/qat/qat_common/qat_uclo.c b/drivers/crypto/qat/qat_common/qat_uclo.c index ebd5da03dc71..258009178031 100644 --- a/drivers/crypto/qat/qat_common/qat_uclo.c +++ b/drivers/crypto/qat/qat_common/qat_uclo.c | |||
@@ -132,7 +132,7 @@ static int qat_uclo_check_format(struct icp_qat_uof_filehdr *hdr) | |||
132 | return -EINVAL; | 132 | return -EINVAL; |
133 | } | 133 | } |
134 | if (min != ICP_QAT_UOF_MINVER || maj != ICP_QAT_UOF_MAJVER) { | 134 | if (min != ICP_QAT_UOF_MINVER || maj != ICP_QAT_UOF_MAJVER) { |
135 | pr_err("QAT: bad uof version, major 0x%x, minor 0x%x\n", | 135 | pr_err("QAT: bad UOF version, major 0x%x, minor 0x%x\n", |
136 | maj, min); | 136 | maj, min); |
137 | return -EINVAL; | 137 | return -EINVAL; |
138 | } | 138 | } |
@@ -249,7 +249,7 @@ static int qat_uclo_fetch_initmem_ae(struct icp_qat_fw_loader_handle *handle, | |||
249 | } | 249 | } |
250 | str = qat_uclo_get_string(&obj_handle->str_table, init_mem->sym_name); | 250 | str = qat_uclo_get_string(&obj_handle->str_table, init_mem->sym_name); |
251 | if (!str) { | 251 | if (!str) { |
252 | pr_err("QAT: AE name assigned in uof init table is NULL\n"); | 252 | pr_err("QAT: AE name assigned in UOF init table is NULL\n"); |
253 | return -EINVAL; | 253 | return -EINVAL; |
254 | } | 254 | } |
255 | if (qat_uclo_parse_num(str, ae)) { | 255 | if (qat_uclo_parse_num(str, ae)) { |
@@ -751,14 +751,14 @@ static int qat_uclo_check_uof_compat(struct icp_qat_uclo_objhandle *obj_handle) | |||
751 | unsigned int maj_ver, prod_type = obj_handle->prod_type; | 751 | unsigned int maj_ver, prod_type = obj_handle->prod_type; |
752 | 752 | ||
753 | if (!(prod_type & obj_handle->encap_uof_obj.obj_hdr->cpu_type)) { | 753 | if (!(prod_type & obj_handle->encap_uof_obj.obj_hdr->cpu_type)) { |
754 | pr_err("QAT: uof type 0x%x not match with cur platform 0x%x\n", | 754 | pr_err("QAT: UOF type 0x%x not match with cur platform 0x%x\n", |
755 | obj_handle->encap_uof_obj.obj_hdr->cpu_type, prod_type); | 755 | obj_handle->encap_uof_obj.obj_hdr->cpu_type, prod_type); |
756 | return -EINVAL; | 756 | return -EINVAL; |
757 | } | 757 | } |
758 | maj_ver = obj_handle->prod_rev & 0xff; | 758 | maj_ver = obj_handle->prod_rev & 0xff; |
759 | if ((obj_handle->encap_uof_obj.obj_hdr->max_cpu_ver < maj_ver) || | 759 | if ((obj_handle->encap_uof_obj.obj_hdr->max_cpu_ver < maj_ver) || |
760 | (obj_handle->encap_uof_obj.obj_hdr->min_cpu_ver > maj_ver)) { | 760 | (obj_handle->encap_uof_obj.obj_hdr->min_cpu_ver > maj_ver)) { |
761 | pr_err("QAT: uof majVer 0x%x out of range\n", maj_ver); | 761 | pr_err("QAT: UOF majVer 0x%x out of range\n", maj_ver); |
762 | return -EINVAL; | 762 | return -EINVAL; |
763 | } | 763 | } |
764 | return 0; | 764 | return 0; |
@@ -868,7 +868,7 @@ static int qat_uclo_init_globals(struct icp_qat_fw_loader_handle *handle) | |||
868 | return 0; | 868 | return 0; |
869 | if (obj_handle->init_mem_tab.entry_num) { | 869 | if (obj_handle->init_mem_tab.entry_num) { |
870 | if (qat_uclo_init_memory(handle)) { | 870 | if (qat_uclo_init_memory(handle)) { |
871 | pr_err("QAT: initalize memory failed\n"); | 871 | pr_err("QAT: initialize memory failed\n"); |
872 | return -EINVAL; | 872 | return -EINVAL; |
873 | } | 873 | } |
874 | } | 874 | } |
@@ -917,13 +917,13 @@ static int qat_uclo_set_ae_mode(struct icp_qat_fw_loader_handle *handle) | |||
917 | if (qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM0, | 917 | if (qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM0, |
918 | (char)ICP_QAT_LOC_MEM0_MODE | 918 | (char)ICP_QAT_LOC_MEM0_MODE |
919 | (uof_image->ae_mode))) { | 919 | (uof_image->ae_mode))) { |
920 | pr_err("QAT: qat_hal_set_ae_lm_mode error\n "); | 920 | pr_err("QAT: qat_hal_set_ae_lm_mode LMEM0 error\n"); |
921 | return -EFAULT; | 921 | return -EFAULT; |
922 | } | 922 | } |
923 | if (qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM1, | 923 | if (qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM1, |
924 | (char)ICP_QAT_LOC_MEM1_MODE | 924 | (char)ICP_QAT_LOC_MEM1_MODE |
925 | (uof_image->ae_mode))) { | 925 | (uof_image->ae_mode))) { |
926 | pr_err("QAT: qat_hal_set_ae_lm_mode error\n "); | 926 | pr_err("QAT: qat_hal_set_ae_lm_mode LMEM1 error\n"); |
927 | return -EFAULT; | 927 | return -EFAULT; |
928 | } | 928 | } |
929 | } | 929 | } |
@@ -961,14 +961,14 @@ static int qat_uclo_parse_uof_obj(struct icp_qat_fw_loader_handle *handle) | |||
961 | obj_handle->prod_rev = PID_MAJOR_REV | | 961 | obj_handle->prod_rev = PID_MAJOR_REV | |
962 | (PID_MINOR_REV & handle->hal_handle->revision_id); | 962 | (PID_MINOR_REV & handle->hal_handle->revision_id); |
963 | if (qat_uclo_check_uof_compat(obj_handle)) { | 963 | if (qat_uclo_check_uof_compat(obj_handle)) { |
964 | pr_err("QAT: uof incompatible\n"); | 964 | pr_err("QAT: UOF incompatible\n"); |
965 | return -EINVAL; | 965 | return -EINVAL; |
966 | } | 966 | } |
967 | obj_handle->ustore_phy_size = ICP_QAT_UCLO_MAX_USTORE; | 967 | obj_handle->ustore_phy_size = ICP_QAT_UCLO_MAX_USTORE; |
968 | if (!obj_handle->obj_hdr->file_buff || | 968 | if (!obj_handle->obj_hdr->file_buff || |
969 | !qat_uclo_map_str_table(obj_handle->obj_hdr, ICP_QAT_UOF_STRT, | 969 | !qat_uclo_map_str_table(obj_handle->obj_hdr, ICP_QAT_UOF_STRT, |
970 | &obj_handle->str_table)) { | 970 | &obj_handle->str_table)) { |
971 | pr_err("QAT: uof doesn't have effective images\n"); | 971 | pr_err("QAT: UOF doesn't have effective images\n"); |
972 | goto out_err; | 972 | goto out_err; |
973 | } | 973 | } |
974 | obj_handle->uimage_num = | 974 | obj_handle->uimage_num = |