File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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+
3945IMAGE_UPGRADE=" ${NO_PARAM} "
4046VERBOSE_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
You can’t perform that action at this time.
0 commit comments