sysfs-bus-pci 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. What: /sys/bus/pci/drivers/.../bind
  2. Date: December 2003
  3. Contact: linux-pci@vger.kernel.org
  4. Description:
  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. What: /sys/bus/pci/drivers/.../unbind
  14. Date: December 2003
  15. Contact: linux-pci@vger.kernel.org
  16. Description:
  17. Writing a device location to this file will cause the
  18. driver to attempt to unbind from the device found at
  19. this location. This may be useful when overriding default
  20. bindings. The format for the location is: DDDD:BB:DD.F.
  21. That is Domain:Bus:Device.Function and is the same as
  22. found in /sys/bus/pci/devices/. For example::
  23. # echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/unbind
  24. (Note: kernels before 2.6.28 may require echo -n).
  25. What: /sys/bus/pci/drivers/.../new_id
  26. Date: December 2003
  27. Contact: linux-pci@vger.kernel.org
  28. Description:
  29. Writing a device ID to this file will attempt to
  30. dynamically add a new device ID to a PCI device driver.
  31. This may allow the driver to support more hardware than
  32. was included in the driver's static device ID support
  33. table at compile time. The format for the device ID is:
  34. VVVV DDDD SVVV SDDD CCCC MMMM PPPP. That is Vendor ID,
  35. Device ID, Subsystem Vendor ID, Subsystem Device ID,
  36. Class, Class Mask, and Private Driver Data. The Vendor ID
  37. and Device ID fields are required, the rest are optional.
  38. Upon successfully adding an ID, the driver will probe
  39. for the device and attempt to bind to it. For example::
  40. # echo "8086 10f5" > /sys/bus/pci/drivers/foo/new_id
  41. What: /sys/bus/pci/drivers/.../remove_id
  42. Date: February 2009
  43. Contact: Chris Wright <chrisw@sous-sol.org>
  44. Description:
  45. Writing a device ID to this file will remove an ID
  46. that was dynamically added via the new_id sysfs entry.
  47. The format for the device ID is:
  48. VVVV DDDD SVVV SDDD CCCC MMMM. That is Vendor ID, Device
  49. ID, Subsystem Vendor ID, Subsystem Device ID, Class,
  50. and Class Mask. The Vendor ID and Device ID fields are
  51. required, the rest are optional. After successfully
  52. removing an ID, the driver will no longer support the
  53. device. This is useful to ensure auto probing won't
  54. match the driver to the device. For example::
  55. # echo "8086 10f5" > /sys/bus/pci/drivers/foo/remove_id
  56. What: /sys/bus/pci/rescan
  57. Date: January 2009
  58. Contact: Linux PCI developers <linux-pci@vger.kernel.org>
  59. Description:
  60. Writing a non-zero value to this attribute will
  61. force a rescan of all PCI buses in the system, and
  62. re-discover previously removed devices.
  63. What: /sys/bus/pci/devices/.../msi_bus
  64. Date: September 2014
  65. Contact: Linux PCI developers <linux-pci@vger.kernel.org>
  66. Description:
  67. Writing a zero value to this attribute disallows MSI and
  68. MSI-X for any future drivers of the device. If the device
  69. is a bridge, MSI and MSI-X will be disallowed for future
  70. drivers of all child devices under the bridge. Drivers
  71. must be reloaded for the new setting to take effect.
  72. What: /sys/bus/pci/devices/.../msi_irqs/
  73. Date: September, 2011
  74. Contact: Neil Horman <nhorman@tuxdriver.com>
  75. Description:
  76. The /sys/devices/.../msi_irqs directory contains a variable set
  77. of files, with each file being named after a corresponding msi
  78. irq vector allocated to that device.
  79. What: /sys/bus/pci/devices/.../msi_irqs/<N>
  80. Date: September 2011
  81. Contact: Neil Horman <nhorman@tuxdriver.com>
  82. Description:
  83. This attribute indicates the mode that the irq vector named by
  84. the file is in (msi vs. msix)
  85. What: /sys/bus/pci/devices/.../remove
  86. Date: January 2009
  87. Contact: Linux PCI developers <linux-pci@vger.kernel.org>
  88. Description:
  89. Writing a non-zero value to this attribute will
  90. hot-remove the PCI device and any of its children.
  91. What: /sys/bus/pci/devices/.../pci_bus/.../rescan
  92. Date: May 2011
  93. Contact: Linux PCI developers <linux-pci@vger.kernel.org>
  94. Description:
  95. Writing a non-zero value to this attribute will
  96. force a rescan of the bus and all child buses,
  97. and re-discover devices removed earlier from this
  98. part of the device tree.
  99. What: /sys/bus/pci/devices/.../rescan
  100. Date: January 2009
  101. Contact: Linux PCI developers <linux-pci@vger.kernel.org>
  102. Description:
  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.
  107. What: /sys/bus/pci/devices/.../reset
  108. Date: July 2009
  109. Contact: Michael S. Tsirkin <mst@redhat.com>
  110. Description:
  111. Some devices allow an individual function to be reset
  112. without affecting other functions in the same device.
  113. For devices that have this support, a file named reset
  114. will be present in sysfs. Writing 1 to this file
  115. will perform reset.
  116. What: /sys/bus/pci/devices/.../vpd
  117. Date: February 2008
  118. Contact: Ben Hutchings <bwh@kernel.org>
  119. Description:
  120. A file named vpd in a device directory will be a
  121. binary file containing the Vital Product Data for the
  122. device. It should follow the VPD format defined in
  123. PCI Specification 2.1 or 2.2, but users should consider
  124. that some devices may have malformatted data. If the
  125. underlying VPD has a writable section then the
  126. corresponding section of this file will be writable.
  127. What: /sys/bus/pci/devices/.../virtfnN
  128. Date: March 2009
  129. Contact: Yu Zhao <yu.zhao@intel.com>
  130. Description:
  131. This symbolic link appears when hardware supports the SR-IOV
  132. capability and the Physical Function driver has enabled it.
  133. The symbolic link points to the PCI device sysfs entry of the
  134. Virtual Function whose index is N (0...MaxVFs-1).
  135. What: /sys/bus/pci/devices/.../dep_link
  136. Date: March 2009
  137. Contact: Yu Zhao <yu.zhao@intel.com>
  138. Description:
  139. This symbolic link appears when hardware supports the SR-IOV
  140. capability and the Physical Function driver has enabled it,
  141. and this device has vendor specific dependencies with others.
  142. The symbolic link points to the PCI device sysfs entry of
  143. Physical Function this device depends on.
  144. What: /sys/bus/pci/devices/.../physfn
  145. Date: March 2009
  146. Contact: Yu Zhao <yu.zhao@intel.com>
  147. Description:
  148. This symbolic link appears when a device is a Virtual Function.
  149. The symbolic link points to the PCI device sysfs entry of the
  150. Physical Function this device associates with.
  151. What: /sys/bus/pci/slots/.../module
  152. Date: June 2009
  153. Contact: linux-pci@vger.kernel.org
  154. Description:
  155. This symbolic link points to the PCI hotplug controller driver
  156. module that manages the hotplug slot.
  157. What: /sys/bus/pci/devices/.../label
  158. Date: July 2010
  159. Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
  160. Description:
  161. Reading this attribute will provide the firmware
  162. given name (SMBIOS type 41 string or ACPI _DSM string) of
  163. the PCI device. The attribute will be created only
  164. if the firmware has given a name to the PCI device.
  165. ACPI _DSM string name will be given priority if the
  166. system firmware provides SMBIOS type 41 string also.
  167. Users:
  168. Userspace applications interested in knowing the
  169. firmware assigned name of the PCI device.
  170. What: /sys/bus/pci/devices/.../index
  171. Date: July 2010
  172. Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
  173. Description:
  174. Reading this attribute will provide the firmware
  175. given instance (SMBIOS type 41 device type instance) of the
  176. PCI device. The attribute will be created only if the firmware
  177. has given an instance number to the PCI device.
  178. Users:
  179. Userspace applications interested in knowing the
  180. firmware assigned device type instance of the PCI
  181. device that can help in understanding the firmware
  182. intended order of the PCI device.
  183. What: /sys/bus/pci/devices/.../acpi_index
  184. Date: July 2010
  185. Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
  186. Description:
  187. Reading this attribute will provide the firmware
  188. given instance (ACPI _DSM instance number) of the PCI device.
  189. The attribute will be created only if the firmware has given
  190. an instance number to the PCI device. ACPI _DSM instance number
  191. will be given priority if the system firmware provides SMBIOS
  192. type 41 device type instance also.
  193. Users:
  194. Userspace applications interested in knowing the
  195. firmware assigned instance number of the PCI
  196. device that can help in understanding the firmware
  197. intended order of the PCI device.
  198. What: /sys/bus/pci/devices/.../d3cold_allowed
  199. Date: July 2012
  200. Contact: Huang Ying <ying.huang@intel.com>
  201. Description:
  202. d3cold_allowed is bit to control whether the corresponding PCI
  203. device can be put into D3Cold state. If it is cleared, the
  204. device will never be put into D3Cold state. If it is set, the
  205. device may be put into D3Cold state if other requirements are
  206. satisfied too. Reading this attribute will show the current
  207. value of d3cold_allowed bit. Writing this attribute will set
  208. the value of d3cold_allowed bit.
  209. What: /sys/bus/pci/devices/.../sriov_totalvfs
  210. Date: November 2012
  211. Contact: Donald Dutile <ddutile@redhat.com>
  212. Description:
  213. This file appears when a physical PCIe device supports SR-IOV.
  214. Userspace applications can read this file to determine the
  215. maximum number of Virtual Functions (VFs) a PCIe physical
  216. function (PF) can support. Typically, this is the value reported
  217. in the PF's SR-IOV extended capability structure's TotalVFs
  218. element. Drivers have the ability at probe time to reduce the
  219. value read from this file via the pci_sriov_set_totalvfs()
  220. function.
  221. What: /sys/bus/pci/devices/.../sriov_numvfs
  222. Date: November 2012
  223. Contact: Donald Dutile <ddutile@redhat.com>
  224. Description:
  225. This file appears when a physical PCIe device supports SR-IOV.
  226. Userspace applications can read and write to this file to
  227. determine and control the enablement or disablement of Virtual
  228. Functions (VFs) on the physical function (PF). A read of this
  229. file will return the number of VFs that are enabled on this PF.
  230. A number written to this file will enable the specified
  231. number of VFs. A userspace application would typically read the
  232. file and check that the value is zero, and then write the number
  233. of VFs that should be enabled on the PF; the value written
  234. should be less than or equal to the value in the sriov_totalvfs
  235. file. A userspace application wanting to disable the VFs would
  236. write a zero to this file. The core ensures that valid values
  237. are written to this file, and returns errors when values are not
  238. valid. For example, writing a 2 to this file when sriov_numvfs
  239. is not 0 and not 2 already will return an error. Writing a 10
  240. when the value of sriov_totalvfs is 8 will return an error.
  241. What: /sys/bus/pci/devices/.../driver_override
  242. Date: April 2014
  243. Contact: Alex Williamson <alex.williamson@redhat.com>
  244. Description:
  245. This file allows the driver for a device to be specified which
  246. will override standard static and dynamic ID matching. When
  247. specified, only a driver with a name matching the value written
  248. to driver_override will have an opportunity to bind to the
  249. device. The override is specified by writing a string to the
  250. driver_override file (echo pci-stub > driver_override) and
  251. may be cleared with an empty string (echo > driver_override).
  252. This returns the device to standard matching rules binding.
  253. Writing to driver_override does not automatically unbind the
  254. device from its current driver or make any attempt to
  255. automatically load the specified driver. If no driver with a
  256. matching name is currently loaded in the kernel, the device
  257. will not bind to any driver. This also allows devices to
  258. opt-out of driver binding using a driver_override name such as
  259. "none". Only a single driver may be specified in the override,
  260. there is no support for parsing delimiters.
  261. What: /sys/bus/pci/devices/.../numa_node
  262. Date: Oct 2014
  263. Contact: Prarit Bhargava <prarit@redhat.com>
  264. Description:
  265. This file contains the NUMA node to which the PCI device is
  266. attached, or -1 if the node is unknown. The initial value
  267. comes from an ACPI _PXM method or a similar firmware
  268. source. If that is missing or incorrect, this file can be
  269. written to override the node. In that case, please report
  270. a firmware bug to the system vendor. Writing to this file
  271. taints the kernel with TAINT_FIRMWARE_WORKAROUND, which
  272. reduces the supportability of your system.
  273. What: /sys/bus/pci/devices/.../revision
  274. Date: November 2016
  275. Contact: Emil Velikov <emil.l.velikov@gmail.com>
  276. Description:
  277. This file contains the revision field of the PCI device.
  278. The value comes from device config space. The file is read only.
  279. What: /sys/bus/pci/devices/.../sriov_drivers_autoprobe
  280. Date: April 2017
  281. Contact: Bodong Wang<bodong@mellanox.com>
  282. Description:
  283. This file is associated with the PF of a device that
  284. supports SR-IOV. It determines whether newly-enabled VFs
  285. are immediately bound to a driver. It initially contains
  286. 1, which means the kernel automatically binds VFs to a
  287. compatible driver immediately after they are enabled. If
  288. an application writes 0 to the file before enabling VFs,
  289. the kernel will not bind VFs to a driver.
  290. A typical use case is to write 0 to this file, then enable
  291. VFs, then assign the newly-created VFs to virtual machines.
  292. Note that changing this file does not affect already-
  293. enabled VFs. In this scenario, the user must first disable
  294. the VFs, write 0 to sriov_drivers_autoprobe, then re-enable
  295. the VFs.
  296. This is similar to /sys/bus/pci/drivers_autoprobe, but
  297. affects only the VFs associated with a specific PF.
  298. What: /sys/bus/pci/devices/.../p2pmem/size
  299. Date: November 2017
  300. Contact: Logan Gunthorpe <logang@deltatee.com>
  301. Description:
  302. If the device has any Peer-to-Peer memory registered, this
  303. file contains the total amount of memory that the device
  304. provides (in decimal).
  305. What: /sys/bus/pci/devices/.../p2pmem/available
  306. Date: November 2017
  307. Contact: Logan Gunthorpe <logang@deltatee.com>
  308. Description:
  309. If the device has any Peer-to-Peer memory registered, this
  310. file contains the amount of memory that has not been
  311. allocated (in decimal).
  312. What: /sys/bus/pci/devices/.../p2pmem/published
  313. Date: November 2017
  314. Contact: Logan Gunthorpe <logang@deltatee.com>
  315. Description:
  316. If the device has any Peer-to-Peer memory registered, this
  317. file contains a '1' if the memory has been published for
  318. use outside the driver that owns the device.
  319. What: /sys/bus/pci/devices/.../link/clkpm
  320. /sys/bus/pci/devices/.../link/l0s_aspm
  321. /sys/bus/pci/devices/.../link/l1_aspm
  322. /sys/bus/pci/devices/.../link/l1_1_aspm
  323. /sys/bus/pci/devices/.../link/l1_2_aspm
  324. /sys/bus/pci/devices/.../link/l1_1_pcipm
  325. /sys/bus/pci/devices/.../link/l1_2_pcipm
  326. Date: October 2019
  327. Contact: Heiner Kallweit <hkallweit1@gmail.com>
  328. Description: If ASPM is supported for an endpoint, these files can be
  329. used to disable or enable the individual power management
  330. states. Write y/1/on to enable, n/0/off to disable.