[SWDEV-524147] Patch for handling new ras filenames (#205)

The code is changed to handle both original and ACA based ECC counters
for backward compatibilities.

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Co-authored-by: Maisam Arif <Maisam.Arif@amd.com>
This commit is contained in:
Liu, Shuzhou (Bill)
2025-03-27 16:36:43 -04:00
committed by GitHub
parent 7d109001ac
commit 9b6e0432b2
2 changed files with 42 additions and 3 deletions
+6 -1
View File
@@ -503,7 +503,12 @@ amdsmi_status_t smi_amdgpu_get_ecc_error_count(amd::smi::AMDSmiGPUDevice* device
std::ifstream f(fullpath.c_str());
if (f.fail()) {
return AMDSMI_STATUS_NOT_SUPPORTED;
//fall back to aca file
fullpath = "/sys/class/drm/" + device->get_gpu_path() + std::string("/device/ras/aca_umc");
f.open(fullpath.c_str());
if (f.fail()) {
return AMDSMI_STATUS_NOT_SUPPORTED;
}
}
std::string line;