diff mbox

[1/2] PCI: add some sysfs ABI docs

Message ID 20090224021725.GB7436@sequoia.sous-sol.org (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Chris Wright Feb. 24, 2009, 2:17 a.m. UTC
Add sysfs ABI docs for driver entries bind, unbind and new_id.  These
entries are pretty old, from 2.6.0 onwards AFAIK, so this documents
current behaviour.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
 Documentation/ABI/testing/sysfs-bus-pci |   41 ++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Greg KH Feb. 24, 2009, 3:47 a.m. UTC | #1
On Mon, Feb 23, 2009 at 06:17:25PM -0800, Chris Wright wrote:
> Add sysfs ABI docs for driver entries bind, unbind and new_id.  These
> entries are pretty old, from 2.6.0 onwards AFAIK, so this documents
> current behaviour.
> 
> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
> ---
>  Documentation/ABI/testing/sysfs-bus-pci |   41 ++++++++++++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
> 
> --- a/Documentation/ABI/testing/sysfs-bus-pci
> +++ b/Documentation/ABI/testing/sysfs-bus-pci
> @@ -1,3 +1,44 @@
> +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

Don't you need 'echo -n' instead?  Or did we fix that problem?  Or is
that just for the new_id file?

If so, feel free to ignore the comment and add:
	Acked-by: Greg Kroah-Hartman <gregkh@suse.de>

Thanks a lot for doing this, it is much needed.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Chris Wright Feb. 24, 2009, 5:08 a.m. UTC | #2
* Greg KH (greg@kroah.com) wrote:
> On Mon, Feb 23, 2009 at 06:17:25PM -0800, Chris Wright wrote:
> > +		# echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/bind
> 
> Don't you need 'echo -n' instead?  Or did we fix that problem?  Or is
> that just for the new_id file?

Not any more, bind/unbind using sysfs_streq now (I think as of 2.6.28).
And new_id doesn't need it either.

> If so, feel free to ignore the comment and add:
> 	Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
> 
> Thanks a lot for doing this, it is much needed.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/Documentation/ABI/testing/sysfs-bus-pci
+++ b/Documentation/ABI/testing/sysfs-bus-pci
@@ -1,3 +1,44 @@ 
+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
+
+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
+
+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/devices/.../vpd
 Date:		February 2008
 Contact:	Ben Hutchings <bhutchings@solarflare.com>