Why I did it The hw resources should be released before updating firmware. How I did it Added logic to release hw resources in syncd.sh script Signed-off-by: Vadym Hlushko <vadymh@nvidia.com> Co-authored-by: Vadym Hlushko <62022266+vadymhlushko-mlnx@users.noreply.github.com>
This commit is contained in:
parent
5b05598cac
commit
a134bfe0b2
@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
. /usr/local/bin/syncd_common.sh
|
. /usr/local/bin/syncd_common.sh
|
||||||
|
|
||||||
|
declare -r UNKN_MST="unknown"
|
||||||
|
|
||||||
|
function GetMstDevice() {
|
||||||
|
local _MST_DEVICE="$(ls /dev/mst/*_pci_cr0 2>&1)"
|
||||||
|
|
||||||
|
if [[ ! -c "${_MST_DEVICE}" ]]; then
|
||||||
|
echo "${UNKN_MST}"
|
||||||
|
else
|
||||||
|
echo "${_MST_DEVICE}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function startplatform() {
|
function startplatform() {
|
||||||
|
|
||||||
# platform specific tasks
|
# platform specific tasks
|
||||||
@ -23,6 +35,12 @@ function startplatform() {
|
|||||||
|
|
||||||
debug "Starting Firmware update procedure"
|
debug "Starting Firmware update procedure"
|
||||||
/usr/bin/mst start --with_i2cdev
|
/usr/bin/mst start --with_i2cdev
|
||||||
|
|
||||||
|
local -r _MST_DEVICE="$(GetMstDevice)"
|
||||||
|
if [[ "${_MST_DEVICE}" != "${UNKN_MST}" ]]; then
|
||||||
|
/usr/bin/flint -d $_MST_DEVICE --clear_semaphore
|
||||||
|
fi
|
||||||
|
|
||||||
/usr/bin/mlnx-fw-upgrade.sh
|
/usr/bin/mlnx-fw-upgrade.sh
|
||||||
/etc/init.d/sxdkernel restart
|
/etc/init.d/sxdkernel restart
|
||||||
debug "Firmware update procedure ended"
|
debug "Firmware update procedure ended"
|
||||||
|
Reference in New Issue
Block a user