xref: /freebsd/share/man/man9/BUS_CHILD_PNPINFO.9 (revision f7c32ed617858bcd22f8d1b03199099d50125721)
1.\"
2.\" Copyright (c) 2021 Netflix, Inc.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
14.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
17.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23.\"
24.\" $FreeBSD$
25.\"
26.Dd April 22, 2021
27.Dt BUS_CHILD_PNPINFO 9
28.Os
29.Sh NAME
30.Nm BUS_CHILD_PNPINFO
31.Nd "obtain the plug and play information from a device"
32.Sh SYNOPSIS
33.In sys/param.h
34.In sys/bus.h
35.In sys/sbuf.h
36.Ft void
37.Fn BUS_CHILD_PNPINFO "device_t dev" "device_t child" "struct sbuf *sb"
38.Sh DESCRIPTION
39The
40.Fn BUS_CHILD_LOCATION
41method returns the identifying information about the
42.Dv child
43device.
44This information is called the plug and play (pnp) details by some buses.
45This information is a series of key=value pairs.
46The string must be formatted as a space-separated list of key=value pairs.
47Names may only contain alphanumeric characters, underscores ('_') and hyphens ('-').
48Values can contain any non-whitespace characters.
49Values containing whitespace can be quoted with double quotes ('"').
50Double quotes and backslashes in quoted values can be escaped with backslashes ('\').
51.Pp
52The pnpinfo is defined as a series of characteristics of the
53.Dv child
54device that are independent of which drivers are attached, but
55are used to allow drivers to claim a device.
56Typically, plug and play information encodes who made the device, what the model
57number is, and some generic details about the device.
58By convention, only the generic information about the device that's used by
59drivers on that bus to decide on accepting the device is reported.
60Other configuration information (such as the cache burst size) needed for the
61operation of the device, but that doesn't distinguish it broadly from other
62devices is not reported.
63.Sh SEE ALSO
64.Xr bus 9 ,
65.Xr device 9
66