aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorMarco Chiappero <marco.chiappero@intel.com>2021-08-12 21:21:24 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2021-08-21 15:44:56 +0800
commit7c258f501ee09c1388a1ecef232db7b648d46aed (patch)
treeefea45fafb27a36ae638168ee5a7909bbb9b7b2f /drivers/crypto
parentcrypto: qat - move IO virtualization functions (diff)
downloadlinux-dev-7c258f501ee09c1388a1ecef232db7b648d46aed.tar.xz
linux-dev-7c258f501ee09c1388a1ecef232db7b648d46aed.zip
crypto: qat - complete all the init steps before service notification
Make sure all the steps in the initialization sequence are complete before any completion event notification. 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>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/qat/qat_common/adf_init.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/crypto/qat/qat_common/adf_init.c b/drivers/crypto/qat/qat_common/adf_init.c
index 346dcb8bcca5..52ce1fde9e93 100644
--- a/drivers/crypto/qat/qat_common/adf_init.c
+++ b/drivers/crypto/qat/qat_common/adf_init.c
@@ -110,6 +110,11 @@ int adf_dev_init(struct adf_accel_dev *accel_dev)
set_bit(ADF_STATUS_IRQ_ALLOCATED, &accel_dev->status);
hw_data->enable_ints(accel_dev);
+ hw_data->enable_error_correction(accel_dev);
+
+ ret = hw_data->enable_vf2pf_comms(accel_dev);
+ if (ret)
+ return ret;
/*
* Subservice initialisation is divided into two stages: init and start.
@@ -127,10 +132,7 @@ int adf_dev_init(struct adf_accel_dev *accel_dev)
set_bit(accel_dev->accel_id, service->init_status);
}
- hw_data->enable_error_correction(accel_dev);
- ret = hw_data->enable_vf2pf_comms(accel_dev);
-
- return ret;
+ return 0;
}
EXPORT_SYMBOL_GPL(adf_dev_init);