[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:
committed by
GitHub
parent
7d109001ac
commit
9b6e0432b2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user