]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: qat - fix access to PFVF interrupt registers for GEN4
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Tue, 18 Jan 2022 10:35:15 +0000 (10:35 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:57:32 +0000 (13:57 +0200)
commit596ad215a310ff9dc3134e53ea04e3aaae4970b5
tree0b71822839e38bcdaea7b96bffcc5be21049b748
parent6af12f8d1e43ead89c3c55fd373f03bfc0bc1197
crypto: qat - fix access to PFVF interrupt registers for GEN4

[ Upstream commit 642a7d49c249f04007e68c124a148847471dd476 ]

The logic that detects, enables and disables pfvf interrupts was
expecting a single CSR per VF. Instead, the source and mask register are
two registers with a bit per VF.
Due to this, the driver is reading and setting reserved CSRs and not
masking the correct source of interrupts.

Fix the access to the source and mask register for QAT GEN4 devices by
removing the outer loop in adf_gen4_get_vf2pf_sources(),
adf_gen4_enable_vf2pf_interrupts() and
adf_gen4_disable_vf2pf_interrupts() and changing the helper macros
ADF_4XXX_VM2PF_SOU and ADF_4XXX_VM2PF_MSK.

Fixes: a9dc0d966605 ("crypto: qat - add PFVF support to the GEN4 host driver")
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Co-developed-by: Siming Wan <siming.wan@intel.com>
Signed-off-by: Siming Wan <siming.wan@intel.com>
Reviewed-by: Xin Zeng <xin.zeng@intel.com>
Reviewed-by: Wojciech Ziemba <wojciech.ziemba@intel.com>
Reviewed-by: Marco Chiappero <marco.chiappero@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/qat/qat_common/adf_gen4_pfvf.c