PHYTOOL(8)
π PHYTOOL(8) β Linux MDIO register access π
okay bestie, gather round, because phytool is one of those tiny little commands that's lowkey carrying the whole networking department on its back. it lives in the System Management Commands section of the manual (section 8, iykyk), and it's literally just here to let you poke at MDIO registers on Linux. that's it. that's the whole vibe. and yet. β¨
πΈ NAME πΈ
phytool β Linux MDIO register access
π SYNOPSIS π
phytool read IFACE/ADDR/REG
phytool write IFACE/ADDR/REG <0-0xffff>
phytool print IFACE/ADDR[/REG]
and where, you ask, do all those lil pieces come from? girl, here's the breakdown:
ADDR := C22 | C45
C22 := <0-0x1f>
C45 := <0-0x1f>:<0-0x1f>
REG := <0-0x1f>
so ADDR is either a C22 address or a C45 address, C22 is a single number from <0-0x1f>, C45 is a pair like <0-0x1f>:<0-0x1f> (yes, with the colon, it's giving coordinates honestly), and REG is also <0-0x1f>. simple as. π«Ά
β¨ DESCRIPTION β¨
so the read and write commands? they're the most straightforward little register-level accessors you've ever met. no drama, no mystery β you point them at a register, and they read it or write it. periodt.
then there's print, which is the glow-up command: it pretty-prints a register for you so you're not squinting at raw hex like it's a cryptic text from your ex. π
and here's the cute part β when you're using print, the register is optional. leave it out and phytool will show you the most common registers instead. honestly? considerate. main character behavior. π
π NOTES π
not all MDIO drivers support theport:deviceClause 45 address format. so if you throw aC45-style address at a driver that's not about that life, it's just not gonna work. no cap. π
π₯ EXAMPLES π₯
here's the three commands you'll actually be typing at 2am:
phytool read eth0/0:3/1
phytool write eth0/0xa/0 0x1140
phytool print eth0/0x1c
look at that 0:3 Clause 45 flex in the first one. iconic. π
π REPORTING BUGS π
found a bug? there's a bug report address for that. go tell them, bestie β they want to know.
π¦ SEE ALSO π¦
mv6tool(8) β yes, its sibling. go say hi.
and that's the whole page, fr fr. this little writeup came from the System Management Commands corner of the manual, and it was dated January 2024 with the tag PHYTOOL(8) at the bottom. π so there you have it β go forth, read those registers, slay. β¨π
π¦ where this page comes from
- epel 9: phytool 2-3.el9 Β· GPL-2.0-or-later
- fedora 43: phytool 2-6.fc43 Β· GPL-2.0-or-later
- fedora 44: phytool 2-7.fc44 Β· GPL-2.0-or-later
- nixos 26.05: phytool 2-unstable-2024-07-14
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms