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"
8 scsi_get_device_type_string \- look up per-device-type, returning matching
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);
24 Solaris DDI specific (Solaris DDI).
32 Name of string array property that contains a list of paired device-type
42 Pointer to the device info node for this HBA driver.
51 Pointer to a \fBscsi_device\fR(9S) structure of the target.
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:
67 prop_name = \fI<duplet>\fR [, \fI<duplet>\fR *];
78 \fI<duplet>\fR := \fI"<vid+pid>"\fR, \fI"<information"\fR
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.
96 scsi_vhci_failover_override =
97 "STK FLEXLINE 400", "f_asym_lsi",
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
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:
120 kmem_free(info, strlen(info) + 1);
127 This function can be called from kernel or interrupt context.
134 \fIWriting Device Drivers \fR