aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/ABI
diff options
context:
space:
mode:
authorAlex Chiang <achiang@hp.com>2010-03-08 12:24:29 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-05-11 15:01:07 -0400
commit75568f8094eb0333e9c2109b23cbc8b82d318a3c (patch)
treebdbd169b2220e067bc03f7445e2471aa2f8499a7 /Documentation/ABI
parentfc2a093e7ad23e935aa29e349bc27173c92f1a95 (diff)
PCI: create function symlinks in /sys/bus/pci/slots/N/
Create convenience symlinks in sysfs, linking slots to device functions, and vice versa. These links make it easier for users to figure out which devices actually live in what slots. For example: sapphire:/sys/bus/pci/slots # ls 1 10 2 3 4 5 6 7 8 9 sapphire:/sys/bus/pci/slots # ls -l 3 total 0 -r--r--r-- 1 root root 65536 Aug 18 14:10 address lrwxrwxrwx 1 root root 0 Aug 18 14:10 function0 -> ../../../../devices/pci0000:23/0000:23:01.0 lrwxrwxrwx 1 root root 0 Aug 18 14:10 function1 -> ../../../../devices/pci0000:23/0000:23:01.1 sapphire:/sys/bus/pci/slots # ls -l 3/function0/slot lrwxrwxrwx 1 root root 0 Aug 18 14:13 3/function0/slot -> ../../../bus/pci/slots/3 The original form of this patch was written by Matthew Wilcox, and was enhanced to include links from the sysfs slots/ directory pointing back at the device functions. Cc: willy@linux.intel.com Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'Documentation/ABI')
-rw-r--r--Documentation/ABI/testing/sysfs-bus-pci40
1 files changed, 40 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
index 25be3250f7d6..428676cfa61e 100644
--- a/Documentation/ABI/testing/sysfs-bus-pci
+++ b/Documentation/ABI/testing/sysfs-bus-pci
@@ -133,6 +133,46 @@ Description:
133 The symbolic link points to the PCI device sysfs entry of the 133 The symbolic link points to the PCI device sysfs entry of the
134 Physical Function this device associates with. 134 Physical Function this device associates with.
135 135
136
137What: /sys/bus/pci/slots/...
138Date: April 2005 (possibly older)
139KernelVersion: 2.6.12 (possibly older)
140Contact: linux-pci@vger.kernel.org
141Description:
142 When the appropriate driver is loaded, it will create a
143 directory per claimed physical PCI slot in
144 /sys/bus/pci/slots/. The names of these directories are
145 specific to the driver, which in turn, are specific to the
146 platform, but in general, should match the label on the
147 machine's physical chassis.
148
149 The drivers that can create slot directories include the
150 PCI hotplug drivers, and as of 2.6.27, the pci_slot driver.
151
152 The slot directories contain, at a minimum, a file named
153 'address' which contains the PCI bus:device:function tuple.
154 Other files may appear as well, but are specific to the
155 driver.
156
157What: /sys/bus/pci/slots/.../function[0-7]
158Date: March 2010
159KernelVersion: 2.6.35
160Contact: linux-pci@vger.kernel.org
161Description:
162 If PCI slot directories (as described above) are created,
163 and the physical slot is actually populated with a device,
164 symbolic links in the slot directory pointing to the
165 device's PCI functions are created as well.
166
167What: /sys/bus/pci/devices/.../slot
168Date: March 2010
169KernelVersion: 2.6.35
170Contact: linux-pci@vger.kernel.org
171Description:
172 If PCI slot directories (as described above) are created,
173 a symbolic link pointing to the slot directory will be
174 created as well.
175
136What: /sys/bus/pci/slots/.../module 176What: /sys/bus/pci/slots/.../module
137Date: June 2009 177Date: June 2009
138Contact: linux-pci@vger.kernel.org 178Contact: linux-pci@vger.kernel.org