rocm_smi_lib: Fix rocm-smi --showfan shows 'unable to detect fan'
Code changes related to the following: * Reverts earlier fix for the same issue * Check for existence of files before reading Change-Id: I175b20c3343c414b12b79dc3fc404f53fbaabf3a Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>
This commit is contained in:
@@ -785,12 +785,8 @@ def resetFans(deviceList):
|
||||
for device in deviceList:
|
||||
sensor_ind = c_uint32(0)
|
||||
ret = rocmsmi.rsmi_dev_fan_reset(device, sensor_ind)
|
||||
if (ret == rsmi_status_t.RSMI_STATUS_NOT_SUPPORTED) or (ret == rsmi_status_t.RSMI_STATUS_PERMISSION):
|
||||
if not rsmi_ret_ok(rsmi_status_t.RSMI_STATUS_NOT_SUPPORTED, device, 'reset_fan'):
|
||||
continue
|
||||
else:
|
||||
if rsmi_ret_ok(ret, device, 'reset_fan'):
|
||||
printLog(device, 'Successfully reset fan speed to driver control', None)
|
||||
if rsmi_ret_ok(ret, device, 'reset_fan'):
|
||||
printLog(device, 'Successfully reset fan speed to driver control', None)
|
||||
printLogSpacer()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user