Merge pull request #621 from zhouzi88/swl-5642

as7726 fan related bug fix
This commit is contained in:
Zi Zhou
2019-09-18 14:38:29 -07:00
committed by GitHub
2 changed files with 8 additions and 4 deletions

View File

@@ -28,7 +28,7 @@
#define PSU_PREFIX_PATH "/sys/bus/i2c/devices/"
#define MAX_FAN_SPEED 25500
#define MAX_FAN_SPEED 18500
#define MAX_PSU_FAN_SPEED 25500
enum fan_id {
@@ -318,7 +318,7 @@ onlp_fani_percentage_set(onlp_oid_t id, int p)
return ONLP_STATUS_E_INVALID;
}
DEBUG_PRINT("Fan path = (%s)", path);
DEBUG_PRINT("Fan path = (%s)", path);
if (onlp_file_write_integer(path, p) < 0) {
AIM_LOG_ERROR("Unable to write data to file (%s)\r\n", path);

View File

@@ -272,7 +272,9 @@ int onlp_sysi_platform_manage_fans(void)
onlp_fani_percentage_set(ONLP_FAN_ID_CREATE(1), FAN_DUTY_CYCLE_MAX);
fan_fail=1;
break;
}
} else {
fan_fail = 0;
}
/* Decision 1: Set fan as full speed if any fan is failed.
*/
if (fan_info.status & ONLP_FAN_STATUS_FAILED || !(fan_info.status & ONLP_FAN_STATUS_PRESENT)) {
@@ -280,7 +282,9 @@ int onlp_sysi_platform_manage_fans(void)
onlp_fani_percentage_set(ONLP_FAN_ID_CREATE(1), FAN_DUTY_CYCLE_MAX);
fan_fail=1;
break;
}
} else {
fan_fail = 0;
}
}
if(current_state!=ori_state)