From 6f2efa4d544a62a3e6f52d49e117a56ad711b391 Mon Sep 17 00:00:00 2001 From: Bellekallu Rajkiran Date: Sun, 10 Apr 2022 18:12:57 +0000 Subject: [PATCH] Update fabric id based on new sysfs entry Added new iaf directory path to query fabric id. Related-To: LOCI-3034 Signed-off-by: Bellekallu Rajkiran --- .../sysman/fabric_port/linux/fabric_device_access_imp.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/level_zero/tools/source/sysman/fabric_port/linux/fabric_device_access_imp.cpp b/level_zero/tools/source/sysman/fabric_port/linux/fabric_device_access_imp.cpp index dd227191da..4ce1ddc0b0 100644 --- a/level_zero/tools/source/sysman/fabric_port/linux/fabric_device_access_imp.cpp +++ b/level_zero/tools/source/sysman/fabric_port/linux/fabric_device_access_imp.cpp @@ -14,7 +14,8 @@ namespace L0 { const std::string iafPath = "device/"; -const std::string iafDirectory = "iaf."; +const std::string iafDirectoryLegacy = "iaf."; +const std::string iafDirectory = "i915.iaf."; const std::string fabricIdFile = "/iaf_fabric_id"; ze_result_t FabricDeviceAccessNl::getState(const zes_fabric_port_id_t portId, zes_fabric_port_state_t &state) { @@ -216,8 +217,8 @@ ze_result_t FabricDeviceAccessNl::init() { return ZE_RESULT_ERROR_UNKNOWN; } for (auto entry : list) { - if (!iafDirectory.compare(entry.substr(0, iafDirectory.length()))) { - // device/iaf.X/iaf_fabric_id, where X is the hardware slot number + if ((!iafDirectoryLegacy.compare(entry.substr(0, iafDirectoryLegacy.length()))) || (!iafDirectory.compare(entry.substr(0, iafDirectory.length())))) { + // device/iaf.X/iaf_fabric_id or device/i915.iaf.X/iaf_fabric_id, where X is the hardware slot number path = iafPath + entry + fabricIdFile; } }