From: Daniel Stekloff <dsteklof@us.ibm.com>
To: Greg KH <greg@kroah.com>
Cc: Anthony Samsung <anthony.samsung@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: network interface to driver and pci slot mapping
Date: Thu, 11 Nov 2004 19:43:05 -0800 [thread overview]
Message-ID: <1100230914.3048.4.camel@localhost.localdomain> (raw)
In-Reply-To: <20041112005624.GA12129@kroah.com>
On Thu, 2004-11-11 at 16:56, Greg KH wrote:
> On Thu, Nov 11, 2004 at 04:28:35PM -0500, Anthony Samsung wrote:
> > Given an interface name (like eth0), how do I determine:
> > The name of the driver (module) for this interface.
> > The PCI address for this interface, if relevant.
>
> Use sysfs. All of this information is there (well, the driver link back
> to the module isn't there for most PCI drivers, but the functionality is
> there if the drivers are modified to support it...)
If you're going to use sysfs, libsysfs can help. It can be found in the
sysfsutils package here:
http://linux-diag.sourceforge.net/Sysfsutils.html
[stekloff@... stekloff]$ systool -c net eth0 -D
Class = "net"
Class Device = "eth0"
Device = "0000:02:01.0"
Driver = "e1000"
Devices using "e1000" are:
Device = "0000:02:01.0"
And more extended output:
[stekloff@... stekloff]$ systool -c net eth0 -v
Class = "net"
Class Device = "eth0"
Class Device path = "/sys/class/net/eth0"
addr_len = "6"
address = "00:0d:60:c9:42:06"
broadcast = "ff:ff:ff:ff:ff:ff"
features = "0x3a9"
flags = "0x1002"
ifindex = "6"
iflink = "6"
mtu = "1500"
tx_queue_len = "1000"
type = "1"
Device = "0000:02:01.0"
Device path = "/sys/devices/pci0000:00/0000:00:1e.0/0000:02:01.0"
class = "0x020000"
config = 86 80 1e 10 17 01 30 02 03 00 00 02 08 40
00 00
00 00 24 c0 00 00 20 c0 01 80 00 00 00 00
00 00
00 00 00 00 00 00 00 00 22 00 00 00 14 10
49 05
00 00 00 00 dc 00 00 00 00 00 00 00 0b 01
ff 00
detach_state = "0"
device = "0x101e"
irq = "11"
resource = "0x00000000c0240000 0x00000000c025ffff
0x0000000000000200
0x00000000c0200000 0x00000000c020ffff 0x0000000000000200
0x0000000000008000 0x000000000000803f 0x0000000000000101
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x000000000000ffff 0x0000000000007200"
subsystem_device = "0x0549"
subsystem_vendor = "0x1014"
vendor = "0x8086"
Driver = "e1000"
Driver path = "/sys/bus/pci/drivers/e1000"
new_id = <store method only>
Devices using "e1000" are:
"0000:02:01.0"
Thanks,
Dan
next prev parent reply other threads:[~2004-11-12 3:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-11 21:28 network interface to driver and pci slot mapping Anthony Samsung
2004-11-11 21:48 ` linux-os
2004-11-11 22:34 ` Måns Rullgård
2004-11-11 22:51 ` Jeff Garzik
2004-11-12 0:56 ` Greg KH
2004-11-12 3:43 ` Daniel Stekloff [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-11-11 21:49 Jean Tourrilhes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1100230914.3048.4.camel@localhost.localdomain \
--to=dsteklof@us.ibm.com \
--cc=anthony.samsung@gmail.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox