Closed k3wals closed 1 year ago
My quess is that you have to specify the correct PHY address.
phytool read IFACE/ADDR/REG
Means read REG
from PHY using address ADDR
on the MDIO bus to which IFACE
's PHY is attached. I.e., if eth0
and eth1
are using PHYs that are attached to the same underlying MDIO bus, then your two commands will be equivalent.
This should give you what you want:
phytool eth0/$(ethtool eth0 | awk '/PHYAD:/ { print($2); }')/1
phytool eth1/$(ethtool eth1 | awk '/PHYAD:/ { print($2); }')/1
I realize that this is not very user-friendly at all. In time, I hope to provide a much better interface using mdio-tools. Once I solve wkz/mdio-tools#22, this should all work much better.
This is a good work-around. Thanks.
I'm working on a TI AM335x based embedded system that has two PHYs and uses cpsw. I noticed that regardless of if I specify eth0 or eth1, I always get data for eth0 when using phytool.
For purpose of demonstration, I have only one of my interfaces connected (eth0). As you can see,
phytool eth1/0/1
reports back the same register value as eth0. ethtool reports correctly.