OSDN Git Service

crypto: qat - differentiate between pf2vf and vf2pf offset
authorMarco Chiappero <marco.chiappero@intel.com>
Wed, 17 Nov 2021 14:30:48 +0000 (14:30 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 26 Nov 2021 05:20:47 +0000 (16:20 +1100)
commit9baf2de7ee4eeaca5cf95d1a399182ab83aa42b8
treee9d286b04e18305ea1843a14d3297e993df51056
parentbc63dabe525402b91320192ff1758f0d05b159c6
crypto: qat - differentiate between pf2vf and vf2pf offset

Add the function get_vf2pf_offset() to adf_pfvf_ops to differentiate the
CSRs used for pf2vf and vf2pf.

Offsets may or may not be direction specific depending on QAT
generation. Since in QAT GEN2 the CSR is not direction specific, i.e.
there is a single mailbox register shared for pf2vf and vf2pf, both
get_vf2pf_offset() and get_vf2pf_offset() will return the same offset.

This change is to make the direction explicit, so it is easier to
understand and debug and also in preparation for the introduction of
PFVF support in the qat_4xxx driver since QAT GEN4 devices have a
separate CSR for pf2vf and vf2pf communications.

Signed-off-by: Marco Chiappero <marco.chiappero@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/adf_accel_devices.h
drivers/crypto/qat/qat_common/adf_gen2_pfvf.c
drivers/crypto/qat/qat_common/adf_pf2vf_msg.c