Ajit_Prem> Given just the PCI devfn, can I
Ajit_Prem> determine the interface name (like eth5)
Yes.
use /proc/pci or /proc/bus/pci/devices
Eg. I have the devices:
Bus 0, device 10, function 0:
Medium devsel. IRQ 9.
I/O at 0x6400 [0x6401].
Bus 0, device 11, function 0:
Medium devsel. IRQ 12.
I/O at 0x6500 [0x6501].
ifconfig tells me:
eth0 Link encap:Ethernet HWaddr 00:00:C0:FF:EE:00
Interrupt:9 Base address:0x6400
eth1 Link encap:Ethernet HWaddr 00:C1:49:00:DE:AD
Interrupt:12 Base address:0x6500
which tells me device 10 is eth0 and device 11 is eth1 (compare I/O
addresses and IRQs)
Simple enough to write a small perl (or bash) script that does the
comparison.
- Matt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/