Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mellanox] Add hw-mgmt patch for SimX platform adaptation #6782

Merged
merged 3 commits into from
Feb 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
diff --git a/usr/usr/bin/hw-management-ready.sh b/usr/usr/bin/hw-management-ready.sh
index 3c9f7b6..05d143f 100755
--- a/usr/usr/bin/hw-management-ready.sh
+++ b/usr/usr/bin/hw-management-ready.sh
@@ -49,9 +49,12 @@ if [ -d /var/run/hw-management ]; then
rm -fr /var/run/hw-management
fi

-while [ ! -d /sys/devices/platform/mlxplat/mlxreg-hotplug/hwmon ]
-do
- sleep 1
-done
+if [ -z "$(lspci -vvv | grep SimX)" ]; then
+ while [ ! -d /sys/devices/platform/mlxplat/mlxreg-hotplug/hwmon ]
+ do
+ sleep 1
+ done
+fi
+
echo "Start Chassis HW management service."
logger -t hw-management -p daemon.notice "Start Chassis HW management service."
diff --git a/usr/usr/bin/hw-management.sh b/usr/usr/bin/hw-management.sh
index 70f1297..e427a3d 100755
--- a/usr/usr/bin/hw-management.sh
+++ b/usr/usr/bin/hw-management.sh
@@ -1110,6 +1110,13 @@ do_chip_down()
/usr/bin/hw-management-thermal-events.sh change hotplug_asic down %S %p
}

+check_simx()
+{
+ if [ -n "$(lspci -vvv | grep SimX)" ]; then
+ exit 0
+ fi
+}
+
__usage="
Usage: $(basename $0) [Options]

@@ -1135,6 +1142,8 @@ Options:
force-reload Performs hw-management 'stop' and the 'start.
"

+check_simx
+
case $ACTION in
start)
if [ -d /var/run/hw-management ]; then
2 changes: 1 addition & 1 deletion platform/mellanox/mlnx-fw-upgrade.j2
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ function UpgradeFWFromImage() {
}

function ExitIfQEMU() {
if [[ $(cat /sys/devices/virtual/dmi/id/chassis_vendor) = "QEMU" ]]; then
if [ -n "$(lspci -vvv | grep SimX)" ]; then
ExitSuccess "No FW upgrade for SimX platform"
fi
}
Expand Down