File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
platform/broadcom/sonic-platform-modules-accton/as9736-64d/sonic_platform Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,20 @@ def get_direction(self):
82
82
direction = self .FAN_DIRECTION_EXHAUST
83
83
84
84
else : #For PSU
85
- direction = self .FAN_DIRECTION_EXHAUST
85
+ psu_path = "{}{}" .format (self .psu_cpld_path , 'psu_power_good' )
86
+ val = self ._api_helper .read_txt_file (psu_path )
87
+ if val is None or int (val , 10 )== 0 :
88
+ return self .FAN_DIRECTION_NOT_APPLICABLE
89
+
90
+ dir_str = "{}{}" .format (self .psu_hwmon_path ,'psu_fan_dir' )
91
+ val = self ._api_helper .read_txt_file (dir_str )
92
+ if val is None or val == "" :
93
+ return self .FAN_DIRECTION_EXHAUST
94
+ else :
95
+ if val == 'F2B' :
96
+ direction = self .FAN_DIRECTION_EXHAUST
97
+ else :
98
+ direction = self .FAN_DIRECTION_INTAKE
86
99
87
100
return direction
88
101
You can’t perform that action at this time.
0 commit comments