Root/
Source at commit 2351 created 10 years 5 months ago. By ifabio, more info from dmi tables | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 1998-2009 Apple Inc. All rights reserved.␊ |
3 | *␊ |
4 | * @APPLE_LICENSE_HEADER_START@␊ |
5 | * ␊ |
6 | * This file contains Original Code and/or Modifications of Original Code␊ |
7 | * as defined in and that are subject to the Apple Public Source License␊ |
8 | * Version 2.0 (the 'License'). You may not use this file except in␊ |
9 | * compliance with the License. Please obtain a copy of the License at␊ |
10 | * http://www.opensource.apple.com/apsl/ and read it before using this␊ |
11 | * file.␊ |
12 | * ␊ |
13 | * The Original Code and all software distributed under the License are␊ |
14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.␊ |
18 | * Please see the License for the specific language governing rights and␊ |
19 | * limitations under the License.␊ |
20 | * ␊ |
21 | * @APPLE_LICENSE_HEADER_END@␊ |
22 | */␊ |
23 | ␊ |
24 | ␊ |
25 | #ifndef _IOKIT_SCSI_TASK_H_␊ |
26 | #define _IOKIT_SCSI_TASK_H_␊ |
27 | ␊ |
28 | ␊ |
29 | #if KERNEL␊ |
30 | #include <IOKit/IOTypes.h>␊ |
31 | #else␊ |
32 | #include <CoreFoundation/CoreFoundation.h>␊ |
33 | #endif␊ |
34 | ␊ |
35 | ␊ |
36 | /*! @header SCSITask␊ |
37 | SCSITask typedefs and constants used inside the kernel and user space.␊ |
38 | ␊ |
39 | Note that the SCSITaskIdentifier is an opaque object and that directly␊ |
40 | casting the SCSITaskIdentifier to any other type is discouraged. The SCSITask␊ |
41 | implementation changes when necessary to accomodate architectural changes,␊ |
42 | performance improvements, and bug fixes.␊ |
43 | ␊ |
44 | Device and protocol layer drivers that need to access information␊ |
45 | contained in a SCSITask should use the appropriate accessor methods in␊ |
46 | IOSCSIPrimaryCommandsDevice.h or IOSCSIProtocolServices.h␊ |
47 | */␊ |
48 | ␊ |
49 | ␊ |
50 | /*! @typedef SCSIDeviceIdentifier␊ |
51 | @abstract 64-bit number to represent a SCSI Device.␊ |
52 | ␉@discussion If the identifier can either be that of an initiator or a target,␊ |
53 | SCSIDeviceIdentifier should be used.␊ |
54 | */␊ |
55 | ␊ |
56 | typedef UInt64 ␉␉␉␉␉SCSIDeviceIdentifier;␊ |
57 | ␊ |
58 | /*! @typedef SCSITargetIdentifier␊ |
59 | @abstract 64-bit number to represent a SCSI Target Device.␊ |
60 | ␉@discussion If the identifier is for a target only and not an initiator, then␊ |
61 | ␉SCSITargetIdentifier should be used.␊ |
62 | */␊ |
63 | ␊ |
64 | typedef SCSIDeviceIdentifier ␉SCSITargetIdentifier;␊ |
65 | ␊ |
66 | /*! @typedef SCSIInitiatorIdentifier␊ |
67 | @abstract 64-bit number to represent a SCSI Initiator Device.␊ |
68 | ␉@discussion If the identifier is for an initiator only and not a target, then␊ |
69 | ␉SCSIInitiatorIdentifier should be used.␊ |
70 | */␊ |
71 | ␊ |
72 | typedef SCSIDeviceIdentifier ␉SCSIInitiatorIdentifier;␊ |
73 | ␊ |
74 | /*! @typedef SCSILogicalUnitNumber␊ |
75 | @abstract 64-bit number to represent a logical unit.␊ |
76 | ␉@discussion 64-bit number to represent a logical unit.␊ |
77 | */␊ |
78 | ␊ |
79 | typedef UInt64 ␉␉␉␉␉SCSILogicalUnitNumber;␊ |
80 | ␊ |
81 | /*! @typedef SCSITaggedTaskIdentifier␊ |
82 | @abstract 64-bit number to represent a unique task identifier.␊ |
83 | ␉@discussion The Tagged Task Identifier is used when a Task has a Task Attribute other␊ |
84 | ␉than SIMPLE. The SCSI Application Layer client that controls the Logical␊ |
85 | ␉Unit for which a Task is intended is required to guarantee that the Task␊ |
86 | ␉Tag Identifier is unique. Zero cannot be used a a Tag value as this is used␊ |
87 | ␉to when a Tagged Task Identifier value is needed for a Task with a SIMPLE ␊ |
88 | ␉attribute.␊ |
89 | */␊ |
90 | ␊ |
91 | typedef UInt64 SCSITaggedTaskIdentifier;␊ |
92 | ␊ |
93 | /*!␊ |
94 | ␉@enum Untagged Task Identifier␊ |
95 | ␉@discussion The Untagged Task Identifier is used to indicate no unique tag␊ |
96 | ␉is associated with the Task.␊ |
97 | ␉@constant kSCSIUntaggedTaskIdentifier This value means the task is untagged.␊ |
98 | */␊ |
99 | ␊ |
100 | enum␊ |
101 | {␊ |
102 | ␉kSCSIUntaggedTaskIdentifier = 0␊ |
103 | };␊ |
104 | ␊ |
105 | /*!␊ |
106 | ␉@typedef SCSITaskAttribute␊ |
107 | ␉@abstract Attributes for task delivery.␊ |
108 | ␉@discussion The Task Attribute defines how this task should be managed␊ |
109 | ␉when determing order for queueing and submission to the ␊ |
110 | ␉appropriate device server. The Task Attribute is set by the SCSI␊ |
111 | ␉Application Layer and cannot be modified by the SCSI Protocol Layer.␊ |
112 | ␉@constant kSCSITask_SIMPLE The task has a simple attribute.␊ |
113 | ␉@constant kSCSITask_ORDERED The task has an ordered attribute.␊ |
114 | ␉@constant kSCSITask_HEAD_OF_QUEUE The task has a head-of-queue attribute.␊ |
115 | ␉@constant kSCSITask_ACA The task has an auto-contingent-allegiance attribute.␊ |
116 | */␊ |
117 | ␊ |
118 | typedef enum SCSITaskAttribute␊ |
119 | {␊ |
120 | ␉kSCSITask_SIMPLE␉␉␉= 0,␊ |
121 | ␉kSCSITask_ORDERED␉␉␉= 1,␊ |
122 | ␉kSCSITask_HEAD_OF_QUEUE␉␉= 2,␊ |
123 | ␉kSCSITask_ACA␉␉␉␉= 3␊ |
124 | } SCSITaskAttribute;␊ |
125 | ␊ |
126 | /*!␊ |
127 | ␉@typedef SCSITaskState␊ |
128 | ␉@abstract Attributes for task state.␊ |
129 | ␉@discussion The Task State represents the current state of the task.␊ |
130 | ␉The state is set to NEW_TASK when the task is created. The SCSI Protocol␊ |
131 | ␉Layer will then adjust the state as the task is queued and during␊ |
132 | ␉execution. The SCSI Application Layer can examine the state to monitor␊ |
133 | ␉the progress of a task. The Task State can only be modified by the SCSI␊ |
134 | ␉Protocol Layer. The SCSI Application Layer can only read the state.␊ |
135 | ␉@constant kSCSITaskState_NEW_TASK The task state is new task.␊ |
136 | ␉@constant kSCSITaskState_ENABLED The task is enabled and queued.␊ |
137 | ␉@constant kSCSITaskState_BLOCKED The task is blocked.␊ |
138 | ␉@constant kSCSITaskState_DORMANT The task is dormant.␊ |
139 | ␉@constant kSCSITaskState_ENDED The task is complete.␊ |
140 | */␊ |
141 | ␊ |
142 | typedef enum SCSITaskState␊ |
143 | {␊ |
144 | ␉kSCSITaskState_NEW_TASK␉␉= 0,␊ |
145 | ␉kSCSITaskState_ENABLED␉␉= 1,␊ |
146 | ␉kSCSITaskState_BLOCKED␉␉= 2,␊ |
147 | ␉kSCSITaskState_DORMANT␉␉= 3,␊ |
148 | ␉kSCSITaskState_ENDED␉␉= 4␊ |
149 | } SCSITaskState;␊ |
150 | ␊ |
151 | ␊ |
152 | /*!␊ |
153 | ␉@typedef SCSIServiceResponse␊ |
154 | ␉@abstract Attributes for task service response.␊ |
155 | ␉@discussion The Service Response represents the execution status of␊ |
156 | ␉a service request made to a Protocol Services Driver. The Service␊ |
157 | ␉Response can only be modified by the SCSI Protocol Layer. The SCSI␊ |
158 | ␉Application Layer can only read the state.␊ |
159 | */␊ |
160 | ␊ |
161 | typedef enum SCSIServiceResponse␊ |
162 | {␊ |
163 | ␉/*!␊ |
164 | ␉@constant kSCSIServiceResponse_Request_In_Process␊ |
165 | ␉Not defined in SAM specification, but is a service response used␊ |
166 | ␉for asynchronous commands that are not yet completed.␊ |
167 | ␉*/␊ |
168 | ␉kSCSIServiceResponse_Request_In_Process␉␉␉␉␉= 0,␊ |
169 | ␊ |
170 | ␉/*!␊ |
171 | ␉@constant kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE␊ |
172 | ␉The service request failed because of a delivery or target failure.␊ |
173 | ␉*/␊ |
174 | ␉kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE␉= 1,␊ |
175 | ␊ |
176 | ␉/*!␊ |
177 | ␉@constant kSCSIServiceResponse_TASK_COMPLETE␊ |
178 | ␉The task completed.␊ |
179 | ␉*/␊ |
180 | ␉kSCSIServiceResponse_TASK_COMPLETE ␉␉␉␉␉␉= 2,␊ |
181 | ␉␊ |
182 | ␉/*!␊ |
183 | ␉@constant kSCSIServiceResponse_LINK_COMMAND_COMPLETE␊ |
184 | ␉The linked command completed.␊ |
185 | ␉*/␊ |
186 | ␉kSCSIServiceResponse_LINK_COMMAND_COMPLETE␉␉␉␉= 3,␊ |
187 | ␉␊ |
188 | ␉/*!␊ |
189 | ␉@constant kSCSIServiceResponse_FUNCTION_COMPLETE␊ |
190 | ␉The task management function completed.␊ |
191 | ␉*/␊ |
192 | ␉kSCSIServiceResponse_FUNCTION_COMPLETE␉␉␉␉␉= 4,␊ |
193 | ␉␊ |
194 | ␉/*!␊ |
195 | ␉@constant kSCSIServiceResponse_FUNCTION_REJECTED␊ |
196 | ␉The task management function was rejected.␊ |
197 | ␉*/␊ |
198 | ␉kSCSIServiceResponse_FUNCTION_REJECTED␉␉␉␉␉= 5␊ |
199 | } SCSIServiceResponse;␊ |
200 | ␊ |
201 | /*!␊ |
202 | ␉@typedef SCSITaskStatus␊ |
203 | ␉@abstract Attributes for task status.␊ |
204 | ␉@discussion The Task Status represents the completion status␊ |
205 | ␉of the task which provides the SCSI Application Layer with␊ |
206 | ␉additional information about how to procede in handling a␊ |
207 | ␉completed task.␊ |
208 | ␉␊ |
209 | ␉The SCSI Architecture Model specification only defines task␊ |
210 | ␉status values for when a task completes with a service response␊ |
211 | ␉of either TASK_COMPLETED or LINK_COMMAND_COMPLETE.␊ |
212 | ␉␊ |
213 | ␉Since additional information will aid in error recovery when␊ |
214 | ␉a task fails to be completed by a device due to a service␊ |
215 | ␉response of kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE,␊ |
216 | ␉additional values have been defined that can be returned by the␊ |
217 | ␉SCSI Protocol Layer to inform the SCSI Application Layer of the␊ |
218 | ␉cause of the delivery failure.␊ |
219 | ␉␊ |
220 | ␉The Task Status can only be modified by the SCSI Protocol Layer.␊ |
221 | ␉The SCSI Application Layer can only read the status␊ |
222 | */␊ |
223 | typedef enum SCSITaskStatus␊ |
224 | {␊ |
225 | ␉␊ |
226 | ␉/*!␊ |
227 | ␉@constant kSCSITaskStatus_GOOD␊ |
228 | ␉The task completed with a status of GOOD.␊ |
229 | ␉*/␊ |
230 | ␉␊ |
231 | ␉kSCSITaskStatus_GOOD␉␉␉␉␉␉= 0x00,␊ |
232 | ␊ |
233 | ␉/*!␊ |
234 | ␉@constant kSCSITaskStatus_CHECK_CONDITION␊ |
235 | ␉The task completed with a status of CHECK_CONDITION. Additional␊ |
236 | ␉information about the condition should be available in the sense data.␊ |
237 | ␉*/␊ |
238 | ␉␊ |
239 | ␉kSCSITaskStatus_CHECK_CONDITION␉␉␉␉= 0x02,␊ |
240 | ␉␊ |
241 | ␉/*!␊ |
242 | ␉@constant kSCSITaskStatus_CONDITION_MET␊ |
243 | ␉The task completed with a status of CONDITION_MET.␊ |
244 | ␉*/␊ |
245 | ␉␊ |
246 | ␉kSCSITaskStatus_CONDITION_MET␉␉␉␉= 0x04,␊ |
247 | ␉␊ |
248 | ␉/*!␊ |
249 | ␉@constant kSCSITaskStatus_BUSY␊ |
250 | ␉The task completed with a status of BUSY. The device server might need␊ |
251 | ␉time to process a request and a delay may be required.␊ |
252 | ␉*/␊ |
253 | ␉kSCSITaskStatus_BUSY␉␉␉␉␉␉= 0x08,␊ |
254 | ␊ |
255 | ␉/*!␊ |
256 | ␉@constant kSCSITaskStatus_INTERMEDIATE␊ |
257 | ␉The task completed with a status of INTERMEDIATE.␊ |
258 | ␉*/␊ |
259 | ␉kSCSITaskStatus_INTERMEDIATE␉␉␉␉= 0x10,␊ |
260 | ␊ |
261 | ␉/*!␊ |
262 | ␉@constant kSCSITaskStatus_INTERMEDIATE_CONDITION_MET␊ |
263 | ␉The task completed with a status of INTERMEDIATE_CONDITION_MET.␊ |
264 | ␉*/␊ |
265 | ␉kSCSITaskStatus_INTERMEDIATE_CONDITION_MET␉= 0x14,␊ |
266 | ␊ |
267 | ␉/*!␊ |
268 | ␉@constant kSCSITaskStatus_RESERVATION_CONFLICT␊ |
269 | ␉The task completed with a status of RESERVATION_CONFLICT.␊ |
270 | ␉*/␊ |
271 | ␉kSCSITaskStatus_RESERVATION_CONFLICT␉␉= 0x18,␊ |
272 | ␊ |
273 | ␉/*!␊ |
274 | ␉@constant kSCSITaskStatus_TASK_SET_FULL␊ |
275 | ␉The task completed with a status of TASK_SET_FULL. The device server␊ |
276 | ␉may need to complete a task before the initiator sends another.␊ |
277 | ␉*/␊ |
278 | ␉kSCSITaskStatus_TASK_SET_FULL␉␉␉␉= 0x28,␊ |
279 | ␉␊ |
280 | ␉/*!␊ |
281 | ␉@constant kSCSITaskStatus_ACA_ACTIVE␊ |
282 | ␉The task completed with a status of ACA_ACTIVE. The device server may␊ |
283 | ␉need the initiator to clear the Auto-Contingent Allegiance condition␊ |
284 | ␉before it will respond to new commands.␊ |
285 | ␉*/␊ |
286 | ␉kSCSITaskStatus_ACA_ACTIVE␉␉␉␉␉= 0x30,␊ |
287 | ␉␊ |
288 | ␉/*!␊ |
289 | ␉@constant kSCSITaskStatus_TaskTimeoutOccurred␊ |
290 | ␉If a task is aborted by the SCSI Protocol Layer due to it exceeding␊ |
291 | ␉the timeout value specified by the task, the task status shall be␊ |
292 | ␉set to kSCSITaskStatus_TaskTimeoutOccurred.␊ |
293 | ␉*/␊ |
294 | ␉␊ |
295 | ␉kSCSITaskStatus_TaskTimeoutOccurred␉␉␉= 0x01,␊ |
296 | ␉␊ |
297 | ␉/*!␊ |
298 | ␉@constant kSCSITaskStatus_ProtocolTimeoutOccurred␊ |
299 | ␉If a task is aborted by the SCSI Protocol Layer due to it exceeding a␊ |
300 | ␉timeout value specified by the support for the protocol or a related␊ |
301 | ␉specification, the task status shall be set to␊ |
302 | ␉kSCSITaskStatus_ProtocolTimeoutOccurred.␊ |
303 | ␉*/␊ |
304 | ␉␊ |
305 | ␉kSCSITaskStatus_ProtocolTimeoutOccurred␉␉= 0x02,␊ |
306 | ␉␊ |
307 | ␉/*!␊ |
308 | ␉@constant kSCSITaskStatus_DeviceNotResponding␊ |
309 | ␉If a task is unable to be delivered due to a failure of the device not␊ |
310 | ␉accepting the task or the device acknowledging the attempt to send it the␊ |
311 | ␉device the task status shall be set to kSCSITaskStatus_DeviceNotResponding.␊ |
312 | ␉This will allow the SCSI Application driver to perform the necessary steps␊ |
313 | ␉to try to recover the device. This shall only be reported after the SCSI␊ |
314 | ␉Protocol Layer driver has attempted all protocol specific attempts to recover␊ |
315 | ␉the device.␊ |
316 | ␉*/␊ |
317 | ␉␊ |
318 | ␉kSCSITaskStatus_DeviceNotResponding␉␉␉= 0x03,␊ |
319 | ␉␊ |
320 | ␉/*!␊ |
321 | ␉@constant kSCSITaskStatus_DeviceNotPresent␊ |
322 | ␉If the task is unable to be delivered because the device has been␊ |
323 | ␉detached, the task status shall be set to kSCSITaskStatus_DeviceNotPresent.␊ |
324 | ␉This will allow the SCSI Application Layer to halt the sending of tasks␊ |
325 | ␉to the device and, if supported, perform any device failover or system␊ |
326 | ␉cleanup.␊ |
327 | ␉*/␊ |
328 | ␉kSCSITaskStatus_DeviceNotPresent␉␉␉= 0x04,␊ |
329 | ␉␊ |
330 | ␉/*!␊ |
331 | ␉@constant kSCSITaskStatus_DeliveryFailure␊ |
332 | ␉If the task is unable to be␊ |
333 | ␉delivered to the device due to a failure in the SCSI Protocol Layer,␊ |
334 | ␉such as a bus reset or communications error, but the device is is␊ |
335 | ␉known to be functioning properly, the task status shall be set to ␊ |
336 | ␉kSCSITaskStatus_DeliveryFailure. This can also be reported if the␊ |
337 | ␉task could not be delivered due to a protocol error that has since␊ |
338 | ␉been corrected.␊ |
339 | ␉ */␊ |
340 | ␉kSCSITaskStatus_DeliveryFailure␉␉␉␉= 0x05,␊ |
341 | ␉␊ |
342 | ␉/*!␊ |
343 | ␉@constant kSCSITaskStatus_No_Status␊ |
344 | ␉This status is not defined by␊ |
345 | ␉the SCSI specifications, but is here to provide a status that can␊ |
346 | ␉be returned in cases where there is not status available from the␊ |
347 | ␉device or protocol, for example, when the service response is␊ |
348 | ␉neither TASK_COMPLETED nor LINK_COMMAND_COMPLETE or when the␊ |
349 | ␉service response is SERVICE_DELIVERY_OR_TARGET_FAILURE and the␊ |
350 | ␉reason for failure could not be determined.␊ |
351 | ␉*/␊ |
352 | ␉kSCSITaskStatus_No_Status␉␉␉␉␉= 0xFF␊ |
353 | } SCSITaskStatus;␊ |
354 | ␊ |
355 | /*!␊ |
356 | ␉@enum Command Descriptor Block Size␊ |
357 | ␉@discussion Command Descriptor Block Size constants.␊ |
358 | */␊ |
359 | enum␊ |
360 | {␊ |
361 | ␉/*!␊ |
362 | ␉@constant kSCSICDBSize_Maximum This is the largest size a Command Descriptor␊ |
363 | ␉Block can be as specified in SPC-2.␊ |
364 | ␉*/␊ |
365 | ␉kSCSICDBSize_Maximum ␉= 16,␊ |
366 | ␊ |
367 | ␉/*!␊ |
368 | ␉@constant kSCSICDBSize_6Byte Use this for a 6-byte CDB.␊ |
369 | ␉*/␊ |
370 | ␉kSCSICDBSize_6Byte ␉␉= 6,␊ |
371 | ␊ |
372 | ␉/*!␊ |
373 | ␉@constant kSCSICDBSize_10Byte Use this for a 10-byte CDB.␊ |
374 | ␉*/␊ |
375 | ␉kSCSICDBSize_10Byte ␉= 10,␊ |
376 | ␊ |
377 | ␉/*!␊ |
378 | ␉@constant kSCSICDBSize_12Byte Use this for a 12-byte CDB.␊ |
379 | ␉*/␊ |
380 | ␉kSCSICDBSize_12Byte ␉= 12,␊ |
381 | ␊ |
382 | ␉/*!␊ |
383 | ␉@constant kSCSICDBSize_16Byte Use this for a 16-byte CDB.␊ |
384 | ␉*/␊ |
385 | ␉kSCSICDBSize_16Byte ␉= 16␊ |
386 | };␊ |
387 | ␊ |
388 | typedef UInt8 SCSICommandDescriptorBlock[kSCSICDBSize_Maximum];␊ |
389 | ␊ |
390 | /*!␊ |
391 | ␉@enum Data Transfer Direction␊ |
392 | ␉@discussion DataTransferDirection constants.␊ |
393 | */␊ |
394 | enum␊ |
395 | {␊ |
396 | ␉/*!␊ |
397 | ␉@constant kSCSIDataTransfer_NoDataTransfer Use this for tasks␊ |
398 | ␉that transfer no data.␊ |
399 | ␉*/␊ |
400 | ␉kSCSIDataTransfer_NoDataTransfer␉␉= 0x00,␊ |
401 | ␊ |
402 | ␉/*!␊ |
403 | ␉@constant kSCSIDataTransfer_FromInitiatorToTarget Use this for tasks that transfer␊ |
404 | ␉data from the initiator to the target.␊ |
405 | ␉*/␊ |
406 | ␉kSCSIDataTransfer_FromInitiatorToTarget␉= 0x01,␊ |
407 | ␊ |
408 | ␉/*!␊ |
409 | ␉@constant kSCSIDataTransfer_FromTargetToInitiator Use this for tasks that transfer␊ |
410 | ␉data from the target to the initiator.␊ |
411 | ␉*/␊ |
412 | ␉kSCSIDataTransfer_FromTargetToInitiator␉= 0x02␊ |
413 | };␊ |
414 | ␊ |
415 | ␊ |
416 | #if defined(KERNEL) && defined(__cplusplus)␊ |
417 | ␊ |
418 | /* Libkern includes */␊ |
419 | #include <libkern/c++/OSObject.h>␊ |
420 | ␊ |
421 | ␊ |
422 | /*!␊ |
423 | ␉@enum SCSITaskMode␊ |
424 | ␉@discussion The SCSI Task mode is used by the SCSI␊ |
425 | ␉Protocol Layer to indicate what mode the task is executing.␊ |
426 | */␊ |
427 | typedef enum SCSITaskMode␊ |
428 | {␊ |
429 | ␉kSCSITaskMode_CommandExecution␉= 1,␊ |
430 | ␉kSCSITaskMode_Autosense␉␉␉= 2␊ |
431 | } SCSITaskMode;␊ |
432 | ␊ |
433 | /*!␊ |
434 | ␉@typedef SCSITaskIdentifier␊ |
435 | ␉@discussion This is an opaque object that represents a task.␊ |
436 | ␉This is used so that drivers for both the SCSI Protocol Layer␊ |
437 | ␉and the SCSI Application Layer cannot modify the SCSITask object␊ |
438 | ␉directly but must instead use the inherited methods to do so. This␊ |
439 | ␉allows the implementation of SCSITask to change without directly␊ |
440 | ␉impacting device and protocol layer drivers. In addition, it␊ |
441 | ␉prevents changing of properties that are not allowed to be␊ |
442 | ␉changed by a given layer.␊ |
443 | */␊ |
444 | typedef OSObject *␉SCSITaskIdentifier;␊ |
445 | ␊ |
446 | ␊ |
447 | /*!␊ |
448 | ␉@typedef SCSITaskCompletion␊ |
449 | ␉@discussion This is the typedef for completion routines that␊ |
450 | ␉work with SCSITaskIdentifiers.␊ |
451 | */␊ |
452 | typedef void ( *SCSITaskCompletion )( SCSITaskIdentifier completedTask );␊ |
453 | ␊ |
454 | #endif␉/* defined(KERNEL) && defined(__cplusplus) */␊ |
455 | ␊ |
456 | #endif /* _IOKIT_SCSI_TASK_H_ */␊ |
457 |