blob: a3c5a6685036103e7ec677272acdc4620d0302f6 [file] [log] [blame]
Chris Wrightd22157b2009-02-23 21:50:35 -08001What: /sys/bus/pci/drivers/.../bind
2Date: December 2003
3Contact: linux-pci@vger.kernel.org
4Description:
5 Writing a device location to this file will cause
6 the driver to attempt to bind to the device found at
7 this location. This is useful for overriding default
8 bindings. The format for the location is: DDDD:BB:DD.F.
9 That is Domain:Bus:Device.Function and is the same as
10 found in /sys/bus/pci/devices/. For example:
11 # echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/bind
12 (Note: kernels before 2.6.28 may require echo -n).
13
14What: /sys/bus/pci/drivers/.../unbind
15Date: December 2003
16Contact: linux-pci@vger.kernel.org
17Description:
18 Writing a device location to this file will cause the
19 driver to attempt to unbind from the device found at
20 this location. This may be useful when overriding default
21 bindings. The format for the location is: DDDD:BB:DD.F.
22 That is Domain:Bus:Device.Function and is the same as
23 found in /sys/bus/pci/devices/. For example:
24 # echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/unbind
25 (Note: kernels before 2.6.28 may require echo -n).
26
27What: /sys/bus/pci/drivers/.../new_id
28Date: December 2003
29Contact: linux-pci@vger.kernel.org
30Description:
31 Writing a device ID to this file will attempt to
32 dynamically add a new device ID to a PCI device driver.
33 This may allow the driver to support more hardware than
34 was included in the driver's static device ID support
35 table at compile time. The format for the device ID is:
36 VVVV DDDD SVVV SDDD CCCC MMMM PPPP. That is Vendor ID,
37 Device ID, Subsystem Vendor ID, Subsystem Device ID,
38 Class, Class Mask, and Private Driver Data. The Vendor ID
39 and Device ID fields are required, the rest are optional.
40 Upon successfully adding an ID, the driver will probe
41 for the device and attempt to bind to it. For example:
42 # echo "8086 10f5" > /sys/bus/pci/drivers/foo/new_id
43
Chris Wright09943752009-02-23 21:52:23 -080044What: /sys/bus/pci/drivers/.../remove_id
45Date: February 2009
46Contact: Chris Wright <chrisw@sous-sol.org>
47Description:
48 Writing a device ID to this file will remove an ID
49 that was dynamically added via the new_id sysfs entry.
50 The format for the device ID is:
51 VVVV DDDD SVVV SDDD CCCC MMMM. That is Vendor ID, Device
52 ID, Subsystem Vendor ID, Subsystem Device ID, Class,
53 and Class Mask. The Vendor ID and Device ID fields are
54 required, the rest are optional. After successfully
55 removing an ID, the driver will no longer support the
56 device. This is useful to ensure auto probing won't
57 match the driver to the device. For example:
58 # echo "8086 10f5" > /sys/bus/pci/drivers/foo/remove_id
59
Alex Chiang705b1aa2009-03-20 14:56:31 -060060What: /sys/bus/pci/rescan
61Date: January 2009
62Contact: Linux PCI developers <linux-pci@vger.kernel.org>
63Description:
64 Writing a non-zero value to this attribute will
65 force a rescan of all PCI buses in the system, and
66 re-discover previously removed devices.
Alex Chiang705b1aa2009-03-20 14:56:31 -060067
Neil Hormanb50cac52011-10-06 14:08:18 -040068What: /sys/bus/pci/devices/.../msi_irqs/
69Date: September, 2011
70Contact: Neil Horman <nhorman@tuxdriver.com>
71Description:
72 The /sys/devices/.../msi_irqs directory contains a variable set
Greg Kroah-Hartman1c51b502013-12-19 12:30:17 -080073 of files, with each file being named after a corresponding msi
74 irq vector allocated to that device.
Neil Hormanb50cac52011-10-06 14:08:18 -040075
Greg Kroah-Hartman1c51b502013-12-19 12:30:17 -080076What: /sys/bus/pci/devices/.../msi_irqs/<N>
Neil Hormanb50cac52011-10-06 14:08:18 -040077Date: September 2011
78Contact: Neil Horman <nhorman@tuxdriver.com>
79Description:
80 This attribute indicates the mode that the irq vector named by
Greg Kroah-Hartman1c51b502013-12-19 12:30:17 -080081 the file is in (msi vs. msix)
Neil Hormanb50cac52011-10-06 14:08:18 -040082
Alex Chiang77c27c72009-03-20 14:56:36 -060083What: /sys/bus/pci/devices/.../remove
84Date: January 2009
85Contact: Linux PCI developers <linux-pci@vger.kernel.org>
86Description:
87 Writing a non-zero value to this attribute will
88 hot-remove the PCI device and any of its children.
Alex Chiang77c27c72009-03-20 14:56:36 -060089
Yinghai Lub9d320f2011-05-12 17:11:39 -070090What: /sys/bus/pci/devices/.../pci_bus/.../rescan
91Date: May 2011
92Contact: Linux PCI developers <linux-pci@vger.kernel.org>
93Description:
94 Writing a non-zero value to this attribute will
95 force a rescan of the bus and all child buses,
96 and re-discover devices removed earlier from this
Stephen Rothwell40b31362013-05-21 13:49:35 +100097 part of the device tree.
Yinghai Lub9d320f2011-05-12 17:11:39 -070098
Alex Chiang738a6392009-03-20 14:56:41 -060099What: /sys/bus/pci/devices/.../rescan
100Date: January 2009
101Contact: Linux PCI developers <linux-pci@vger.kernel.org>
102Description:
103 Writing a non-zero value to this attribute will
104 force a rescan of the device's parent bus and all
105 child buses, and re-discover devices removed earlier
106 from this part of the device tree.
Alex Chiang738a6392009-03-20 14:56:41 -0600107
Michael S. Tsirkin711d5772009-07-27 23:37:48 +0300108What: /sys/bus/pci/devices/.../reset
109Date: July 2009
110Contact: Michael S. Tsirkin <mst@redhat.com>
111Description:
112 Some devices allow an individual function to be reset
113 without affecting other functions in the same device.
114 For devices that have this support, a file named reset
115 will be present in sysfs. Writing 1 to this file
116 will perform reset.
117
Ben Hutchings94e61082008-03-05 16:52:39 +0000118What: /sys/bus/pci/devices/.../vpd
119Date: February 2008
120Contact: Ben Hutchings <bhutchings@solarflare.com>
121Description:
122 A file named vpd in a device directory will be a
123 binary file containing the Vital Product Data for the
124 device. It should follow the VPD format defined in
125 PCI Specification 2.1 or 2.2, but users should consider
126 that some devices may have malformatted data. If the
127 underlying VPD has a writable section then the
128 corresponding section of this file will be writable.
Yu Zhao01db4952009-03-20 11:25:17 +0800129
130What: /sys/bus/pci/devices/.../virtfnN
131Date: March 2009
132Contact: Yu Zhao <yu.zhao@intel.com>
133Description:
134 This symbolic link appears when hardware supports the SR-IOV
135 capability and the Physical Function driver has enabled it.
136 The symbolic link points to the PCI device sysfs entry of the
137 Virtual Function whose index is N (0...MaxVFs-1).
138
139What: /sys/bus/pci/devices/.../dep_link
140Date: March 2009
141Contact: Yu Zhao <yu.zhao@intel.com>
142Description:
143 This symbolic link appears when hardware supports the SR-IOV
144 capability and the Physical Function driver has enabled it,
145 and this device has vendor specific dependencies with others.
146 The symbolic link points to the PCI device sysfs entry of
147 Physical Function this device depends on.
148
149What: /sys/bus/pci/devices/.../physfn
150Date: March 2009
151Contact: Yu Zhao <yu.zhao@intel.com>
152Description:
153 This symbolic link appears when a device is a Virtual Function.
154 The symbolic link points to the PCI device sysfs entry of the
155 Physical Function this device associates with.
Kenji Kaneshigec825bc92009-06-16 11:01:25 +0900156
157What: /sys/bus/pci/slots/.../module
158Date: June 2009
159Contact: linux-pci@vger.kernel.org
160Description:
161 This symbolic link points to the PCI hotplug controller driver
162 module that manages the hotplug slot.
Narendra K911e1c92010-07-26 05:56:50 -0500163
164What: /sys/bus/pci/devices/.../label
165Date: July 2010
166Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
167Description:
168 Reading this attribute will provide the firmware
Narendra_K@Dell.com60589892011-03-02 22:34:17 +0530169 given name (SMBIOS type 41 string or ACPI _DSM string) of
170 the PCI device. The attribute will be created only
171 if the firmware has given a name to the PCI device.
172 ACPI _DSM string name will be given priority if the
173 system firmware provides SMBIOS type 41 string also.
Narendra K911e1c92010-07-26 05:56:50 -0500174Users:
175 Userspace applications interested in knowing the
176 firmware assigned name of the PCI device.
177
178What: /sys/bus/pci/devices/.../index
179Date: July 2010
180Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
181Description:
182 Reading this attribute will provide the firmware
Narendra_K@Dell.com60589892011-03-02 22:34:17 +0530183 given instance (SMBIOS type 41 device type instance) of the
184 PCI device. The attribute will be created only if the firmware
185 has given an instance number to the PCI device.
Narendra K911e1c92010-07-26 05:56:50 -0500186Users:
187 Userspace applications interested in knowing the
188 firmware assigned device type instance of the PCI
189 device that can help in understanding the firmware
190 intended order of the PCI device.
Narendra_K@Dell.com60589892011-03-02 22:34:17 +0530191
192What: /sys/bus/pci/devices/.../acpi_index
193Date: July 2010
194Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
195Description:
196 Reading this attribute will provide the firmware
197 given instance (ACPI _DSM instance number) of the PCI device.
198 The attribute will be created only if the firmware has given
199 an instance number to the PCI device. ACPI _DSM instance number
200 will be given priority if the system firmware provides SMBIOS
201 type 41 device type instance also.
202Users:
203 Userspace applications interested in knowing the
204 firmware assigned instance number of the PCI
205 device that can help in understanding the firmware
206 intended order of the PCI device.
Huang Ying046c6532012-08-08 09:07:41 +0800207
208What: /sys/bus/pci/devices/.../d3cold_allowed
209Date: July 2012
210Contact: Huang Ying <ying.huang@intel.com>
211Description:
212 d3cold_allowed is bit to control whether the corresponding PCI
213 device can be put into D3Cold state. If it is cleared, the
214 device will never be put into D3Cold state. If it is set, the
215 device may be put into D3Cold state if other requirements are
216 satisfied too. Reading this attribute will show the current
217 value of d3cold_allowed bit. Writing this attribute will set
218 the value of d3cold_allowed bit.
Donald Dutile2597ba72012-11-27 22:31:37 -0500219
220What: /sys/bus/pci/devices/.../sriov_totalvfs
221Date: November 2012
222Contact: Donald Dutile <ddutile@redhat.com>
223Description:
224 This file appears when a physical PCIe device supports SR-IOV.
225 Userspace applications can read this file to determine the
226 maximum number of Virtual Functions (VFs) a PCIe physical
227 function (PF) can support. Typically, this is the value reported
228 in the PF's SR-IOV extended capability structure's TotalVFs
229 element. Drivers have the ability at probe time to reduce the
230 value read from this file via the pci_sriov_set_totalvfs()
231 function.
232
233What: /sys/bus/pci/devices/.../sriov_numvfs
234Date: November 2012
235Contact: Donald Dutile <ddutile@redhat.com>
236Description:
237 This file appears when a physical PCIe device supports SR-IOV.
238 Userspace applications can read and write to this file to
239 determine and control the enablement or disablement of Virtual
240 Functions (VFs) on the physical function (PF). A read of this
241 file will return the number of VFs that are enabled on this PF.
242 A number written to this file will enable the specified
243 number of VFs. A userspace application would typically read the
244 file and check that the value is zero, and then write the number
245 of VFs that should be enabled on the PF; the value written
246 should be less than or equal to the value in the sriov_totalvfs
247 file. A userspace application wanting to disable the VFs would
248 write a zero to this file. The core ensures that valid values
249 are written to this file, and returns errors when values are not
250 valid. For example, writing a 2 to this file when sriov_numvfs
251 is not 0 and not 2 already will return an error. Writing a 10
252 when the value of sriov_totalvfs is 8 will return an error.