crypto: qat - enable ring after pair is programmed
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Mon, 12 Oct 2020 20:38:34 +0000 (21:38 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Oct 2020 06:34:54 +0000 (17:34 +1100)
commit070a34c9dfa3eeb0b18d63c6fec5dfe7861a43ac
tree2d7d3a16cea4902a731ca8a48bef3bddb818444d
parentdbf568755e7781a4ce8bd3c587c2c388600ae661
crypto: qat - enable ring after pair is programmed

Enable arbitration on the TX ring only after the RX ring is programmed.

Before this change, arbitration was enabled on the TX ring before the RX
ring was programmed allowing the HW to process a request before having
the ring pair configured.
With this change, the arbitration logic is programmed only if the TX
half of the ring mask matches the RX half.

This change does not affect QAT GEN2 devices (c62x, c3xxx and dh895xcc),
but it is a must for QAT GEN4 devices since the CSRs of the ring pair
are locked after arbitration is enabled on the TX ring.

Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Wojciech Ziemba <wojciech.ziemba@intel.com>
Reviewed-by: Maksim Lukoshkov <maksim.lukoshkov@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_common/adf_hw_arbiter.c