]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: qat - enable reporting of error counters for GEN6 devices
authorSuman Kumar Chakraborty <suman.kumar.chakraborty@intel.com>
Tue, 13 May 2025 10:25:27 +0000 (11:25 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 19 May 2025 05:48:19 +0000 (13:48 +0800)
Enable the reporting of error counters through sysfs for QAT GEN6
devices and update the ABI documentation.

This enables the reporting of the following:
   - errors_correctable - hardware correctable errors that allow the
     system to recover without data loss.
   - errors_nonfatal: errors that can be isolated to specific in-flight
     requests.
   - errors_fatal: errors that cannot be contained to a request,
     requiring a Function Level Reset (FLR) upon occurrence.

Signed-off-by: Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Documentation/ABI/testing/sysfs-driver-qat_ras
drivers/crypto/intel/qat/qat_6xxx/adf_drv.c

index 176dea1e9c0aa9684cfc9c15037aecba2277795f..82ceb04445ecc6cb0c7bc83c52647afde4f8dd12 100644 (file)
@@ -4,7 +4,7 @@ KernelVersion:  6.7
 Contact:       qat-linux@intel.com
 Description:   (RO) Reports the number of correctable errors detected by the device.
 
-               This attribute is only available for qat_4xxx devices.
+               This attribute is only available for qat_4xxx and qat_6xxx devices.
 
 What:          /sys/bus/pci/devices/<BDF>/qat_ras/errors_nonfatal
 Date:          January 2024
@@ -12,7 +12,7 @@ KernelVersion:        6.7
 Contact:       qat-linux@intel.com
 Description:   (RO) Reports the number of non fatal errors detected by the device.
 
-               This attribute is only available for qat_4xxx devices.
+               This attribute is only available for qat_4xxx and qat_6xxx devices.
 
 What:          /sys/bus/pci/devices/<BDF>/qat_ras/errors_fatal
 Date:          January 2024
@@ -20,7 +20,7 @@ KernelVersion:        6.7
 Contact:       qat-linux@intel.com
 Description:   (RO) Reports the number of fatal errors detected by the device.
 
-               This attribute is only available for qat_4xxx devices.
+               This attribute is only available for qat_4xxx and qat_6xxx devices.
 
 What:          /sys/bus/pci/devices/<BDF>/qat_ras/reset_error_counters
 Date:          January 2024
@@ -38,4 +38,4 @@ Description:  (WO) Write to resets all error counters of a device.
                        # cat /sys/bus/pci/devices/<BDF>/qat_ras/errors_fatal
                        0
 
-               This attribute is only available for qat_4xxx devices.
+               This attribute is only available for qat_4xxx and qat_6xxx devices.
index 132e26501621308187850b5c2e4f86343aad6dec..c1dc9c56fdf549552ee0f561f8517693e1ca1544 100644 (file)
@@ -173,6 +173,8 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (ret)
                return dev_err_probe(dev, ret, "Failed to save pci state.\n");
 
+       accel_dev->ras_errors.enabled = true;
+
        adf_dbgfs_init(accel_dev);
 
        ret = devm_add_action_or_reset(dev, adf_dbgfs_cleanup, accel_dev);