9022 loader.efi: module placement must check memory map
[unleashed.git] / share / man / man9f / scsi_get_device_type_string.9f
blob7196a54288cb0bf7798b8385d7e6c8a7751bf249
1 '\" te
2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SCSI_GET_DEVICE_TYPE_STRING 9F "Jul 12, 2007"
7 .SH NAME
8 scsi_get_device_type_string \- look up per-device-type, returning matching
9 information string
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <sys/scsi/scsi.h>
17 \fBchar\fR \fB*scsi_get_device_type_string\fR(\fBchar *prop_name,
18                 dev_info_t  *\fR\fIdip\fR, \fBstruct scsi_device  *\fR\fIdevp\fR);
19 .fi
21 .SH INTERFACE LEVEL
22 .sp
23 .LP
24 Solaris DDI specific (Solaris DDI).
25 .SH PARAMETERS
26 .sp
27 .ne 2
28 .na
29 \fB\fIprop_name\fR\fR
30 .ad
31 .RS 13n
32 Name of string array property that contains a list of paired device-type
33 information.
34 .RE
36 .sp
37 .ne 2
38 .na
39 \fB\fIdip\fR\fR
40 .ad
41 .RS 13n
42 Pointer to the device info node for this HBA driver.
43 .RE
45 .sp
46 .ne 2
47 .na
48 \fB\fIdevp\fR \fR
49 .ad
50 .RS 13n
51 Pointer to a \fBscsi_device\fR(9S) structure of the target.
52 .RE
54 .SH DESCRIPTION
55 .sp
56 .LP
57 The \fBscsi_get_device_type_string()\fR function looks up the \fIprop_name\fR
58 property, which can be specified in the HBA's \fBdriver.conf\fR(4)file. This
59 property allows specification of per-device-type information. The syntax for
60 \fIprop_name\fR in a \fBdriver.conf\fR(4) file is:
61 .sp
62 .LP
63 The formal syntax is:
64 .sp
65 .in +2
66 .nf
67 prop_name = \fI<duplet>\fR [, \fI<duplet>\fR *];
68 .fi
69 .in -2
70 .sp
72 .sp
73 .LP
74 where:
75 .sp
76 .in +2
77 .nf
78 \fI<duplet>\fR := \fI"<vid+pid>"\fR, \fI"<information"\fR
79 .fi
80 .in -2
81 .sp
83 .sp
84 .LP
85 The string \fI<vid+pid>\fR is returned by the device on a SCSI inquiry command.
86 This string can contain any character in the range 0x20-0x7e. Characters such
87 as double quote (") or single quote ('), which are not permitted in property
88 value strings, are represented by their octal equivalent (for example, \e042
89 and \e047). Trailing spaces can be truncated.
90 .sp
91 .LP
92 For example:
93 .sp
94 .in +2
95 .nf
96 scsi_vhci_failover_override =
97             "STK     FLEXLINE 400",     "f_asym_lsi",
98             "SUN     T4",               "f_tpgs";;
99 .fi
100 .in -2
105 The \fBscsi_get_device_type_string\fR() function searches the list of duplets
106 for a matching INQUIRY string. If a match is found,
107 \fBscsi_get_device_type_string\fR returns a copy of the <\fIinformation\fR>
108 string. The meaning of the returned <\fIinformation\fR> string is determined by
109 the caller.
110 .SH RETURN VALUES
113 \fBscsi_get_device_type_string()\fR returns a copy of the matching
114 <\fIinformation\fR> string, or if no match is found, \fBNULL\fR is returned.
115 When a non-NULL value is returned, the caller is responsible for freeing the
116 <\fIinformation\fR> string via:
118 .in +2
120 kmem_free(info, strlen(info) + 1);
122 .in -2
124 .SH CONTEXT
127 This function can be called from kernel or interrupt context.
128 .SH SEE ALSO
131 \fBdriver.conf\fR(4)
134 \fIWriting Device Drivers \fR