From 30f2503ab3035e2995be0e73ad1b448be82c05e2 Mon Sep 17 00:00:00 2001 From: Junchao-Mellanox <57339448+Junchao-Mellanox@users.noreply.github.com> Date: Mon, 13 Sep 2021 23:32:28 +0800 Subject: [PATCH] [Mellanox] Read PSU fan max/min speed per PSU (#8563) (#8728) New PSU could install different type of fan, so fan max/min speed should be read per PSU --- platform/mellanox/mlnx-platform-api/sonic_platform/fan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/fan.py b/platform/mellanox/mlnx-platform-api/sonic_platform/fan.py index a6043da38e32..e0cc62ede8c8 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/fan.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/fan.py @@ -72,8 +72,8 @@ def __init__(self, has_fan_dir, fan_index, drawer_index = 1, psu_fan = False, pl self.fan_speed_get_path = "psu{}_fan1_speed_get".format(self.index) self.fan_presence_path = "psu{}_fan1_speed_get".format(self.index) self._name = 'psu_{}_fan_{}'.format(self.index, 1) - self.fan_max_speed_path = os.path.join(CONFIG_PATH, "psu_fan_max") - self.fan_min_speed_path = os.path.join(CONFIG_PATH, "psu_fan_min") + self.fan_max_speed_path = os.path.join(FAN_PATH, "psu{}_fan_max".format(self.index)) + self.fan_min_speed_path = os.path.join(FAN_PATH, "psu{}_fan_min".format(self.index)) self.psu_i2c_bus_path = os.path.join(CONFIG_PATH, 'psu{0}_i2c_bus'.format(self.index)) self.psu_i2c_addr_path = os.path.join(CONFIG_PATH, 'psu{0}_i2c_addr'.format(self.index)) self.psu_i2c_command_path = os.path.join(CONFIG_PATH, 'fan_command')