162306a36Sopenharmony_ciWhat: /sys/bus/pci/drivers/.../bind 262306a36Sopenharmony_ciWhat: /sys/devices/pciX/.../bind 362306a36Sopenharmony_ciDate: December 2003 462306a36Sopenharmony_ciContact: linux-pci@vger.kernel.org 562306a36Sopenharmony_ciDescription: 662306a36Sopenharmony_ci Writing a device location to this file will cause 762306a36Sopenharmony_ci the driver to attempt to bind to the device found at 862306a36Sopenharmony_ci this location. This is useful for overriding default 962306a36Sopenharmony_ci bindings. The format for the location is: DDDD:BB:DD.F. 1062306a36Sopenharmony_ci That is Domain:Bus:Device.Function and is the same as 1162306a36Sopenharmony_ci found in /sys/bus/pci/devices/. For example:: 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci # echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/bind 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci (Note: kernels before 2.6.28 may require echo -n). 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ciWhat: /sys/bus/pci/drivers/.../unbind 1862306a36Sopenharmony_ciWhat: /sys/devices/pciX/.../unbind 1962306a36Sopenharmony_ciDate: December 2003 2062306a36Sopenharmony_ciContact: linux-pci@vger.kernel.org 2162306a36Sopenharmony_ciDescription: 2262306a36Sopenharmony_ci Writing a device location to this file will cause the 2362306a36Sopenharmony_ci driver to attempt to unbind from the device found at 2462306a36Sopenharmony_ci this location. This may be useful when overriding default 2562306a36Sopenharmony_ci bindings. The format for the location is: DDDD:BB:DD.F. 2662306a36Sopenharmony_ci That is Domain:Bus:Device.Function and is the same as 2762306a36Sopenharmony_ci found in /sys/bus/pci/devices/. For example:: 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci # echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/unbind 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci (Note: kernels before 2.6.28 may require echo -n). 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ciWhat: /sys/bus/pci/drivers/.../new_id 3462306a36Sopenharmony_ciWhat: /sys/devices/pciX/.../new_id 3562306a36Sopenharmony_ciDate: December 2003 3662306a36Sopenharmony_ciContact: linux-pci@vger.kernel.org 3762306a36Sopenharmony_ciDescription: 3862306a36Sopenharmony_ci Writing a device ID to this file will attempt to 3962306a36Sopenharmony_ci dynamically add a new device ID to a PCI device driver. 4062306a36Sopenharmony_ci This may allow the driver to support more hardware than 4162306a36Sopenharmony_ci was included in the driver's static device ID support 4262306a36Sopenharmony_ci table at compile time. The format for the device ID is: 4362306a36Sopenharmony_ci VVVV DDDD SVVV SDDD CCCC MMMM PPPP. That is Vendor ID, 4462306a36Sopenharmony_ci Device ID, Subsystem Vendor ID, Subsystem Device ID, 4562306a36Sopenharmony_ci Class, Class Mask, and Private Driver Data. The Vendor ID 4662306a36Sopenharmony_ci and Device ID fields are required, the rest are optional. 4762306a36Sopenharmony_ci Upon successfully adding an ID, the driver will probe 4862306a36Sopenharmony_ci for the device and attempt to bind to it. For example:: 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci # echo "8086 10f5" > /sys/bus/pci/drivers/foo/new_id 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ciWhat: /sys/bus/pci/drivers/.../remove_id 5362306a36Sopenharmony_ciWhat: /sys/devices/pciX/.../remove_id 5462306a36Sopenharmony_ciDate: February 2009 5562306a36Sopenharmony_ciContact: Chris Wright <chrisw@sous-sol.org> 5662306a36Sopenharmony_ciDescription: 5762306a36Sopenharmony_ci Writing a device ID to this file will remove an ID 5862306a36Sopenharmony_ci that was dynamically added via the new_id sysfs entry. 5962306a36Sopenharmony_ci The format for the device ID is: 6062306a36Sopenharmony_ci VVVV DDDD SVVV SDDD CCCC MMMM. That is Vendor ID, Device 6162306a36Sopenharmony_ci ID, Subsystem Vendor ID, Subsystem Device ID, Class, 6262306a36Sopenharmony_ci and Class Mask. The Vendor ID and Device ID fields are 6362306a36Sopenharmony_ci required, the rest are optional. After successfully 6462306a36Sopenharmony_ci removing an ID, the driver will no longer support the 6562306a36Sopenharmony_ci device. This is useful to ensure auto probing won't 6662306a36Sopenharmony_ci match the driver to the device. For example:: 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci # echo "8086 10f5" > /sys/bus/pci/drivers/foo/remove_id 6962306a36Sopenharmony_ci 7062306a36Sopenharmony_ciWhat: /sys/bus/pci/rescan 7162306a36Sopenharmony_ciDate: January 2009 7262306a36Sopenharmony_ciContact: Linux PCI developers <linux-pci@vger.kernel.org> 7362306a36Sopenharmony_ciDescription: 7462306a36Sopenharmony_ci Writing a non-zero value to this attribute will 7562306a36Sopenharmony_ci force a rescan of all PCI buses in the system, and 7662306a36Sopenharmony_ci re-discover previously removed devices. 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../msi_bus 7962306a36Sopenharmony_ciDate: September 2014 8062306a36Sopenharmony_ciContact: Linux PCI developers <linux-pci@vger.kernel.org> 8162306a36Sopenharmony_ciDescription: 8262306a36Sopenharmony_ci Writing a zero value to this attribute disallows MSI and 8362306a36Sopenharmony_ci MSI-X for any future drivers of the device. If the device 8462306a36Sopenharmony_ci is a bridge, MSI and MSI-X will be disallowed for future 8562306a36Sopenharmony_ci drivers of all child devices under the bridge. Drivers 8662306a36Sopenharmony_ci must be reloaded for the new setting to take effect. 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../msi_irqs/ 8962306a36Sopenharmony_ciDate: September, 2011 9062306a36Sopenharmony_ciContact: Neil Horman <nhorman@tuxdriver.com> 9162306a36Sopenharmony_ciDescription: 9262306a36Sopenharmony_ci The /sys/devices/.../msi_irqs directory contains a variable set 9362306a36Sopenharmony_ci of files, with each file being named after a corresponding msi 9462306a36Sopenharmony_ci irq vector allocated to that device. 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../msi_irqs/<N> 9762306a36Sopenharmony_ciDate: September 2011 9862306a36Sopenharmony_ciContact: Neil Horman <nhorman@tuxdriver.com> 9962306a36Sopenharmony_ciDescription: 10062306a36Sopenharmony_ci This attribute indicates the mode that the irq vector named by 10162306a36Sopenharmony_ci the file is in (msi vs. msix) 10262306a36Sopenharmony_ci 10362306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../irq 10462306a36Sopenharmony_ciDate: August 2021 10562306a36Sopenharmony_ciContact: Linux PCI developers <linux-pci@vger.kernel.org> 10662306a36Sopenharmony_ciDescription: 10762306a36Sopenharmony_ci If a driver has enabled MSI (not MSI-X), "irq" contains the 10862306a36Sopenharmony_ci IRQ of the first MSI vector. Otherwise "irq" contains the 10962306a36Sopenharmony_ci IRQ of the legacy INTx interrupt. 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_ci "irq" being set to 0 indicates that the device isn't 11262306a36Sopenharmony_ci capable of generating legacy INTx interrupts. 11362306a36Sopenharmony_ci 11462306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../remove 11562306a36Sopenharmony_ciDate: January 2009 11662306a36Sopenharmony_ciContact: Linux PCI developers <linux-pci@vger.kernel.org> 11762306a36Sopenharmony_ciDescription: 11862306a36Sopenharmony_ci Writing a non-zero value to this attribute will 11962306a36Sopenharmony_ci hot-remove the PCI device and any of its children. 12062306a36Sopenharmony_ci 12162306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../pci_bus/.../rescan 12262306a36Sopenharmony_ciDate: May 2011 12362306a36Sopenharmony_ciContact: Linux PCI developers <linux-pci@vger.kernel.org> 12462306a36Sopenharmony_ciDescription: 12562306a36Sopenharmony_ci Writing a non-zero value to this attribute will 12662306a36Sopenharmony_ci force a rescan of the bus and all child buses, 12762306a36Sopenharmony_ci and re-discover devices removed earlier from this 12862306a36Sopenharmony_ci part of the device tree. 12962306a36Sopenharmony_ci 13062306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../rescan 13162306a36Sopenharmony_ciDate: January 2009 13262306a36Sopenharmony_ciContact: Linux PCI developers <linux-pci@vger.kernel.org> 13362306a36Sopenharmony_ciDescription: 13462306a36Sopenharmony_ci Writing a non-zero value to this attribute will 13562306a36Sopenharmony_ci force a rescan of the device's parent bus and all 13662306a36Sopenharmony_ci child buses, and re-discover devices removed earlier 13762306a36Sopenharmony_ci from this part of the device tree. 13862306a36Sopenharmony_ci 13962306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../reset_method 14062306a36Sopenharmony_ciDate: August 2021 14162306a36Sopenharmony_ciContact: Amey Narkhede <ameynarkhede03@gmail.com> 14262306a36Sopenharmony_ciDescription: 14362306a36Sopenharmony_ci Some devices allow an individual function to be reset 14462306a36Sopenharmony_ci without affecting other functions in the same slot. 14562306a36Sopenharmony_ci 14662306a36Sopenharmony_ci For devices that have this support, a file named 14762306a36Sopenharmony_ci reset_method is present in sysfs. Reading this file 14862306a36Sopenharmony_ci gives names of the supported and enabled reset methods and 14962306a36Sopenharmony_ci their ordering. Writing a space-separated list of names of 15062306a36Sopenharmony_ci reset methods sets the reset methods and ordering to be 15162306a36Sopenharmony_ci used when resetting the device. Writing an empty string 15262306a36Sopenharmony_ci disables the ability to reset the device. Writing 15362306a36Sopenharmony_ci "default" enables all supported reset methods in the 15462306a36Sopenharmony_ci default ordering. 15562306a36Sopenharmony_ci 15662306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../reset 15762306a36Sopenharmony_ciDate: July 2009 15862306a36Sopenharmony_ciContact: Michael S. Tsirkin <mst@redhat.com> 15962306a36Sopenharmony_ciDescription: 16062306a36Sopenharmony_ci Some devices allow an individual function to be reset 16162306a36Sopenharmony_ci without affecting other functions in the same device. 16262306a36Sopenharmony_ci For devices that have this support, a file named reset 16362306a36Sopenharmony_ci will be present in sysfs. Writing 1 to this file 16462306a36Sopenharmony_ci will perform reset. 16562306a36Sopenharmony_ci 16662306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../vpd 16762306a36Sopenharmony_ciDate: February 2008 16862306a36Sopenharmony_ciContact: Ben Hutchings <bwh@kernel.org> 16962306a36Sopenharmony_ciDescription: 17062306a36Sopenharmony_ci A file named vpd in a device directory will be a 17162306a36Sopenharmony_ci binary file containing the Vital Product Data for the 17262306a36Sopenharmony_ci device. It should follow the VPD format defined in 17362306a36Sopenharmony_ci PCI Specification 2.1 or 2.2, but users should consider 17462306a36Sopenharmony_ci that some devices may have incorrectly formatted data. 17562306a36Sopenharmony_ci If the underlying VPD has a writable section then the 17662306a36Sopenharmony_ci corresponding section of this file will be writable. 17762306a36Sopenharmony_ci 17862306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../virtfn<N> 17962306a36Sopenharmony_ciDate: March 2009 18062306a36Sopenharmony_ciContact: Yu Zhao <yu.zhao@intel.com> 18162306a36Sopenharmony_ciDescription: 18262306a36Sopenharmony_ci This symbolic link appears when hardware supports the SR-IOV 18362306a36Sopenharmony_ci capability and the Physical Function driver has enabled it. 18462306a36Sopenharmony_ci The symbolic link points to the PCI device sysfs entry of the 18562306a36Sopenharmony_ci Virtual Function whose index is N (0...MaxVFs-1). 18662306a36Sopenharmony_ci 18762306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../dep_link 18862306a36Sopenharmony_ciDate: March 2009 18962306a36Sopenharmony_ciContact: Yu Zhao <yu.zhao@intel.com> 19062306a36Sopenharmony_ciDescription: 19162306a36Sopenharmony_ci This symbolic link appears when hardware supports the SR-IOV 19262306a36Sopenharmony_ci capability and the Physical Function driver has enabled it, 19362306a36Sopenharmony_ci and this device has vendor specific dependencies with others. 19462306a36Sopenharmony_ci The symbolic link points to the PCI device sysfs entry of 19562306a36Sopenharmony_ci Physical Function this device depends on. 19662306a36Sopenharmony_ci 19762306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../physfn 19862306a36Sopenharmony_ciDate: March 2009 19962306a36Sopenharmony_ciContact: Yu Zhao <yu.zhao@intel.com> 20062306a36Sopenharmony_ciDescription: 20162306a36Sopenharmony_ci This symbolic link appears when a device is a Virtual Function. 20262306a36Sopenharmony_ci The symbolic link points to the PCI device sysfs entry of the 20362306a36Sopenharmony_ci Physical Function this device associates with. 20462306a36Sopenharmony_ci 20562306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../modalias 20662306a36Sopenharmony_ciDate: May 2005 20762306a36Sopenharmony_ciContact: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 20862306a36Sopenharmony_ciDescription: 20962306a36Sopenharmony_ci This attribute indicates the PCI ID of the device object. 21062306a36Sopenharmony_ci 21162306a36Sopenharmony_ci That is in the format: 21262306a36Sopenharmony_ci pci:vXXXXXXXXdXXXXXXXXsvXXXXXXXXsdXXXXXXXXbcXXscXXiXX, 21362306a36Sopenharmony_ci where: 21462306a36Sopenharmony_ci 21562306a36Sopenharmony_ci - vXXXXXXXX contains the vendor ID; 21662306a36Sopenharmony_ci - dXXXXXXXX contains the device ID; 21762306a36Sopenharmony_ci - svXXXXXXXX contains the sub-vendor ID; 21862306a36Sopenharmony_ci - sdXXXXXXXX contains the subsystem device ID; 21962306a36Sopenharmony_ci - bcXX contains the device class; 22062306a36Sopenharmony_ci - scXX contains the device subclass; 22162306a36Sopenharmony_ci - iXX contains the device class programming interface. 22262306a36Sopenharmony_ci 22362306a36Sopenharmony_ciWhat: /sys/bus/pci/slots/.../module 22462306a36Sopenharmony_ciDate: June 2009 22562306a36Sopenharmony_ciContact: linux-pci@vger.kernel.org 22662306a36Sopenharmony_ciDescription: 22762306a36Sopenharmony_ci This symbolic link points to the PCI hotplug controller driver 22862306a36Sopenharmony_ci module that manages the hotplug slot. 22962306a36Sopenharmony_ci 23062306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../label 23162306a36Sopenharmony_ciDate: July 2010 23262306a36Sopenharmony_ciContact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com 23362306a36Sopenharmony_ciDescription: 23462306a36Sopenharmony_ci Reading this attribute will provide the firmware 23562306a36Sopenharmony_ci given name (SMBIOS type 41 string or ACPI _DSM string) of 23662306a36Sopenharmony_ci the PCI device. The attribute will be created only 23762306a36Sopenharmony_ci if the firmware has given a name to the PCI device. 23862306a36Sopenharmony_ci ACPI _DSM string name will be given priority if the 23962306a36Sopenharmony_ci system firmware provides SMBIOS type 41 string also. 24062306a36Sopenharmony_ciUsers: 24162306a36Sopenharmony_ci Userspace applications interested in knowing the 24262306a36Sopenharmony_ci firmware assigned name of the PCI device. 24362306a36Sopenharmony_ci 24462306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../index 24562306a36Sopenharmony_ciDate: July 2010 24662306a36Sopenharmony_ciContact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com 24762306a36Sopenharmony_ciDescription: 24862306a36Sopenharmony_ci Reading this attribute will provide the firmware given instance 24962306a36Sopenharmony_ci number of the PCI device. Depending on the platform this can 25062306a36Sopenharmony_ci be for example the SMBIOS type 41 device type instance or the 25162306a36Sopenharmony_ci user-defined ID (UID) on s390. The attribute will be created 25262306a36Sopenharmony_ci only if the firmware has given an instance number to the PCI 25362306a36Sopenharmony_ci device and that number is guaranteed to uniquely identify the 25462306a36Sopenharmony_ci device in the system. 25562306a36Sopenharmony_ciUsers: 25662306a36Sopenharmony_ci Userspace applications interested in knowing the 25762306a36Sopenharmony_ci firmware assigned device type instance of the PCI 25862306a36Sopenharmony_ci device that can help in understanding the firmware 25962306a36Sopenharmony_ci intended order of the PCI device. 26062306a36Sopenharmony_ci 26162306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../acpi_index 26262306a36Sopenharmony_ciDate: July 2010 26362306a36Sopenharmony_ciContact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com 26462306a36Sopenharmony_ciDescription: 26562306a36Sopenharmony_ci Reading this attribute will provide the firmware 26662306a36Sopenharmony_ci given instance (ACPI _DSM instance number) of the PCI device. 26762306a36Sopenharmony_ci The attribute will be created only if the firmware has given 26862306a36Sopenharmony_ci an instance number to the PCI device. ACPI _DSM instance number 26962306a36Sopenharmony_ci will be given priority if the system firmware provides SMBIOS 27062306a36Sopenharmony_ci type 41 device type instance also. 27162306a36Sopenharmony_ciUsers: 27262306a36Sopenharmony_ci Userspace applications interested in knowing the 27362306a36Sopenharmony_ci firmware assigned instance number of the PCI 27462306a36Sopenharmony_ci device that can help in understanding the firmware 27562306a36Sopenharmony_ci intended order of the PCI device. 27662306a36Sopenharmony_ci 27762306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../d3cold_allowed 27862306a36Sopenharmony_ciDate: July 2012 27962306a36Sopenharmony_ciContact: Huang Ying <ying.huang@intel.com> 28062306a36Sopenharmony_ciDescription: 28162306a36Sopenharmony_ci d3cold_allowed is bit to control whether the corresponding PCI 28262306a36Sopenharmony_ci device can be put into D3Cold state. If it is cleared, the 28362306a36Sopenharmony_ci device will never be put into D3Cold state. If it is set, the 28462306a36Sopenharmony_ci device may be put into D3Cold state if other requirements are 28562306a36Sopenharmony_ci satisfied too. Reading this attribute will show the current 28662306a36Sopenharmony_ci value of d3cold_allowed bit. Writing this attribute will set 28762306a36Sopenharmony_ci the value of d3cold_allowed bit. 28862306a36Sopenharmony_ci 28962306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../sriov_totalvfs 29062306a36Sopenharmony_ciDate: November 2012 29162306a36Sopenharmony_ciContact: Donald Dutile <ddutile@redhat.com> 29262306a36Sopenharmony_ciDescription: 29362306a36Sopenharmony_ci This file appears when a physical PCIe device supports SR-IOV. 29462306a36Sopenharmony_ci Userspace applications can read this file to determine the 29562306a36Sopenharmony_ci maximum number of Virtual Functions (VFs) a PCIe physical 29662306a36Sopenharmony_ci function (PF) can support. Typically, this is the value reported 29762306a36Sopenharmony_ci in the PF's SR-IOV extended capability structure's TotalVFs 29862306a36Sopenharmony_ci element. Drivers have the ability at probe time to reduce the 29962306a36Sopenharmony_ci value read from this file via the pci_sriov_set_totalvfs() 30062306a36Sopenharmony_ci function. 30162306a36Sopenharmony_ci 30262306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../sriov_numvfs 30362306a36Sopenharmony_ciDate: November 2012 30462306a36Sopenharmony_ciContact: Donald Dutile <ddutile@redhat.com> 30562306a36Sopenharmony_ciDescription: 30662306a36Sopenharmony_ci This file appears when a physical PCIe device supports SR-IOV. 30762306a36Sopenharmony_ci Userspace applications can read and write to this file to 30862306a36Sopenharmony_ci determine and control the enablement or disablement of Virtual 30962306a36Sopenharmony_ci Functions (VFs) on the physical function (PF). A read of this 31062306a36Sopenharmony_ci file will return the number of VFs that are enabled on this PF. 31162306a36Sopenharmony_ci A number written to this file will enable the specified 31262306a36Sopenharmony_ci number of VFs. A userspace application would typically read the 31362306a36Sopenharmony_ci file and check that the value is zero, and then write the number 31462306a36Sopenharmony_ci of VFs that should be enabled on the PF; the value written 31562306a36Sopenharmony_ci should be less than or equal to the value in the sriov_totalvfs 31662306a36Sopenharmony_ci file. A userspace application wanting to disable the VFs would 31762306a36Sopenharmony_ci write a zero to this file. The core ensures that valid values 31862306a36Sopenharmony_ci are written to this file, and returns errors when values are not 31962306a36Sopenharmony_ci valid. For example, writing a 2 to this file when sriov_numvfs 32062306a36Sopenharmony_ci is not 0 and not 2 already will return an error. Writing a 10 32162306a36Sopenharmony_ci when the value of sriov_totalvfs is 8 will return an error. 32262306a36Sopenharmony_ci 32362306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../driver_override 32462306a36Sopenharmony_ciDate: April 2014 32562306a36Sopenharmony_ciContact: Alex Williamson <alex.williamson@redhat.com> 32662306a36Sopenharmony_ciDescription: 32762306a36Sopenharmony_ci This file allows the driver for a device to be specified which 32862306a36Sopenharmony_ci will override standard static and dynamic ID matching. When 32962306a36Sopenharmony_ci specified, only a driver with a name matching the value written 33062306a36Sopenharmony_ci to driver_override will have an opportunity to bind to the 33162306a36Sopenharmony_ci device. The override is specified by writing a string to the 33262306a36Sopenharmony_ci driver_override file (echo pci-stub > driver_override) and 33362306a36Sopenharmony_ci may be cleared with an empty string (echo > driver_override). 33462306a36Sopenharmony_ci This returns the device to standard matching rules binding. 33562306a36Sopenharmony_ci Writing to driver_override does not automatically unbind the 33662306a36Sopenharmony_ci device from its current driver or make any attempt to 33762306a36Sopenharmony_ci automatically load the specified driver. If no driver with a 33862306a36Sopenharmony_ci matching name is currently loaded in the kernel, the device 33962306a36Sopenharmony_ci will not bind to any driver. This also allows devices to 34062306a36Sopenharmony_ci opt-out of driver binding using a driver_override name such as 34162306a36Sopenharmony_ci "none". Only a single driver may be specified in the override, 34262306a36Sopenharmony_ci there is no support for parsing delimiters. 34362306a36Sopenharmony_ci 34462306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../numa_node 34562306a36Sopenharmony_ciDate: Oct 2014 34662306a36Sopenharmony_ciContact: Prarit Bhargava <prarit@redhat.com> 34762306a36Sopenharmony_ciDescription: 34862306a36Sopenharmony_ci This file contains the NUMA node to which the PCI device is 34962306a36Sopenharmony_ci attached, or -1 if the node is unknown. The initial value 35062306a36Sopenharmony_ci comes from an ACPI _PXM method or a similar firmware 35162306a36Sopenharmony_ci source. If that is missing or incorrect, this file can be 35262306a36Sopenharmony_ci written to override the node. In that case, please report 35362306a36Sopenharmony_ci a firmware bug to the system vendor. Writing to this file 35462306a36Sopenharmony_ci taints the kernel with TAINT_FIRMWARE_WORKAROUND, which 35562306a36Sopenharmony_ci reduces the supportability of your system. 35662306a36Sopenharmony_ci 35762306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../revision 35862306a36Sopenharmony_ciDate: November 2016 35962306a36Sopenharmony_ciContact: Emil Velikov <emil.l.velikov@gmail.com> 36062306a36Sopenharmony_ciDescription: 36162306a36Sopenharmony_ci This file contains the revision field of the PCI device. 36262306a36Sopenharmony_ci The value comes from device config space. The file is read only. 36362306a36Sopenharmony_ci 36462306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../sriov_drivers_autoprobe 36562306a36Sopenharmony_ciDate: April 2017 36662306a36Sopenharmony_ciContact: Bodong Wang<bodong@mellanox.com> 36762306a36Sopenharmony_ciDescription: 36862306a36Sopenharmony_ci This file is associated with the PF of a device that 36962306a36Sopenharmony_ci supports SR-IOV. It determines whether newly-enabled VFs 37062306a36Sopenharmony_ci are immediately bound to a driver. It initially contains 37162306a36Sopenharmony_ci 1, which means the kernel automatically binds VFs to a 37262306a36Sopenharmony_ci compatible driver immediately after they are enabled. If 37362306a36Sopenharmony_ci an application writes 0 to the file before enabling VFs, 37462306a36Sopenharmony_ci the kernel will not bind VFs to a driver. 37562306a36Sopenharmony_ci 37662306a36Sopenharmony_ci A typical use case is to write 0 to this file, then enable 37762306a36Sopenharmony_ci VFs, then assign the newly-created VFs to virtual machines. 37862306a36Sopenharmony_ci Note that changing this file does not affect already- 37962306a36Sopenharmony_ci enabled VFs. In this scenario, the user must first disable 38062306a36Sopenharmony_ci the VFs, write 0 to sriov_drivers_autoprobe, then re-enable 38162306a36Sopenharmony_ci the VFs. 38262306a36Sopenharmony_ci 38362306a36Sopenharmony_ci This is similar to /sys/bus/pci/drivers_autoprobe, but 38462306a36Sopenharmony_ci affects only the VFs associated with a specific PF. 38562306a36Sopenharmony_ci 38662306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../p2pmem/size 38762306a36Sopenharmony_ciDate: November 2017 38862306a36Sopenharmony_ciContact: Logan Gunthorpe <logang@deltatee.com> 38962306a36Sopenharmony_ciDescription: 39062306a36Sopenharmony_ci If the device has any Peer-to-Peer memory registered, this 39162306a36Sopenharmony_ci file contains the total amount of memory that the device 39262306a36Sopenharmony_ci provides (in decimal). 39362306a36Sopenharmony_ci 39462306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../p2pmem/available 39562306a36Sopenharmony_ciDate: November 2017 39662306a36Sopenharmony_ciContact: Logan Gunthorpe <logang@deltatee.com> 39762306a36Sopenharmony_ciDescription: 39862306a36Sopenharmony_ci If the device has any Peer-to-Peer memory registered, this 39962306a36Sopenharmony_ci file contains the amount of memory that has not been 40062306a36Sopenharmony_ci allocated (in decimal). 40162306a36Sopenharmony_ci 40262306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../p2pmem/published 40362306a36Sopenharmony_ciDate: November 2017 40462306a36Sopenharmony_ciContact: Logan Gunthorpe <logang@deltatee.com> 40562306a36Sopenharmony_ciDescription: 40662306a36Sopenharmony_ci If the device has any Peer-to-Peer memory registered, this 40762306a36Sopenharmony_ci file contains a '1' if the memory has been published for 40862306a36Sopenharmony_ci use outside the driver that owns the device. 40962306a36Sopenharmony_ci 41062306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../p2pmem/allocate 41162306a36Sopenharmony_ciDate: August 2022 41262306a36Sopenharmony_ciContact: Logan Gunthorpe <logang@deltatee.com> 41362306a36Sopenharmony_ciDescription: 41462306a36Sopenharmony_ci This file allows mapping p2pmem into userspace. For each 41562306a36Sopenharmony_ci mmap() call on this file, the kernel will allocate a chunk 41662306a36Sopenharmony_ci of Peer-to-Peer memory for use in Peer-to-Peer transactions. 41762306a36Sopenharmony_ci This memory can be used in O_DIRECT calls to NVMe backed 41862306a36Sopenharmony_ci files for Peer-to-Peer copies. 41962306a36Sopenharmony_ci 42062306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../link/clkpm 42162306a36Sopenharmony_ci /sys/bus/pci/devices/.../link/l0s_aspm 42262306a36Sopenharmony_ci /sys/bus/pci/devices/.../link/l1_aspm 42362306a36Sopenharmony_ci /sys/bus/pci/devices/.../link/l1_1_aspm 42462306a36Sopenharmony_ci /sys/bus/pci/devices/.../link/l1_2_aspm 42562306a36Sopenharmony_ci /sys/bus/pci/devices/.../link/l1_1_pcipm 42662306a36Sopenharmony_ci /sys/bus/pci/devices/.../link/l1_2_pcipm 42762306a36Sopenharmony_ciDate: October 2019 42862306a36Sopenharmony_ciContact: Heiner Kallweit <hkallweit1@gmail.com> 42962306a36Sopenharmony_ciDescription: If ASPM is supported for an endpoint, these files can be 43062306a36Sopenharmony_ci used to disable or enable the individual power management 43162306a36Sopenharmony_ci states. Write y/1/on to enable, n/0/off to disable. 43262306a36Sopenharmony_ci 43362306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../power_state 43462306a36Sopenharmony_ciDate: November 2020 43562306a36Sopenharmony_ciContact: Linux PCI developers <linux-pci@vger.kernel.org> 43662306a36Sopenharmony_ciDescription: 43762306a36Sopenharmony_ci This file contains the current PCI power state of the device. 43862306a36Sopenharmony_ci The value comes from the PCI kernel device state and can be one 43962306a36Sopenharmony_ci of: "unknown", "error", "D0", D1", "D2", "D3hot", "D3cold". 44062306a36Sopenharmony_ci The file is read only. 44162306a36Sopenharmony_ci 44262306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../sriov_vf_total_msix 44362306a36Sopenharmony_ciDate: January 2021 44462306a36Sopenharmony_ciContact: Leon Romanovsky <leonro@nvidia.com> 44562306a36Sopenharmony_ciDescription: 44662306a36Sopenharmony_ci This file is associated with a SR-IOV physical function (PF). 44762306a36Sopenharmony_ci It contains the total number of MSI-X vectors available for 44862306a36Sopenharmony_ci assignment to all virtual functions (VFs) associated with PF. 44962306a36Sopenharmony_ci The value will be zero if the device doesn't support this 45062306a36Sopenharmony_ci functionality. For supported devices, the value will be 45162306a36Sopenharmony_ci constant and won't be changed after MSI-X vectors assignment. 45262306a36Sopenharmony_ci 45362306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../sriov_vf_msix_count 45462306a36Sopenharmony_ciDate: January 2021 45562306a36Sopenharmony_ciContact: Leon Romanovsky <leonro@nvidia.com> 45662306a36Sopenharmony_ciDescription: 45762306a36Sopenharmony_ci This file is associated with a SR-IOV virtual function (VF). 45862306a36Sopenharmony_ci It allows configuration of the number of MSI-X vectors for 45962306a36Sopenharmony_ci the VF. This allows devices that have a global pool of MSI-X 46062306a36Sopenharmony_ci vectors to optimally divide them between VFs based on VF usage. 46162306a36Sopenharmony_ci 46262306a36Sopenharmony_ci The values accepted are: 46362306a36Sopenharmony_ci * > 0 - this number will be reported as the Table Size in the 46462306a36Sopenharmony_ci VF's MSI-X capability 46562306a36Sopenharmony_ci * < 0 - not valid 46662306a36Sopenharmony_ci * = 0 - will reset to the device default value 46762306a36Sopenharmony_ci 46862306a36Sopenharmony_ci The file is writable if the PF is bound to a driver that 46962306a36Sopenharmony_ci implements ->sriov_set_msix_vec_count(). 47062306a36Sopenharmony_ci 47162306a36Sopenharmony_ciWhat: /sys/bus/pci/devices/.../resourceN_resize 47262306a36Sopenharmony_ciDate: September 2022 47362306a36Sopenharmony_ciContact: Alex Williamson <alex.williamson@redhat.com> 47462306a36Sopenharmony_ciDescription: 47562306a36Sopenharmony_ci These files provide an interface to PCIe Resizable BAR support. 47662306a36Sopenharmony_ci A file is created for each BAR resource (N) supported by the 47762306a36Sopenharmony_ci PCIe Resizable BAR extended capability of the device. Reading 47862306a36Sopenharmony_ci each file exposes the bitmap of available resource sizes: 47962306a36Sopenharmony_ci 48062306a36Sopenharmony_ci # cat resource1_resize 48162306a36Sopenharmony_ci 00000000000001c0 48262306a36Sopenharmony_ci 48362306a36Sopenharmony_ci The bitmap represents supported resource sizes for the BAR, 48462306a36Sopenharmony_ci where bit0 = 1MB, bit1 = 2MB, bit2 = 4MB, etc. In the above 48562306a36Sopenharmony_ci example the device supports 64MB, 128MB, and 256MB BAR sizes. 48662306a36Sopenharmony_ci 48762306a36Sopenharmony_ci When writing the file, the user provides the bit position of 48862306a36Sopenharmony_ci the desired resource size, for example: 48962306a36Sopenharmony_ci 49062306a36Sopenharmony_ci # echo 7 > resource1_resize 49162306a36Sopenharmony_ci 49262306a36Sopenharmony_ci This indicates to set the size value corresponding to bit 7, 49362306a36Sopenharmony_ci 128MB. The resulting size is 2 ^ (bit# + 20). This definition 49462306a36Sopenharmony_ci matches the PCIe specification of this capability. 49562306a36Sopenharmony_ci 49662306a36Sopenharmony_ci In order to make use of resource resizing, all PCI drivers must 49762306a36Sopenharmony_ci be unbound from the device and peer devices under the same 49862306a36Sopenharmony_ci parent bridge may need to be soft removed. In the case of 49962306a36Sopenharmony_ci VGA devices, writing a resize value will remove low level 50062306a36Sopenharmony_ci console drivers from the device. Raw users of pci-sysfs 50162306a36Sopenharmony_ci resourceN attributes must be terminated prior to resizing. 50262306a36Sopenharmony_ci Success of the resizing operation is not guaranteed. 503