Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: qat - do not rely on min version

Remove min_iov_compat_ver field as for now all versions are compatible.

Compatibility is determined by a series of rules and dynamic conditions
such as specific configurations.
In any case the minimum version requirement for compatibility is
an inadequate and obsolete approach which should be removed.

At this time compatibility can be assured across the currently available
versions.

Signed-off-by: Marco Chiappero <marco.chiappero@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Marco Chiappero and committed by
Herbert Xu
e669b4de c35c76c6

+9 -33
-2
drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c
··· 4 4 #include <adf_accel_devices.h> 5 5 #include <adf_common_drv.h> 6 6 #include <adf_gen4_hw_data.h> 7 - #include <adf_pfvf_msg.h> 8 7 #include "adf_4xxx_hw_data.h" 9 8 #include "icp_qat_hw.h" 10 9 ··· 256 257 hw_data->pfvf_ops.enable_comms = adf_pfvf_comms_disabled; 257 258 hw_data->pfvf_ops.get_vf2pf_sources = get_vf2pf_sources; 258 259 hw_data->disable_iov = adf_disable_sriov; 259 - hw_data->min_iov_compat_ver = ADF_PFVF_COMPAT_THIS_VERSION; 260 260 261 261 adf_gen4_init_hw_csr_ops(&hw_data->csr_ops); 262 262 }
-2
drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.c
··· 4 4 #include <adf_common_drv.h> 5 5 #include <adf_gen2_hw_data.h> 6 6 #include <adf_gen2_pfvf.h> 7 - #include <adf_pfvf_msg.h> 8 7 #include "adf_c3xxx_hw_data.h" 9 8 #include "icp_qat_hw.h" 10 9 ··· 136 137 hw_data->reset_device = adf_reset_flr; 137 138 hw_data->set_ssm_wdtimer = adf_gen2_set_ssm_wdtimer; 138 139 hw_data->disable_iov = adf_disable_sriov; 139 - hw_data->min_iov_compat_ver = ADF_PFVF_COMPAT_THIS_VERSION; 140 140 141 141 adf_gen2_init_pf_pfvf_ops(&hw_data->pfvf_ops); 142 142 adf_gen2_init_hw_csr_ops(&hw_data->csr_ops);
-2
drivers/crypto/qat/qat_c3xxxvf/adf_c3xxxvf_hw_data.c
··· 4 4 #include <adf_common_drv.h> 5 5 #include <adf_gen2_hw_data.h> 6 6 #include <adf_gen2_pfvf.h> 7 - #include <adf_pfvf_msg.h> 8 7 #include <adf_pfvf_vf_msg.h> 9 8 #include "adf_c3xxxvf_hw_data.h" 10 9 ··· 84 85 hw_data->get_misc_bar_id = get_misc_bar_id; 85 86 hw_data->get_sku = get_sku; 86 87 hw_data->enable_ints = adf_vf_void_noop; 87 - hw_data->min_iov_compat_ver = ADF_PFVF_COMPAT_THIS_VERSION; 88 88 hw_data->dev_class->instances++; 89 89 adf_devmgr_update_class_index(hw_data); 90 90 adf_gen2_init_vf_pfvf_ops(&hw_data->pfvf_ops);
-2
drivers/crypto/qat/qat_c62x/adf_c62x_hw_data.c
··· 4 4 #include <adf_common_drv.h> 5 5 #include <adf_gen2_hw_data.h> 6 6 #include <adf_gen2_pfvf.h> 7 - #include <adf_pfvf_msg.h> 8 7 #include "adf_c62x_hw_data.h" 9 8 #include "icp_qat_hw.h" 10 9 ··· 138 139 hw_data->reset_device = adf_reset_flr; 139 140 hw_data->set_ssm_wdtimer = adf_gen2_set_ssm_wdtimer; 140 141 hw_data->disable_iov = adf_disable_sriov; 141 - hw_data->min_iov_compat_ver = ADF_PFVF_COMPAT_THIS_VERSION; 142 142 143 143 adf_gen2_init_pf_pfvf_ops(&hw_data->pfvf_ops); 144 144 adf_gen2_init_hw_csr_ops(&hw_data->csr_ops);
-2
drivers/crypto/qat/qat_c62xvf/adf_c62xvf_hw_data.c
··· 4 4 #include <adf_common_drv.h> 5 5 #include <adf_gen2_hw_data.h> 6 6 #include <adf_gen2_pfvf.h> 7 - #include <adf_pfvf_msg.h> 8 7 #include <adf_pfvf_vf_msg.h> 9 8 #include "adf_c62xvf_hw_data.h" 10 9 ··· 84 85 hw_data->get_misc_bar_id = get_misc_bar_id; 85 86 hw_data->get_sku = get_sku; 86 87 hw_data->enable_ints = adf_vf_void_noop; 87 - hw_data->min_iov_compat_ver = ADF_PFVF_COMPAT_THIS_VERSION; 88 88 hw_data->dev_class->instances++; 89 89 adf_devmgr_update_class_index(hw_data); 90 90 adf_gen2_init_vf_pfvf_ops(&hw_data->pfvf_ops);
-1
drivers/crypto/qat/qat_common/adf_accel_devices.h
··· 209 209 u8 num_accel; 210 210 u8 num_logical_accel; 211 211 u8 num_engines; 212 - u8 min_iov_compat_ver; 213 212 }; 214 213 215 214 /* CSR write macro */
+7 -13
drivers/crypto/qat/qat_common/adf_pfvf_pf_proto.c
··· 40 40 u32 msg, u32 *response) 41 41 { 42 42 struct adf_accel_vf_info *vf_info = &accel_dev->pf.vf_info[vf_nr]; 43 - struct adf_hw_device_data *hw_data = accel_dev->hw_device; 44 43 u32 resp = 0; 45 44 46 45 switch ((msg & ADF_VF2PF_MSGTYPE_MASK) >> ADF_VF2PF_MSGTYPE_SHIFT) { ··· 52 53 "Compatibility Version Request from VF%d vers=%u\n", 53 54 vf_nr + 1, vf_compat_ver); 54 55 55 - if (vf_compat_ver < hw_data->min_iov_compat_ver) { 56 - dev_err(&GET_DEV(accel_dev), 57 - "VF (vers %d) incompatible with PF (vers %d)\n", 58 - vf_compat_ver, ADF_PFVF_COMPAT_THIS_VERSION); 59 - compat = ADF_PF2VF_VF_INCOMPATIBLE; 60 - } else if (vf_compat_ver > ADF_PFVF_COMPAT_THIS_VERSION) { 61 - dev_err(&GET_DEV(accel_dev), 62 - "VF (vers %d) compat with PF (vers %d) unkn.\n", 63 - vf_compat_ver, ADF_PFVF_COMPAT_THIS_VERSION); 64 - compat = ADF_PF2VF_VF_COMPAT_UNKNOWN; 65 - } else { 56 + if (vf_compat_ver <= ADF_PFVF_COMPAT_THIS_VERSION) { 57 + compat = ADF_PF2VF_VF_COMPATIBLE; 66 58 dev_dbg(&GET_DEV(accel_dev), 67 59 "VF (vers %d) compatible with PF (vers %d)\n", 68 60 vf_compat_ver, ADF_PFVF_COMPAT_THIS_VERSION); 69 - compat = ADF_PF2VF_VF_COMPATIBLE; 61 + } else { 62 + compat = ADF_PF2VF_VF_COMPAT_UNKNOWN; 63 + dev_err(&GET_DEV(accel_dev), 64 + "VF (vers %d) compat with PF (vers %d) unkn.\n", 65 + vf_compat_ver, ADF_PFVF_COMPAT_THIS_VERSION); 70 66 } 71 67 72 68 resp = ADF_PF2VF_MSGORIGIN_SYSTEM;
+2 -5
drivers/crypto/qat/qat_common/adf_pfvf_vf_msg.c
··· 51 51 52 52 int adf_vf2pf_request_version(struct adf_accel_dev *accel_dev) 53 53 { 54 - struct adf_hw_device_data *hw_data = accel_dev->hw_device; 55 54 u8 pf_version; 56 55 u32 msg = 0; 57 56 int compat; ··· 79 80 case ADF_PF2VF_VF_COMPATIBLE: 80 81 break; 81 82 case ADF_PF2VF_VF_COMPAT_UNKNOWN: 82 - /* VF is newer than PF and decides whether it is compatible */ 83 - if (pf_version >= hw_data->min_iov_compat_ver) 84 - break; 85 - fallthrough; 83 + /* VF is newer than PF - compatible for now */ 84 + break; 86 85 case ADF_PF2VF_VF_INCOMPATIBLE: 87 86 dev_err(&GET_DEV(accel_dev), 88 87 "PF (vers %d) and VF (vers %d) are not compatible\n",
-2
drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c
··· 4 4 #include <adf_common_drv.h> 5 5 #include <adf_gen2_hw_data.h> 6 6 #include <adf_gen2_pfvf.h> 7 - #include <adf_pfvf_msg.h> 8 7 #include "adf_dh895xcc_hw_data.h" 9 8 #include "icp_qat_hw.h" 10 9 ··· 215 216 hw_data->enable_ints = adf_enable_ints; 216 217 hw_data->reset_device = adf_reset_sbr; 217 218 hw_data->disable_iov = adf_disable_sriov; 218 - hw_data->min_iov_compat_ver = ADF_PFVF_COMPAT_THIS_VERSION; 219 219 220 220 adf_gen2_init_pf_pfvf_ops(&hw_data->pfvf_ops); 221 221 hw_data->pfvf_ops.get_vf2pf_sources = get_vf2pf_sources;
-2
drivers/crypto/qat/qat_dh895xccvf/adf_dh895xccvf_hw_data.c
··· 4 4 #include <adf_common_drv.h> 5 5 #include <adf_gen2_hw_data.h> 6 6 #include <adf_gen2_pfvf.h> 7 - #include <adf_pfvf_msg.h> 8 7 #include <adf_pfvf_vf_msg.h> 9 8 #include "adf_dh895xccvf_hw_data.h" 10 9 ··· 84 85 hw_data->get_misc_bar_id = get_misc_bar_id; 85 86 hw_data->get_sku = get_sku; 86 87 hw_data->enable_ints = adf_vf_void_noop; 87 - hw_data->min_iov_compat_ver = ADF_PFVF_COMPAT_THIS_VERSION; 88 88 hw_data->dev_class->instances++; 89 89 adf_devmgr_update_class_index(hw_data); 90 90 adf_gen2_init_vf_pfvf_ops(&hw_data->pfvf_ops);