forked from luck/tmp_suning_uos_patched
0994375e96
This adds a remove_id sysfs entry to allow users of new_id to later remove the added dynid. One use case is management tools that want to dynamically bind/unbind devices to pci-stub driver while devices are assigned to KVM guests. Rather than having to track which driver was originally bound to the driver, a mangement tool can simply: Guest uses device Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
71 lines
3.0 KiB
Plaintext
71 lines
3.0 KiB
Plaintext
What: /sys/bus/pci/drivers/.../bind
|
|
Date: December 2003
|
|
Contact: linux-pci@vger.kernel.org
|
|
Description:
|
|
Writing a device location to this file will cause
|
|
the driver to attempt to bind to the device found at
|
|
this location. This is useful for overriding default
|
|
bindings. The format for the location is: DDDD:BB:DD.F.
|
|
That is Domain:Bus:Device.Function and is the same as
|
|
found in /sys/bus/pci/devices/. For example:
|
|
# echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/bind
|
|
(Note: kernels before 2.6.28 may require echo -n).
|
|
|
|
What: /sys/bus/pci/drivers/.../unbind
|
|
Date: December 2003
|
|
Contact: linux-pci@vger.kernel.org
|
|
Description:
|
|
Writing a device location to this file will cause the
|
|
driver to attempt to unbind from the device found at
|
|
this location. This may be useful when overriding default
|
|
bindings. The format for the location is: DDDD:BB:DD.F.
|
|
That is Domain:Bus:Device.Function and is the same as
|
|
found in /sys/bus/pci/devices/. For example:
|
|
# echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/unbind
|
|
(Note: kernels before 2.6.28 may require echo -n).
|
|
|
|
What: /sys/bus/pci/drivers/.../new_id
|
|
Date: December 2003
|
|
Contact: linux-pci@vger.kernel.org
|
|
Description:
|
|
Writing a device ID to this file will attempt to
|
|
dynamically add a new device ID to a PCI device driver.
|
|
This may allow the driver to support more hardware than
|
|
was included in the driver's static device ID support
|
|
table at compile time. The format for the device ID is:
|
|
VVVV DDDD SVVV SDDD CCCC MMMM PPPP. That is Vendor ID,
|
|
Device ID, Subsystem Vendor ID, Subsystem Device ID,
|
|
Class, Class Mask, and Private Driver Data. The Vendor ID
|
|
and Device ID fields are required, the rest are optional.
|
|
Upon successfully adding an ID, the driver will probe
|
|
for the device and attempt to bind to it. For example:
|
|
# echo "8086 10f5" > /sys/bus/pci/drivers/foo/new_id
|
|
|
|
What: /sys/bus/pci/drivers/.../remove_id
|
|
Date: February 2009
|
|
Contact: Chris Wright <chrisw@sous-sol.org>
|
|
Description:
|
|
Writing a device ID to this file will remove an ID
|
|
that was dynamically added via the new_id sysfs entry.
|
|
The format for the device ID is:
|
|
VVVV DDDD SVVV SDDD CCCC MMMM. That is Vendor ID, Device
|
|
ID, Subsystem Vendor ID, Subsystem Device ID, Class,
|
|
and Class Mask. The Vendor ID and Device ID fields are
|
|
required, the rest are optional. After successfully
|
|
removing an ID, the driver will no longer support the
|
|
device. This is useful to ensure auto probing won't
|
|
match the driver to the device. For example:
|
|
# echo "8086 10f5" > /sys/bus/pci/drivers/foo/remove_id
|
|
|
|
What: /sys/bus/pci/devices/.../vpd
|
|
Date: February 2008
|
|
Contact: Ben Hutchings <bhutchings@solarflare.com>
|
|
Description:
|
|
A file named vpd in a device directory will be a
|
|
binary file containing the Vital Product Data for the
|
|
device. It should follow the VPD format defined in
|
|
PCI Specification 2.1 or 2.2, but users should consider
|
|
that some devices may have malformatted data. If the
|
|
underlying VPD has a writable section then the
|
|
corresponding section of this file will be writable.
|