linux/drivers/crypto/qat/qat_common
Giovanni Cabiddu 642a7d49c2 crypto: qat - fix access to PFVF interrupt registers for GEN4
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: a9dc0d9666 ("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>
2022-01-31 11:21:43 +11:00
..
adf_accel_devices.h crypto: qat - add support for compression for 4xxx 2021-12-24 14:18:27 +11:00
adf_accel_engine.c crypto: qat - add support for compression for 4xxx 2021-12-24 14:18:27 +11:00
adf_admin.c crypto: qat - add the adf_get_pmisc_base() helper function 2021-12-24 14:18:24 +11:00
adf_aer.c crypto: qat - simplify adf_enable_aer() 2021-10-12 17:37:15 -05:00
adf_cfg_common.h crypto: qat - store the ring-to-service mapping 2021-12-24 14:18:26 +11:00
adf_cfg_strings.h crypto: qat - add support for compression for 4xxx 2021-12-24 14:18:27 +11:00
adf_cfg_user.h crypto: qat - replace user types with kernel ABI __u types 2020-06-18 17:26:42 +10:00
adf_cfg.c crypto: qat - add support for compression for 4xxx 2021-12-24 14:18:27 +11:00
adf_cfg.h crypto: qat - convert to SPDX License Identifiers 2020-06-18 17:19:44 +10:00
adf_common_drv.h crypto: qat - config VFs based on ring-to-svc mapping 2021-12-24 14:18:27 +11:00
adf_ctl_drv.c crypto: qat - ratelimit invalid ioctl message and print the invalid cmd 2021-06-28 11:28:08 +08:00
adf_dev_mgr.c crypto: qat - fix excluded_middle.cocci warnings 2020-11-27 17:13:41 +11:00
adf_gen2_hw_data.c crypto: qat - add the adf_get_pmisc_base() helper function 2021-12-24 14:18:24 +11:00
adf_gen2_hw_data.h crypto: qat - store the ring-to-service mapping 2021-12-24 14:18:26 +11:00
adf_gen2_pfvf.c crypto: qat - support fast ACKs in the PFVF protocol 2021-12-24 14:18:26 +11:00
adf_gen2_pfvf.h crypto: qat - add pfvf_ops 2021-11-26 16:20:46 +11:00
adf_gen4_hw_data.c crypto: qat - add the adf_get_pmisc_base() helper function 2021-12-24 14:18:24 +11:00
adf_gen4_hw_data.h crypto: qat - store the ring-to-service mapping 2021-12-24 14:18:26 +11:00
adf_gen4_pfvf.c crypto: qat - fix access to PFVF interrupt registers for GEN4 2022-01-31 11:21:43 +11:00
adf_gen4_pfvf.h crypto: qat - add PFVF support to the GEN4 host driver 2021-12-24 14:18:27 +11:00
adf_hw_arbiter.c crypto: qat - configure arbiter mapping based on engines enabled 2021-01-14 17:10:26 +11:00
adf_init.c crypto: qat - config VFs based on ring-to-svc mapping 2021-12-24 14:18:27 +11:00
adf_isr.c crypto: qat - add the adf_get_pmisc_base() helper function 2021-12-24 14:18:24 +11:00
adf_pfvf_msg.h crypto: qat - fix definition of ring reset results 2021-12-31 18:10:56 +11:00
adf_pfvf_pf_msg.c crypto: qat - exchange ring-to-service mappings over PFVF 2021-12-24 14:18:26 +11:00
adf_pfvf_pf_msg.h crypto: qat - exchange ring-to-service mappings over PFVF 2021-12-24 14:18:26 +11:00
adf_pfvf_pf_proto.c crypto: qat - add PFVF support to enable the reset of ring pairs 2021-12-24 14:18:27 +11:00
adf_pfvf_pf_proto.h crypto: qat - abstract PFVF messages with struct pfvf_message 2021-12-24 14:18:25 +11:00
adf_pfvf_utils.c crypto: qat - introduce support for PFVF block messages 2021-12-24 14:18:26 +11:00
adf_pfvf_utils.h crypto: qat - introduce support for PFVF block messages 2021-12-24 14:18:26 +11:00
adf_pfvf_vf_msg.c crypto: qat - exchange ring-to-service mappings over PFVF 2021-12-24 14:18:26 +11:00
adf_pfvf_vf_msg.h crypto: qat - exchange ring-to-service mappings over PFVF 2021-12-24 14:18:26 +11:00
adf_pfvf_vf_proto.c crypto: qat - add PFVF support to enable the reset of ring pairs 2021-12-24 14:18:27 +11:00
adf_pfvf_vf_proto.h crypto: qat - introduce support for PFVF block messages 2021-12-24 14:18:26 +11:00
adf_sriov.c crypto: qat - add support for compression for 4xxx 2021-12-24 14:18:27 +11:00
adf_transport_access_macros.h crypto: qat - remove hardcoded bank irq clear flag mask 2020-10-30 17:34:57 +11:00
adf_transport_debug.c crypto: qat - change format string and cast ring size 2021-01-14 17:10:26 +11:00
adf_transport_internal.h crypto: qat - num_rings_per_bank is device dependent 2020-10-30 17:34:46 +11:00
adf_transport.c crypto: qat - Fix a double free in adf_create_ring 2021-04-09 17:45:14 +10:00
adf_transport.h crypto: qat - replace user types with kernel u types 2020-06-18 17:26:41 +10:00
adf_vf_isr.c crypto: qat - add the adf_get_pmisc_base() helper function 2021-12-24 14:18:24 +11:00
icp_qat_fw_init_admin.h crypto: qat - get compression extended capabilities 2021-12-24 14:18:23 +11:00
icp_qat_fw_la.h crypto: qat - add AES-CTR support for QAT GEN4 devices 2020-12-11 21:54:15 +11:00
icp_qat_fw_loader_handle.h crypto: qat - check MMP size before writing to the SRAM 2021-05-28 14:20:40 +08:00
icp_qat_fw_pke.h crypto: qat - replace user types with kernel ABI __u types 2020-06-18 17:26:42 +10:00
icp_qat_fw.h crypto: qat - replace user types with kernel ABI __u types 2020-06-18 17:26:42 +10:00
icp_qat_hal.h crypto: qat - add gen4 firmware loader 2020-11-13 20:38:55 +11:00
icp_qat_hw.h crypto: qat - allow detection of dc capabilities for 4xxx 2021-12-24 14:18:27 +11:00
icp_qat_uclo.h crypto: qat - add gen4 firmware loader 2020-11-13 20:38:55 +11:00
Makefile crypto: qat - add PFVF support to the GEN4 host driver 2021-12-24 14:18:27 +11:00
qat_algs.c crypto: qat - fix use of 'dma_map_single' 2021-03-13 00:04:05 +11:00
qat_asym_algs.c crypto: qat - reduce size of mapped region 2021-01-14 17:10:26 +11:00
qat_crypto.c crypto: qat - config VFs based on ring-to-svc mapping 2021-12-24 14:18:27 +11:00
qat_crypto.h crypto: qat - register crypto instances based on capability 2020-10-30 17:34:54 +11:00
qat_hal.c crypto: qat - add the adf_get_pmisc_base() helper function 2021-12-24 14:18:24 +11:00
qat_uclo.c crypto: qat - remove unused macro in FW loader 2021-05-28 14:20:40 +08:00