Fix PSU fan present while BMC on.

This commit is contained in:
Jeff Chen
2018-11-22 17:07:04 +08:00
parent 9967b15923
commit 9d5271a44a
2 changed files with 3 additions and 3 deletions

View File

@@ -191,7 +191,7 @@ static int dni_fani_info_get_fan_on_psu(int local_id, onlp_fan_info_t* info, cha
switch(local_id)
{
case FAN_1_ON_PSU1:
if((psu_present & 0x80) != 0x80)
if((psu_present & 0x01) != 0x01)
{
info->rpm = rpm_data;
info->percentage = (info->rpm * 100) / MAX_FRONT_FAN_SPEED;
@@ -204,7 +204,7 @@ static int dni_fani_info_get_fan_on_psu(int local_id, onlp_fan_info_t* info, cha
}
break;
case FAN_1_ON_PSU2:
if((psu_present & 0x08) != 0x08)
if((psu_present & 0x02) != 0x02)
{
info->rpm = rpm_data;
info->percentage = (info->rpm * 100) / MAX_FRONT_FAN_SPEED;

View File

@@ -180,7 +180,7 @@ int dni_psu_present(int *r_data)
char cmd[35] = {0};
char str_data[50] = {0};
sprintf(cmd, "ipmitool raw 0x38 0x2 3 0x6a 0x03 1");
sprintf(cmd, "ipmitool raw 0x38 0x2 2 0x6a 0x0d 1");
fptr = popen(cmd, "r");
if(fptr != NULL)
{