Root/
Source at commit 2056 created 11 years 10 months ago. By cosmo1t, fixed indent and added X79 && 7 series http://forge.voodooprojects.org/p/chameleon/issues/284/ | |
---|---|
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 | #ifndef _IOKIT_IO_SCSI_PROTOCOL_INTERFACE_H_␊ |
25 | #define _IOKIT_IO_SCSI_PROTOCOL_INTERFACE_H_␊ |
26 | ␊ |
27 | ␊ |
28 | /*! @header SCSI Protocol Interface␊ |
29 | ␉@discussion␊ |
30 | ␉This file contains definitions for the IOSCSIProtocolInterface class,␊ |
31 | ␉SCSI Protocol Features used by this interface, and additional constants␊ |
32 | ␉used by this interface.␊ |
33 | */␊ |
34 | ␊ |
35 | ␊ |
36 | //-----------------------------------------------------------------------------␊ |
37 | //␉Includes␊ |
38 | //-----------------------------------------------------------------------------␊ |
39 | ␊ |
40 | #include <IOKit/storage/IOStorageDeviceCharacteristics.h>␊ |
41 | ␊ |
42 | ␊ |
43 | //-----------------------------------------------------------------------------␊ |
44 | //␉Constants␊ |
45 | //-----------------------------------------------------------------------------␊ |
46 | ␊ |
47 | /*␊ |
48 | SCSI Device Characteristics - Defined between SCSI Application Layer and␊ |
49 | ␉␉␉␉␉␉␉ SCSI Protocol Layer only.␊ |
50 | */␊ |
51 | ␊ |
52 | /*!␊ |
53 | @constant kIOPropertySCSIDeviceCharacteristicsKey␊ |
54 | @discussion␊ |
55 | This key is used to define SCSI Device Characteristics for a particular device.␊ |
56 | It is the key for the dictionary containing the keys of characteristics. These keys␊ |
57 | are only defined between the SCSI Protocol Layer and the SCSI Applicaiton Layer. Some␊ |
58 | properties may be copied from this dictionary to the more generic Device Characteristics␊ |
59 | or Protocol Characteristics dictionaries.␊ |
60 | */␊ |
61 | #define kIOPropertySCSIDeviceCharacteristicsKey␉␉"SCSI Device Characteristics"␊ |
62 | ␊ |
63 | /*!␊ |
64 | @constant kIOPropertySCSIInquiryLengthKey␊ |
65 | @discussion␊ |
66 | This key is used to define a default INQUIRY length to issue to the device. The␊ |
67 | value is a UInt32 corresponding to the number of bytes to request in the INQUIRY␊ |
68 | command.␊ |
69 | */␊ |
70 | #define kIOPropertySCSIInquiryLengthKey␉␉␉␉"Inquiry Length"␊ |
71 | ␊ |
72 | /*!␊ |
73 | @constant kIOPropertySCSIManualEjectKey␊ |
74 | @discussion␊ |
75 | This key is used to indicate that the device is known to be a manual ejectable media␊ |
76 | device. This property overrides all of the driver checks for determining this capability.␊ |
77 | This property is a string, although if it exists it should always be true.␊ |
78 | */␊ |
79 | #define kIOPropertySCSIManualEjectKey␉␉␉␉"Manual Eject"␊ |
80 | ␊ |
81 | /*!␊ |
82 | @constant kIOPropertyReadTimeOutDurationKey␊ |
83 | @discussion␊ |
84 | This key is used to define the Read Time Out for a particular device.␊ |
85 | This property overrides all of the protocol defaults.␊ |
86 | This property is a value, in milliseconds.␊ |
87 | */␊ |
88 | #define kIOPropertyReadTimeOutDurationKey␉␉␉"Read Time Out Duration"␊ |
89 | ␊ |
90 | /*!␊ |
91 | @constant kIOPropertyWriteTimeOutDurationKey␊ |
92 | @discussion␊ |
93 | This key is used to define the Write Time Out for a particular device.␊ |
94 | This property overrides all of the protocol defaults.␊ |
95 | This property is a value, in milliseconds.␊ |
96 | */␊ |
97 | #define kIOPropertyWriteTimeOutDurationKey␉␉␉"Write Time Out Duration"␊ |
98 | ␊ |
99 | /*!␊ |
100 | @constant kIOPropertyRetryCountKey␊ |
101 | @discussion␊ |
102 | This key is used to define the number of Read/Write retries for a particular device.␊ |
103 | This property overrides all of the protocol defaults.␊ |
104 | The value is a UInt32 corresponding to the number of retries.␊ |
105 | */␊ |
106 | #define kIOPropertyRetryCountKey␉␉␉␉␉"Retry Count"␊ |
107 | ␊ |
108 | /*!␊ |
109 | @constant kIOPropertyAutonomousSpinDownKey␊ |
110 | @discussion␊ |
111 | This key is used to indicate that the device is known to have its own internal logic␊ |
112 | for idle disk spin down. This key is used to mark device which respon poorly to our␊ |
113 | efforts to manually spin down or spin up the device when it is already in the desired ␊ |
114 | state. ␊ |
115 | */␊ |
116 | #define kIOPropertyAutonomousSpinDownKey␉␉␉"Autonomous Spin Down"␊ |
117 | ␊ |
118 | /*!␊ |
119 | @constant kIOPropertyEjectRequireStartStopUnitKey␊ |
120 | @discussion␊ |
121 | This key is used to indicate that while the device may have failed PREVENT_ALLOW_MEDIUM␊ |
122 | REMOVAL it still requires a START_STOP_UNIT to eject/unload media. ␊ |
123 | */␊ |
124 | #define kIOPropertyEjectRequireStartStopUnitKey␉␉"Eject Requires START_STOP_UNIT"␊ |
125 | ␊ |
126 | #if defined(KERNEL) && defined(__cplusplus)␊ |
127 | ␊ |
128 | ␊ |
129 | /*!␊ |
130 | @constant kCFBundleIdentifierKey␊ |
131 | @discussion␊ |
132 | Property key for CFBundleIdentifier.␊ |
133 | */␊ |
134 | #define kCFBundleIdentifierKey␉␉␉␉␉"CFBundleIdentifier"␊ |
135 | ␊ |
136 | /*!␊ |
137 | @constant kIOSCSIArchitectureBundleIdentifierKey␊ |
138 | @discussion␊ |
139 | IOSCSIArchitectureModelFamily's CFBundle identifier.␊ |
140 | */␊ |
141 | #define kIOSCSIArchitectureBundleIdentifierKey␉"com.apple.iokit.IOSCSIArchitectureModelFamily"␊ |
142 | ␊ |
143 | ␊ |
144 | // General kernel headers␊ |
145 | #include <kern/thread.h>␊ |
146 | ␊ |
147 | // General IOKit headers␊ |
148 | #include <IOKit/IOLib.h>␊ |
149 | #include <IOKit/IOService.h>␊ |
150 | #include <IOKit/IOCommandGate.h>␊ |
151 | #include <IOKit/IOWorkLoop.h>␊ |
152 | ␊ |
153 | // SCSI Architecture Model Family includes␊ |
154 | #include <IOKit/scsi/SCSITask.h>␊ |
155 | ␊ |
156 | ␊ |
157 | /*!␊ |
158 | @enum SCSI Protocol Interface Device Notification values␊ |
159 | @discussion␊ |
160 | Message values for SCSI Protocol Interface Device Notifications.␊ |
161 | @constant kSCSIProtocolNotification_DeviceRemoved␊ |
162 | Private message sent between a SCSI protocol service provider and␊ |
163 | SCSI application layer driver to indicate device removal.␊ |
164 | @constant kSCSIProtocolNotification_VerifyDeviceState␊ |
165 | Private message sent between a SCSI protocol service provider and␊ |
166 | SCSI application layer driver to indicate device state may have␊ |
167 | changed and the device state should be re-verified by the SCSI␊ |
168 | Application Layer driver. An example would be a bus reset which clears␊ |
169 | the tray locking state of an ATAPI device.␊ |
170 | @constant kSCSIServicesNotification_ExclusivityChanged␊ |
171 | Message sent when a change in exclusivity state occurs. Usually in␊ |
172 | response to acquiring/releasing exclusive access to a device via a user client.␊ |
173 | */␊ |
174 | enum␊ |
175 | {␊ |
176 | ␉kSCSIProtocolNotification_DeviceRemoved␉␉␉= 0x69000010,␊ |
177 | ␉kSCSIProtocolNotification_VerifyDeviceState␉␉= 0x69000020,␊ |
178 | ␉kSCSIServicesNotification_ExclusivityChanged␉= 0x69000030␊ |
179 | };␊ |
180 | ␊ |
181 | ␊ |
182 | /*!␊ |
183 | @typedef SCSIProtocolFeature␊ |
184 | @discussion␊ |
185 | Typedef for SCSIProtocolFeature, a 32-bit quantity.␊ |
186 | */␊ |
187 | typedef UInt32 SCSIProtocolFeature;␊ |
188 | ␊ |
189 | /*!␊ |
190 | @enum SCSI Protocol Features␊ |
191 | @discussion␊ |
192 | The list of SCSI Protocol Features currently supported.␊ |
193 | */␊ |
194 | enum␊ |
195 | {␊ |
196 | ␉␊ |
197 | ␉/*!␊ |
198 | ␉@constant kSCSIProtocolFeature_ACA Not yet used.␊ |
199 | ␉*/␊ |
200 | ␉kSCSIProtocolFeature_ACA␉␉␉␉␉␉␉␉= 1,␊ |
201 | ␉␊ |
202 | ␉/*!␊ |
203 | ␉@constant kSCSIProtocolFeature_CPUInDiskMode Used to determine␊ |
204 | ␉if the SCSI Protocol Services Driver supports a CPU which is in␊ |
205 | ␉target disk mode.␊ |
206 | ␉*/␊ |
207 | ␉kSCSIProtocolFeature_CPUInDiskMode␉␉␉␉␉␉= 2,␊ |
208 | ␉␊ |
209 | ␉/*!␊ |
210 | ␉@constant kSCSIProtocolFeature_ProtocolSpecificPolling Used␊ |
211 | ␉to determine if the SCSI Protocol Services Driver supports␊ |
212 | ␉protocol specific polling for media. This is used for low-power␊ |
213 | ␉polling specifically for ATAPI devices on ATA buses␊ |
214 | ␉*/␊ |
215 | ␉kSCSIProtocolFeature_ProtocolSpecificPolling␉␉␉= 3,␊ |
216 | ␉␊ |
217 | ␉/*!␊ |
218 | ␉@constant kSCSIProtocolFeature_ProtocolSpecificSleepCommand Used␊ |
219 | ␉to determine if the SCSI Protocol Services Driver supports␊ |
220 | ␉protocol specific sleep commands to a drive. This is used for␊ |
221 | ␉sleeping drives specifically ATAPI devices on ATA buses.␊ |
222 | ␉*/␊ |
223 | ␉kSCSIProtocolFeature_ProtocolSpecificSleepCommand␉␉= 4,␊ |
224 | ␉␊ |
225 | ␉/*!␊ |
226 | ␉@constant kSCSIProtocolFeature_GetMaximumLogicalUnitNumber If␊ |
227 | ␉the SCSI Protocol Services Driver supports logical units, it will␊ |
228 | ␉report the maximum addressable ID that it supports in the UInt32 pointer␊ |
229 | ␉that is passed in as the serviceValue. If only one unit is supported,␊ |
230 | ␉the driver should return false for this query.␊ |
231 | ␉*/␊ |
232 | ␉kSCSIProtocolFeature_GetMaximumLogicalUnitNumber␉␉= 5,␊ |
233 | ␉␊ |
234 | ␉/*!␊ |
235 | ␉@constant kSCSIProtocolFeature_MaximumReadBlockTransferCount If␊ |
236 | ␉the SCSI Protocol Services Driver has a maximum number of␊ |
237 | ␉blocks that can be transfered in a read request, it will return␊ |
238 | ␉true to this query and return the block count in the UInt32 pointer␊ |
239 | ␉that is passed in as the serviceValue.␊ |
240 | ␉*/␊ |
241 | ␉kSCSIProtocolFeature_MaximumReadBlockTransferCount␉␉= 6,␊ |
242 | ␊ |
243 | ␉/*!␊ |
244 | ␉@constant kSCSIProtocolFeature_MaximumWriteBlockTransferCount If␊ |
245 | ␉the SCSI Protocol Services Driver has a maximum number of␊ |
246 | ␉blocks that can be transferred in a write request, it will return␊ |
247 | ␉true to this query and return the block count in the UInt32 pointer␊ |
248 | ␉that is passed in as the serviceValue.␊ |
249 | ␉*/␊ |
250 | ␉kSCSIProtocolFeature_MaximumWriteBlockTransferCount␉␉= 7,␊ |
251 | ␊ |
252 | ␉/*!␊ |
253 | ␉@constant kSCSIProtocolFeature_MaximumReadTransferByteCount If␊ |
254 | ␉the SCSI Protocol Services Driver has a maximum byte count␊ |
255 | ␉that can be transferred in a read request, it will return␊ |
256 | ␉true to this query and return the byte count in the UInt64 pointer␊ |
257 | ␉that is passed in as the serviceValue.␊ |
258 | ␉*/␊ |
259 | ␉kSCSIProtocolFeature_MaximumReadTransferByteCount␉␉= 8,␊ |
260 | ␊ |
261 | ␉/*!␊ |
262 | ␉@constant kSCSIProtocolFeature_MaximumWriteTransferByteCount If␊ |
263 | ␉the SCSI Protocol Services Driver has a maximum byte count␊ |
264 | ␉that can be transferred in a write request, it will return␊ |
265 | ␉true to this query and return the byte count in the UInt64 pointer␊ |
266 | ␉that is passed in as the serviceValue.␊ |
267 | ␉*/␊ |
268 | ␉kSCSIProtocolFeature_MaximumWriteTransferByteCount␉␉= 9,␊ |
269 | ␉␊ |
270 | ␉/*!␊ |
271 | ␉@constant kSCSIProtocolFeature_SubmitDefaultInquiryData If␊ |
272 | ␉the SCSI Protocol Services Driver needs any extra information to␊ |
273 | ␉make any negotiation settings from the standard INQUIRY data, this ␊ |
274 | ␉will be called to set that appropriately. The serviceValue will␊ |
275 | ␉point to a SCSICmd_INQUIRY_StandardData buffer. The size␊ |
276 | ␉of the buffer depends on the SCSI Device Characteristics␊ |
277 | ␉dictionary for the device or bus. If there is no␊ |
278 | ␉kIOPropertySCSIInquiryLengthKey value set in the dictionary␊ |
279 | ␉or if it doesn't exist, then the size of the data will be␊ |
280 | ␉the size of the full amount of Inquiry retrieved from the device.␊ |
281 | ␉*/␊ |
282 | ␉kSCSIProtocolFeature_SubmitDefaultInquiryData␉␉␉= 10,␊ |
283 | ␉␊ |
284 | ␉/*!␊ |
285 | ␉@constant kSCSIProtocolFeature_ProtocolAlwaysReportsAutosenseData If␊ |
286 | ␉the SCSI Protocol Services Driver always reports available␊ |
287 | ␉autosense data when a kSCSITaskStatus_CHECK_CONDITION is set,␊ |
288 | ␉then the protocol layer should return true. E.g. FireWire␊ |
289 | ␉transport drivers should respond true to this.␊ |
290 | ␉*/␊ |
291 | ␉kSCSIProtocolFeature_ProtocolAlwaysReportsAutosenseData␉= 11,␊ |
292 | ␉␊ |
293 | ␉/*!␊ |
294 | ␉@constant kSCSIProtocolFeature_ProtocolSpecificPowerOff If␊ |
295 | ␉the SCSI Protocol Services Driver supports removing the power␊ |
296 | ␉to the drive, then the protocol layer should return true. This is␊ |
297 | ␉used for aggressive power management, specifically for ATAPI␊ |
298 | ␉devices on ATA buses.␊ |
299 | ␉*/␊ |
300 | ␉kSCSIProtocolFeature_ProtocolSpecificPowerOff␉␉␉= 12,␊ |
301 | ␉␊ |
302 | ␉/*!␊ |
303 | ␉@constant kSCSIProtocolFeature_ProtocolSpecificPowerControl␊ |
304 | ␉Used to determine if the SCSI Protocol Services Driver supports␊ |
305 | ␉switching the power to the drive on and off. This is used for aggressive␊ |
306 | ␉power management, specifically for SATAPI devices on AHCI buses.␊ |
307 | ␉*/␊ |
308 | ␉kSCSIProtocolFeature_ProtocolSpecificPowerControl␉␉= 13,␊ |
309 | ␉␊ |
310 | ␉/*!␊ |
311 | ␉@constant kSCSIProtocolFeature_ProtocolSpecificAsyncNotification␊ |
312 | ␉Used to determine if the SCSI Protocol Services Driver supports␊ |
313 | ␉asynchronous notifications from the drive. This is used to prevent␊ |
314 | ␉polling for media, specifically for SATAPI devices on AHCI buses.␊ |
315 | ␉*/␊ |
316 | ␉kSCSIProtocolFeature_ProtocolSpecificAsyncNotification␉= 14␊ |
317 | ␉␊ |
318 | };␊ |
319 | ␊ |
320 | ␊ |
321 | /*!␊ |
322 | @typedef SCSIProtocolPowerState␊ |
323 | @discussion␊ |
324 | Typedef for SCSIProtocolPowerState, a 32-bit quantity.␊ |
325 | */␊ |
326 | typedef UInt32 SCSIProtocolPowerState;␊ |
327 | ␊ |
328 | /*!␊ |
329 | @enum SCSI Protocol Power States␊ |
330 | @discussion␊ |
331 | The list of SCSI Protocol Power States.␊ |
332 | */␊ |
333 | enum␊ |
334 | {␊ |
335 | ␉/*!␊ |
336 | ␉@constant kSCSIProtocolPowerStateOff␊ |
337 | ␉Off power state.␊ |
338 | ␉*/␊ |
339 | ␉kSCSIProtocolPowerStateOff␉␉␉= 0,␊ |
340 | ␊ |
341 | ␉/*!␊ |
342 | ␉@constant kSCSIProtocolPowerStateOn␊ |
343 | ␉On power state.␊ |
344 | ␉*/␊ |
345 | ␉kSCSIProtocolPowerStateOn␉␉␉= 1␊ |
346 | };␊ |
347 | ␊ |
348 | ␊ |
349 | //-----------------------------------------------------------------------------␊ |
350 | //␉Class Declaration␊ |
351 | //-----------------------------------------------------------------------------␊ |
352 | ␊ |
353 | /*!␊ |
354 | @class IOSCSIProtocolInterface␊ |
355 | @superclass IOService␊ |
356 | @discussion␊ |
357 | This class defines the public SCSI Protocol Layer API for any class that␊ |
358 | provides Protocol services or needs to provide the Protocol Service API␊ |
359 | for passing service requests to a Protocol Service driver.␊ |
360 | */␊ |
361 | class IOSCSIProtocolInterface : public IOService␊ |
362 | {␊ |
363 | ␉␊ |
364 | ␉OSDeclareAbstractStructors ( IOSCSIProtocolInterface )␊ |
365 | ␉␊ |
366 | public:␊ |
367 | ␉␊ |
368 | ␉/*!␊ |
369 | ␉@function start␊ |
370 | ␉@abstract During an IOService object's instantiation, starts the IOService object that has been selected to run on the provider.␊ |
371 | ␉@discussion See IOService.h for details.␊ |
372 | ␉@result <code>true</code> if the start was successful; <code>false</code> otherwise (which will cause the instance to be detached and usually freed).␊ |
373 | ␉*/␊ |
374 | ␉virtual bool␉start ( IOService * provider );␊ |
375 | ␉␊ |
376 | ␉/*!␊ |
377 | ␉@function free␊ |
378 | ␉@abstract Called to release all resources held by the object.␊ |
379 | ␉@discussion Release all resources held by the object, then call super::free(). ␊ |
380 | ␉*/␉␊ |
381 | ␉virtual void␉free ( void );␊ |
382 | ␊ |
383 | ␉/*!␊ |
384 | ␉@function willTerminate␊ |
385 | ␉@abstract Passes a termination up the stack.␊ |
386 | ␉@discussion Notification that a provider has been terminated, sent before recursing up the stack, in root-to-leaf order.␊ |
387 | ␉@param provider The terminated provider of this object.␊ |
388 | ␉@param options Options originally passed to terminate().␊ |
389 | ␉@result <code>true</code>.␊ |
390 | ␉*/␊ |
391 | ␉virtual bool␉willTerminate ( IOService * provider, IOOptionBits options );␊ |
392 | ␉␊ |
393 | ␉/*!␊ |
394 | ␉@function GetUserClientExclusivityState␊ |
395 | ␉@abstract Gets the current exclusivity state of the user client.␊ |
396 | ␉@discussion The GetUserClientExclusivityState() method is called by the SCSITaskUserClient␊ |
397 | ␉to determine if any user client is holding exclusive access at the current time. This is simply␊ |
398 | ␉a preflight check and a return value of <code>false</code> does not guarantee that a subsequent␊ |
399 | ␉call to SetUserClientExclusivityState() will return successfully.␊ |
400 | ␉@result <code>true</code> if a user client is in exclusive control of the device, <code>false</code> otherwise.␊ |
401 | ␉*/␊ |
402 | ␉virtual bool ␉␉GetUserClientExclusivityState ( void );␊ |
403 | ␉␊ |
404 | ␉/*!␊ |
405 | ␉@function SetUserClientExclusivityState␊ |
406 | ␉@abstract Sets the current exclusivity state of the user client.␊ |
407 | ␉@discussion The SetUserClientExclusivityState() method is called by the SCSITaskUserClient␊ |
408 | ␉to set the exclusive access mode.␊ |
409 | ␉@param userClient The instance of SCSITaskUserClient for which to change exclusivity state.␊ |
410 | ␉@param state Exclusivity state. <code>true</code> means exclusive access is desired, <code>false</code>␊ |
411 | ␉means exclusive access is being released.␊ |
412 | ␉@result A valid IOReturn code indicating success or the type of failure.␊ |
413 | ␉*/␊ |
414 | ␉virtual IOReturn␉SetUserClientExclusivityState ( IOService * userClient, bool state );␊ |
415 | ␉␊ |
416 | ␉␊ |
417 | ␉/*!␊ |
418 | ␉@function initialPowerStateForDomainState␊ |
419 | ␉@abstract Determines which power state a device is in, given the current power domain state.␊ |
420 | ␉@discussion Power management calls this method once, when the driver is initializing power management.␊ |
421 | ␉Subclasses should not need to override this method.␊ |
422 | ␉@param flags Flags that describe the character of "domain power"; they represent the <code>outputPowerCharacter</code> field of a state in the power domain's power state array. ␊ |
423 | ␉@result A state number. ␊ |
424 | ␉*/␊ |
425 | ␉virtual unsigned long␉initialPowerStateForDomainState ( IOPMPowerFlags flags );␊ |
426 | ␉␊ |
427 | ␉/*!␊ |
428 | ␉@function setPowerState␊ |
429 | ␉@abstract Requests a power managed driver to change the power state of its device.␊ |
430 | ␉@discussion Requests a power managed driver to change the power state of its device. Most subclasses␊ |
431 | ␉of IOSCSIProtocolInterface have class-specific mechanisms and should not override this routine.␊ |
432 | ␉See IOSCSIProtocolServices.h, IOSCSIBlockCommandsDevice.h, IOSCSIReducedBlockCommandsDevice.h, and␊ |
433 | ␉IOSCSIMultimediaCommandsDevice.h for more information about power management changes.␊ |
434 | ␉Subclasses should not need to override this method.␊ |
435 | ␉@param powerStateOrdinal The number in the power state array to which the drive is being instructed to change.␊ |
436 | ␉@param whichDevice A pointer to the power management object which registered to manage power for this device.␊ |
437 | ␉The whichDevice field is not pertinent to us since the driver is both the "policy maker" for the device,␊ |
438 | ␉and the "policy implementor" for the device.␊ |
439 | ␉@result See IOService.h for details.␊ |
440 | ␉*/␊ |
441 | ␉virtual IOReturn ␉setPowerState ( unsigned long powerStateOrdinal, IOService * whichDevice );␊ |
442 | ␉␊ |
443 | ␉/*!␊ |
444 | ␉@function IsPowerManagementIntialized␊ |
445 | ␉@abstract Called to determine if power management is initialized.␊ |
446 | ␉@discussion Called to determine if power management is initialized.␊ |
447 | ␉Subclasses should not need to override this method.␊ |
448 | ␉@result <code>true</code> if power management has been initialized, <code>false</code> otherwise.␊ |
449 | ␉*/␊ |
450 | ␉virtual bool␉␉IsPowerManagementIntialized ( void );␊ |
451 | ␉␊ |
452 | ␉/*!␊ |
453 | ␉@function CheckPowerState␊ |
454 | ␉@abstract Called by clients to ensure device is in correct power state before issuing I/O.␊ |
455 | ␉@discussion Called by clients to ensure device is in correct power state before issuing I/O.␊ |
456 | ␉If the device is not ready to handle such requests, it gives the driver a chance to block the␊ |
457 | ␉thread until the device is ready. Subclasses should not need to override this method.␊ |
458 | ␉*/␊ |
459 | ␉virtual void ␉␉CheckPowerState ( void );␊ |
460 | ␉␊ |
461 | ␉/*!␊ |
462 | ␉@function ExecuteCommand␊ |
463 | ␉@abstract Called to send a SCSITask and transport it across the physical wire(s) to the device.␊ |
464 | ␉@discussion Called to send a SCSITask and transport it across the physical wire(s) to the device.␊ |
465 | ␉Subclasses internal to IOSCSIArchitectureModelFamily will need to override this method. Third␊ |
466 | ␉party subclasses should not need to override this method.␊ |
467 | ␉@param request A valid SCSITaskIdentifier representing the task to transport across the wire(s).␊ |
468 | ␉*/␊ |
469 | ␉virtual void␉␉ExecuteCommand ( SCSITaskIdentifier request ) = 0;␊ |
470 | ␉␊ |
471 | ␉/*!␊ |
472 | ␉@function AbortCommand␊ |
473 | ␉@abstract Obsolete. Do not use this method.␊ |
474 | ␉@discussion Obsolete. Do not use this method.␊ |
475 | ␉*/␊ |
476 | ␉virtual SCSIServiceResponse␉␉AbortCommand ( SCSITaskIdentifier request ) = 0;␊ |
477 | ␉␊ |
478 | ␉/*!␊ |
479 | ␉@function IsProtocolServiceSupported␊ |
480 | ␉@abstract This method is called to query for support of a protocol specific service feature.␊ |
481 | ␉@discussion This method is called to query for support of a protocol specific service feature.␊ |
482 | ␉Subclasses of IOSCSIProtocolServices should override this method.␊ |
483 | ␉@param feature A valid SCSIProtocolFeature. See enums for SCSIProtocolFeature.␊ |
484 | ␉@param serviceValue A pointer to a structure/value that is used in conjunction with the feature␊ |
485 | ␉requested. See enums for SCSIProtocolFeature. NB: This parameter may be NULL for certain␊ |
486 | ␉feature requests.␊ |
487 | ␉@result <code>true</code> if the feature is supported, <code>false</code> otherwise.␊ |
488 | ␉*/␊ |
489 | ␉virtual bool␉␉IsProtocolServiceSupported ( ␊ |
490 | ␉␉␉␉␉␉␉␉SCSIProtocolFeature ␉feature, ␊ |
491 | ␉␉␉␉␉␉␉␉void * ␉␉␉␉␉serviceValue ) = 0;␊ |
492 | ␉␊ |
493 | ␉/*!␊ |
494 | ␉@function HandleProtocolServiceFeature␊ |
495 | ␉@abstract This method is called to enact support of a protocol specific service feature.␊ |
496 | ␉@discussion This method is called to enact support of a protocol specific service feature.␊ |
497 | ␉Subclasses of IOSCSIProtocolServices should override this method.␊ |
498 | ␉@param feature A valid SCSIProtocolFeature. See enums for SCSIProtocolFeature.␊ |
499 | ␉@param serviceValue A pointer to a structure/value that is used in conjunction with the feature␊ |
500 | ␉requested. See enums for SCSIProtocolFeature. NB: This parameter may be NULL for certain␊ |
501 | ␉feature requests.␊ |
502 | ␉@result <code>true</code> if the service feature request succeeded, <code>false</code> otherwise.␊ |
503 | ␉*/␊ |
504 | ␉virtual bool␉␉HandleProtocolServiceFeature ( ␊ |
505 | ␉␉␉␉␉␉␉␉SCSIProtocolFeature ␉feature, ␊ |
506 | ␉␉␉␉␉␉␉␉void * ␉␉␉␉␉serviceValue ) = 0;␊ |
507 | ␉␊ |
508 | protected:␊ |
509 | ␉␊ |
510 | ␉// Reserve space for future expansion.␊ |
511 | ␉struct IOSCSIProtocolInterfaceExpansionData␊ |
512 | ␉{␊ |
513 | ␉␉IOWorkLoop *␉fWorkLoop;␊ |
514 | ␉};␊ |
515 | ␉IOSCSIProtocolInterfaceExpansionData * fIOSCSIProtocolInterfaceReserved;␊ |
516 | ␉␊ |
517 | ␉// ------ Power Management Support ------␊ |
518 | ␉␊ |
519 | ␉thread_call_t␉␉fPowerManagementThread;␊ |
520 | ␉IOCommandGate *␉␉fCommandGate;␊ |
521 | ␉UInt32␉␉␉␉fCurrentPowerState;␊ |
522 | ␉UInt32␉␉␉␉fProposedPowerState;␊ |
523 | ␉bool␉␉␉␉fPowerTransitionInProgress;␊ |
524 | ␉bool␉␉␉␉fPowerAckInProgress;␊ |
525 | ␉bool␉␉␉␉fPowerManagementInitialized;␊ |
526 | ␉␊ |
527 | ␉/*!␊ |
528 | ␉@function GetCommandGate␊ |
529 | ␉@abstract Accessor method to obtain the IOCommandGate.␊ |
530 | ␉@discussion Accessor method to obtain the IOCommandGate.␊ |
531 | ␉@result The IOCommandGate for this instance. May return NULL.␊ |
532 | ␉*/␊ |
533 | ␉IOCommandGate *␉␉GetCommandGate ( void );␊ |
534 | ␉␊ |
535 | ␉/*!␊ |
536 | ␉@function InitializePowerManagement␊ |
537 | ␉@abstract This method is called to initialize power management.␊ |
538 | ␉@discussion This method is called to initialize power management. It will call PMinit(), joinPMTree(),␊ |
539 | ␉setIdleTimerPeriod(), and makeUsable(). This method does not call registerPowerDriver().␊ |
540 | ␉Subclasses may override this method to change the behavior (such as the number of power states).␊ |
541 | ␉@param provider The power management provider (i.e. the provider to attach to in the PowerManagement␊ |
542 | ␉tree). This may be a device that is not in the PM Tree itself, in which case, the IOService plane␊ |
543 | ␉is traversed towards the root node in an effort to find a node in the PM Tree.␊ |
544 | ␉*/␊ |
545 | ␉virtual void␉␉InitializePowerManagement ( IOService * provider );␊ |
546 | ␉␊ |
547 | ␉/*!␊ |
548 | ␉@function GetInitialPowerState␊ |
549 | ␉@abstract This method is called to obtain the initial power state of the device (usually the highest).␊ |
550 | ␉@discussion This method is called to obtain the initial power state of the device (usually the highest).␊ |
551 | ␉Subclasses must override this method.␊ |
552 | ␉@result A power state ordinal.␊ |
553 | ␉*/␊ |
554 | ␉virtual UInt32␉␉GetInitialPowerState ( void ) = 0;␊ |
555 | ␉␊ |
556 | ␉/*!␊ |
557 | ␉@function finalize␊ |
558 | ␉@abstract Finalizes the destruction of an IOService object.␊ |
559 | ␉@discussion See IOService.h␊ |
560 | ␉Subclasses may override this method, but should call super::finalize().␊ |
561 | @result <code>true</code>.␊ |
562 | ␉*/␊ |
563 | ␉virtual bool␉␉finalize ( IOOptionBits options );␊ |
564 | ␉␊ |
565 | ␉/*!␊ |
566 | ␉@function sHandleSetPowerState␊ |
567 | ␉@abstract The sHandleSetPowerState method is a static function used as C->C++ glue␊ |
568 | ␉for going behind the command gate.␊ |
569 | ␉@discussion The sHandleSetPowerState method is a static function used as C->C++ glue␊ |
570 | ␉for going behind the command gate.␊ |
571 | ␉@param self The 'this' pointer for the class.␊ |
572 | ␉@param powerStateOrdinal The power state to which device shall be changed.␊ |
573 | @result A valid IOReturn code indicating success or failure.␊ |
574 | ␉*/␊ |
575 | ␉static IOReturn ␉sHandleSetPowerState ( IOSCSIProtocolInterface * self, UInt32 powerStateOrdinal );␊ |
576 | ␉␊ |
577 | ␉/*!␊ |
578 | ␉@function sGetPowerTransistionInProgress␊ |
579 | ␉@abstract The sGetPowerTransistionInProgress method is a static function used as C->C++ glue␊ |
580 | ␉for going behind the command gate.␊ |
581 | ␉@discussion The sGetPowerTransistionInProgress method is a static function used as C->C++ glue␊ |
582 | ␉for going behind the command gate.␊ |
583 | ␉@param self The 'this' pointer for the class.␊ |
584 | @result <code>true</code> if a power state is in progress, otherwise <code>false</code>.␊ |
585 | ␉*/␊ |
586 | ␉static bool sGetPowerTransistionInProgress ( IOSCSIProtocolInterface * ␉self );␊ |
587 | ␉␊ |
588 | ␉/*!␊ |
589 | ␉@function HandleSetPowerState␊ |
590 | ␉@abstract The HandleSetPowerState method is called by the glue code and is on the␊ |
591 | ␉serialized side of the command gate.␊ |
592 | ␉@discussion The HandleSetPowerState method is called by the glue code and is on the␊ |
593 | ␉serialized side of the command gate. This allows us to touch any member␊ |
594 | ␉variables as necessary without any multi-threading issues.␊ |
595 | ␉Subclasses may override this method to change behavior. Third party subclasses␊ |
596 | ␉should not need to override this method, but may.␊ |
597 | ␉@param powerStateOrdinal The power state to which device shall be changed.␊ |
598 | ␉*/␊ |
599 | ␉virtual void␉␉HandleSetPowerState ( UInt32 powerStateOrdinal );␊ |
600 | ␉␊ |
601 | ␉/*!␊ |
602 | ␉@function sPowerManagement␊ |
603 | ␉@abstract The sPowerManagement method is a static C-function which is called using␊ |
604 | ␉mach's thread_call API. It guarantees us a thread of execution which is␊ |
605 | ␉different than the power management thread and the workloop thread on which␊ |
606 | ␉we can issue commands to the device synchronously or asynchronously without␊ |
607 | ␉worrying about deadlocks. It calls through to HandlePowerChange, which is␊ |
608 | ␉a state machine used to direct power management.␊ |
609 | ␉@discussion The sPowerManagement method is a static C-function which is called using␊ |
610 | ␉mach's thread_call API. It guarantees us a thread of execution which is␊ |
611 | ␉different than the power management thread and the workloop thread on which␊ |
612 | ␉we can issue commands to the device synchronously or asynchronously without␊ |
613 | ␉worrying about deadlocks. It calls through to HandlePowerChange, which is␊ |
614 | ␉a state machine used to direct power management.␊ |
615 | ␉@param whichDevice The 'this' pointer.␊ |
616 | ␉*/␊ |
617 | ␉static void␉␉␉sPowerManagement ( thread_call_param_t whichDevice );␊ |
618 | ␉␊ |
619 | ␉/*!␊ |
620 | ␉@function HandlePowerChange␊ |
621 | ␉@abstract The HandlePowerChange method is pure virtual and is left to each protocol or␊ |
622 | ␉application layer driver to implement. It is guaranteed to be called on its␊ |
623 | ␉own thread of execution and can make synchronous or asynchronous calls.␊ |
624 | ␉@discussion The HandlePowerChange method is pure virtual and is left to each protocol or␊ |
625 | ␉application layer driver to implement. It is guaranteed to be called on its␊ |
626 | ␉own thread of execution and can make synchronous or asynchronous calls.␊ |
627 | ␉Subclasses must override this method. Third party subclasses shouldn't need to override␊ |
628 | ␉this method but can to alter the default behavior.␊ |
629 | ␉*/␊ |
630 | ␉virtual void␉␉HandlePowerChange ( void ) = 0;␊ |
631 | ␉␉␊ |
632 | ␉/*!␊ |
633 | ␉@function sHandleCheckPowerState␊ |
634 | ␉@abstract The sHandleCheckPowerState method is a static function used as C->C++ glue␊ |
635 | ␉for going behind the command gate.␊ |
636 | ␉@discussion The sHandleCheckPowerState method is a static function used as C->C++ glue␊ |
637 | ␉for going behind the command gate.␊ |
638 | ␉@param self The 'this' pointer for the class.␊ |
639 | ␉*/␊ |
640 | ␉static void␉␉␉sHandleCheckPowerState ( IOSCSIProtocolInterface * self );␊ |
641 | ␉␊ |
642 | ␉/*!␊ |
643 | ␉@function HandleCheckPowerState(void)␊ |
644 | ␉@abstract The HandleCheckPowerState (void) method is on the serialized side of the command␊ |
645 | ␉gate and can change member variables safely without multi-threading issues.␊ |
646 | ␉It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState )␊ |
647 | ␉with the max power state the class registered with.␊ |
648 | ␉@discussion The HandleCheckPowerState (void) method is on the serialized side of the command␊ |
649 | ␉gate and can change member variables safely without multi-threading issues.␊ |
650 | ␉It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState )␊ |
651 | ␉with the max power state the class registered with.␊ |
652 | ␉Subclasses must override this method. Third party subclasses shouldn't need to override␊ |
653 | ␉this method but can to alter the default behavior.␊ |
654 | ␉*/␊ |
655 | ␉virtual void␉␉HandleCheckPowerState ( void ) = 0;␊ |
656 | ␉␊ |
657 | ␉/*!␊ |
658 | ␉@function HandleCheckPowerState(UInt32 maxPowerState)␊ |
659 | ␉@abstract The HandleCheckPowerState(UInt32 maxPowerState) method is called by␊ |
660 | ␉the subclasses and is passed the maxPowerState number given to the power␊ |
661 | ␉manager at initialization time. This guarantees the threads block until that␊ |
662 | ␉power state has been achieved.␊ |
663 | ␉@discussion The HandleCheckPowerState(UInt32 maxPowerState) method is called by␊ |
664 | ␉the subclasses and is passed the maxPowerState number given to the power␊ |
665 | ␉manager at initialization time. This guarantees the threads block until that␊ |
666 | ␉power state has been achieved.␊ |
667 | ␉@param maxPowerState The maximum power state in the power state array.␊ |
668 | ␉*/␊ |
669 | ␉void ␉␉␉␉HandleCheckPowerState ( UInt32 maxPowerState );␊ |
670 | ␉␊ |
671 | ␉/*!␊ |
672 | ␉@function TicklePowerManager(void)␊ |
673 | ␉@abstract The TicklePowerManager(void) method is called by CheckPowerState and␊ |
674 | ␉sends an activity tickle to the power manager so that the idle timer is␊ |
675 | ␉reset.␊ |
676 | ␉@discussion The TicklePowerManager(void) method is called by CheckPowerState and␊ |
677 | ␉sends an activity tickle to the power manager so that the idle timer is␊ |
678 | ␉reset.␊ |
679 | ␉Subclasses must override this method. Third party subclasses shouldn't need to override␊ |
680 | ␉this method but can to alter the default behavior.␊ |
681 | ␉*/␊ |
682 | ␉virtual void␉␉TicklePowerManager ( void ) = 0;␊ |
683 | ␉␊ |
684 | ␉/*!␊ |
685 | ␉@function TicklePowerManager(UInt32 maxPowerState)␊ |
686 | ␉@abstract The TicklePowerManager(UInt32 maxPowerState) method is a convenience␊ |
687 | ␉function which can be called by subclasses in TicklePowerManager (void)␊ |
688 | ␉in order to tell the power manager to reset idle timer or bring the device␊ |
689 | ␉into the requested state. It returns whatever is returned by activityTickle␊ |
690 | ␉(true if device is in the requested state, false if it is not).␊ |
691 | ␉@discussion The TicklePowerManager(UInt32 maxPowerState) method is a convenience␊ |
692 | ␉function which can be called by subclasses in TicklePowerManager(void)␊ |
693 | ␉in order to tell the power manager to reset idle timer or bring the device␊ |
694 | ␉into the requested state. It returns whatever is returned by activityTickle␊ |
695 | ␉(true if device is in the requested state, false if it is not).␊ |
696 | ␉@param maxPowerState The maximum power state in the power state array.␊ |
697 | ␉@result The result of the call to activityTickle(). See IOService.h for details.␊ |
698 | ␉*/␊ |
699 | ␉bool␉␉␉␉TicklePowerManager ( UInt32 maxPowerState );␊ |
700 | ␉␊ |
701 | ␉// ------ User Client Support ------␊ |
702 | ␉␊ |
703 | ␉bool␉␉␉␉fUserClientExclusiveControlled;␊ |
704 | ␉IOService *␉␉␉fUserClient;␊ |
705 | ␉␊ |
706 | ␉/*!␊ |
707 | ␉@function sGetUserClientExclusivityState␊ |
708 | ␉@abstract The sGetUserClientExclusivityState method is a static function used as C->C++ glue␊ |
709 | ␉for going behind the command gate.␊ |
710 | ␉@discussion The sGetUserClientExclusivityState method is a static function used as C->C++ glue␊ |
711 | ␉for going behind the command gate.␊ |
712 | ␉@param self The 'this' pointer for the class.␊ |
713 | ␉@param state A pointer to a bool in which the state should be set.␊ |
714 | ␉*/␊ |
715 | ␉static void ␉sGetUserClientExclusivityState ( IOSCSIProtocolInterface * self, bool * state );␊ |
716 | ␉␊ |
717 | ␉/*!␊ |
718 | ␉@function sSetUserClientExclusivityState␊ |
719 | ␉@abstract The sSetUserClientExclusivityState method is a static function used as C->C++ glue␊ |
720 | ␉for going behind the command gate.␊ |
721 | ␉@discussion The sSetUserClientExclusivityState method is a static function used as C->C++ glue␊ |
722 | ␉for going behind the command gate.␊ |
723 | ␉@param self The 'this' pointer for the class.␊ |
724 | ␉@param result A pointer to an IOReturn for the resulting status.␊ |
725 | ␉@param userClient The instance of SCSITaskUserClient for which to change exclusivity state.␊ |
726 | ␉@param state A bool indicating the desired state to set.␊ |
727 | ␉*/␊ |
728 | ␉static void␉␉sSetUserClientExclusivityState ( IOSCSIProtocolInterface * self, IOReturn * result, IOService * userClient, bool state );␊ |
729 | ␊ |
730 | ␉/*!␊ |
731 | ␉@function HandleGetUserClientExclusivityState␊ |
732 | ␉@abstract Gets the current exclusivity state of the user client.␊ |
733 | ␉@discussion The HandleGetUserClientExclusivityState() method is called on the serialized side␊ |
734 | ␉of the command gate to determine if any user client is holding exclusive access at the current␊ |
735 | ␉time. See discussion for GetUserClientExclusivityState().␊ |
736 | ␉Subclasses may override this method to alter default behavior. Third party subclasses should␊ |
737 | ␉not need to override this method.␊ |
738 | ␉@result <code>true</code> if a user client is in exclusive control of the device, <code>false</code> otherwise.␊ |
739 | ␉*/␊ |
740 | ␉virtual bool␉HandleGetUserClientExclusivityState ( void );␊ |
741 | ␊ |
742 | ␉/*!␊ |
743 | ␉@function HandleSetUserClientExclusivityState␊ |
744 | ␉@abstract Sets the current exclusivity state of the user client.␊ |
745 | ␉@discussion The HandleSetUserClientExclusivityState() method is called on the serialized side␊ |
746 | ␉of the command gate to set the exclusive access mode.␊ |
747 | ␉@param userClient The instance of SCSITaskUserClient for which to change exclusivity state.␊ |
748 | ␉@param state Exclusivity state. <code>true</code> means exclusive access is desired, <code>false</code>␊ |
749 | ␉means exclusive access is being released.␊ |
750 | ␉@result A valid IOReturn code indicating success or the type of failure.␊ |
751 | ␉*/␊ |
752 | ␉virtual IOReturn␉HandleSetUserClientExclusivityState ( IOService * userClient, bool state );␊ |
753 | ␉␊ |
754 | public:␊ |
755 | ␉␊ |
756 | ␉// ------- SCSI Architecture Model Task Management Functions ------␊ |
757 | ␊ |
758 | ␉OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 1 );␊ |
759 | ␉/*!␊ |
760 | ␉@function AbortTask␊ |
761 | ␉@abstract Aborts a task based on the Logical Unit and tagged task identifier.␊ |
762 | ␉@discussion Aborts a task based on the Logical Unit and tagged task identifier.␊ |
763 | ␉Subclasses must override this method. Third party subclasses should not need to override␊ |
764 | ␉this method.␊ |
765 | ␉@param theLogicalUnit This value should be zero unless the device driver is␊ |
766 | ␉more complex and managing multiple Logical Units.␊ |
767 | ␉@param theTag A valid SCSITaggedTaskIdentifier representing an outstanding SCSITask.␊ |
768 | ␉@result A valid SCSIServiceResponse code.␊ |
769 | ␉*/␊ |
770 | ␉virtual SCSIServiceResponse␉␉AbortTask ( UInt8 theLogicalUnit, SCSITaggedTaskIdentifier theTag ) = 0;␊ |
771 | ␉␊ |
772 | ␉OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 2 );␊ |
773 | ␉/*!␊ |
774 | ␉@function AbortTaskSet␊ |
775 | ␉@abstract Aborts a task set based on the Logical Unit.␊ |
776 | ␉@discussion Aborts a task set based on the Logical Unit.␊ |
777 | ␉Subclasses must override this method. Third party subclasses should not need to override␊ |
778 | ␉this method.␊ |
779 | ␉@param theLogicalUnit This value should be zero unless the device driver is␊ |
780 | ␉more complex and managing multiple Logical Units.␊ |
781 | ␉@result A valid SCSIServiceResponse code.␊ |
782 | ␉*/␊ |
783 | ␉virtual SCSIServiceResponse␉␉AbortTaskSet ( UInt8 theLogicalUnit ) = 0;␊ |
784 | ␉␊ |
785 | ␉OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 3 );␊ |
786 | ␉/*!␊ |
787 | ␉@function ClearACA␊ |
788 | ␉@abstract Clears an Auto-Contingent Allegiance (ACA) for the specified Logical Unit.␊ |
789 | ␉@discussion Clears an Auto-Contingent Allegiance (ACA) for the specified Logical Unit.␊ |
790 | ␉Subclasses must override this method. Third party subclasses should not need to override␊ |
791 | ␉this method.␊ |
792 | ␉@param theLogicalUnit This value should be zero unless the device driver is␊ |
793 | ␉more complex and managing multiple Logical Units.␊ |
794 | ␉@result A valid SCSIServiceResponse code.␊ |
795 | ␉*/␊ |
796 | ␉virtual SCSIServiceResponse␉␉ClearACA ( UInt8 theLogicalUnit ) = 0;␊ |
797 | ␉␊ |
798 | ␉OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 4 );␊ |
799 | ␉/*!␊ |
800 | ␉@function ClearTaskSet␊ |
801 | ␉@abstract Clears a task set for the specified Logical Unit.␊ |
802 | ␉@discussion Clears a task set for the specified Logical Unit.␊ |
803 | ␉Subclasses must override this method. Third party subclasses should not need to override␊ |
804 | ␉this method.␊ |
805 | ␉@param theLogicalUnit This value should be zero unless the device driver is␊ |
806 | ␉more complex and managing multiple Logical Units.␊ |
807 | ␉@result A valid SCSIServiceResponse code.␊ |
808 | ␉*/␊ |
809 | ␉virtual SCSIServiceResponse␉␉ClearTaskSet ( UInt8 theLogicalUnit ) = 0;␊ |
810 | ␉␊ |
811 | ␉OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 5 );␊ |
812 | ␉/*!␊ |
813 | ␉@function LogicalUnitReset␊ |
814 | ␉@abstract Resets the specified Logical Unit.␊ |
815 | ␉@discussion Resets the specified Logical Unit.␊ |
816 | ␉Subclasses must override this method. Third party subclasses should not need to override␊ |
817 | ␉this method.␊ |
818 | ␉@param theLogicalUnit This value should be zero unless the device driver is␊ |
819 | ␉more complex and managing multiple Logical Units.␊ |
820 | ␉@result A valid SCSIServiceResponse code.␊ |
821 | ␉*/␊ |
822 | ␉virtual SCSIServiceResponse␉␉LogicalUnitReset ( UInt8 theLogicalUnit ) = 0;␊ |
823 | ␉␊ |
824 | ␉OSMetaClassDeclareReservedUsed ( IOSCSIProtocolInterface, 6 );␊ |
825 | ␉␊ |
826 | ␉/*!␊ |
827 | ␉@function TargetReset␊ |
828 | ␉@abstract Resets the target device.␊ |
829 | ␉@discussion Resets the target device.␊ |
830 | ␉Subclasses must override this method. Third party subclasses should not need to override␊ |
831 | ␉this method.␊ |
832 | ␉@result A valid SCSIServiceResponse code.␊ |
833 | ␉*/␊ |
834 | ␉virtual SCSIServiceResponse␉␉TargetReset ( void ) = 0;␊ |
835 | ␉␊ |
836 | private:␊ |
837 | ␉␊ |
838 | ␉// Space reserved for future expansion.␊ |
839 | ␉OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 7 );␊ |
840 | ␉OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 8 );␊ |
841 | ␉OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 9 );␊ |
842 | ␉OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 10 );␊ |
843 | ␉OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 11 );␊ |
844 | ␉OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 12 );␊ |
845 | ␉OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 13 );␊ |
846 | ␉OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 14 );␊ |
847 | ␉OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 15 );␊ |
848 | ␉OSMetaClassDeclareReservedUnused ( IOSCSIProtocolInterface, 16 );␊ |
849 | ␉␊ |
850 | };␊ |
851 | ␊ |
852 | #endif␉/* defined(KERNEL) && defined(__cplusplus) */␊ |
853 | ␊ |
854 | #endif␉/* _IOKIT_IO_SCSI_PROTOCOL_INTERFACE_H_ */␊ |
855 |