Skip to content

Latest commit

 

History

History
70 lines (47 loc) · 1.11 KB

2021-06-16-mvls-mdio.md

File metadata and controls

70 lines (47 loc) · 1.11 KB
layout title author tags date
post
Tools of the Trade :: mdio & mvls
Tobas Waldekranz
howto
tools
2021-06-16 21:37:49 +0100

In this the third part of the series of useful tools for networking devices, we good deep and look at mdio & mvls from the GitHub [mdio-tools][] project. They communicate with MDIO devices using the Linux devlink API.

Other tools in this domain exist, but mdio-tools provides us with a way to do direct addressing on MDIO buses and, most importantly, atomic operations even of complex things like read-mask-write.

To list all buses:

~$ mdio bus

To show all switchcore ports:

~$ mvls port

To show the PVT:

~$ mvls pvt

To show the ATU:

~$ mvls atu

To read/write a switchcore reister

~$ mdio mvls 10* 4 raw PORT REG [VAL]

To read/write a PHY register:

~$ mdio phy *mdio PORT raw REG [VAL]

mdio mbl 10002b* 4 raw 0x10 3

mdio mbl 10002b* 4 raw 0x10 0 mdio mbl 10002b* 4 raw 0x11 0 mdio mbl 10002b* 4 raw 0x12 0

mdio phy *mdioe 9 raw 3