Hi,
I need to get an output that is the same as "ethtool -e eth0"
But I need to use another method that does not use the eth port ID (ethX).
Does anyone know of any method?
Thanks!!
Hi,
I need to get an output that is the same as "ethtool -e eth0"
But I need to use another method that does not use the eth port ID (ethX).
Does anyone know of any method?
Thanks!!
Did you try lspci in verbosest mode?
hmmm
ethtool -e eth0
returns this kind of log:
Offset Values
------ ------
0x0000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0020 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0030 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0050 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0060 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0080 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0090 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00a0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00b0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00d0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00e0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0100 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0110 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0120 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0130 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0140 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
can lspci show this kind of log?
I don't think you can dump EEPROM from raw PCI. It wouldn't work the same way for each and every kind of network card; that's why it's the job of the network driver.
Are you on Linux? You can tell which interface is on what bus:
$ ls -l /sys/class/net/
total 0
lrwxrwxrwx 1 root root 0 Apr 17 13:00 lan -> ../../devices/pci0000:00/0000:00:0a.0/net/lan
lrwxrwxrwx 1 root root 0 Apr 18 11:14 lo -> ../../devices/virtual/net/lo
lrwxrwxrwx 1 root root 0 Apr 18 11:14 sit0 -> ../../devices/virtual/net/sit0
lrwxrwxrwx 1 root root 0 Apr 18 11:14 tun0 -> ../../devices/virtual/net/tun0
$
You can se that lan(what I've renamed eth0 into) is on pci0000:00/0000:00:0a.0. From that you can decide which interface to feed into ethtool.