From e1c862a8e83707a0e1de0509055c912f78a86a93 Mon Sep 17 00:00:00 2001 From: Dror Prital <76714716+dprital@users.noreply.github.com> Date: Wed, 28 Aug 2024 07:28:44 +0300 Subject: [PATCH] [202305][Mellanox]Integrate HW-MGMT 7.0030.2300 Changes (#19340) This PR depend with PR: sonic-net/sonic-linux-kernel#408 Why I did it Intgerate HW-MGMT 7.0030.2300 Changes Work item tracking Microsoft ADO (number only): How I did it Run make integrate-mlnx-hw-mgmt How to verify it Build an image and run tests from "sonic-mgmt". --- platform/mellanox/hw-management.mk | 2 +- ...02-Disable-hw-mgmt-on-SimX-platforms.patch | 36 +++++++++---------- platform/mellanox/hw-management/hw-mgmt | 2 +- .../external-changes.patch | 9 ++--- 4 files changed, 23 insertions(+), 26 deletions(-) diff --git a/platform/mellanox/hw-management.mk b/platform/mellanox/hw-management.mk index b46d67307fec..ca18a8af023e 100644 --- a/platform/mellanox/hw-management.mk +++ b/platform/mellanox/hw-management.mk @@ -16,7 +16,7 @@ # # Mellanox HW Management -MLNX_HW_MANAGEMENT_VERSION = 7.0030.2008 +MLNX_HW_MANAGEMENT_VERSION = 7.0030.2300 export MLNX_HW_MANAGEMENT_VERSION diff --git a/platform/mellanox/hw-management/0002-Disable-hw-mgmt-on-SimX-platforms.patch b/platform/mellanox/hw-management/0002-Disable-hw-mgmt-on-SimX-platforms.patch index a35a7e15eee4..05f4ab6dd4d1 100644 --- a/platform/mellanox/hw-management/0002-Disable-hw-mgmt-on-SimX-platforms.patch +++ b/platform/mellanox/hw-management/0002-Disable-hw-mgmt-on-SimX-platforms.patch @@ -1,15 +1,11 @@ -From eb3a76d7fbd0cbf2c370ecadd912960b094403d6 Mon Sep 17 00:00:00 2001 -From: Junchao-Mellanox -Date: Wed, 23 Aug 2023 14:33:44 +0800 -Subject: [PATCH] [PATCH 2/4] Disable hw-mgmt on SimX platforms +From 42a00c6690ae4d97040afff5bb282b5f0aa9a361 Mon Sep 17 00:00:00 2001 +From: dgsudharsan +Date: Fri, 31 May 2024 15:43:00 +0000 +Subject: [PATCH] Disable hw-mgmt on SimX platforms ---- - usr/usr/bin/hw-management-ready.sh | 3 --- - usr/usr/bin/hw-management.sh | 21 +++++++++------------ - 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/usr/usr/bin/hw-management-ready.sh b/usr/usr/bin/hw-management-ready.sh -index 840bb0b..2f8547f 100755 +index 840bb0bf..2f8547f8 100755 --- a/usr/usr/bin/hw-management-ready.sh +++ b/usr/usr/bin/hw-management-ready.sh @@ -56,9 +56,6 @@ fi @@ -23,10 +19,10 @@ index 840bb0b..2f8547f 100755 if systemctl is-enabled --quiet hw-management-tc; then echo "Stopping and disabling hw-management-tc on SimX" diff --git a/usr/usr/bin/hw-management.sh b/usr/usr/bin/hw-management.sh -index d3914d1..a60dba9 100755 +index 78ac13e8..a6e002b8 100755 --- a/usr/usr/bin/hw-management.sh +++ b/usr/usr/bin/hw-management.sh -@@ -545,7 +545,7 @@ function restore_i2c_bus_frequency_default() +@@ -601,7 +601,7 @@ function restore_i2c_bus_frequency_default() function find_regio_sysfs_path_helper() { # Find hwmon{n} sysfs path for regio device @@ -35,7 +31,7 @@ index d3914d1..a60dba9 100755 VMOD0014) for path in /sys/devices/pci0000:00/*/NVSN2201:*/mlxreg-io/hwmon/hwmon*; do if [ -d "$path" ]; then -@@ -732,10 +732,10 @@ set_jtag_gpio() +@@ -780,10 +780,10 @@ set_jtag_gpio() gpio_tdi=$((gpiobase+jtag_tdi)) echo $gpio_tdi > /sys/class/gpio/"$export_unexport" @@ -49,7 +45,7 @@ index d3914d1..a60dba9 100755 if [ "$board_type" == "VMOD0014" ]; then mux_reset=27 jtag_mux_en=33 -@@ -1294,7 +1294,7 @@ connect_msn4700_msn4600_A1() +@@ -1363,7 +1363,7 @@ connect_msn4700_msn4600_A1() # msn4600C with removed A2D connect_table+=(${msn4600C_A1_base_connect_table[@]}) else @@ -58,7 +54,7 @@ index d3914d1..a60dba9 100755 connect_table+=(${msn4700_msn4600_A1_base_connect_table[@]}) fi add_cpu_board_to_connection_table -@@ -2144,7 +2144,7 @@ create_symbolic_links() +@@ -2324,7 +2324,7 @@ create_symbolic_links() fi if [ ! -d $thermal_path ]; then mkdir $thermal_path @@ -67,7 +63,7 @@ index d3914d1..a60dba9 100755 if [ ! -d $config_path ]; then mkdir $config_path fi -@@ -2341,7 +2341,7 @@ do_start() +@@ -2556,7 +2556,7 @@ do_start() check_system set_asic_pci_id @@ -76,7 +72,7 @@ index d3914d1..a60dba9 100755 if [[ $asic_control -ne 0 ]]; then get_asic_bus get_asic2_bus -@@ -2379,9 +2379,9 @@ do_start() +@@ -2595,9 +2595,9 @@ do_start() else ln -sf /etc/sensors3.conf $config_path/lm_sensors_config fi @@ -86,18 +82,18 @@ index d3914d1..a60dba9 100755 - fi + fi if [ -v "thermal_control_config" ] && [ -f $thermal_control_config ]; then - ln -sf $thermal_control_config $config_path/tc_config.json + cp $thermal_control_config $config_path/tc_config.json else -@@ -2528,9 +2528,6 @@ do_chip_up_down() +@@ -2777,9 +2777,6 @@ do_chip_up_down() check_simx() { case $sku in -- HI130|HI122) +- HI130|HI122|HI144|HI147|HI157) - # Let the initialization go through - ;; *) if [ -n "$(lspci -vvv | grep SimX)" ]; then exit 0 -- -1.9.1 +2.43.2 diff --git a/platform/mellanox/hw-management/hw-mgmt b/platform/mellanox/hw-management/hw-mgmt index f0cbd0e61f77..f5f49751e561 160000 --- a/platform/mellanox/hw-management/hw-mgmt +++ b/platform/mellanox/hw-management/hw-mgmt @@ -1 +1 @@ -Subproject commit f0cbd0e61f77ca0d8ca37612abc5fe8339e0f884 +Subproject commit f5f49751e561f3bf4ef778c390881100f5751ba6 diff --git a/platform/mellanox/non-upstream-patches/external-changes.patch b/platform/mellanox/non-upstream-patches/external-changes.patch index 245d500ea276..c852ac1867f0 100644 --- a/platform/mellanox/non-upstream-patches/external-changes.patch +++ b/platform/mellanox/non-upstream-patches/external-changes.patch @@ -1,6 +1,6 @@ --- a/patch/series +++ b/patch/series -@@ -108,6 +108,9 @@ +@@ -110,6 +110,9 @@ 0045-i2c-mlxcpld-Fix-criteria-for-frequency-setting.patch 0046-i2c-mlxcpld-Reduce-polling-time-for-performance-impr.patch 0047-i2c-mlxcpld-Allow-flexible-polling-time-setting-for-.patch @@ -10,7 +10,7 @@ 0053-mlxsw-core-Avoid-creation-virtual-hwmon-objects-by-t.patch 0054-mlxsw-minimal-Simplify-method-of-modules-number-dete.patch 0055-platform_data-mlxreg-Add-new-type-to-support-modular.patch -@@ -155,7 +158,68 @@ +@@ -157,7 +160,68 @@ 0097-1-mlxsw-Use-u16-for-local_port-field.patch 0097-2-mlxsw-i2c-Fix-chunk-size-setting.patch 0097-3-mlxsw-core_hwmon-Adjust-module-label-names.patch @@ -79,7 +79,7 @@ 0157-platform-x86-mlx-platform-Make-activation-of-some-dr.patch 0158-platform-x86-mlx-platform-Add-cosmetic-changes-for-a.patch 0159-mlx-platform-Add-support-for-systems-equipped-with-t.patch -@@ -166,14 +230,19 @@ +@@ -168,14 +232,19 @@ 0164-hwmon-jc42-Add-support-for-Seiko-Instruments-S-34TS0.patch 0165-platform-mellanox-mlxreg-io-Add-locking-for-io-opera.patch 0166-DS-leds-leds-mlxreg-Send-udev-event-from-leds-mlxreg.patch @@ -99,7 +99,7 @@ 0182-platform-mellanox-Introduce-support-of-new-Nvidia-L1.patch 0183-platform-mellanox-Split-initialization-procedure.patch 0184-platform-mellanox-Split-logic-in-init-and-exit-flow.patch -@@ -191,24 +260,121 @@ +@@ -193,25 +262,122 @@ 0197-platform-mellanox-Fix-order-in-exit-flow.patch 0198-platform-mellanox-Add-new-attributes.patch 0199-platform-mellanox-Change-register-offset-addresses.patch @@ -217,6 +217,7 @@ +0326-platform-mellanox-mlxreg-hotplug-Add-support-for-new.patch +0327-platform-mellanox-mlx-platform-Change-register-name.patch +0328-platform-mellanox-mlx-platform-Add-support-for-new-X.patch + 0329-platform-mellanox-indicate-deferred-I2C-bus-creation.patch +9002-TMP-fix-for-fan-minimum-speed.patch ###-> mellanox_hw_mgmt-end