diff --git a/device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfputil.py index 77831b54d2fd..053b591b70fb 100644 --- a/device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfputil.py +++ b/device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfputil.py @@ -49,7 +49,7 @@ def port_to_eeprom_mapping(self): return self._port_to_eeprom_mapping def __init__(self): - eeprom_path = "/bsp/qsfp/qsfp{0}" + eeprom_path = "/sys/devices/platform/i2c_mlxcpld.1/i2c-1/i2c-2/2-0048/qsfp{0}" for x in range(0, self.port_end + 1): self._port_to_eeprom_mapping[x] = eeprom_path.format(x + self.EEPROM_OFFSET) diff --git a/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py index a4eda6edfe39..d534386e2fbe 100644 --- a/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py +++ b/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py @@ -49,7 +49,7 @@ def port_to_eeprom_mapping(self): return self._port_to_eeprom_mapping def __init__(self): - eeprom_path = "/sys/class/i2c-adapter/i2c-2/2-0048/hwmon/hwmon4/qsfp{0}_eeprom" + eeprom_path = "/sys/devices/platform/i2c_mlxcpld.1/i2c-1/i2c-2/2-0048/qsfp{0}" for x in range(0, self.port_end + 1): self._port_to_eeprom_mapping[x] = eeprom_path.format(x + self.EEPROM_OFFSET) diff --git a/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py index 8bd4ba789168..bc61073ba10b 100644 --- a/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py +++ b/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py @@ -49,7 +49,7 @@ def port_to_eeprom_mapping(self): return self._port_to_eeprom_mapping def __init__(self): - eeprom_path = "/sys/class/i2c-adapter/i2c-2/2-0048/hwmon/hwmon7/qsfp{0}_eeprom" + eeprom_path = "/sys/devices/platform/i2c_mlxcpld.1/i2c-1/i2c-2/2-0048/qsfp{0}" for x in range(0, self.port_end + 1): self._port_to_eeprom_mapping[x] = eeprom_path.format(x + self.EEPROM_OFFSET) diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py index 11a5bdcb02b6..f85fcc4d9040 100644 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py @@ -49,7 +49,7 @@ def port_to_eeprom_mapping(self): return self._port_to_eeprom_mapping def __init__(self): - eeprom_path = "/sys/class/i2c-adapter/i2c-2/2-0048/hwmon/hwmon7/qsfp{0}_eeprom" + eeprom_path = "/sys/devices/platform/i2c_mlxcpld.1/i2c-1/i2c-2/2-0048/qsfp{0}" for x in range(0, self.port_end + 1): self._port_to_eeprom_mapping[x] = eeprom_path.format(x + self.EEPROM_OFFSET) diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py index f84cefc67268..f85fcc4d9040 100644 --- a/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py @@ -49,7 +49,7 @@ def port_to_eeprom_mapping(self): return self._port_to_eeprom_mapping def __init__(self): - eeprom_path = "/sys/class/i2c-adapter/i2c-2/2-0048/hwmon/hwmon6/qsfp{0}_eeprom" + eeprom_path = "/sys/devices/platform/i2c_mlxcpld.1/i2c-1/i2c-2/2-0048/qsfp{0}" for x in range(0, self.port_end + 1): self._port_to_eeprom_mapping[x] = eeprom_path.format(x + self.EEPROM_OFFSET) diff --git a/files/build_templates/updategraph.service.j2 b/files/build_templates/updategraph.service.j2 index 8039f42531cd..e01fd0146f98 100644 --- a/files/build_templates/updategraph.service.j2 +++ b/files/build_templates/updategraph.service.j2 @@ -4,7 +4,7 @@ After=rc-local.service After=database.service Requires=database.service {% if sonic_asic_platform == 'mellanox' -%} -Requires=hw-management.service +Requires=msn-chassis.service {% endif -%} diff --git a/files/scripts/syncd.sh b/files/scripts/syncd.sh index ad3ddd164cde..b7d23209557f 100755 --- a/files/scripts/syncd.sh +++ b/files/scripts/syncd.sh @@ -74,7 +74,6 @@ start() { /usr/bin/mlnx-fw-upgrade.sh /etc/init.d/sxdkernel start /sbin/modprobe i2c-dev - /etc/mlnx/mlnx-hw-management start elif [ x$sonic_asic_platform == x'cavium' ]; then /etc/init.d/xpnet.sh start fi @@ -115,7 +114,6 @@ stop() { if [[ x"$WARM_BOOT" != x"true" ]]; then # platform specific tasks if [ x$sonic_asic_platform == x'mellanox' ]; then - /etc/mlnx/mlnx-hw-management stop /etc/init.d/sxdkernel stop /usr/bin/mst stop elif [ x$sonic_asic_platform == x'cavium' ]; then diff --git a/platform/mellanox/hw-management.mk b/platform/mellanox/hw-management.mk index cd457181268f..10e6bcd76652 100644 --- a/platform/mellanox/hw-management.mk +++ b/platform/mellanox/hw-management.mk @@ -1,6 +1,6 @@ # Mellanox HW Management -MLNX_HW_MANAGEMENT_VERSION = onl.deb9.13.12.2017 +MLNX_HW_MANAGEMENT_VERSION = 27.09.2018 export MLNX_HW_MANAGEMENT_VERSION diff --git a/platform/mellanox/hw-management/Add-modprobe-config-for-at24-module.patch b/platform/mellanox/hw-management/Add-modprobe-config-for-at24-module.patch deleted file mode 100644 index 37d57da4e937..000000000000 --- a/platform/mellanox/hw-management/Add-modprobe-config-for-at24-module.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 2f70f5df445820fb86e3bd7f95707e0fb97b553f Mon Sep 17 00:00:00 2001 -From: Volodymyr Samotiy -Date: Thu, 16 Aug 2018 17:21:37 +0300 -Subject: Add modprobe config for "at24" module - -Signed-off-by: Volodymyr Samotiy ---- - usr/etc/modprobe.d/mellanox-system-whitelist.conf | 1 + - 1 file changed, 1 insertion(+) - create mode 100644 usr/etc/modprobe.d/mellanox-system-whitelist.conf - -diff --git a/usr/etc/modprobe.d/mellanox-system-whitelist.conf b/usr/etc/modprobe.d/mellanox-system-whitelist.conf -new file mode 100644 -index 0000000..a3eef57 ---- /dev/null -+++ b/usr/etc/modprobe.d/mellanox-system-whitelist.conf -@@ -0,0 +1 @@ -+options at24 io_limit=32 --- -1.9.1 - diff --git a/platform/mellanox/hw-management/Add-systemd-service-config.patch b/platform/mellanox/hw-management/Add-systemd-service-config.patch deleted file mode 100644 index ce16bb712ee1..000000000000 --- a/platform/mellanox/hw-management/Add-systemd-service-config.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 22fef644b1150677353ab0559828ea45a982d901 Mon Sep 17 00:00:00 2001 -From: Andriy Moroz -Date: Wed, 11 Jul 2018 16:51:07 +0300 -Subject: [PATCH] Add systemd service config - -Signed-off-by: Andriy Moroz ---- - debian/control | 2 +- - debian/hw-management.service | 10 ++++++++++ - debian/rules | 2 +- - 3 files changed, 12 insertions(+), 2 deletions(-) - create mode 100644 debian/hw-management.service - -diff --git a/debian/control b/debian/control -index 048cd61..7e3a545 100644 ---- a/debian/control -+++ b/debian/control -@@ -1,7 +1,7 @@ - Source: hw-management - Priority: extra - Maintainer: MellanoxBSP --Build-Depends: -+Build-Depends: dh-systemd - Standards-Version: - Section: libs - Homepage: http://www.mellanox.com -diff --git a/debian/hw-management.service b/debian/hw-management.service -new file mode 100644 -index 0000000..d18916d ---- /dev/null -+++ b/debian/hw-management.service -@@ -0,0 +1,10 @@ -+[Unit] -+Description=Mellanox Hardware Management -+ -+[Service] -+Type=oneshot -+EnvironmentFile=/host/machine.conf -+ExecStart=/bin/bash -c "/etc/mlnx/mlnx-hw-management start" -+ -+[Install] -+WantedBy=multi-user.target -diff --git a/debian/rules b/debian/rules -index fc38817..fba4150 100755 ---- a/debian/rules -+++ b/debian/rules -@@ -8,7 +8,7 @@ K_SRC ?= "/lib/modules/$(KVERSION)/build" - pwd=$(shell pwd) - - %: -- dh $@ -+ dh $@ --with systemd - - override_dh_auto_configure: - --- -1.9.1 - diff --git a/platform/mellanox/hw-management/Fix-system-EEPROM-for-MSN2740-platform.patch b/platform/mellanox/hw-management/Fix-system-EEPROM-for-MSN2740-platform.patch deleted file mode 100644 index 5519692e12ed..000000000000 --- a/platform/mellanox/hw-management/Fix-system-EEPROM-for-MSN2740-platform.patch +++ /dev/null @@ -1,25 +0,0 @@ -From cebfa8338c2e5953a097de2a776bb680e7a34410 Mon Sep 17 00:00:00 2001 -From: Volodymyr Samotiy -Date: Fri, 17 Aug 2018 13:27:16 +0300 -Subject: Fix system EEPROM for MSN2740 platform - -Signed-off-by: Volodymyr Samotiy ---- - usr/etc/mlnx/mlnx-hw-management | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/usr/etc/mlnx/mlnx-hw-management b/usr/etc/mlnx/mlnx-hw-management -index 54cdd30..4f0d265 100755 ---- a/usr/etc/mlnx/mlnx-hw-management -+++ b/usr/etc/mlnx/mlnx-hw-management -@@ -107,6 +107,7 @@ msn2740_connect_table=( mlxsw_minimal 0x48 2 \ - max11603 0x64 5 \ - tmp102 0x49 6 \ - tmp102 0x48 7 \ -+ 24c32 0x51 8 \ - max11603 0x6d 15 \ - 24c32 0x51 16) - --- -1.9.1 - diff --git a/platform/mellanox/hw-management/hw-mgmt b/platform/mellanox/hw-management/hw-mgmt index ff83e6490d5c..344e81942c02 160000 --- a/platform/mellanox/hw-management/hw-mgmt +++ b/platform/mellanox/hw-management/hw-mgmt @@ -1 +1 @@ -Subproject commit ff83e6490d5c36fff6bfb17781119b52e234f5f6 +Subproject commit 344e81942c02c279db03c3aba40db4142dc6817d