Mellanox: automatic firmware update

Auto / Online firmware update
# Search latest mlxup version
http://www.mellanox.com/page/mlxup_firmware_tool

URL=http://www.mellanox.com/downloads/firmware/mlxup/4.13.0/SFX/linux_x64/mlxup
# URL=https://bit.ly/2NQWo5t
 
# Download mlxup
wget ${URL} -qO /tmp/mlxup
#gunzip /tmp/mlxup.gz
chmod +x /tmp/mlxup
 
# Auto flash all Mellanox network cards
/tmp/mlxup -y

Manual firware update

download firmware
http://www.mellanox.com/supportdownloader/

wget http://www.mellanox.com/downloads/firmware/fw-ConnectX3-rel-2_34_5000-MCX311A-XCA_Ax-FlexBoot-3.4.521.bin.zip -P /tmp
apt-get install -y unzip
unzip /tmp/fw-ConnectX3-rel-*-MCX312A-XCB_A2-A6-FlexBoot-*.bin.zip -d /tmp/

update firmware

for MST in $(ls /dev/mst/mt*_pci_cr*); do 
    flint -y -d ${MST} -i /tmp/fw-ConnectX3Pro-rel-2_42_5000-MCX312B-XCC_Ax-FlexBoot-3.4.752-UEFI-14.11.46.bin b
done

Links
http://www.mellanox.com/supportdownloader/
http://www.mellanox.com/page/firmware_table_ConnectX3EN