sysfs-bus-pci 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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_irqs/
  64. Date: September, 2011
  65. Contact: Neil Horman <nhorman@tuxdriver.com>
  66. Description:
  67. The /sys/devices/.../msi_irqs directory contains a variable set
  68. of sub-directories, with each sub-directory being named after a
  69. corresponding msi irq vector allocated to that device. Each
  70. numbered sub-directory N contains attributes of that irq.
  71. Note that this directory is not created for device drivers which
  72. do not support msi irqs
  73. What: /sys/bus/pci/devices/.../msi_irqs/<N>/mode
  74. Date: September 2011
  75. Contact: Neil Horman <nhorman@tuxdriver.com>
  76. Description:
  77. This attribute indicates the mode that the irq vector named by
  78. the parent directory is in (msi vs. msix)
  79. What: /sys/bus/pci/devices/.../remove
  80. Date: January 2009
  81. Contact: Linux PCI developers <linux-pci@vger.kernel.org>
  82. Description:
  83. Writing a non-zero value to this attribute will
  84. hot-remove the PCI device and any of its children.
  85. What: /sys/bus/pci/devices/.../pci_bus/.../rescan
  86. Date: May 2011
  87. Contact: Linux PCI developers <linux-pci@vger.kernel.org>
  88. Description:
  89. Writing a non-zero value to this attribute will
  90. force a rescan of the bus and all child buses,
  91. and re-discover devices removed earlier from this
  92. part of the device tree.
  93. What: /sys/bus/pci/devices/.../rescan
  94. Date: January 2009
  95. Contact: Linux PCI developers <linux-pci@vger.kernel.org>
  96. Description:
  97. Writing a non-zero value to this attribute will
  98. force a rescan of the device's parent bus and all
  99. child buses, and re-discover devices removed earlier
  100. from this part of the device tree.
  101. What: /sys/bus/pci/devices/.../reset
  102. Date: July 2009
  103. Contact: Michael S. Tsirkin <mst@redhat.com>
  104. Description:
  105. Some devices allow an individual function to be reset
  106. without affecting other functions in the same device.
  107. For devices that have this support, a file named reset
  108. will be present in sysfs. Writing 1 to this file
  109. will perform reset.
  110. What: /sys/bus/pci/devices/.../vpd
  111. Date: February 2008
  112. Contact: Ben Hutchings <bhutchings@solarflare.com>
  113. Description:
  114. A file named vpd in a device directory will be a
  115. binary file containing the Vital Product Data for the
  116. device. It should follow the VPD format defined in
  117. PCI Specification 2.1 or 2.2, but users should consider
  118. that some devices may have malformatted data. If the
  119. underlying VPD has a writable section then the
  120. corresponding section of this file will be writable.
  121. What: /sys/bus/pci/devices/.../virtfnN
  122. Date: March 2009
  123. Contact: Yu Zhao <yu.zhao@intel.com>
  124. Description:
  125. This symbolic link appears when hardware supports the SR-IOV
  126. capability and the Physical Function driver has enabled it.
  127. The symbolic link points to the PCI device sysfs entry of the
  128. Virtual Function whose index is N (0...MaxVFs-1).
  129. What: /sys/bus/pci/devices/.../dep_link
  130. Date: March 2009
  131. Contact: Yu Zhao <yu.zhao@intel.com>
  132. Description:
  133. This symbolic link appears when hardware supports the SR-IOV
  134. capability and the Physical Function driver has enabled it,
  135. and this device has vendor specific dependencies with others.
  136. The symbolic link points to the PCI device sysfs entry of
  137. Physical Function this device depends on.
  138. What: /sys/bus/pci/devices/.../physfn
  139. Date: March 2009
  140. Contact: Yu Zhao <yu.zhao@intel.com>
  141. Description:
  142. This symbolic link appears when a device is a Virtual Function.
  143. The symbolic link points to the PCI device sysfs entry of the
  144. Physical Function this device associates with.
  145. What: /sys/bus/pci/slots/.../module
  146. Date: June 2009
  147. Contact: linux-pci@vger.kernel.org
  148. Description:
  149. This symbolic link points to the PCI hotplug controller driver
  150. module that manages the hotplug slot.
  151. What: /sys/bus/pci/devices/.../label
  152. Date: July 2010
  153. Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
  154. Description:
  155. Reading this attribute will provide the firmware
  156. given name (SMBIOS type 41 string or ACPI _DSM string) of
  157. the PCI device. The attribute will be created only
  158. if the firmware has given a name to the PCI device.
  159. ACPI _DSM string name will be given priority if the
  160. system firmware provides SMBIOS type 41 string also.
  161. Users:
  162. Userspace applications interested in knowing the
  163. firmware assigned name of the PCI device.
  164. What: /sys/bus/pci/devices/.../index
  165. Date: July 2010
  166. Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
  167. Description:
  168. Reading this attribute will provide the firmware
  169. given instance (SMBIOS type 41 device type instance) of the
  170. PCI device. The attribute will be created only if the firmware
  171. has given an instance number to the PCI device.
  172. Users:
  173. Userspace applications interested in knowing the
  174. firmware assigned device type instance of the PCI
  175. device that can help in understanding the firmware
  176. intended order of the PCI device.
  177. What: /sys/bus/pci/devices/.../acpi_index
  178. Date: July 2010
  179. Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
  180. Description:
  181. Reading this attribute will provide the firmware
  182. given instance (ACPI _DSM instance number) of the PCI device.
  183. The attribute will be created only if the firmware has given
  184. an instance number to the PCI device. ACPI _DSM instance number
  185. will be given priority if the system firmware provides SMBIOS
  186. type 41 device type instance also.
  187. Users:
  188. Userspace applications interested in knowing the
  189. firmware assigned instance number of the PCI
  190. device that can help in understanding the firmware
  191. intended order of the PCI device.
  192. What: /sys/bus/pci/devices/.../d3cold_allowed
  193. Date: July 2012
  194. Contact: Huang Ying <ying.huang@intel.com>
  195. Description:
  196. d3cold_allowed is bit to control whether the corresponding PCI
  197. device can be put into D3Cold state. If it is cleared, the
  198. device will never be put into D3Cold state. If it is set, the
  199. device may be put into D3Cold state if other requirements are
  200. satisfied too. Reading this attribute will show the current
  201. value of d3cold_allowed bit. Writing this attribute will set
  202. the value of d3cold_allowed bit.
  203. What: /sys/bus/pci/devices/.../sriov_totalvfs
  204. Date: November 2012
  205. Contact: Donald Dutile <ddutile@redhat.com>
  206. Description:
  207. This file appears when a physical PCIe device supports SR-IOV.
  208. Userspace applications can read this file to determine the
  209. maximum number of Virtual Functions (VFs) a PCIe physical
  210. function (PF) can support. Typically, this is the value reported
  211. in the PF's SR-IOV extended capability structure's TotalVFs
  212. element. Drivers have the ability at probe time to reduce the
  213. value read from this file via the pci_sriov_set_totalvfs()
  214. function.
  215. What: /sys/bus/pci/devices/.../sriov_numvfs
  216. Date: November 2012
  217. Contact: Donald Dutile <ddutile@redhat.com>
  218. Description:
  219. This file appears when a physical PCIe device supports SR-IOV.
  220. Userspace applications can read and write to this file to
  221. determine and control the enablement or disablement of Virtual
  222. Functions (VFs) on the physical function (PF). A read of this
  223. file will return the number of VFs that are enabled on this PF.
  224. A number written to this file will enable the specified
  225. number of VFs. A userspace application would typically read the
  226. file and check that the value is zero, and then write the number
  227. of VFs that should be enabled on the PF; the value written
  228. should be less than or equal to the value in the sriov_totalvfs
  229. file. A userspace application wanting to disable the VFs would
  230. write a zero to this file. The core ensures that valid values
  231. are written to this file, and returns errors when values are not
  232. valid. For example, writing a 2 to this file when sriov_numvfs
  233. is not 0 and not 2 already will return an error. Writing a 10
  234. when the value of sriov_totalvfs is 8 will return an error.