Commit 93b2f579 authored by Giovanni Cabiddu's avatar Giovanni Cabiddu Committed by Herbert Xu
Browse files

crypto: qat - rename and relocate GEN2 config function



Rename qat_crypto_dev_config() in adf_gen2_dev_config() and relocate it
to the newly created file adf_gen2_config.c.
This function is specific to QAT GEN2 devices and will be used also to
configure the compression service.

In addition change the drivers to use the dev_config() in the hardware
data structure (which for GEN2 devices now points to
adf_gen2_dev_config()), for consistency.

Signed-off-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: default avatarWojciech Ziemba <wojciech.ziemba@intel.com>
Reviewed-by: default avatarAdam Guerin <adam.guerin@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 79d8dbf1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
/* Copyright(c) 2014 - 2021 Intel Corporation */
#include <adf_accel_devices.h>
#include <adf_common_drv.h>
#include <adf_gen2_config.h>
#include <adf_gen2_hw_data.h>
#include <adf_gen2_pfvf.h>
#include "adf_c3xxx_hw_data.h"
@@ -124,6 +125,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->disable_iov = adf_disable_sriov;
	hw_data->dev_config = adf_gen2_dev_config;

	adf_gen2_init_pf_pfvf_ops(&hw_data->pfvf_ops);
	adf_gen2_init_hw_csr_ops(&hw_data->csr_ops);
+1 −1
Original line number Diff line number Diff line
@@ -201,7 +201,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
		goto out_err_disable_aer;
	}

	ret = qat_crypto_dev_config(accel_dev);
	ret = hw_data->dev_config(accel_dev);
	if (ret)
		goto out_err_disable_aer;

+2 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
/* Copyright(c) 2015 - 2021 Intel Corporation */
#include <adf_accel_devices.h>
#include <adf_common_drv.h>
#include <adf_gen2_config.h>
#include <adf_gen2_hw_data.h>
#include <adf_gen2_pfvf.h>
#include <adf_pfvf_vf_msg.h>
@@ -86,6 +87,7 @@ void adf_init_hw_data_c3xxxiov(struct adf_hw_device_data *hw_data)
	hw_data->get_sku = get_sku;
	hw_data->enable_ints = adf_vf_void_noop;
	hw_data->dev_class->instances++;
	hw_data->dev_config = adf_gen2_dev_config;
	adf_devmgr_update_class_index(hw_data);
	adf_gen2_init_vf_pfvf_ops(&hw_data->pfvf_ops);
	adf_gen2_init_hw_csr_ops(&hw_data->csr_ops);
+2 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
/* Copyright(c) 2014 - 2021 Intel Corporation */
#include <adf_accel_devices.h>
#include <adf_common_drv.h>
#include <adf_gen2_config.h>
#include <adf_gen2_hw_data.h>
#include <adf_gen2_pfvf.h>
#include "adf_c62x_hw_data.h"
@@ -126,6 +127,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->disable_iov = adf_disable_sriov;
	hw_data->dev_config = adf_gen2_dev_config;

	adf_gen2_init_pf_pfvf_ops(&hw_data->pfvf_ops);
	adf_gen2_init_hw_csr_ops(&hw_data->csr_ops);
+1 −1
Original line number Diff line number Diff line
@@ -201,7 +201,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
		goto out_err_disable_aer;
	}

	ret = qat_crypto_dev_config(accel_dev);
	ret = hw_data->dev_config(accel_dev);
	if (ret)
		goto out_err_disable_aer;

Loading