Update Mellanox firmware under Ubuntu

Install Driver
http://www.panticz.de/mellanox/install-dirver

Install MFT
http://www.panticz.de/install-mellanox-mft

Get NIC info

# get controller info
for MST in $(mst status | grep "mst" | cut -d" " -f1); do
    flint -d ${MST} query #| egrep "FW Version|UEFI|PSID"
    echo
done
 
# get board id for update
for MST in $(ls /dev/mst/*); do
    echo ${MST}
    flint -d ${MST} query | grep PSID | cut -d":" -f2 | tr -d ' '
    echo
done
 
# reset parameter
for MST in $(ls /dev/mst/*); do
    mlxconfig -y -d ${MST} reset
    echo
done

Get cable statistics
https://www.mellanox.com/related-docs/MFT/MFT_user_manual_4_8_0.pdf

mst start
mst cable add
mlxcables
 
mget_temp -d /dev/mst/mt4117_pciconf0
mlxcables -d mt4117_pciconf0_cable_0 -q
mlxcables -d mt4117_pciconf0_cable_0 --read_all_regs
mlxcables -d mt4117_pciconf0_cable_0 --DDM

Links
http://www.mellanox.com/page/firmware_HCA_FW_identification - Firmware Support and Downloads - Identifying Adapter Cards
http://www.mellanox.com/page/firmware_table_IBM
http://www.mellanox.com/page/firmware_HCA_FW_update
http://www.mellanox.com/page/firmware_NIC_FW_update
http://www.mellanox.com/content/pages.php?pg=firmware_HCA_FW_update
http://www.mellanox.com/pdf/MFT/ESXi_bootable_mst_README.txt
http://www.mellanox.com/page/products_dyn?product_family=27
http://www.mellanox.com/page/products_dyn?product_family=26&mtag=linux_sw_drivers
http://www.mellanox.com/page/infiniband_cards_overview
http://www.mellanox.com/page/firmware_table_ConnectX2EN
http://www.mellanox.com/content/pages.php?pg=firmware_HCA_FW_identification
http://www.mellanox.com/content/pages.php?pg=management_tools&menu_section=34
http://packages.ubuntu.com/search?searchon=names&keywords=libmlx