* structure of /sys/class/pci_bus
@ 2004-09-04 23:39 Jon Smirl
0 siblings, 0 replies; only message in thread
From: Jon Smirl @ 2004-09-04 23:39 UTC (permalink / raw)
To: lkml
I'm having some trouble with the way sysfs is structured for multiple
PCI busses.
[jonsmirl@smirl /]$ ls sys/class/pci_bus
0000:00 0000:01 0000:02
I have three busses in my system. It is Intel i875P.
[jonsmirl@smirl /]$ ls sys/class/pci_bus/0000:00
bridge cpuaffinity
Normal pci_bus entry
[jonsmirl@smirl /]$ ls sys/class/pci_bus/0000:00/bridge -l
lrwxrwxrwx 1 root root 0 Sep 4 13:10
sys/class/pci_bus/0000:00/bridge -> ../../../devices/pci0000:00
bridge for bus 0 is pci0000:00
[jonsmirl@smirl /]$ ls sys/class/pci_bus/0000:01/bridge -l
lrwxrwxrwx 1 root root 0 Sep 4 13:10
sys/class/pci_bus/0000:01/bridge ->
../../../devices/pci0000:00/0000:00:01.0
bridge for bus 0 is pci0000:00/0000:00:01.0
[jonsmirl@smirl /]$ ls sys/class/pci_bus/0000:02/bridge -l
lrwxrwxrwx 1 root root 0 Sep 4 13:10
sys/class/pci_bus/0000:02/bridge ->
../../../devices/pci0000:00/0000:00:1e.0
bridge for bus 2 is pci0000:00/0000:00:1e.0
[jonsmirl@smirl /]$ ls sys/class/pci_bus/0000:00/bridge
0000:00:00.0 0000:00:1d.0 0000:00:1d.2 0000:00:1d.7 0000:00:1f.0
0000:00:1f.2 0000:00:1f.5 power
0000:00:01.0 0000:00:1d.1 0000:00:1d.3 0000:00:1e.0 0000:00:1f.1
0000:00:1f.3 detach_state
But bridge 0 is not linked to a bridge node. It is linked to the host
device node instead. This is not symetrical with bus 1 and 2.
[jonsmirl@smirl /]$ ls sys/class/pci_bus/0000:01/bridge
0000:01:00.0 class detach_state irq resource subsystem_vendor
0000:01:00.1 config device power subsystem_device vendor
This is what a normal bridge node looks like
[jonsmirl@smirl /]$ cat sys/class/pci_bus/0000:01/bridge/class
0x060400
Bridge is a PCI bridge
[jonsmirl@smirl /]$ ls sys/class/pci_bus/0000:00/bridge/0000:00:00.0
class config detach_state device irq power resource
subsystem_device subsystem_vendor vendor
This is the real bridge node for bus 0.
[jonsmirl@smirl /]$ cat sys/class/pci_bus/0000:00/bridge/0000:00:00.0/class
0x060000
Class is Host bridge. Host bridge has two nodes in sysfs, a device
node, pci0000:00, and a pci_device node, 0000:00:00.0.
[jonsmirl@smirl /]$ ls sys/devices
pci0000:00 platform system
This shows the top level Host bridge.
Starting from here, how I am supposed to figure out that 0000:00:00.0
is the PCI device for controlling this bridge?
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-09-04 23:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-04 23:39 structure of /sys/class/pci_bus Jon Smirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox