mstflint - Updating Firmware Using ethtool/devlink and .mfa2 File
In order to flash the firmware on the device using ethtool, you need to prepare a .mfa2 firmware file using the mstarchive tool - see mstarchive – Binary Files Compression Tool. Note that mstarchive requires installing mstflint with --enable-fw-mgr
option.
To perform firmware upgrade using ethtool/devlink, follow the steps below:
Run the mstarchive tool to generate the .mfa2 file (the following example assumes MFA2 v1.1.1).
# mstarchive -v
1.1
.1
--bins-dir <source binaries directory> --out-file /lib/firmware/<file_name>.mfa2Obtain the interface name of the adapter for which you wish to update firmware. For example, you can use
ifconfig -a.
# ifconfig -a ... p5p1: flags=
4099
<UP,BROADCAST,MULTICAST> mtu1500
ether ec:0d:9a:48
:af:2a txqueuelen1000
(Ethernet) RX packets0
bytes0
(0.0
B) RX errors0
dropped0
overruns0
frame0
TX packets0
bytes0
(0.0
B) TX errors0
dropped0
overruns0
carrier0
collisions0
p5p2: flags=4099
<UP,BROADCAST,MULTICAST> mtu1500
ether ec:0d:9a:48
:af:2b txqueuelen1000
(Ethernet) RX packets0
bytes0
(0.0
B) RX errors0
dropped0
overruns0
frame0
TX packets0
bytes0
(0.0
B) TX errors0
dropped0
overruns0
carrier0
collisions0
...Burn the firmware using the .mfa2 image with ethtool/devlink. Please use the .mfa2 file path relative to /lib/firmware.
ethtool command:
# ethtool -f <
interface
name> <file_name>.mfa2devlink command:
$ devlink dev flash <dev> file <file_name>.mfa2
Query the adapter to verify that the new firmware version has been loaded following.
# lspci -n | grep 15b3
04
:00.0
0207
: 15b3:1017
04
:00.1
0207
: 15b3:1017
# mstflint -d04
:00.0
q Image type: FS4 FW Version:16.26
.0292
FW Version(Running):16.25
.1020
FW Release Date:9.9
.2019
Product Version:16.26
.0292
Rom Info: type=UEFI version=14.19
.13
cpu=AMD64 type=PXE version=3.5
.802
cpu=AMD64 Description: UID GuidsNumber Base GUID: 248a0703009e950c4
Base MAC: 248a079e950c4
Image VSD: N/A Device VSD: N/A PSID: MT_0000000008 Security Attributes: N/AFor the firmware update to take effect, you need to either reboot the server or run:
# mstfwreset -d
04
:00.0
-y rValidate the firmware update by a query.
Using mst:
# mstflint -d
04
:00.0
q Image type: Image type: FS4 FW Version:16.26
.0292
FW Release Date:15.5
.2019
Product Version:16.25
.1042
Rom Info: type=UEFI version=14.18
.19
cpu=AMD64 type=PXE version=3.5
.701
cpu=AMD64 Description: UID Base GUID: ec0d9a030048af2a Base MAC: ec0d9a48af2a Image VSD: N/A Device VSD: N/A PSID: MT_0000000080 Security Attributes: N/A #Using devlink:
$ devlink dev info <dev> pci/
0000
:05
:00.0
: driver mlx5_core versions: fixed: fw.psid MT_0000000080 running: fw.version16.23
.1000
stored: fw.version16.25
.1042