crypto: qat - fix ring to service map for QAT GEN4
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Fri, 20 Oct 2023 13:49:23 +0000 (15:49 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 27 Oct 2023 10:04:27 +0000 (18:04 +0800)
commita238487f7965d102794ed9f8aff0b667cd2ae886
tree4743cb436bf0fdce0b560826849c95ccd034c3ad
parentf7df2329eec1729a606bba8ed1566a1b3c248bad
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>
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c
drivers/crypto/intel/qat/qat_common/adf_accel_devices.h
drivers/crypto/intel/qat/qat_common/adf_init.c