Print this page
4630 clean stale references to ddi_iopb_alloc and ddi_iopb_free
4634 undocument scsi_hba_attach() and ddi_dma_lim(9s)
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man9f/scsi_slave.9f
+++ new/usr/src/man/man9f/scsi_slave.9f
1 1 '\" te
2 2 .\" Copyright (c) 2002, Sun Microsystems, Inc., All Rights Reserved
3 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 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 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_SLAVE 9F "Sep 27, 2002"
6 +.TH SCSI_SLAVE 9F "Feb 26, 2014"
7 7 .SH NAME
8 8 scsi_slave \- utility for SCSI target drivers to establish the presence of a
9 9 target
10 10 .SH SYNOPSIS
11 11 .LP
12 12 .nf
13 13 #include <sys/scsi/scsi.h>
14 14
15 15
16 16
17 17 \fBint\fR \fBscsi_slave\fR(\fBstruct scsi_device *\fR\fIdevp\fR, \fBint\fR \fB(*\fRcallback\fB)(void)\fR);
18 18 .fi
19 19
20 20 .SH INTERFACE LEVEL
21 21 .sp
22 22 .LP
23 23 The \fBscsi_slave()\fR function is obsolete. This function has been replaced by
24 24 \fBscsi_probe\fR(9F).
25 25 .SH PARAMETERS
26 26 .sp
27 27 .ne 2
28 28 .na
29 29 \fB\fIdevp\fR \fR
30 30 .ad
31 31 .RS 13n
32 32 Pointer to a \fBscsi_device\fR(9S) structure.
33 33 .RE
34 34
35 35 .sp
36 36 .ne 2
37 37 .na
38 38 \fB\fIcallback\fR \fR
39 39 .ad
40 40 .RS 13n
41 41 Pointer to a callback function, \fBNULL_FUNC\fR or \fBSLEEP_FUNC\fR.
42 42 .RE
43 43
44 44 .SH DESCRIPTION
45 45 .sp
46 46 .LP
47 47 \fBscsi_slave()\fR checks for the presence of a \fBSCSI\fR device. Target
48 48 drivers may use this function in their \fBprobe\fR(9E) routines.
49 49 \fBscsi_slave()\fR determines if the device is present by using a Test Unit
50 50 Ready command followed by an Inquiry command. If \fBscsi_slave()\fR is
51 51 successful, it will fill in the \fBscsi_inquiry\fR structure, which is the
52 52 \fBsd_inq\fR member of the \fBscsi_device\fR(9S) structure, and return
53 53 \fBSCSI_PROBE_EXISTS\fR. This information can be used to determine if the
54 54 target driver has probed the correct SCSI device type. \fIcallback\fR indicates
55 55 what the allocator routines should do when \fBDMA \fRresources are not
56 56 available:
57 57 .sp
58 58 .ne 2
59 59 .na
60 60 \fB\fBNULL_FUNC\fR \fR
61 61 .ad
62 62 .RS 16n
63 63 Do not wait for resources. Return a \fINULL\fR pointer.
64 64 .RE
65 65
66 66 .sp
67 67 .ne 2
68 68 .na
69 69 \fB\fBSLEEP_FUNC\fR \fR
70 70 .ad
71 71 .RS 16n
72 72 Wait indefinitely for resources.
73 73 .RE
74 74
75 75 .sp
76 76 .ne 2
77 77 .na
78 78 \fBOther Values\fR
79 79 .ad
80 80 .RS 16n
81 81 \fIcallback\fR points to a function which is called when resources may have
82 82 become available. \fIcallback\fR \fBmust\fR return either \fB0\fR (indicating
83 83 that it attempted to allocate resources but again failed to do so), in which
84 84 case it is put back on a list to be called again later, or \fB1\fR indicating
85 85 either success in allocating resources or indicating that it no longer cares
86 86 for a retry.
87 87 .RE
88 88
89 89 .SH RETURN VALUES
90 90 .sp
91 91 .LP
92 92 \fBscsi_slave()\fR returns:
93 93 .sp
94 94 .ne 2
95 95 .na
96 96 \fB\fBSCSIPROBE_NOMEM\fR \fR
97 97 .ad
98 98 .RS 22n
99 99 No space available for structures.
100 100 .RE
101 101
102 102 .sp
103 103 .ne 2
104 104 .na
105 105 \fB\fBSCSIPROBE_EXISTS\fR \fR
106 106 .ad
107 107 .RS 22n
108 108 Device exists and inquiry data is valid.
109 109 .RE
110 110
111 111 .sp
112 112 .ne 2
113 113 .na
114 114 \fB\fBSCSIPROBE_NONCCS\fR \fR
115 115 .ad
116 116 .RS 22n
117 117 Device exists but inquiry data is not valid.
118 118 .RE
119 119
120 120 .sp
121 121 .ne 2
122 122 .na
123 123 \fB\fBSCSIPROBE_FAILURE\fR \fR
124 124 .ad
125 125 .RS 22n
126 126 Polled command failure.
127 127 .RE
128 128
129 129 .sp
130 130 .ne 2
131 131 .na
132 132 \fB\fBSCSIPROBE_NORESP\fR \fR
133 133 .ad
134 134 .RS 22n
135 135 No response to \fBTEST UNIT READY\fR.
136 136 .RE
137 137
138 138 .SH CONTEXT
139 139 .sp
140 140 .LP
141 141 \fBscsi_slave()\fR is normally called from the target driver's \fBprobe\fR(9E)
142 142 or \fBattach\fR(9E) routine. In any case, this routine should not be called
143 143 from interrupt context, because it can sleep waiting for memory to be
144 144 allocated.
145 145 .SH ATTRIBUTES
146 146 .sp
147 147 .LP
148 148 See \fBattributes\fR(5) for a description of the following attributes:
149 149 .sp
150 150
151 151 .sp
152 152 .TS
153 153 box;
154 154 c | c
↓ open down ↓ |
138 lines elided |
↑ open up ↑ |
155 155 l | l .
156 156 ATTRIBUTE TYPE ATTRIBUTE VALUE
157 157 _
158 158 Stability Level Obsolete
159 159 .TE
160 160
161 161 .SH SEE ALSO
162 162 .sp
163 163 .LP
164 164 \fBattributes\fR(5), \fBattach\fR(9E), \fBprobe\fR(9E),
165 -\fBddi_iopb_alloc\fR(9F), \fBmakecom\fR(9F), \fBscsi_dmaget\fR(9F),
165 +\fBmakecom\fR(9F), \fBscsi_dmaget\fR(9F),
166 166 \fBscsi_ifgetcap\fR(9F), \fBscsi_pktalloc\fR(9F), \fBscsi_poll\fR(9F),
167 167 \fBscsi_probe\fR(9F), \fBscsi_device\fR(9S)
168 168 .sp
169 169 .LP
170 170 \fIANSI Small Computer System Interface-2 (SCSI-2)\fR
171 171 .sp
172 172 .LP
173 173 \fIWriting Device Drivers\fR
174 174 .SH NOTES
175 175 .sp
176 176 .LP
177 177 The \fBscsi_slave()\fR function is obsolete and will be discontinued in a
178 178 future release. This function has been replaced by \fBscsi_probe\fR(9F).
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX