mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-26 17:57:01 +00:00
Fix PSU fan present while BMC on.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user