Tags: vivien/linux
Tags
net: dsa: mv88e6xxx: add debugfs interface
Add a debugfs interface for the mv88e6xxx module.
# mount -t debugfs none /sys/kernel/debug
The mv88e6xxx directory contains one directory per chip:
# cd /sys/kernel/debug/mv88e6xxx/
# ls
sw0 sw1 sw2
Each chip directory contains several entries and one directory per port:
# ls -p sw0/
age_time device_map global2 p0/ p2/ p4/ p6/ scratch stats
atu/ global1 name p1/ p3/ p5/ pvt serdes vtu
# cat name
Marvell 88E6352
You can compare registers set side-by-side with the coreutils "pr" tool:
# pr -mt sw0/p*/regs
Port 0.0 Port 0.1 Port 0.2 Port 0.3 Port 0.4 Port 0.5 Port 0.6
0: 5d0f 0: 5d0f 0: 5d0f 0: 500f 0: 500f 0: 4e07 0: 4d04
1: 3 1: 3 1: 3 1: 3 1: 3 1: 403e 1: 3d
2: 0 2: 0 2: 0 2: 0 2: 0 2: 0 2: 0
3: 3521 3: 3521 3: 3521 3: 3521 3: 3521 3: 3521 3: 3521
[...]
1c: 0 1c: 0 1c: 0 1c: 0 1c: 0 1c: 0 1c: 0
1d: 0 1d: 0 1d: 0 1d: 0 1d: 0 1d: 0 1d: 0
1e: 0 1e: 0 1e: 0 1e: 0 1e: 0 1e: 0 1e: 0
1f: 0 1f: 0 1f: 0 1f: 0 1f: 0 1f: 0 1f: 0
Or even registers set from multiple chips:
# pr -mt */global1
Global1@0 Global1@1 Global1@2
0: c800 0: c800 0: c800
1: 0 1: 0 1: 9699
2: 0 2: 0 2: c6ba
[...]
1d: 1000 1d: 1000 1d: 1000
1e: 0 1e: 0 1e: 0
1f: 0 1f: 0 1f: 0
The ATU is quite big. Dump it all, or only individual FIDs with:
# cat */atu/{1,2} | grep -v FID
0 00:0a:e4:ea:19:c6 Age 7 (newest) n - - 2 - - - -
Signed-off-by: Vivien Didelot <[email protected]>
PreviousNext