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:
|-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:|
|-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.|
|-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.
Sending MDIO transactions via FW requires specification of the PCI device.
To read mlxmdio register, run the following command:
To write mlxmdio register, run the following command:
To read block of 5 sequential operations through mlxmdio register, run the following command:
The address of the beginning of the block should be provided with the "-a" flag (e.g.,
To write block of operations through mlxmdio register, run the following command:
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: