Skip to content

Commit a222d1f

Browse files
committed
hw-mgmt:scripts: Fix voltmon5 address conflict with DPU.
hw-mgmt: scripts: Resolve voltmon5 address conflict with the DPU. When the DPU is powered off, hw-mgmt may receive two udev events referencing the same voltmon address 0u06a (voltmon2 and voltmon5) but originating from different I2C buses. This results in an unintended removal of voltmon5 on the management board. Fix: add I2C bus validation for the DPU module. Bug: 4744091 Signed-off-by: Oleksandr Shamray <[email protected]>
1 parent c927d29 commit a222d1f

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

usr/usr/bin/hw-management-chassis-events.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,13 +1487,16 @@ else
14871487
# DPU event, replace output folder.
14881488
input_bus_num=$(echo "$3""$4" | xargs dirname | xargs dirname | xargs basename | cut -d"-" -f1)
14891489
slot_num=$(find_dpu_slot_from_i2c_bus $input_bus_num)
1490-
if [ "$prefix" == "voltmon1" ] || [ "$prefix" == "voltmon2" ]; then
1491-
if [ ! -z "$slot_num" ]; then
1492-
environment_path="$hw_management_path"/dpu"$slot_num"/environment
1493-
alarm_path="$hw_management_path"/dpu"$slot_num"/alarm
1494-
thermal_path="$hw_management_path"/dpu"$slot_num"/thermal
1495-
fi
1496-
fi
1490+
if [ ! -z "$slot_num" ]; then
1491+
if [ "$prefix" == "voltmon1" ] || [ "$prefix" == "voltmon2" ]; then
1492+
environment_path="$hw_management_path"/dpu"$slot_num"/environment
1493+
alarm_path="$hw_management_path"/dpu"$slot_num"/alarm
1494+
thermal_path="$hw_management_path"/dpu"$slot_num"/thermal
1495+
else
1496+
# Skip other voltmons events, since its not present in DPU.
1497+
exit 0
1498+
fi
1499+
fi
14971500
;;
14981501
*)
14991502
;;

0 commit comments

Comments
 (0)