crypto: qat - num_rings_per_bank is device dependent
authorAhsan Atta <ahsan.atta@intel.com>
Mon, 12 Oct 2020 20:38:19 +0000 (21:38 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Oct 2020 06:34:46 +0000 (17:34 +1100)
commit70b9bd3929da903d54dbd7d1ca2465333077cfd9
tree6d3aec67d4f7e03d30df758778b69e82d8207476
parent7b07ed5042c5d21467af5aa055f2b49b2e661a83
crypto: qat - num_rings_per_bank is device dependent

This change is to allow support for QAT devices that may not have 16
rings per bank.
The rings structure in bank is allocated dynamically based on the number
of banks supported by a device.

Note that in the error path in adf_init_bank(), ring->inflights is set
to NULL after the free to silence a false positive double free reported
by clang scan-build.

Signed-off-by: Ahsan Atta <ahsan.atta@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>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
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_transport.c
drivers/crypto/qat/qat_common/adf_transport_debug.c
drivers/crypto/qat/qat_common/adf_transport_internal.h
drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c
drivers/crypto/qat/qat_dh895xccvf/adf_dh895xccvf_hw_data.c