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.Dd April 22, 2021 25.Dt BUS_CHILD_PNPINFO 9 26.Os 27.Sh NAME 28.Nm BUS_CHILD_PNPINFO 29.Nd "obtain the plug and play information from a device" 30.Sh SYNOPSIS 31.In sys/param.h 32.In sys/bus.h 33.In sys/sbuf.h 34.Ft void 35.Fn BUS_CHILD_PNPINFO "device_t dev" "device_t child" "struct sbuf *sb" 36.Sh DESCRIPTION 37The 38.Fn BUS_CHILD_LOCATION 39method returns the identifying information about the 40.Dv child 41device. 42This information is called the plug and play (pnp) details by some buses. 43This information is a series of key=value pairs. 44The string must be formatted as a space-separated list of key=value pairs. 45Names may only contain alphanumeric characters, underscores ('_') and hyphens ('-'). 46Values can contain any non-whitespace characters. 47Values containing whitespace can be quoted with double quotes ('"'). 48Double quotes and backslashes in quoted values can be escaped with backslashes ('\'). 49.Pp 50The pnpinfo is defined as a series of characteristics of the 51.Dv child 52device that are independent of which drivers are attached, but 53are used to allow drivers to claim a device. 54Typically, plug and play information encodes who made the device, what the model 55number is, and some generic details about the device. 56By convention, only the generic information about the device that's used by 57drivers on that bus to decide on accepting the device is reported. 58Other configuration information (such as the cache burst size) needed for the 59operation of the device, but that doesn't distinguish it broadly from other 60devices is not reported. 61.Sh SEE ALSO 62.Xr bus 9 , 63.Xr device 9 64