Skip to content

Commit 79e2762

Browse files
committed
crypto: qat - fix unintentional re-enabling of error interrupts
JIRA: https://issues.redhat.com/browse/RHEL-52749 Upstream Status: merged into the linux.git commit f062289 Author: Hareshx Sankar Raj <hareshx.sankar.raj@intel.com> Date: Tue Jun 25 15:41:19 2024 +0100 crypto: qat - fix unintentional re-enabling of error interrupts The logic that detects pending VF2PF interrupts unintentionally clears the section of the error mask register(s) not related to VF2PF. This might cause interrupts unrelated to VF2PF, reported through errsou3 and errsou5, to be reported again after the execution of the function disable_pending_vf2pf_interrupts() in dh895xcc and GEN2 devices. Fix by updating only section of errmsk3 and errmsk5 related to VF2PF. Signed-off-by: Hareshx Sankar Raj <hareshx.sankar.raj@intel.com> Reviewed-by: Damian Muszynski <damian.muszynski@intel.com> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Vladis Dronov <vdronov@redhat.com>
1 parent b34e9ec commit 79e2762

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

drivers/crypto/intel/qat/qat_common/adf_gen2_pfvf.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ static u32 adf_gen2_disable_pending_vf2pf_interrupts(void __iomem *pmisc_addr)
100100
errmsk3 |= ADF_GEN2_ERR_MSK_VF2PF(ADF_GEN2_VF_MSK);
101101
ADF_CSR_WR(pmisc_addr, ADF_GEN2_ERRMSK3, errmsk3);
102102

103-
errmsk3 &= ADF_GEN2_ERR_MSK_VF2PF(sources | disabled);
103+
/* Update only section of errmsk3 related to VF2PF */
104+
errmsk3 &= ~ADF_GEN2_ERR_MSK_VF2PF(ADF_GEN2_VF_MSK);
105+
errmsk3 |= ADF_GEN2_ERR_MSK_VF2PF(sources | disabled);
104106
ADF_CSR_WR(pmisc_addr, ADF_GEN2_ERRMSK3, errmsk3);
105107

106108
/* Return the sources of the (new) interrupt(s) */

drivers/crypto/intel/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,12 @@ static u32 disable_pending_vf2pf_interrupts(void __iomem *pmisc_addr)
193193
ADF_CSR_WR(pmisc_addr, ADF_GEN2_ERRMSK3, errmsk3);
194194
ADF_CSR_WR(pmisc_addr, ADF_GEN2_ERRMSK5, errmsk5);
195195

196-
errmsk3 &= ADF_DH895XCC_ERR_MSK_VF2PF_L(sources | disabled);
197-
errmsk5 &= ADF_DH895XCC_ERR_MSK_VF2PF_U(sources | disabled);
196+
/* Update only section of errmsk3 and errmsk5 related to VF2PF */
197+
errmsk3 &= ~ADF_DH895XCC_ERR_MSK_VF2PF_L(ADF_DH895XCC_VF_MSK);
198+
errmsk5 &= ~ADF_DH895XCC_ERR_MSK_VF2PF_U(ADF_DH895XCC_VF_MSK);
199+
200+
errmsk3 |= ADF_DH895XCC_ERR_MSK_VF2PF_L(sources | disabled);
201+
errmsk5 |= ADF_DH895XCC_ERR_MSK_VF2PF_U(sources | disabled);
198202
ADF_CSR_WR(pmisc_addr, ADF_GEN2_ERRMSK3, errmsk3);
199203
ADF_CSR_WR(pmisc_addr, ADF_GEN2_ERRMSK5, errmsk5);
200204

0 commit comments

Comments
 (0)