crypto: qat - add error counters
authorShashank Gupta <shashank.gupta@intel.com>
Fri, 20 Oct 2023 10:32:52 +0000 (11:32 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 27 Oct 2023 10:04:27 +0000 (18:04 +0800)
commit532d7f6bc458042571752168bcb5e1fdc576b8c4
tree9a16682c85b3778ef75da42b1ae535017a0a88b3
parent22289dc95833c6584aea1f4e8ab9f4f1641bb076
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>
Documentation/ABI/testing/sysfs-driver-qat_ras [new file with mode: 0644]
drivers/crypto/intel/qat/qat_4xxx/adf_drv.c
drivers/crypto/intel/qat/qat_common/Makefile
drivers/crypto/intel/qat/qat_common/adf_accel_devices.h
drivers/crypto/intel/qat/qat_common/adf_init.c
drivers/crypto/intel/qat/qat_common/adf_sysfs_ras_counters.c [new file with mode: 0644]
drivers/crypto/intel/qat/qat_common/adf_sysfs_ras_counters.h [new file with mode: 0644]