brintos

brintos / linux-shallow public Read only

0
0
Text · 23.1 KiB · 7f63c7e Raw
575 lines · plain
1What:		/sys/bus/pci/drivers/.../bind2What:		/sys/devices/pciX/.../bind3Date:		December 20034Contact:	linux-pci@vger.kernel.org5Description:6		Writing a device location to this file will cause7		the driver to attempt to bind to the device found at8		this location.	This is useful for overriding default9		bindings.  The format for the location is: DDDD:BB:DD.F.10		That is Domain:Bus:Device.Function and is the same as11		found in /sys/bus/pci/devices/.  For example::12 13		  # echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/bind14 15		(Note: kernels before 2.6.28 may require echo -n).16 17What:		/sys/bus/pci/drivers/.../unbind18What:		/sys/devices/pciX/.../unbind19Date:		December 200320Contact:	linux-pci@vger.kernel.org21Description:22		Writing a device location to this file will cause the23		driver to attempt to unbind from the device found at24		this location.	This may be useful when overriding default25		bindings.  The format for the location is: DDDD:BB:DD.F.26		That is Domain:Bus:Device.Function and is the same as27		found in /sys/bus/pci/devices/. For example::28 29		  # echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/unbind30 31		(Note: kernels before 2.6.28 may require echo -n).32 33What:		/sys/bus/pci/drivers/.../new_id34What:		/sys/devices/pciX/.../new_id35Date:		December 200336Contact:	linux-pci@vger.kernel.org37Description:38		Writing a device ID to this file will attempt to39		dynamically add a new device ID to a PCI device driver.40		This may allow the driver to support more hardware than41		was included in the driver's static device ID support42		table at compile time.  The format for the device ID is:43		VVVV DDDD SVVV SDDD CCCC MMMM PPPP.  That is Vendor ID,44		Device ID, Subsystem Vendor ID, Subsystem Device ID,45		Class, Class Mask, and Private Driver Data.  The Vendor ID46		and Device ID fields are required, the rest are optional.47		Upon successfully adding an ID, the driver will probe48		for the device and attempt to bind to it.  For example::49 50		  # echo "8086 10f5" > /sys/bus/pci/drivers/foo/new_id51 52What:		/sys/bus/pci/drivers/.../remove_id53What:		/sys/devices/pciX/.../remove_id54Date:		February 200955Contact:	Chris Wright <chrisw@sous-sol.org>56Description:57		Writing a device ID to this file will remove an ID58		that was dynamically added via the new_id sysfs entry.59		The format for the device ID is:60		VVVV DDDD SVVV SDDD CCCC MMMM.	That is Vendor ID, Device61		ID, Subsystem Vendor ID, Subsystem Device ID, Class,62		and Class Mask.  The Vendor ID and Device ID fields are63		required, the rest are optional.  After successfully64		removing an ID, the driver will no longer support the65		device.  This is useful to ensure auto probing won't66		match the driver to the device.  For example::67 68		  # echo "8086 10f5" > /sys/bus/pci/drivers/foo/remove_id69 70What:		/sys/bus/pci/rescan71Date:		January 200972Contact:	Linux PCI developers <linux-pci@vger.kernel.org>73Description:74		Writing a non-zero value to this attribute will75		force a rescan of all PCI buses in the system, and76		re-discover previously removed devices.77 78What:		/sys/bus/pci/devices/.../msi_bus79Date:		September 201480Contact:	Linux PCI developers <linux-pci@vger.kernel.org>81Description:82		Writing a zero value to this attribute disallows MSI and83		MSI-X for any future drivers of the device.  If the device84		is a bridge, MSI and MSI-X will be disallowed for future85		drivers of all child devices under the bridge.  Drivers86		must be reloaded for the new setting to take effect.87 88What:		/sys/bus/pci/devices/.../msi_irqs/89Date:		September, 201190Contact:	Neil Horman <nhorman@tuxdriver.com>91Description:92		The /sys/devices/.../msi_irqs directory contains a variable set93		of files, with each file being named after a corresponding msi94		irq vector allocated to that device.95 96What:		/sys/bus/pci/devices/.../msi_irqs/<N>97Date:		September 201198Contact:	Neil Horman <nhorman@tuxdriver.com>99Description:100		This attribute indicates the mode that the irq vector named by101		the file is in (msi vs. msix)102 103What:		/sys/bus/pci/devices/.../irq104Date:		August 2021105Contact:	Linux PCI developers <linux-pci@vger.kernel.org>106Description:107		If a driver has enabled MSI (not MSI-X), "irq" contains the108		IRQ of the first MSI vector. Otherwise "irq" contains the109		IRQ of the legacy INTx interrupt.110 111		"irq" being set to 0 indicates that the device isn't112		capable of generating legacy INTx interrupts.113 114What:		/sys/bus/pci/devices/.../remove115Date:		January 2009116Contact:	Linux PCI developers <linux-pci@vger.kernel.org>117Description:118		Writing a non-zero value to this attribute will119		hot-remove the PCI device and any of its children.120 121What:		/sys/bus/pci/devices/.../pci_bus/.../rescan122Date:		May 2011123Contact:	Linux PCI developers <linux-pci@vger.kernel.org>124Description:125		Writing a non-zero value to this attribute will126		force a rescan of the bus and all child buses,127		and re-discover devices removed earlier from this128		part of the device tree.129 130What:		/sys/bus/pci/devices/.../rescan131Date:		January 2009132Contact:	Linux PCI developers <linux-pci@vger.kernel.org>133Description:134		Writing a non-zero value to this attribute will135		force a rescan of the device's parent bus and all136		child buses, and re-discover devices removed earlier137		from this part of the device tree.138 139What:		/sys/bus/pci/devices/.../reset_method140Date:		August 2021141Contact:	Amey Narkhede <ameynarkhede03@gmail.com>142Description:143		Some devices allow an individual function to be reset144		without affecting other functions in the same slot.145 146		For devices that have this support, a file named147		reset_method is present in sysfs.  Reading this file148		gives names of the supported and enabled reset methods and149		their ordering.  Writing a space-separated list of names of150		reset methods sets the reset methods and ordering to be151		used when resetting the device.  Writing an empty string152		disables the ability to reset the device.  Writing153		"default" enables all supported reset methods in the154		default ordering.155 156What:		/sys/bus/pci/devices/.../reset157Date:		July 2009158Contact:	Michael S. Tsirkin <mst@redhat.com>159Description:160		Some devices allow an individual function to be reset161		without affecting other functions in the same device.162		For devices that have this support, a file named reset163		will be present in sysfs.  Writing 1 to this file164		will perform reset.165 166What:		/sys/bus/pci/devices/.../vpd167Date:		February 2008168Contact:	Ben Hutchings <bwh@kernel.org>169Description:170		A file named vpd in a device directory will be a171		binary file containing the Vital Product Data for the172		device.  It should follow the VPD format defined in173		PCI Specification 2.1 or 2.2, but users should consider174		that some devices may have incorrectly formatted data.  175		If the underlying VPD has a writable section then the176		corresponding section of this file will be writable.177 178What:		/sys/bus/pci/devices/.../virtfn<N>179Date:		March 2009180Contact:	Yu Zhao <yu.zhao@intel.com>181Description:182		This symbolic link appears when hardware supports the SR-IOV183		capability and the Physical Function driver has enabled it.184		The symbolic link points to the PCI device sysfs entry of the185		Virtual Function whose index is N (0...MaxVFs-1).186 187What:		/sys/bus/pci/devices/.../dep_link188Date:		March 2009189Contact:	Yu Zhao <yu.zhao@intel.com>190Description:191		This symbolic link appears when hardware supports the SR-IOV192		capability and the Physical Function driver has enabled it,193		and this device has vendor specific dependencies with others.194		The symbolic link points to the PCI device sysfs entry of195		Physical Function this device depends on.196 197What:		/sys/bus/pci/devices/.../physfn198Date:		March 2009199Contact:	Yu Zhao <yu.zhao@intel.com>200Description:201		This symbolic link appears when a device is a Virtual Function.202		The symbolic link points to the PCI device sysfs entry of the203		Physical Function this device associates with.204 205What:		/sys/bus/pci/devices/.../modalias206Date:		May 2005207Contact:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>208Description:209		This attribute indicates the PCI ID of the device object.210 211		That is in the format:212		pci:vXXXXXXXXdXXXXXXXXsvXXXXXXXXsdXXXXXXXXbcXXscXXiXX,213		where:214 215		    - vXXXXXXXX contains the vendor ID;216		    - dXXXXXXXX contains the device ID;217		    - svXXXXXXXX contains the sub-vendor ID;218		    - sdXXXXXXXX contains the subsystem device ID;219		    - bcXX contains the device class;220		    - scXX contains the device subclass;221		    - iXX contains the device class programming interface.222 223What:		/sys/bus/pci/slots/.../module224Date:		June 2009225Contact:	linux-pci@vger.kernel.org226Description:227		This symbolic link points to the PCI hotplug controller driver228		module that manages the hotplug slot.229 230What:		/sys/bus/pci/devices/.../label231Date:		July 2010232Contact:	Narendra K <narendra_k@dell.com>, linux-bugs@dell.com233Description:234		Reading this attribute will provide the firmware235		given name (SMBIOS type 41 string or ACPI _DSM string) of236		the PCI device.	The attribute will be created only237		if the firmware	has given a name to the PCI device.238		ACPI _DSM string name will be given priority if the239		system firmware provides SMBIOS type 41 string also.240Users:241		Userspace applications interested in knowing the242		firmware assigned name of the PCI device.243 244What:		/sys/bus/pci/devices/.../index245Date:		July 2010246Contact:	Narendra K <narendra_k@dell.com>, linux-bugs@dell.com247Description:248		Reading this attribute will provide the firmware given instance249		number of the PCI device.  Depending on the platform this can250		be for example the SMBIOS type 41 device type instance or the251		user-defined ID (UID) on s390. The attribute will be created252		only if the firmware has given an instance number to the PCI253		device and that number is guaranteed to uniquely identify the254		device in the system.255Users:256		Userspace applications interested in knowing the257		firmware assigned device type instance of the PCI258		device that can help in understanding the firmware259		intended order of the PCI device.260 261What:		/sys/bus/pci/devices/.../acpi_index262Date:		July 2010263Contact:	Narendra K <narendra_k@dell.com>, linux-bugs@dell.com264Description:265		Reading this attribute will provide the firmware266		given instance (ACPI _DSM instance number) of the PCI device.267		The attribute will be created only if the firmware has given268		an instance number to the PCI device. ACPI _DSM instance number269		will be given priority if the system firmware provides SMBIOS270		type 41 device type instance also.271Users:272		Userspace applications interested in knowing the273		firmware assigned instance number of the PCI274		device that can help in understanding the firmware275		intended order of the PCI device.276 277What:		/sys/bus/pci/devices/.../d3cold_allowed278Date:		July 2012279Contact:	Huang Ying <ying.huang@intel.com>280Description:281		d3cold_allowed is bit to control whether the corresponding PCI282		device can be put into D3Cold state.  If it is cleared, the283		device will never be put into D3Cold state.  If it is set, the284		device may be put into D3Cold state if other requirements are285		satisfied too.  Reading this attribute will show the current286		value of d3cold_allowed bit.  Writing this attribute will set287		the value of d3cold_allowed bit.288 289What:		/sys/bus/pci/devices/.../sriov_totalvfs290Date:		November 2012291Contact:	Donald Dutile <ddutile@redhat.com>292Description:293		This file appears when a physical PCIe device supports SR-IOV.294		Userspace applications can read this file to determine the295		maximum number of Virtual Functions (VFs) a PCIe physical296		function (PF) can support. Typically, this is the value reported297		in the PF's SR-IOV extended capability structure's TotalVFs298		element.  Drivers have the ability at probe time to reduce the299		value read from this file via the pci_sriov_set_totalvfs()300		function.301 302What:		/sys/bus/pci/devices/.../sriov_numvfs303Date:		November 2012304Contact:	Donald Dutile <ddutile@redhat.com>305Description:306		This file appears when a physical PCIe device supports SR-IOV.307		Userspace applications can read and write to this file to308		determine and control the enablement or disablement of Virtual309		Functions (VFs) on the physical function (PF). A read of this310		file will return the number of VFs that are enabled on this PF.311		A number written to this file will enable the specified312		number of VFs. A userspace application would typically read the313		file and check that the value is zero, and then write the number314		of VFs that should be enabled on the PF; the value written315		should be less than or equal to the value in the sriov_totalvfs316		file. A userspace application wanting to disable the VFs would317		write a zero to this file. The core ensures that valid values318		are written to this file, and returns errors when values are not319		valid.  For example, writing a 2 to this file when sriov_numvfs320		is not 0 and not 2 already will return an error. Writing a 10321		when the value of sriov_totalvfs is 8 will return an error.322 323What:		/sys/bus/pci/devices/.../driver_override324Date:		April 2014325Contact:	Alex Williamson <alex.williamson@redhat.com>326Description:327		This file allows the driver for a device to be specified which328		will override standard static and dynamic ID matching.  When329		specified, only a driver with a name matching the value written330		to driver_override will have an opportunity to bind to the331		device.  The override is specified by writing a string to the332		driver_override file (echo pci-stub > driver_override) and333		may be cleared with an empty string (echo > driver_override).334		This returns the device to standard matching rules binding.335		Writing to driver_override does not automatically unbind the336		device from its current driver or make any attempt to337		automatically load the specified driver.  If no driver with a338		matching name is currently loaded in the kernel, the device339		will not bind to any driver.  This also allows devices to340		opt-out of driver binding using a driver_override name such as341		"none".  Only a single driver may be specified in the override,342		there is no support for parsing delimiters.343 344What:		/sys/bus/pci/devices/.../numa_node345Date:		Oct 2014346Contact:	Prarit Bhargava <prarit@redhat.com>347Description:348		This file contains the NUMA node to which the PCI device is349		attached, or -1 if the node is unknown.  The initial value350		comes from an ACPI _PXM method or a similar firmware351		source.  If that is missing or incorrect, this file can be352		written to override the node.  In that case, please report353		a firmware bug to the system vendor.  Writing to this file354		taints the kernel with TAINT_FIRMWARE_WORKAROUND, which355		reduces the supportability of your system.356 357What:		/sys/bus/pci/devices/.../revision358Date:		November 2016359Contact:	Emil Velikov <emil.l.velikov@gmail.com>360Description:361		This file contains the revision field of the PCI device.362		The value comes from device config space. The file is read only.363 364What:		/sys/bus/pci/devices/.../sriov_drivers_autoprobe365Date:		April 2017366Contact:	Bodong Wang<bodong@mellanox.com>367Description:368		This file is associated with the PF of a device that369		supports SR-IOV.  It determines whether newly-enabled VFs370		are immediately bound to a driver.  It initially contains371		1, which means the kernel automatically binds VFs to a372		compatible driver immediately after they are enabled.  If373		an application writes 0 to the file before enabling VFs,374		the kernel will not bind VFs to a driver.375 376		A typical use case is to write 0 to this file, then enable377		VFs, then assign the newly-created VFs to virtual machines.378		Note that changing this file does not affect already-379		enabled VFs.  In this scenario, the user must first disable380		the VFs, write 0 to sriov_drivers_autoprobe, then re-enable381		the VFs.382 383		This is similar to /sys/bus/pci/drivers_autoprobe, but384		affects only the VFs associated with a specific PF.385 386What:		/sys/bus/pci/devices/.../p2pmem/size387Date:		November 2017388Contact:	Logan Gunthorpe <logang@deltatee.com>389Description:390		If the device has any Peer-to-Peer memory registered, this391	        file contains the total amount of memory that the device392		provides (in decimal).393 394What:		/sys/bus/pci/devices/.../p2pmem/available395Date:		November 2017396Contact:	Logan Gunthorpe <logang@deltatee.com>397Description:398		If the device has any Peer-to-Peer memory registered, this399	        file contains the amount of memory that has not been400		allocated (in decimal).401 402What:		/sys/bus/pci/devices/.../p2pmem/published403Date:		November 2017404Contact:	Logan Gunthorpe <logang@deltatee.com>405Description:406		If the device has any Peer-to-Peer memory registered, this407	        file contains a '1' if the memory has been published for408		use outside the driver that owns the device.409 410What:		/sys/bus/pci/devices/.../p2pmem/allocate411Date:		August 2022412Contact:	Logan Gunthorpe <logang@deltatee.com>413Description:414		This file allows mapping p2pmem into userspace. For each415		mmap() call on this file, the kernel will allocate a chunk416		of Peer-to-Peer memory for use in Peer-to-Peer transactions.417		This memory can be used in O_DIRECT calls to NVMe backed418		files for Peer-to-Peer copies.419 420What:		/sys/bus/pci/devices/.../link/clkpm421		/sys/bus/pci/devices/.../link/l0s_aspm422		/sys/bus/pci/devices/.../link/l1_aspm423		/sys/bus/pci/devices/.../link/l1_1_aspm424		/sys/bus/pci/devices/.../link/l1_2_aspm425		/sys/bus/pci/devices/.../link/l1_1_pcipm426		/sys/bus/pci/devices/.../link/l1_2_pcipm427Date:		October 2019428Contact:	Heiner Kallweit <hkallweit1@gmail.com>429Description:	If ASPM is supported for an endpoint, these files can be430		used to disable or enable the individual power management431		states. Write y/1/on to enable, n/0/off to disable.432 433What:		/sys/bus/pci/devices/.../power_state434Date:		November 2020435Contact:	Linux PCI developers <linux-pci@vger.kernel.org>436Description:437		This file contains the current PCI power state of the device.438		The value comes from the PCI kernel device state and can be one439		of: "unknown", "error", "D0", D1", "D2", "D3hot", "D3cold".440		The file is read only.441 442What:		/sys/bus/pci/devices/.../sriov_vf_total_msix443Date:		January 2021444Contact:	Leon Romanovsky <leonro@nvidia.com>445Description:446		This file is associated with a SR-IOV physical function (PF).447		It contains the total number of MSI-X vectors available for448		assignment to all virtual functions (VFs) associated with PF.449		The value will be zero if the device doesn't support this450		functionality. For supported devices, the value will be451		constant and won't be changed after MSI-X vectors assignment.452 453What:		/sys/bus/pci/devices/.../sriov_vf_msix_count454Date:		January 2021455Contact:	Leon Romanovsky <leonro@nvidia.com>456Description:457		This file is associated with a SR-IOV virtual function (VF).458		It allows configuration of the number of MSI-X vectors for459		the VF. This allows devices that have a global pool of MSI-X460		vectors to optimally divide them between VFs based on VF usage.461 462		The values accepted are:463		 * > 0 - this number will be reported as the Table Size in the464			 VF's MSI-X capability465		 * < 0 - not valid466		 * = 0 - will reset to the device default value467 468		The file is writable if the PF is bound to a driver that469		implements ->sriov_set_msix_vec_count().470 471What:		/sys/bus/pci/devices/.../resourceN_resize472Date:		September 2022473Contact:	Alex Williamson <alex.williamson@redhat.com>474Description:475		These files provide an interface to PCIe Resizable BAR support.476		A file is created for each BAR resource (N) supported by the477		PCIe Resizable BAR extended capability of the device.  Reading478		each file exposes the bitmap of available resource sizes:479 480		# cat resource1_resize481		00000000000001c0482 483		The bitmap represents supported resource sizes for the BAR,484		where bit0 = 1MB, bit1 = 2MB, bit2 = 4MB, etc.  In the above485		example the device supports 64MB, 128MB, and 256MB BAR sizes.486 487		When writing the file, the user provides the bit position of488		the desired resource size, for example:489 490		# echo 7 > resource1_resize491 492		This indicates to set the size value corresponding to bit 7,493		128MB.  The resulting size is 2 ^ (bit# + 20).  This definition494		matches the PCIe specification of this capability.495 496		In order to make use of resource resizing, all PCI drivers must497		be unbound from the device and peer devices under the same498		parent bridge may need to be soft removed.  In the case of499		VGA devices, writing a resize value will remove low level500		console drivers from the device.  Raw users of pci-sysfs501		resourceN attributes must be terminated prior to resizing.502		Success of the resizing operation is not guaranteed.503 504What:		/sys/bus/pci/devices/.../leds/*:enclosure:*/brightness505What:		/sys/class/leds/*:enclosure:*/brightness506Date:		August 2024507KernelVersion:	6.12508Description:509		LED indications on PCIe storage enclosures which are controlled510		through the NPEM interface (Native PCIe Enclosure Management,511		PCIe r6.1 sec 6.28) are accessible as led class devices, both512		below /sys/class/leds and below NPEM-capable PCI devices.513 514		Although these led class devices could be manipulated manually,515		in practice they are typically manipulated automatically by an516		application such as ledmon(8).517 518		The name of a led class device is as follows:519		<bdf>:enclosure:<indication>520		where:521 522		- <bdf> is the domain, bus, device and function number523		  (e.g. 10000:02:05.0)524		- <indication> is a short description of the LED indication525 526		Valid indications per PCIe r6.1 table 6-27 are:527 528		- ok (drive is functioning normally)529		- locate (drive is being identified by an admin)530		- fail (drive is not functioning properly)531		- rebuild (drive is part of an array that is rebuilding)532		- pfa (drive is predicted to fail soon)533		- hotspare (drive is marked to be used as a replacement)534		- ica (drive is part of an array that is degraded)535		- ifa (drive is part of an array that is failed)536		- idt (drive is not the right type for the connector)537		- disabled (drive is disabled, removal is safe)538		- specific0 to specific7 (enclosure-specific indications)539 540		Broadly, the indications fall into one of these categories:541 542		- to signify drive state (ok, locate, fail, idt, disabled)543		- to signify drive role or state in a software RAID array544		  (rebuild, pfa, hotspare, ica, ifa)545		- to signify any other role or state (specific0 to specific7)546 547		Mandatory indications per PCIe r6.1 sec 7.9.19.2 comprise:548		ok, locate, fail, rebuild. All others are optional.549		A led class device is only visible if the corresponding550		indication is supported by the device.551 552		To manipulate the indications, write 0 (LED_OFF) or 1 (LED_ON)553		to the "brightness" file. Note that manipulating an indication554		may implicitly manipulate other indications at the vendor's555		discretion. E.g. when the user lights up the "ok" indication,556		the vendor may choose to automatically turn off the "fail"557		indication. The current state of an indication can be558		retrieved by reading its "brightness" file.559 560		The PCIe Base Specification allows vendors leeway to choose561		different colors or blinking patterns for the indications,562		but they typically follow the IBPI standard. E.g. the "locate"563		indication is usually presented as one or two LEDs blinking at564		4 Hz frequency:565		https://en.wikipedia.org/wiki/International_Blinking_Pattern_Interpretation566 567		PCI Firmware Specification r3.3 sec 4.7 defines a DSM interface568		to facilitate shared access by operating system and platform569		firmware to a device's NPEM registers. The kernel will use570		this DSM interface where available, instead of accessing NPEM571		registers directly. The DSM interface does not support the572		enclosure-specific indications "specific0" to "specific7",573		hence the corresponding led class devices are unavailable if574		the DSM interface is used.575