Updating Firmware - Mellanox/mlxsw GitHub Wiki

Table of Contents
  1. In-Driver Firmware Flashing
  2. External Tool Firmware Flashing
    1. Getting the Firmware
    2. Updating Firmware
  3. Further Resources

In-Driver Firmware Flashing

Firmware flashing is supported from within the mlxsw driver ever since kernel version 4.13 and firmware version 13.1420.122. The supported firmware version is packaged in the linux-firmware package, relieving users from the need to flash the firmware themselves and synchronize 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:

$ devlink dev info

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 try to flash the minimum supported version.

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 or firmware versions are older than 4.13 or 13.1420.122 respectively, then in-driver firmware flashing fails.

Note: In-driver firmware flashing is performed using *.mfa2 files, whereas flashing using external tools (described below) is performed using *.mfa files.

External Tool Firmware Flashing

If it is not possible to use in-driver firmware flashing, mstflint software package should be used instead. The latest version of mstflint is available here. In Fedora it can be installed using dnf:

$ dnf install mstflint

Getting the Firmware

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

4.12+ kernel installations should use firmware matching the requirements of the kernel as listed in its release notes; Earlier versions should use firmware version 13.1302.120.

Updating Firmware

To update the firmware, the utility mstfwmanager from the mstflint package should be used. Run:

$ mstfwmanager -d 01:00.0 -i mlxsw_spectrum-13.2000.2308.mfa -f -u

Where mlxsw_spectrum-13.2000.2308.mfa is the firmware file described in the previous section and 01:00.0 is the PCI address of the device.

Note: Changes take effect following reboot.

Further Resources

  1. man mstfwmanager