NVIDIA Firmware Tools (MFT) Documentation v4.22.1-406 LTS
NVIDIA ConnectX-5 Adapter Cards Firmware Release Notes v16.35.3502 LTS

mlxmdio Utility

The mlxmdio tool is used to read/write MDIO registers (Clause 45) on Boards with externally managed PHY.

To run mlxmdio, use the following line:

Copy
Copied!
            

# mlxmdio -d mst_dev -m phy_addr:dev_addr -g mdio_gw -a addr[:data] [-r size] [-w input_file]

where:

-d <device>

mst device

-m <mdio_id>

The mdio id of the target device in phy_addr:dev_addr format.

-a <addr[:data]>

Access a single MDIO reg. If data is specified, the reg is written, Otherwise, it is read. Addr and data should be in hex format.

-g <mdio_gw>

Select which mdio gateway <0..10> to use.

-c <clause>

Select which clause to use:

  • 22: clause 22.

  • 45: clause 45 (Default).

-r <size>

Read a block of <size> 16-bit words (max size 64)

-w <input_file>

Write a block from <input_file>. Every line of input file should be addr:data in hex.

-h

Show usage.

-v

Show tool version.

Methods for Sending MDIO Transactions

mlxmdio will attempt to send the MDIO transaction through a firmware interface if supported (on supported devices only). The mdio gateway values should be in the range of 0..10.

Warning

Sending MDIO transactions via FW requires specification of the PCI device.

Example:

To read mlxmdio register, run the following command:

Copy
Copied!
            

# mlxmdio -d /dev/mst/mt4123_pciconf0 -m 0x7:0x1 -a 0x0 -g 6

To write mlxmdio register, run the following command:

Copy
Copied!
            

# mlxmdio -d /dev/mst/mt4123_pciconf0 -m 0x7:0x1 -a 0x0:0x0124 -g 6

To read block of 5 sequential operations through mlxmdio register, run the following command:

Copy
Copied!
            

# mlxmdio -d /dev/mst/mt4123_pciconf0 -m 0x7:0x1 -a 0x14 -g 6 -r 5 0x0014:0x0010 0x0015:0x0003 0x0016:0x0030 0x0017:0x0040 0x0018:0x0050

Warning

The address of the beginning of the block should be provided with the "-a" flag (e.g., -a 0x14).

To write block of operations through mlxmdio register, run the following command:

Copy
Copied!
            

# mlxmdio -d /dev/mst/mt4123_pciconf0 -m 0x7:0x1 -g 6 -w input.txt

Warning

Every line of the input file should be formatted as addr:data in hex. The address of every line is not necessarily in a sequential order.

An example of the input file:

0x0017:0x0040

0x0014:0x0010

0x0015:0x0003

0x0018:0x0050

0x0016:0x0030

© Copyright 2023, NVIDIA. Last updated on Dec 28, 2023.