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