summaryrefslogtreecommitdiff
path: root/drivers/crypto/intel/qat/qat_common/adf_init.c
diff options
context:
space:
mode:
authorShashank Gupta <shashank.gupta@intel.com>2023-10-20 11:32:52 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2023-10-27 18:04:27 +0800
commit532d7f6bc458042571752168bcb5e1fdc576b8c4 (patch)
tree9a16682c85b3778ef75da42b1ae535017a0a88b3 /drivers/crypto/intel/qat/qat_common/adf_init.c
parent22289dc95833c6584aea1f4e8ab9f4f1641bb076 (diff)
crypto: qat - add error counters
Introduce ras counters interface for counting QAT specific device errors and expose them through the newly created qat_ras sysfs group attribute. This adds the following attributes: - errors_correctable: number of correctable errors - errors_nonfatal: number of uncorrectable non fatal errors - errors_fatal: number of uncorrectable fatal errors - reset_error_counters: resets all counters These counters are initialized during device bring up and cleared during device shutdown and are applicable only to QAT GEN4 devices. 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>
Diffstat (limited to 'drivers/crypto/intel/qat/qat_common/adf_init.c')
-rw-r--r--drivers/crypto/intel/qat/qat_common/adf_init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/intel/qat/qat_common/adf_init.c b/drivers/crypto/intel/qat/qat_common/adf_init.c
index b3cf0720cf9a..00a32efdfc59 100644
--- a/drivers/crypto/intel/qat/qat_common/adf_init.c
+++ b/drivers/crypto/intel/qat/qat_common/adf_init.c
@@ -9,6 +9,7 @@
#include "adf_common_drv.h"
#include "adf_dbgfs.h"
#include "adf_heartbeat.h"
+#include "adf_sysfs_ras_counters.h"
static LIST_HEAD(service_table);
static DEFINE_MUTEX(service_lock);
@@ -242,6 +243,7 @@ static int adf_dev_start(struct adf_accel_dev *accel_dev)
set_bit(ADF_STATUS_COMP_ALGS_REGISTERED, &accel_dev->status);
adf_dbgfs_add(accel_dev);
+ adf_sysfs_start_ras(accel_dev);
return 0;
}
@@ -268,6 +270,7 @@ static void adf_dev_stop(struct adf_accel_dev *accel_dev)
return;
adf_dbgfs_rm(accel_dev);
+ adf_sysfs_stop_ras(accel_dev);
clear_bit(ADF_STATUS_STARTING, &accel_dev->status);
clear_bit(ADF_STATUS_STARTED, &accel_dev->status);