Changeset View
Changeset View
Standalone View
Standalone View
share/man/man9/PCI_SUBVID
- This file was added.
.\" Copyright (c) 2018 Lakhan Shiva Kamireddy <lakhan@FreeBSD.org> | |||||
.\" Sponsored by: Google, Inc. (GSoC 2018) | |||||
.\" Mentors: Warner Losh, Chuck Tuffli | |||||
.\" All rights reserved. | |||||
.\" | |||||
.\" Redistribution and use in source and binary forms, with or without | |||||
.\" modification, are permitted provided that the following conditions | |||||
.\" are met: | |||||
.\" 1. Redistributions of source code must retain the above copyright | |||||
.\" notice, this list of conditions and the following disclaimer. | |||||
.\" 2. Redistributions in binary form must reproduce the above copyright | |||||
.\" notice, this list of conditions and the following disclaimer in the | |||||
.\" documentation and/or other materials provided with the distribution. | |||||
.\" | |||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | |||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |||||
.\" SUCH DAMAGE. | |||||
.\" | |||||
.\" $FreeBSD$ | |||||
.\" | |||||
.Dd August 11, 2018 | |||||
.Dt PCI_SUBVID 9 | |||||
.Os | |||||
.Sh NAME | |||||
.Nm PCI_SUBVID | |||||
.Nd stores PnP information of the device to the device table | |||||
using the subvendor id provided & | |||||
sets match flag on subvendor id | |||||
.\" | |||||
.Sh SYNOPSIS | |||||
.In dev/pci/pcivar.h | |||||
.Fo PCI_SUBVID | |||||
.Fa "uint16_t sv" | |||||
.Fc | |||||
.\" | |||||
.Sh DESCRIPTION | |||||
The | |||||
.Fn PCI_SUBVID | |||||
macro adds the PnP information of the device to the device table | |||||
of type pci_device_table which has device-identifying data for use by | |||||
.Xr devmatch 8 . | |||||
.Pp | |||||
The macro takes a | |||||
.Fa subvendor id | |||||
parameter that is of the type | |||||
.It uint16_t element. | |||||
.\" | |||||
.Sh EXAMPLES | |||||
.Bd -literal -offset indent -compact | |||||
#include <sys/module.h> | |||||
#include <dev/pci/pcivar.h> | |||||
struct pci_device_table my_ids[] = { | |||||
{ PCI_VID(0x1234), PCI_SUBVID(0x0001), PCI_DESCR("Foo bar") }, | |||||
{ PCI_VID(0x9abc), PCI_VID(0x9abc), PCI_DESCR("Baz fizz") }, | |||||
}; | |||||
.Ed | |||||
.\" | |||||
.Sh SEE ALSO | |||||
.Xr PCI_VID 9 , | |||||
.Xr devmatch 8 | |||||
.Sh HISTORY | |||||
The macro | |||||
.Nm | |||||
appeared in | |||||
.Fx 12.0 . | |||||
.Sh AUTHORS | |||||
The PNP framework and | |||||
.Xr devmatch 8 | |||||
utility were written by | |||||
.An Warner Losh Aq Mt imp@FreeBSD.org . |