crypto: qat - add reporting of errors from ERRSOU1 for QAT GEN4

Add logic to detect and report uncorrectable errors reported through
the ERRSOU1 register in QAT GEN4 devices.
This also introduces the adf_dev_err_mask structure as part of
adf_hw_device_data which will allow to provide different error masks
per device generation.

Signed-off-by: Shashank Gupta <shashank.gupta@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Tero Kristo <tero.kristo@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Shashank Gupta
2023-10-20 11:32:47 +01:00
committed by Herbert Xu
parent df8c184b77
commit 4926e89d19
5 changed files with 493 additions and 0 deletions

View File

@@ -176,6 +176,10 @@ struct adf_dc_ops {
void (*build_deflate_ctx)(void *ctx);
};
struct adf_dev_err_mask {
u32 cppagentcmdpar_mask;
};
struct adf_hw_device_data {
struct adf_hw_device_class *dev_class;
u32 (*get_accel_mask)(struct adf_hw_device_data *self);
@@ -222,6 +226,7 @@ struct adf_hw_device_data {
struct adf_hw_csr_ops csr_ops;
struct adf_dc_ops dc_ops;
struct adf_ras_ops ras_ops;
struct adf_dev_err_mask dev_err_mask;
const char *fw_name;
const char *fw_mmp_name;
u32 fuses;
@@ -270,6 +275,7 @@ struct adf_hw_device_data {
#define GET_SRV_TYPE(accel_dev, idx) \
(((GET_HW_DATA(accel_dev)->ring_to_svc_map) >> (ADF_SRV_TYPE_BIT_LEN * (idx))) \
& ADF_SRV_TYPE_MASK)
#define GET_ERR_MASK(accel_dev) (&GET_HW_DATA(accel_dev)->dev_err_mask)
#define GET_MAX_ACCELENGINES(accel_dev) (GET_HW_DATA(accel_dev)->num_engines)
#define GET_CSR_OPS(accel_dev) (&(accel_dev)->hw_device->csr_ops)
#define GET_PFVF_OPS(accel_dev) (&(accel_dev)->hw_device->pfvf_ops)