Skip to content

Commit 92c6a70

Browse files
balagapxherbertx
authored andcommitted
crypto: qat - remove access to parity register for QAT GEN4
The firmware already handles parity errors reported by the accelerators by clearing them through the corresponding SSMSOFTERRORPARITY register. To ensure consistent behavior and prevent race conditions between the driver and firmware, remove the logic that checks the SSMSOFTERRORPARITY registers. Additionally, change the return type of the function adf_handle_rf_parr_err() to void, as it consistently returns false. Parity errors are recoverable and do not necessitate a device reset. Fixes: 895f7d5 ("crypto: qat - add handling of errors from ERRSOU2 for QAT GEN4") Signed-off-by: Bairavi Alagappan <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Giovanni Cabiddu <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent f9555d1 commit 92c6a70

File tree

1 file changed

+5
-52
lines changed

1 file changed

+5
-52
lines changed

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

Lines changed: 5 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,63 +1043,16 @@ static bool adf_handle_ssmcpppar_err(struct adf_accel_dev *accel_dev,
10431043
return reset_required;
10441044
}
10451045

1046-
static bool adf_handle_rf_parr_err(struct adf_accel_dev *accel_dev,
1046+
static void adf_handle_rf_parr_err(struct adf_accel_dev *accel_dev,
10471047
void __iomem *csr, u32 iastatssm)
10481048
{
1049-
struct adf_dev_err_mask *err_mask = GET_ERR_MASK(accel_dev);
1050-
u32 reg;
1051-
10521049
if (!(iastatssm & ADF_GEN4_IAINTSTATSSM_SSMSOFTERRORPARITY_BIT))
1053-
return false;
1054-
1055-
reg = ADF_CSR_RD(csr, ADF_GEN4_SSMSOFTERRORPARITY_SRC);
1056-
reg &= ADF_GEN4_SSMSOFTERRORPARITY_SRC_BIT;
1057-
if (reg) {
1058-
ADF_RAS_ERR_CTR_INC(accel_dev->ras_errors, ADF_RAS_UNCORR);
1059-
ADF_CSR_WR(csr, ADF_GEN4_SSMSOFTERRORPARITY_SRC, reg);
1060-
}
1061-
1062-
reg = ADF_CSR_RD(csr, ADF_GEN4_SSMSOFTERRORPARITY_ATH_CPH);
1063-
reg &= err_mask->parerr_ath_cph_mask;
1064-
if (reg) {
1065-
ADF_RAS_ERR_CTR_INC(accel_dev->ras_errors, ADF_RAS_UNCORR);
1066-
ADF_CSR_WR(csr, ADF_GEN4_SSMSOFTERRORPARITY_ATH_CPH, reg);
1067-
}
1068-
1069-
reg = ADF_CSR_RD(csr, ADF_GEN4_SSMSOFTERRORPARITY_CPR_XLT);
1070-
reg &= err_mask->parerr_cpr_xlt_mask;
1071-
if (reg) {
1072-
ADF_RAS_ERR_CTR_INC(accel_dev->ras_errors, ADF_RAS_UNCORR);
1073-
ADF_CSR_WR(csr, ADF_GEN4_SSMSOFTERRORPARITY_CPR_XLT, reg);
1074-
}
1075-
1076-
reg = ADF_CSR_RD(csr, ADF_GEN4_SSMSOFTERRORPARITY_DCPR_UCS);
1077-
reg &= err_mask->parerr_dcpr_ucs_mask;
1078-
if (reg) {
1079-
ADF_RAS_ERR_CTR_INC(accel_dev->ras_errors, ADF_RAS_UNCORR);
1080-
ADF_CSR_WR(csr, ADF_GEN4_SSMSOFTERRORPARITY_DCPR_UCS, reg);
1081-
}
1082-
1083-
reg = ADF_CSR_RD(csr, ADF_GEN4_SSMSOFTERRORPARITY_PKE);
1084-
reg &= err_mask->parerr_pke_mask;
1085-
if (reg) {
1086-
ADF_RAS_ERR_CTR_INC(accel_dev->ras_errors, ADF_RAS_UNCORR);
1087-
ADF_CSR_WR(csr, ADF_GEN4_SSMSOFTERRORPARITY_PKE, reg);
1088-
}
1089-
1090-
if (err_mask->parerr_wat_wcp_mask) {
1091-
reg = ADF_CSR_RD(csr, ADF_GEN4_SSMSOFTERRORPARITY_WAT_WCP);
1092-
reg &= err_mask->parerr_wat_wcp_mask;
1093-
if (reg) {
1094-
ADF_RAS_ERR_CTR_INC(accel_dev->ras_errors, ADF_RAS_UNCORR);
1095-
ADF_CSR_WR(csr, ADF_GEN4_SSMSOFTERRORPARITY_WAT_WCP,
1096-
reg);
1097-
}
1098-
}
1050+
return;
10991051

1052+
ADF_RAS_ERR_CTR_INC(accel_dev->ras_errors, ADF_RAS_UNCORR);
11001053
dev_err(&GET_DEV(accel_dev), "Slice ssm soft parity error reported");
11011054

1102-
return false;
1055+
return;
11031056
}
11041057

11051058
static bool adf_handle_ser_err_ssmsh(struct adf_accel_dev *accel_dev,
@@ -1171,8 +1124,8 @@ static bool adf_handle_iaintstatssm(struct adf_accel_dev *accel_dev,
11711124
reset_required |= adf_handle_slice_hang_error(accel_dev, csr, iastatssm);
11721125
reset_required |= adf_handle_spppar_err(accel_dev, csr, iastatssm);
11731126
reset_required |= adf_handle_ssmcpppar_err(accel_dev, csr, iastatssm);
1174-
reset_required |= adf_handle_rf_parr_err(accel_dev, csr, iastatssm);
11751127
reset_required |= adf_handle_ser_err_ssmsh(accel_dev, csr, iastatssm);
1128+
adf_handle_rf_parr_err(accel_dev, csr, iastatssm);
11761129

11771130
ADF_CSR_WR(csr, ADF_GEN4_IAINTSTATSSM, iastatssm);
11781131

0 commit comments

Comments
 (0)