linux-stable/drivers/crypto/qat
Giovanni Cabiddu af88d3c109 crypto: qat - refactor submission logic
All the algorithms in qat_algs.c and qat_asym_algs.c use the same
pattern to submit messages to the HW queues. Move the submission loop
to a new function, qat_alg_send_message(), and share it between the
symmetric and the asymmetric algorithms.

As part of this rework, since the number of retries before returning an
error is inconsistent between the symmetric and asymmetric
implementations, set it to a value that works for both (i.e. 20, was 10
in qat_algs.c and 100 in qat_asym_algs.c)

In addition fix the return code reported when the HW queues are full.
In that case return -ENOSPC instead of -EBUSY.

Including stable in CC since (1) the error code returned if the HW queues
are full is incorrect and (2) to facilitate the backport of the next fix
"crypto: qat - add backlog mechanism".

Cc: stable@vger.kernel.org
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Marco Chiappero <marco.chiappero@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2022-05-20 13:49:17 +08:00
..
qat_4xxx crypto: qat - disable registration of algorithms 2022-03-09 15:12:32 +12:00
qat_c3xxx crypto: qat - fix ETR sources enabled by default on GEN2 devices 2022-04-15 16:34:26 +08:00
qat_c3xxxvf crypto: qat - config VFs based on ring-to-svc mapping 2021-12-24 14:18:27 +11:00
qat_c62x crypto: qat - fix ETR sources enabled by default on GEN2 devices 2022-04-15 16:34:26 +08:00
qat_c62xvf crypto: qat - config VFs based on ring-to-svc mapping 2021-12-24 14:18:27 +11:00
qat_common crypto: qat - refactor submission logic 2022-05-20 13:49:17 +08:00
qat_dh895xcc crypto: qat - replace disable_vf2pf_interrupts() 2022-04-15 16:34:27 +08:00
qat_dh895xccvf crypto: qat - config VFs based on ring-to-svc mapping 2021-12-24 14:18:27 +11:00
Kconfig crypto: qat - introduce support for PFVF block messages 2021-12-24 14:18:26 +11:00
Makefile crypto: qat - add qat_4xxx driver 2020-11-20 14:45:34 +11:00