Print this page
5025 import and use mandoc
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Albert Lee <trisk@nexenta.com>
Approved by: TBD
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man9f/scsi_hba_attach_setup.9f
+++ new/usr/src/man/man9f/scsi_hba_attach_setup.9f
1 1 '\" te
2 2 .\" Copyright (c) 2006 Sun Microsystems, Inc., All Rights Reserved
3 3 .\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
4 4 .\" 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.
5 5 .\" 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.
6 6 .\" 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]
7 7 .TH SCSI_HBA_ATTACH_SETUP 9F "May 24, 2014"
8 8 .SH NAME
9 9 scsi_hba_attach_setup, scsi_hba_detach \- SCSI HBA attach and
10 10 detach routines
11 11 .SH SYNOPSIS
12 12 .LP
13 13 .nf
14 14 #include <sys/scsi/scsi.h>
15 15
16 16
17 17
18 18 \fBint\fR \fBscsi_hba_attach_setup\fR(\fBdev_info_t *\fR\fIdip\fR, \fBddi_dma_attr_t *\fR\fIhba_dma_attr\fR,
19 19 \fBscsi_hba_tran_t *\fR\fIhba_tran\fR, \fBint\fR \fIhba_flags\fR);
20 20 .fi
21 21
22 22 .LP
23 23 .nf
24 24 \fBint\fR \fBscsi_hba_detach\fR(\fBdev_info_t *\fR\fIdip\fR);
25 25 .fi
26 26
27 27 .SH INTERFACE LEVEL
28 28 .sp
29 29 .LP
30 30 Solaris architecture specific (Solaris DDI).
31 31 .SH PARAMETERS
32 32 .sp
33 33 .ne 2
34 34 .na
35 35 \fB\fIdip\fR\fR
36 36 .ad
37 37 .RS 16n
38 38 Pointer to the \fBdev_info_t\fR structure that refers to the instance of the
39 39 HBA device.
40 40 .RE
41 41
42 42 .sp
43 43 .ne 2
44 44 .na
45 45 \fB\fIhba_tran\fR\fR
46 46 .ad
47 47 .RS 16n
48 48 Pointer to a \fBscsi_hba_tran\fR(9S) structure.
49 49 .RE
50 50
51 51 .sp
52 52 .ne 2
53 53 .na
54 54 \fB\fIhba_flags\fR\fR
55 55 .ad
56 56 .RS 16n
57 57 Flag modifiers. The defined flag values are \fBSCSI_HBA_TRAN_CLONE\fR,
58 58 \fBSCSI_HBA_TRAN_SCB\fR, and \fBSCSI_HBA_TRAN_CDB\fR.
59 59 .RE
60 60
61 61 .sp
62 62 .ne 2
63 63 .na
64 64 \fB\fIhba_options\fR\fR
65 65 .ad
66 66 .RS 16n
67 67 Optional features provided by the HBA driver for future extensions; must be
68 68 \fINULL\fR.
69 69 .RE
70 70
71 71 .sp
72 72 .ne 2
73 73 .na
74 74 \fB\fIhba_dma_attr\fR\fR
75 75 .ad
76 76 .RS 16n
77 77 Pointer to a \fBddi_dma_attr\fR(9S) structure.
78 78 .RE
79 79
80 80 .SH DESCRIPTION
81 81 .sp
82 82 .SS "scsi_hba_attach_setup(\|)"
83 83 .sp
84 84 .LP
85 85 The \fBscsi_hba_attach_setup()\fR function registers the
86 86 \fIhba_dma_attr\fR DMA attributes and the \fIhba_tran\fR transport vectors of
87 87 each instance of the HBA device defined by \fIdip\fR. The HBA driver can pass
88 88 different DMA attributes and the transport vectors for each
89 89 instance of the device to support any constraints imposed by the HBA itself.
90 90 .sp
91 91 .LP
92 92 The \fBscsi_hba_attach_setup()\fR function uses the
93 93 \fBdev_bus_ops\fR field in the \fBdev_ops\fR(9S) structure. The HBA driver
94 94 should initialize this field to \fINULL\fR before calling
95 95 \fBscsi_hba_attach_setup()\fR.
96 96 .sp
97 97 .LP
98 98 If \fBSCSI_HBA_TRAN_CLONE\fR is requested in \fIhba_flags\fR, the
99 99 \fBhba_tran\fR structure is cloned once for each target that is attached to the
100 100 HBA. The structure is cloned before the \fBtran_tgt_init\fR(9E) entry point is
101 101 called to initialize a target. At all subsequent HBA entry points, including
102 102 \fBtran_tgt_init\fR(9E), the \fBscsi_hba_tran_t\fR structure passed as an
103 103 argument or found in a \fBscsi_address\fR structure is the cloned
104 104 \fBscsi_hba_tran_t\fR structure,which allows the HBA to use the
105 105 \fBtran_tgt_private\fR field in the \fBscsi_hba_tran_t\fR structure to point to
106 106 per-target data. The HBA should free only the same \fBscsi_hba_tran_t\fR
107 107 structure allocated when the HBA detaches. All cloned \fBscsi_hba_tran_t\fR
108 108 structures that are allocated by the system are freed by the system.
109 109 .sp
110 110 .LP
111 111 The flags \fBSCSI_HBA_TRAN_CDB\fR and \fBSCSI_HBA_TRAN_SCB\fR are only valid
112 112 when \fBtran_setup_pkt()\fR is used. See \fBtran_setup_pkt\fR(9E) for
113 113 information on using these flags.
114 114 .sp
115 115 .LP
116 116 The \fBscsi_hba_attach_setup()\fR function attaches
117 117 a number of integer-valued properties to \fIdip\fR, unless properties of the
118 118 same name are already attached to the node. An HBA driver should retrieve these
119 119 configuration parameters via \fBddi_prop_get_int\fR(9F), and respect any
120 120 settings for features provided the HBA.
121 121 .sp
122 122 .ne 2
123 123 .na
124 124 \fB\fBscsi-options\fR\fR
125 125 .ad
126 126 .RS 26n
127 127 \fBOptional\fR \fBSCSI\fR \fBconfiguration bits\fR
128 128 .RE
129 129
130 130 .sp
131 131 .ne 2
132 132 .na
133 133 \fB\fBSCSI_OPTIONS_DR\fR\fR
134 134 .ad
135 135 .RS 26n
136 136 If not set, the HBA should not grant Disconnect privileges to target devices.
137 137 .RE
138 138
139 139 .sp
140 140 .ne 2
141 141 .na
142 142 \fB\fBSCSI_OPTIONS_TAG\fR\fR
143 143 .ad
144 144 .RS 26n
145 145 If not set, the HBA should not operate in Command Tagged Queueing mode.
146 146 .RE
147 147
148 148 .sp
149 149 .ne 2
150 150 .na
151 151 \fB\fBSCSI_OPTIONS_PARITY\fR\fR
152 152 .ad
153 153 .RS 26n
154 154 If not set, the HBA should not operate in parity mode.
155 155 .RE
156 156
157 157 .sp
158 158 .ne 2
159 159 .na
160 160 \fB\fBSCSI_OPTIONS_QAS\fR\fR
161 161 .ad
162 162 .RS 26n
163 163 If not set, the HBA should not make use of the Quick Arbitration Select
164 164 feature. Consult your Sun hardware documentation to determine whether your
165 165 machine supports QAS.
166 166 .RE
167 167
168 168 .sp
169 169 .ne 2
170 170 .na
171 171 \fB\fBSCSI_OPTIONS_FAST\fR\fR
172 172 .ad
173 173 .RS 26n
174 174 If not set, the HBA should not operate the bus in FAST SCSI mode.
175 175 .RE
176 176
177 177 .sp
178 178 .ne 2
179 179 .na
180 180 \fB\fBSCSI_OPTIONS_FAST20\fR\fR
181 181 .ad
182 182 .RS 26n
183 183 If not set, the HBA should not operate the bus in FAST20 SCSI mode.
184 184 .RE
185 185
186 186 .sp
187 187 .ne 2
188 188 .na
189 189 \fB\fBSCSI_OPTIONS_FAST40\fR\fR
190 190 .ad
191 191 .RS 26n
192 192 If not set, the HBA should not operate the bus in FAST40 SCSI mode.
193 193 .RE
194 194
195 195 .sp
196 196 .ne 2
197 197 .na
198 198 \fB\fBSCSI_OPTIONS_FAST80\fR\fR
199 199 .ad
200 200 .RS 26n
201 201 If not set, the HBA should not operate the bus in FAST80 SCSI mode.
202 202 .RE
203 203
204 204 .sp
205 205 .ne 2
206 206 .na
207 207 \fB\fBSCSI_OPTIONS_FAST160\fR\fR
208 208 .ad
209 209 .RS 26n
210 210 If not set, the HBA should not operate the bus in FAST160 SCSI mode.
211 211 .RE
212 212
213 213 .sp
214 214 .ne 2
215 215 .na
216 216 \fB\fBSCSI_OPTIONS_FAST320\fR\fR
217 217 .ad
218 218 .RS 26n
219 219 If not set, the HBA should not operate the bus in FAST320 SCSI mode.
220 220 .RE
221 221
222 222 .sp
223 223 .ne 2
224 224 .na
225 225 \fB\fBSCSI_OPTIONS_WIDE\fR\fR
226 226 .ad
227 227 .RS 26n
228 228 If not set, the HBA should not operate the bus in WIDE SCSI mode.
229 229 .RE
230 230
231 231 .sp
232 232 .ne 2
233 233 .na
234 234 \fB\fBSCSI_OPTIONS_SYNC\fR\fR
235 235 .ad
236 236 .RS 26n
237 237 If not set, the HBA should not operate the bus in synchronous transfer mode.
238 238 .RE
239 239
240 240 .sp
241 241 .ne 2
242 242 .na
243 243 \fB\fBscsi-reset-delay\fR\fR
244 244 .ad
245 245 .RS 26n
246 246 SCSI bus or device reset recovery time, in milliseconds.
247 247 .RE
248 248
249 249 .sp
250 250 .ne 2
251 251 .na
↓ open down ↓ |
251 lines elided |
↑ open up ↑ |
252 252 \fB\fBscsi-selection-timeout\fR\fR
253 253 .ad
254 254 .RS 26n
255 255 Default SCSI selection phase timeout value, in milliseconds. Please refer to
256 256 individual HBA man pages for any HBA-specific information
257 257 .RE
258 258
259 259 .SS "scsi_hba_detach(\|)"
260 260 .sp
261 261 .LP
262 -The \fBscsi_hba_detach()\fR function removes the reference to the DMA
262 +The \fBscsi_hba_detach()\fR function removes the reference to the DMA
263 263 attributes structure and the transport vector for the given instance of an HBA
264 264 driver.
265 265 .SH RETURN VALUES
266 266 .sp
267 267 .LP
268 268 The \fBscsi_hba_attach_setup()\fR and
269 269 \fBscsi_hba_detach()\fR functions return \fBDDI_SUCCESS\fR if the function call
270 270 succeeds, and return \fBDDI_FAILURE\fR on failure.
271 271 .SH CONTEXT
272 272 .sp
273 273 .LP
274 274 The \fBscsi_hba_attach_setup()\fR function should
275 275 be called from \fBattach\fR(9E). The \fBscsi_hba_detach()\fR function should be
276 276 called from \fBdetach\fR(9E).
277 277 .SH SEE ALSO
278 278 .sp
279 279 .LP
280 280 \fBattach\fR(9E), \fBdetach\fR(9E), \fBtran_setup_pkt\fR(9E),
281 281 \fBtran_tgt_init\fR(9E), \fBddi_prop_get_int\fR(9F), \fBddi_dma_attr\fR(9S),
282 282 \fBdev_ops\fR(9S), \fBscsi_address\fR(9S),
283 283 \fBscsi_hba_tran\fR(9S)
284 284 .sp
285 285 .LP
286 286 \fIWriting Device Drivers\fR
287 287 .SH NOTES
288 288 .sp
289 289 .LP
290 290 It is the HBA driver's responsibility to ensure that no more transport requests
291 291 will be taken on behalf of any SCSI target device driver after
292 292 \fBscsi_hba_detach()\fR is called.
↓ open down ↓ |
20 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX