Commit 895f7d53 authored by Shashank Gupta's avatar Shashank Gupta Committed by Herbert Xu

crypto: qat - add handling of errors from ERRSOU2 for QAT GEN4

Add logic to detect, report and handle uncorrectable errors reported
through the ERRSOU2 register in QAT GEN4 devices.
Signed-off-by: default avatarShashank Gupta <shashank.gupta@intel.com>
Reviewed-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: default avatarTero Kristo <tero.kristo@linux.intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 4926e89d
......@@ -479,6 +479,11 @@ static u32 uof_get_ae_mask(struct adf_accel_dev *accel_dev, u32 obj_num)
static void adf_gen4_set_err_mask(struct adf_dev_err_mask *dev_err_mask)
{
dev_err_mask->cppagentcmdpar_mask = ADF_4XXX_HICPPAGENTCMDPARERRLOG_MASK;
dev_err_mask->parerr_ath_cph_mask = ADF_4XXX_PARITYERRORMASK_ATH_CPH_MASK;
dev_err_mask->parerr_cpr_xlt_mask = ADF_4XXX_PARITYERRORMASK_CPR_XLT_MASK;
dev_err_mask->parerr_dcpr_ucs_mask = ADF_4XXX_PARITYERRORMASK_DCPR_UCS_MASK;
dev_err_mask->parerr_pke_mask = ADF_4XXX_PARITYERRORMASK_PKE_MASK;
dev_err_mask->ssmfeatren_mask = ADF_4XXX_SSMFEATREN_MASK;
}
void adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 dev_id)
......
......@@ -29,6 +29,21 @@
#define ADF_4XXX_ADMIN_AE_MASK (0x100)
#define ADF_4XXX_HICPPAGENTCMDPARERRLOG_MASK 0x1F
#define ADF_4XXX_PARITYERRORMASK_ATH_CPH_MASK 0xF000F
#define ADF_4XXX_PARITYERRORMASK_CPR_XLT_MASK 0x10001
#define ADF_4XXX_PARITYERRORMASK_DCPR_UCS_MASK 0x30007
#define ADF_4XXX_PARITYERRORMASK_PKE_MASK 0x3F
/*
* SSMFEATREN bit mask
* BIT(4) - enables parity detection on CPP
* BIT(12) - enables the logging of push/pull data errors
* in pperr register
* BIT(16) - BIT(23) - enable parity detection on SPPs
*/
#define ADF_4XXX_SSMFEATREN_MASK \
(BIT(4) | BIT(12) | BIT(16) | BIT(17) | BIT(18) | \
BIT(19) | BIT(20) | BIT(21) | BIT(22) | BIT(23))
#define ADF_4XXX_ETR_MAX_BANKS 64
......
......@@ -178,6 +178,12 @@ struct adf_dc_ops {
struct adf_dev_err_mask {
u32 cppagentcmdpar_mask;
u32 parerr_ath_cph_mask;
u32 parerr_cpr_xlt_mask;
u32 parerr_dcpr_ucs_mask;
u32 parerr_pke_mask;
u32 parerr_wat_wcp_mask;
u32 ssmfeatren_mask;
};
struct adf_hw_device_data {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment