Skip to content

Commit

Permalink
hw-mgmt: scripts Fix FAN dir attribute for PN in none-MLNX format
Browse files Browse the repository at this point in the history
For the systems, with FANs equiped with FRU EEPRM fan_direction attr
value can be extracted from FRU PN field. If PN is not in MLNX
format (MTEF-FANR-A) or broken - not possible to get fan_direction
and fanX_dir attribute not crating.

With this fix added fan direction value == 2, which means "FAN
direction can't be extracted"

attribute fanX_direction can be in states:
1: P2C (forward) air flow direction
0: C2P (reverse) air flow direction
2: Unknown air flow direction

Signed-off-by: Oleksandr Shamray <[email protected]>
  • Loading branch information
sholeksandr committed Mar 6, 2024
1 parent 32b20b8 commit 19e1157
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions usr/usr/bin/hw-management-chassis-events.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,8 @@ if [ "$1" == "add" ]; then
echo 0 > $thermal_path/"${fan_prefix}"_dir
;;
*)
# Unknown FAN dir
echo 2 > $thermal_path/"${fan_prefix}"_dir
;;
esac
fi
Expand Down

0 comments on commit 19e1157

Please sign in to comment.