1scsi_get_device_type_strinKge(r9nFe)l Functions for Drsicvseir_sget_device_type_string(9F)
2
3
4

NAME

6       scsi_get_device_type_string - look up per-device-type, returning match‐
7       ing information string
8

SYNOPSIS

10       #include <sys/scsi/scsi.h>
11
12
13
14       char *scsi_get_device_type_string(char *prop_name,
15                 dev_info_t  *dip, struct scsi_device  *devp);
16
17

INTERFACE LEVEL

19       Solaris DDI specific (Solaris DDI).
20

PARAMETERS

22       prop_name    Name of string array property  that  contains  a  list  of
23                    paired device-type information.
24
25
26       dip          Pointer to the device info node for this HBA driver.
27
28
29       devp         Pointer to a scsi_device(9S) structure of the target.
30
31

DESCRIPTION

33       The scsi_get_device_type_string() function looks up the prop_name prop‐
34       erty, which can be specified  in  the  HBA's  driver.conf(4)file.  This
35       property  allows specification of per-device-type information. The syn‐
36       tax for prop_name in a driver.conf(4) file is:
37
38
39       The formal syntax is:
40
41         prop_name = <duplet> [, <duplet> *];
42
43
44
45
46       where:
47
48         <duplet> := "<vid+pid>", "<information"
49
50
51
52
53       The string <vid+pid> is returned by the device on a SCSI  inquiry  com‐
54       mand.  This  string  can  contain any character in the range 0x20-0x7e.
55       Characters such as double quote (") or single quote ('), which are  not
56       permitted  in  property  value  strings, are represented by their octal
57       equivalent (for example, \042 and \047). Trailing spaces can  be  trun‐
58       cated.
59
60
61       For example:
62
63         scsi_vhci_failover_override =
64                  "STK     FLEXLINE 400",   "f_asym_lsi",
65                  "SUN     T4",        "f_tpgs";;
66
67
68
69
70       The scsi_get_device_type_string() function searches the list of duplets
71       for   a   matching   INQUIRY   string.   If   a   match    is    found,
72       scsi_get_device_type_string returns a copy of the <information> string.
73       The meaning of the returned <information> string is determined  by  the
74       caller.
75

RETURN VALUES

77       scsi_get_device_type_string()  returns a copy of the matching <informa‐
78       tion> string, or if no match is found, NULL is returned.  When  a  non-
79       NULL  value  is  returned,  the  caller  is responsible for freeing the
80       <information> string via:
81
82         kmem_free(info, strlen(info) + 1);
83
84

CONTEXT

86       This function can be called from kernel or interrupt context.
87

SEE ALSO

89       driver.conf(4)
90
91
92       Writing Device Drivers
93
94
95
96SunOS 5.11                        12 Jul 2007  scsi_get_device_type_string(9F)
Impressum