]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
crypto: qat - fix naming of PF/VF enable functions
authorMarco Chiappero <marco.chiappero@intel.com>
Thu, 12 Aug 2021 20:21:25 +0000 (21:21 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 21 Aug 2021 07:44:56 +0000 (15:44 +0800)
Currently all the functions related to the activation of the PFVF
protocol, both on PF and VF, include the direction specific "vf2pf"
name.

Replace the existing naming schema with:
  - a direction agnostic naming, that applies to both PF and VF, for the
    function pointer ("pfvf")
  - a direction specific naming schema for the implementations ("pf2vf" or
    "vf2pf")

In particular this patch renames:
  - adf_pf_enable_vf2pf_comms() in adf_enable_pf2vf_comms()
  - enable_vf2pf_comms() in enable_pfvf_comms()

Signed-off-by: Marco Chiappero <marco.chiappero@intel.com>
Co-developed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c
drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.c
drivers/crypto/qat/qat_c3xxxvf/adf_c3xxxvf_hw_data.c
drivers/crypto/qat/qat_c62x/adf_c62x_hw_data.c
drivers/crypto/qat/qat_c62xvf/adf_c62xvf_hw_data.c
drivers/crypto/qat/qat_common/adf_accel_devices.h
drivers/crypto/qat/qat_common/adf_init.c
drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c
drivers/crypto/qat/qat_dh895xccvf/adf_dh895xccvf_hw_data.c

index 82e67d6795136c4d564b2f20d79448aa10770c9a..33d8e50dcbdacf91414270fe96ceb997a96e7b26 100644 (file)
@@ -161,7 +161,7 @@ static void adf_enable_ints(struct adf_accel_dev *accel_dev)
        ADF_CSR_WR(addr, ADF_4XXX_SMIAPF_MASK_OFFSET, 0);
 }
 
-static int adf_pf_enable_vf2pf_comms(struct adf_accel_dev *accel_dev)
+static int adf_enable_pf2vf_comms(struct adf_accel_dev *accel_dev)
 {
        return 0;
 }
@@ -222,7 +222,7 @@ void adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data)
        hw_data->uof_get_ae_mask = uof_get_ae_mask;
        hw_data->set_msix_rttable = set_msix_default_rttable;
        hw_data->set_ssm_wdtimer = adf_gen4_set_ssm_wdtimer;
-       hw_data->enable_vf2pf_comms = adf_pf_enable_vf2pf_comms;
+       hw_data->enable_pfvf_comms = adf_enable_pf2vf_comms;
        hw_data->disable_iov = adf_disable_sriov;
        hw_data->min_iov_compat_ver = ADF_PFVF_COMPAT_THIS_VERSION;
 
index 45f3905f7f358593f9c5b838b2a9f94f868abd8a..569d4a9fd8cf20adcd7aca7fe90cf73809a6975c 100644 (file)
@@ -159,7 +159,7 @@ static void adf_enable_ints(struct adf_accel_dev *accel_dev)
                   ADF_C3XXX_SMIA1_MASK);
 }
 
-static int adf_pf_enable_vf2pf_comms(struct adf_accel_dev *accel_dev)
+static int adf_enable_pf2vf_comms(struct adf_accel_dev *accel_dev)
 {
        spin_lock_init(&accel_dev->pf.vf2pf_ints_lock);
 
@@ -212,7 +212,7 @@ void adf_init_hw_data_c3xxx(struct adf_hw_device_data *hw_data)
        hw_data->reset_device = adf_reset_flr;
        hw_data->set_ssm_wdtimer = adf_gen2_set_ssm_wdtimer;
        hw_data->get_pf2vf_offset = get_pf2vf_offset;
-       hw_data->enable_vf2pf_comms = adf_pf_enable_vf2pf_comms;
+       hw_data->enable_pfvf_comms = adf_enable_pf2vf_comms;
        hw_data->disable_iov = adf_disable_sriov;
        hw_data->min_iov_compat_ver = ADF_PFVF_COMPAT_THIS_VERSION;
 
index da0790f26574c72af19848243d8a4cc9f2f90572..3f840560d702e2e9bf101ea77e5c14ccac09d075 100644 (file)
@@ -95,7 +95,7 @@ void adf_init_hw_data_c3xxxiov(struct adf_hw_device_data *hw_data)
        hw_data->get_vintmsk_offset = get_vintmsk_offset;
        hw_data->get_sku = get_sku;
        hw_data->enable_ints = adf_vf_void_noop;
-       hw_data->enable_vf2pf_comms = adf_enable_vf2pf_comms;
+       hw_data->enable_pfvf_comms = adf_enable_vf2pf_comms;
        hw_data->min_iov_compat_ver = ADF_PFVF_COMPAT_THIS_VERSION;
        hw_data->dev_class->instances++;
        adf_devmgr_update_class_index(hw_data);
index dbce08b753c76718ccad4d2dfdb4c41829c95361..6660001d4297515c8936bdaad584f63473a93bea 100644 (file)
@@ -160,7 +160,7 @@ static void adf_enable_ints(struct adf_accel_dev *accel_dev)
                   ADF_C62X_SMIA1_MASK);
 }
 
-static int adf_pf_enable_vf2pf_comms(struct adf_accel_dev *accel_dev)
+static int adf_enable_pf2vf_comms(struct adf_accel_dev *accel_dev)
 {
        spin_lock_init(&accel_dev->pf.vf2pf_ints_lock);
 
@@ -213,7 +213,7 @@ void adf_init_hw_data_c62x(struct adf_hw_device_data *hw_data)
        hw_data->reset_device = adf_reset_flr;
        hw_data->set_ssm_wdtimer = adf_gen2_set_ssm_wdtimer;
        hw_data->get_pf2vf_offset = get_pf2vf_offset;
-       hw_data->enable_vf2pf_comms = adf_pf_enable_vf2pf_comms;
+       hw_data->enable_pfvf_comms = adf_enable_pf2vf_comms;
        hw_data->disable_iov = adf_disable_sriov;
        hw_data->min_iov_compat_ver = ADF_PFVF_COMPAT_THIS_VERSION;
 
index e8ed5970b2f2bf2693382f8f0cb7c1b2fb08ba50..67fd41662f20f9e70692313529ead38fa57444e9 100644 (file)
@@ -95,7 +95,7 @@ void adf_init_hw_data_c62xiov(struct adf_hw_device_data *hw_data)
        hw_data->get_vintmsk_offset = get_vintmsk_offset;
        hw_data->get_sku = get_sku;
        hw_data->enable_ints = adf_vf_void_noop;
-       hw_data->enable_vf2pf_comms = adf_enable_vf2pf_comms;
+       hw_data->enable_pfvf_comms = adf_enable_vf2pf_comms;
        hw_data->min_iov_compat_ver = ADF_PFVF_COMPAT_THIS_VERSION;
        hw_data->dev_class->instances++;
        adf_devmgr_update_class_index(hw_data);
index 8250cf856e07dbe77c43ea818f9b14b31cf111bf..c00b16be8b0d8c80c6fdf65e27cf47603e83f526 100644 (file)
@@ -172,7 +172,7 @@ struct adf_hw_device_data {
                                      bool enable);
        void (*enable_ints)(struct adf_accel_dev *accel_dev);
        void (*set_ssm_wdtimer)(struct adf_accel_dev *accel_dev);
-       int (*enable_vf2pf_comms)(struct adf_accel_dev *accel_dev);
+       int (*enable_pfvf_comms)(struct adf_accel_dev *accel_dev);
        void (*reset_device)(struct adf_accel_dev *accel_dev);
        void (*set_msix_rttable)(struct adf_accel_dev *accel_dev);
        char *(*uof_get_name)(u32 obj_num);
index 52ce1fde9e93719e0b4e9f9b81871c0826e89cbf..60bc7b991d3519986942930edb66dc6229b1a7d0 100644 (file)
@@ -112,7 +112,7 @@ int adf_dev_init(struct adf_accel_dev *accel_dev)
        hw_data->enable_ints(accel_dev);
        hw_data->enable_error_correction(accel_dev);
 
-       ret = hw_data->enable_vf2pf_comms(accel_dev);
+       ret = hw_data->enable_pfvf_comms(accel_dev);
        if (ret)
                return ret;
 
index 6f5dab2a63a78bf6ff8714d28be9354291898ae0..94fa65bac7e706adf79515e815257de77a9592aa 100644 (file)
@@ -180,7 +180,7 @@ static void adf_enable_ints(struct adf_accel_dev *accel_dev)
                   ADF_DH895XCC_SMIA1_MASK);
 }
 
-static int adf_pf_enable_vf2pf_comms(struct adf_accel_dev *accel_dev)
+static int adf_enable_pf2vf_comms(struct adf_accel_dev *accel_dev)
 {
        spin_lock_init(&accel_dev->pf.vf2pf_ints_lock);
 
@@ -232,7 +232,7 @@ void adf_init_hw_data_dh895xcc(struct adf_hw_device_data *hw_data)
        hw_data->enable_ints = adf_enable_ints;
        hw_data->reset_device = adf_reset_sbr;
        hw_data->get_pf2vf_offset = get_pf2vf_offset;
-       hw_data->enable_vf2pf_comms = adf_pf_enable_vf2pf_comms;
+       hw_data->enable_pfvf_comms = adf_enable_pf2vf_comms;
        hw_data->disable_iov = adf_disable_sriov;
        hw_data->min_iov_compat_ver = ADF_PFVF_COMPAT_THIS_VERSION;
 
index 643a91f29e40edbe4903892a2b46f24b3e8f844e..5f4e264016c9d5d70a4d18cd902e3eb39d742f00 100644 (file)
@@ -95,7 +95,7 @@ void adf_init_hw_data_dh895xcciov(struct adf_hw_device_data *hw_data)
        hw_data->get_vintmsk_offset = get_vintmsk_offset;
        hw_data->get_sku = get_sku;
        hw_data->enable_ints = adf_vf_void_noop;
-       hw_data->enable_vf2pf_comms = adf_enable_vf2pf_comms;
+       hw_data->enable_pfvf_comms = adf_enable_vf2pf_comms;
        hw_data->min_iov_compat_ver = ADF_PFVF_COMPAT_THIS_VERSION;
        hw_data->dev_class->instances++;
        adf_devmgr_update_class_index(hw_data);