Skip to content

Commit e657953

Browse files
committed
[Mellanox] Use 'mlxfwmanager -d' for specifying MST device in FW burn operation.
1 parent 0c36cdd commit e657953

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

platform/mellanox/mlnx-fw-upgrade.j2

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ declare -rA FW_FILE_MAP=( \
3636
[$SPC3_ASIC]="/etc/mlnx/fw-SPC3.mfa" \
3737
)
3838

39+
declare -rA MST_DEVICE_MAP=( \
40+
[$SPC1_ASIC]="/dev/mst/mt52100_pci_cr0" \
41+
[$SPC2_ASIC]="/dev/mst/mt53100_pci_cr0" \
42+
[$SPC3_ASIC]="/dev/mst/mt53104_pci_cr0" \
43+
)
44+
3945
IMAGE_UPGRADE="${NO_PARAM}"
4046
VERBOSE_LEVEL="${VERBOSE_MIN}"
4147

@@ -175,6 +181,11 @@ function UpgradeFW() {
175181
ExitFailure "failed to detect ASIC type"
176182
fi
177183

184+
local -r _MST_DEVICE="${MST_DEVICE_MAP[$_ASIC_TYPE]}"
185+
if [[ ! -c "${_MST_DEVICE}" ]]; then
186+
ExitFailure "no such device: ${_MST_DEVICE}"
187+
fi
188+
178189
if [ ! -z "${_FS_MOUNTPOINT}" ]; then
179190
local -r _FW_FILE="${_FS_MOUNTPOINT}/${FW_FILE_MAP[$_ASIC_TYPE]}"
180191
else
@@ -207,7 +218,7 @@ function UpgradeFW() {
207218
ExitSuccess "firmware is up to date"
208219
else
209220
LogNotice "firmware upgrade is required. Installing compatible version..."
210-
RunCmd "${BURN_CMD} -i ${_FW_FILE}"
221+
RunCmd "${BURN_CMD} -d ${_MST_DEVICE} -i ${_FW_FILE}"
211222
fi
212223
}
213224

0 commit comments

Comments
 (0)