Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141161728
D17321.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17321.id.diff
View Options
Index: head/share/man/man9/MODULE_PNP_INFO.9
===================================================================
--- head/share/man/man9/MODULE_PNP_INFO.9
+++ head/share/man/man9/MODULE_PNP_INFO.9
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 12, 2018
+.Dd October 2, 2018
.Dt MODULE_PNP_INFO 9
.Os
.Sh NAME
@@ -113,7 +113,7 @@
.It Dq Vt E
EISA PNP Identifier.
.It Dq Vt T
-PNP info that's true for the for the whole table.
+PNP info that is true for the for the whole table.
The driver code checks for these condition pragmatically before using
this table to match devices.
This item must come last in the list.
@@ -157,9 +157,18 @@
.Fa num_entries .
.\"
.Sh EXAMPLES
-.Bd -literal -offset indent -compact
+.Bl -tag -width ""
+.It Sy Example 1\&: No Using W32 for vendor/device pair
+.Pp
+The following example shows usage of
+.Vt W32
+type when vendor/device values are combined into single
+.Vt uint32_t
+value:
+.Bd -literal
#include <sys/param.h>
#include <sys/module.h>
+
static struct my_pciids {
uint32_t devid;
const char *desc;
@@ -168,14 +177,35 @@
{ 0x9abcdef0, "Baz fizz" },
};
-MODULE_PNP_INFO("W32:vendor/device", pci, my_driver, my_ids, sizeof(my_ids[0]),
- nitems(my_ids));
+MODULE_PNP_INFO("W32:vendor/device;D:#", pci, my_driver, my_ids,
+ sizeof(my_ids[0]), nitems(my_ids));
.Ed
+.It Sy Example 2\&: No Using T for common vendor value
+.Pp
+The following example shows usage of
+.Vt T
+type when all entries in the table have the same vendor value:
+.Bd -literal
+#include <sys/param.h>
+#include <sys/module.h>
+
+static struct my_pciids {
+ uint16_t device;
+ const char *desc;
+} my_ids[] = {
+ { 0x9abc, "Foo bar" },
+ { 0xdef0, "Baz fizz" },
+};
+
+MODULE_PNP_INFO("U16:device;D:#;T:vendor=0x1234", pci, my_driver,
+ my_ids, sizeof(my_ids[0]), nitems(my_ids));
+.Ed
+.El
.\"
.Sh SEE ALSO
-.Xr module 9 ,
+.Xr devmatch 8 ,
.Xr DRIVER_MODULE 9 ,
-.Xr devmatch 8
+.Xr module 9
.Sh HISTORY
The macro
.Nm
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 2, 5:29 PM (5 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27460273
Default Alt Text
D17321.id.diff (1 KB)
Attached To
Mode
D17321: MODULE_PNP_INFO(9): add example of T usage
Attached
Detach File
Event Timeline
Log In to Comment