Skip to content

Updating Firmware

Ido Schimmel edited this page Aug 6, 2017 · 19 revisions
Table of Contents
  1. In-Driver Firmware Flashing
  2. External Tool Firmware Flashing
    1. Mellanox Firmware Tools (MFT)
    2. Getting the Firmware
    3. Updating Firmware
  3. Further Resources

In-Driver Firmware Flashing

Since kernel version 4.13 and firmware version 13.1420.122, firmware flashing is supported from within the mlxsw driver. The supported firmware version is packaged in the linux-firmware package, relieving the user from the need to flash the firmware himself and synchronize between the kernel and firmware versions.

The linux-firmware package is based on the linux-firmware repository and contains the kernel-required firmware binaries, which can be found under the /lib/firmware/mellanox directory in most distributions given the linux-firmware package is sufficiently up to date.

To check the current firmware version, run:

$ ethtool -i <DEV>

Where DEV is some switch port interface.

There are two ways to flash a firmware using the mlxsw driver:

  • Upon driver initialization, the current firmware version used by the device is validated against the minimum version supported by the driver. If the current version is older, the driver will flash the newer firmware.
  • Using ethtool, via the ethtool -f <DEV> <firmware> command where the firmware file is a relative path to the /lib/firmware directory and DEV is some switch port interface.

Both ways require a full reboot for changes to take effect.

Note that in-driver firmware flashing requires both the firmware and the kernel to be in a sufficiently up to date version, and if either the kernel is older than 4.13 or the firmware is older than 13.1420.122, in-driver firmware flashing will fail.

External Tool Firmware Flashing

In case it is not possible to use in-driver firmware flashing, the MFT software package should be used instead.

Mellanox Firmware Tools (MFT)

The latest version of MFT is available here.

To install MFT, run:

$ tar -xf mft-<ver>.tgz
$ mft-<ver>/install.sh

To launch MFT, run:

$ mst start
Starting MST (Mellanox Software Tools) driver set
Loading MST PCI module - Success
Loading MST PCI configuration module - Success
Create devices
$ mst status
MST modules:
------------
    MST PCI module loaded
    MST PCI configuration module loaded

MST devices:
------------
/dev/mst/mt52100_pciconf0        - PCI configuration cycles access.
                                   domain:bus:dev.fn=0000:03:00.0 addr.reg=88 data.reg=92
                                   Chip revision is: 00
/dev/mst/mt52100_pci_cr0         - PCI direct access.
                                   domain:bus:dev.fn=0000:03:00.0 bar=0xf5000000 size=0x400000
                                   Chip revision is: 00

Note: MFT needs to be re-installed following every kernel update.

Getting the Firmware

The MFT capable firmware is packed in a tarball together with the installation files, as an *.mfa file. In addition, firmware files are available separately here.

Installations using kernel 4.11 and earlier should use firmware version 13.1302.120, whereas kernel 4.12 based installations should use version 13.1302.122.

Updating Firmware

To update the firmware, mlxfwmanager utility from the MFT package may be used:

$ mlxfwmanager -d /dev/mst/mt52100_pciconf0 -i mlxsw_spectrum-13.1100.0064.mfa -u -f

Where mlxsw_spectrum-13.1100.0064.mfa is the firmware file described in the previous section.

Note: The changes take effect following reboot.

Further Resources

  1. mlxfwmanager -h
Clone this wiki locally