1scsi_get_device_type_scsi_KoeprtnieolnsF(u9nFc)tionssfcosri_Dgreitv_edresvice_type_scsi_options(9F)
2
3
4
6 scsi_get_device_type_scsi_options - look up per-device-type scsi-
7 options property
8
10 #include <sys/scsi/scsi.h>
11
12
13
14 int scsi_get_device_type_scsi_options(dev_info_t *dip,
15 struct scsi_device *devp, int default_scsi_options);
16
17
19 Solaris DDI specific (Solaris DDI).
20
22 dip Pointer to the device info node for this HBA
23 driver.
24
25
26 devp Pointer to a scsi_device(9S) structure of the
27 target.
28
29
30 default_scsi_options Value returned if no match is found.
31
32
34 The scsi_get_device_type_scsi_options() function looks up the property
35 device-type-scsi-options-list, which can be specified in the HBA's
36 driver.conf(4) file. This property allows specification of scsi-options
37 on a per-device-type basis.
38
39
40 The formal syntax is:
41
42 device-type-scsi-options-list = <duplet> [, <duplet> *];
43
44
45
46
47 where:
48
49 <duplet> := <vid+pid>, <scsi-options-property-name>
50
51
52
53
54 and:
55
56 <scsi-options-property-name> = <value>;
57
58
59
60
61 The string <vid+pid> is returned by the device on a SCSI inquiry com‐
62 mand. This string can contain any character in the range 0x20-0x7e.
63 Characters such as double quote (") or single quote ('), which are not
64 permitted in property value strings, are represented by their octal
65 equivalent (for example, \042 and \047). Trailing spaces can be trun‐
66 cated.
67
68
69 For example:
70
71 device-type-scsi-options-list=
72 "SEAGATE ST32550W", "seagate-options",
73 "EXABYTE EXB-2501". "exabyte-options",
74 "IBM OEM DFHSS4S", "ibm-options";
75
76 seagate-options = 0x78;
77 exabyte-options = 0x58;
78 ibm-options = 0x378;
79
80
81
82
83 The scsi_get_device_type_scsi_options() function searches the list of
84 duplets for a matching INQUIRY string. If a match is found,
85 scsi_get_device_type_scsi_options() returns the corresponding value.
86
88 scsi_get_device_type_scsi_options() returns the scsi-options value
89 found, or if no match is found the default_scsi_options value passed
90 in.
91
93 This function can be called from kernel or interrupt context.
94
96 Writing Device Drivers
97
98
99
100SunOS 5.11 19 Nov 2s0c0s1i_get_device_type_scsi_options(9F)