diff options
| author | Giovanni Cabiddu <giovanni.cabiddu@intel.com> | 2023-10-20 15:49:23 +0200 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-10-27 18:04:27 +0800 |
| commit | a238487f7965d102794ed9f8aff0b667cd2ae886 (patch) | |
| tree | 4743cb436bf0fdce0b560826849c95ccd034c3ad /drivers/crypto/intel/qat/qat_common/adf_init.c | |
| parent | f7df2329eec1729a606bba8ed1566a1b3c248bad (diff) | |
crypto: qat - fix ring to service map for QAT GEN4
The 4xxx drivers hardcode the ring to service mapping. However, when
additional configurations where added to the driver, the mappings were
not updated. This implies that an incorrect mapping might be reported
through pfvf for certain configurations.
Add an algorithm that computes the correct ring to service mapping based
on the firmware loaded on the device.
Fixes: 0cec19c761e5 ("crypto: qat - add support for compression for 4xxx")
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Damian Muszynski <damian.muszynski@intel.com>
Reviewed-by: Tero Kristo <tero.kristo@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/intel/qat/qat_common/adf_init.c')
| -rw-r--r-- | drivers/crypto/intel/qat/qat_common/adf_init.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/intel/qat/qat_common/adf_init.c b/drivers/crypto/intel/qat/qat_common/adf_init.c index 00a32efdfc59..ef51c4d028d2 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_init.c +++ b/drivers/crypto/intel/qat/qat_common/adf_init.c @@ -97,6 +97,9 @@ static int adf_dev_init(struct adf_accel_dev *accel_dev) return -EFAULT; } + if (hw_data->get_ring_to_svc_map) + hw_data->ring_to_svc_map = hw_data->get_ring_to_svc_map(accel_dev); + if (adf_ae_init(accel_dev)) { dev_err(&GET_DEV(accel_dev), "Failed to initialise Acceleration Engine\n"); |