fix: Changes in the Device Reset Implementation

Prior to the return of object in use error, the device is bind and init
again

Related-To: NEO-10946

Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
This commit is contained in:
Bari, Pratik
2024-03-28 16:21:39 +00:00
committed by Compute-Runtime-Automation
parent 5a9853c7d0
commit 6d7e3dc5a2
7 changed files with 171 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 Intel Corporation
* Copyright (C) 2023-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -466,6 +466,7 @@ ze_result_t LinuxSysmanImp::osWarmReset() {
"Card Bus remove after resizing VF bar failed\n");
return result;
}
NEO::sleep(std::chrono::seconds(10)); // Sleep for 10seconds to make sure that the config spaces of all devices are saved correctly.
result = pFsAccess->write(rootPortPath + '/' + "rescan", "1");
if (ZE_RESULT_SUCCESS != result) {
@@ -473,6 +474,7 @@ ze_result_t LinuxSysmanImp::osWarmReset() {
"Rescanning root port failed after resizing VF bar failed\n");
return result;
}
NEO::sleep(std::chrono::seconds(10)); // Sleep for 10seconds, allows the rescan to complete on all devices attached to the root port.
}
return result;
}