Root/
Source at commit 2920 created 5 years 9 months ago. By ifabio, typo | |
---|---|
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_IO_SCSI_MULTIMEDIA_COMMANDS_DEVICE_H_␊ |
26 | #define _IOKIT_IO_SCSI_MULTIMEDIA_COMMANDS_DEVICE_H_␊ |
27 | ␊ |
28 | #if KERNEL␊ |
29 | #include <IOKit/IOTypes.h>␊ |
30 | #else␊ |
31 | #include <CoreFoundation/CoreFoundation.h>␊ |
32 | #endif␊ |
33 | ␊ |
34 | #include <IOKit/storage/IOStorageDeviceCharacteristics.h>␊ |
35 | ␊ |
36 | ␊ |
37 | //-----------------------------------------------------------------------------␊ |
38 | //␉Constants␊ |
39 | //-----------------------------------------------------------------------------␊ |
40 | ␊ |
41 | ␊ |
42 | // Message constants␊ |
43 | #define kIOMessageTrayStateChange␉␉␉0x69000035␊ |
44 | #define kIOMessageTrayStateHasChanged␉␉kIOMessageTrayStateChange // DEPRECATED, use kIOMessageTrayStateChange instead␊ |
45 | ␊ |
46 | // Message values for kIOMessageTrayStateChange␊ |
47 | enum␊ |
48 | {␊ |
49 | ␉kMessageTrayStateChangeRequestAccepted␉= 0,␊ |
50 | ␉kMessageTrayStateChangeRequestRejected␉= 1␊ |
51 | };␊ |
52 | ␊ |
53 | #define kIOMessageMediaAccessChange␉␉␉0x69000036␊ |
54 | ␊ |
55 | // Message values for kIOMessageMediaAccessChange␊ |
56 | enum␊ |
57 | {␊ |
58 | ␉kMessageDeterminingMediaPresence␉= 0,␊ |
59 | ␉kMessageFoundMedia␉␉␉␉␉= 1,␊ |
60 | ␉kMessageMediaTypeDetermined␉␉␉= 2␊ |
61 | };␊ |
62 | ␊ |
63 | // IOKit property keys and constants␊ |
64 | #define␉kIOPropertySupportedCDFeatures␉␉kIOPropertySupportedCDFeaturesKey␊ |
65 | #define␉kIOPropertySupportedDVDFeatures␉␉kIOPropertySupportedDVDFeaturesKey␊ |
66 | #define␉kIOPropertySupportedBDFeatures␉␉kIOPropertySupportedBDFeaturesKey␊ |
67 | #define kIOPropertyLowPowerPolling␉␉␉"Low Power Polling"␊ |
68 | ␊ |
69 | typedef UInt32 CDFeatures;␊ |
70 | enum␊ |
71 | {␊ |
72 | ␉kCDFeaturesAnalogAudioBit␉␉␉= 0,␉// Analog Audio playback␊ |
73 | ␉kCDFeaturesReadStructuresBit␉␉= 1,␉// CD-ROM␊ |
74 | ␉kCDFeaturesWriteOnceBit␉␉␉␉= 2,␉// CD-R␊ |
75 | ␉kCDFeaturesReWriteableBit␉␉␉= 3,␉// CD-R/W␊ |
76 | ␉kCDFeaturesCDDAStreamAccurateBit␉= 4,␉// CD-DA stream accurate␊ |
77 | ␉kCDFeaturesPacketWriteBit␉␉␉= 5,␉// Packet Writing␊ |
78 | ␉kCDFeaturesTAOWriteBit␉␉␉␉= 6,␉// CD Track At Once␊ |
79 | ␉kCDFeaturesSAOWriteBit␉␉␉␉= 7,␉// CD Mastering - Session At Once␊ |
80 | ␉kCDFeaturesRawWriteBit␉␉␉␉= 8,␉// CD Mastering - Raw␊ |
81 | ␉kCDFeaturesTestWriteBit␉␉␉␉= 9,␉// CD Mastering/TAO - Test Write␊ |
82 | ␉kCDFeaturesBUFWriteBit␉␉␉␉= 10␉// CD Mastering/TAO - Buffer Underrun Free␊ |
83 | };␊ |
84 | ␊ |
85 | enum␊ |
86 | {␊ |
87 | ␉kCDFeaturesAnalogAudioMask ␉␉␉= (1 << kCDFeaturesAnalogAudioBit),␊ |
88 | ␉kCDFeaturesReadStructuresMask␉␉= (1 << kCDFeaturesReadStructuresBit),␊ |
89 | ␉kCDFeaturesWriteOnceMask␉␉␉= (1 << kCDFeaturesWriteOnceBit),␊ |
90 | ␉kCDFeaturesReWriteableMask␉␉␉= (1 << kCDFeaturesReWriteableBit),␊ |
91 | ␉kCDFeaturesCDDAStreamAccurateMask␉= (1 << kCDFeaturesCDDAStreamAccurateBit),␊ |
92 | ␉kCDFeaturesPacketWriteMask␉␉␉= (1 << kCDFeaturesPacketWriteBit),␊ |
93 | ␉kCDFeaturesTAOWriteMask␉␉␉␉= (1 << kCDFeaturesTAOWriteBit),␊ |
94 | ␉kCDFeaturesSAOWriteMask␉␉␉␉= (1 << kCDFeaturesSAOWriteBit),␊ |
95 | ␉kCDFeaturesRawWriteMask␉␉␉␉= (1 << kCDFeaturesRawWriteBit),␊ |
96 | ␉kCDFeaturesTestWriteMask␉␉␉= (1 << kCDFeaturesTestWriteBit),␊ |
97 | ␉kCDFeaturesBUFWriteMask␉␉␉␉= (1 << kCDFeaturesBUFWriteBit)␊ |
98 | };␊ |
99 | ␊ |
100 | typedef␉UInt32 DVDFeatures;␊ |
101 | enum␊ |
102 | {␊ |
103 | ␉kDVDFeaturesCSSBit ␉␉␉␉␉= 0,␉// DVD-CSS␊ |
104 | ␉kDVDFeaturesReadStructuresBit ␉␉= 1,␉// DVD-ROM␊ |
105 | ␉kDVDFeaturesWriteOnceBit␉␉␉= 2,␉// DVD-R␊ |
106 | ␉kDVDFeaturesRandomWriteableBit␉␉= 3,␉// DVD-RAM␊ |
107 | ␉kDVDFeaturesReWriteableBit␉␉␉= 4,␉// DVD-RW␊ |
108 | ␉kDVDFeaturesTestWriteBit␉␉␉= 5,␉// DVD-R Write - Test Write␊ |
109 | ␉kDVDFeaturesBUFWriteBit␉␉␉␉= 6,␉// DVD-R Write - Buffer Underrun Free␊ |
110 | ␉kDVDFeaturesPlusRBit␉␉␉␉= 7,␉// DVD+R␊ |
111 | ␉kDVDFeaturesPlusRWBit␉␉␉␉= 8,␉// DVD+RW (implies backgound format support)␊ |
112 | ␉kDVDFeaturesHDReadBit␉␉␉␉= 9,␉// HD DVD-ROM␊ |
113 | ␉kDVDFeaturesHDRBit␉␉␉␉␉= 10,␉// HD DVD-R␊ |
114 | ␉kDVDFeaturesHDRAMBit␉␉␉␉= 11,␉// HD DVD-RAM␊ |
115 | ␉kDVDFeaturesHDRWBit␉␉␉␉␉= 12␉// HD DVD-RW␊ |
116 | };␊ |
117 | ␊ |
118 | enum␊ |
119 | {␊ |
120 | ␉kDVDFeaturesCSSMask ␉␉␉␉= (1 << kDVDFeaturesCSSBit),␊ |
121 | ␉kDVDFeaturesReadStructuresMask ␉␉= (1 << kDVDFeaturesReadStructuresBit),␊ |
122 | ␉kDVDFeaturesWriteOnceMask␉␉␉= (1 << kDVDFeaturesWriteOnceBit),␊ |
123 | ␉kDVDFeaturesRandomWriteableMask␉␉= (1 << kDVDFeaturesRandomWriteableBit),␊ |
124 | ␉kDVDFeaturesReWriteableMask␉␉␉= (1 << kDVDFeaturesReWriteableBit),␊ |
125 | ␉kDVDFeaturesTestWriteMask␉␉␉= (1 << kDVDFeaturesTestWriteBit),␊ |
126 | ␉kDVDFeaturesBUFWriteMask␉␉␉= (1 << kDVDFeaturesBUFWriteBit),␊ |
127 | ␉kDVDFeaturesPlusRMask␉␉␉␉= (1 << kDVDFeaturesPlusRBit),␊ |
128 | ␉kDVDFeaturesPlusRWMask␉␉␉␉= (1 << kDVDFeaturesPlusRWBit),␊ |
129 | ␉kDVDFeaturesHDReadMask␉␉␉␉= (1 << kDVDFeaturesHDReadBit),␊ |
130 | ␉kDVDFeaturesHDRMask␉␉␉␉␉= (1 << kDVDFeaturesHDRBit),␊ |
131 | ␉kDVDFeaturesHDRAMMask␉␉␉␉= (1 << kDVDFeaturesHDRAMBit),␊ |
132 | ␉kDVDFeaturesHDRWMask␉␉␉␉= (1 << kDVDFeaturesHDRWBit)␊ |
133 | };␊ |
134 | ␊ |
135 | typedef␉UInt32 BDFeatures;␊ |
136 | enum␊ |
137 | {␊ |
138 | ␉kBDFeaturesReadBit␉␉␉␉␉= 0,␉// BD-ROM␊ |
139 | ␉kBDFeaturesWriteBit␉␉␉␉␉= 1␉␉// BD-R / BD-RE␊ |
140 | };␊ |
141 | ␊ |
142 | enum␊ |
143 | {␊ |
144 | ␉kBDFeaturesReadMask␉␉␉␉␉= (1 << kBDFeaturesReadBit),␊ |
145 | ␉kBDFeaturesWriteMask␉␉␉␉= (1 << kBDFeaturesWriteBit)␊ |
146 | };␊ |
147 | ␊ |
148 | enum␊ |
149 | {␊ |
150 | ␉kDiscStatusEmpty ␉␉␉␉␉= 0,␊ |
151 | ␉kDiscStatusIncomplete␉␉␉␉= 1,␊ |
152 | ␉kDiscStatusComplete␉␉␉␉␉= 2,␊ |
153 | ␉kDiscStatusOther␉␉␉␉␉= 3,␊ |
154 | ␉kDiscStatusMask␉␉␉␉␉␉= 0x03,␊ |
155 | ␉kDiscStatusErasableMask␉␉␉␉= 0x10␊ |
156 | };␊ |
157 | ␊ |
158 | ␊ |
159 | #if defined(KERNEL) && defined(__cplusplus)␊ |
160 | ␊ |
161 | // MMC power states as defined in T10:1228D SCSI Multimedia Commands - 2 (MMC-2)␊ |
162 | // Revision 11a, August 30, 1999, page 312 (Annex F).␊ |
163 | enum␊ |
164 | {␊ |
165 | ␉kMMCPowerStateSystemSleep␉= 0,␊ |
166 | ␉kMMCPowerStateSleep ␉␉= 1,␊ |
167 | ␉kMMCPowerStateStandby ␉␉= 2,␊ |
168 | ␉kMMCPowerStateIdle␉␉␉= 3,␊ |
169 | ␉kMMCPowerStateActive␉␉= 4,␊ |
170 | ␉kMMCNumPowerStates␉␉␉= 5␊ |
171 | };␊ |
172 | ␊ |
173 | enum␊ |
174 | {␊ |
175 | ␉kMediaStateUnlocked␉= 0,␊ |
176 | ␉kMediaStateLocked ␉= 1␊ |
177 | };␊ |
178 | ␊ |
179 | ␊ |
180 | //-----------------------------------------------------------------------------␊ |
181 | //␉Includes␊ |
182 | //-----------------------------------------------------------------------------␊ |
183 | ␊ |
184 | // General IOKit headers␊ |
185 | #include <IOKit/IOLib.h>␊ |
186 | #include <IOKit/IOMemoryDescriptor.h>␊ |
187 | ␊ |
188 | // Generic IOKit storage related headers␊ |
189 | #include <IOKit/storage/IOStorage.h>␊ |
190 | #include <IOKit/storage/IOCDTypes.h>␊ |
191 | #include <IOKit/storage/IODVDTypes.h>␊ |
192 | ␊ |
193 | // SCSI Architecture Model Family includes␊ |
194 | #include <IOKit/scsi/IOSCSIPrimaryCommandsDevice.h>␊ |
195 | ␊ |
196 | // Forward definitions for internal use only classes␊ |
197 | class SCSIMultimediaCommands;␊ |
198 | class SCSIBlockCommands;␊ |
199 | ␊ |
200 | ␊ |
201 | //-----------------------------------------------------------------------------␊ |
202 | //␉Class Declaration␊ |
203 | //-----------------------------------------------------------------------------␊ |
204 | ␊ |
205 | class IOSCSIMultimediaCommandsDevice : public IOSCSIPrimaryCommandsDevice␊ |
206 | {␊ |
207 | ␉␊ |
208 | ␉OSDeclareAbstractStructors ( IOSCSIMultimediaCommandsDevice )␊ |
209 | ␉␊ |
210 | private:␊ |
211 | ␊ |
212 | #ifndef __LP64__␊ |
213 | ␊ |
214 | SCSIMultimediaCommands *␉fSCSIMultimediaCommandObject;␊ |
215 | SCSIMultimediaCommands *␉GetSCSIMultimediaCommandObject ( void );␊ |
216 | ␉␊ |
217 | SCSIBlockCommands *␉␉␉fSCSIBlockCommandObject;␉␉␉/* OBSOLETE */␊ |
218 | SCSIBlockCommands *␉␉␉GetSCSIBlockCommandObject ( void );␉/* OBSOLETE */␊ |
219 | ␊ |
220 | #endif␉/* !__LP64__ */␊ |
221 | ␉␊ |
222 | ␉static void␉␉AsyncReadWriteComplete ( SCSITaskIdentifier completedTask );␊ |
223 | ␉␊ |
224 | protected:␊ |
225 | ␉␊ |
226 | // Reserve space for future expansion.␊ |
227 | struct IOSCSIMultimediaCommandsDeviceExpansionData␊ |
228 | ␉{␊ |
229 | ␉␉IONotifier *␉␉fPowerDownNotifier;␊ |
230 | ␉␉bool␉␉␉␉fDeviceSupportsPowerOff;␊ |
231 | ␉␉BDFeatures␉␉␉fSupportedBDFeatures;␊ |
232 | ␉␉bool␉␉␉␉fDeviceSupportsAsyncNotification;␊ |
233 | ␉␉bool␉␉␉␉fDeviceSupportsFastSpindown;␊ |
234 | ␉␉UInt8␉␉␉␉fCDLoadingMechanism;␊ |
235 | ␉};␊ |
236 | IOSCSIMultimediaCommandsDeviceExpansionData * fIOSCSIMultimediaCommandsDeviceReserved;␊ |
237 | ␉␊ |
238 | ␉#define fPowerDownNotifier ␉␉␉␉␉fIOSCSIMultimediaCommandsDeviceReserved->fPowerDownNotifier␊ |
239 | ␉#define fDeviceSupportsPowerOff ␉␉␉fIOSCSIMultimediaCommandsDeviceReserved->fDeviceSupportsPowerOff␊ |
240 | ␉#define fSupportedBDFeatures␉␉␉␉fIOSCSIMultimediaCommandsDeviceReserved->fSupportedBDFeatures␊ |
241 | ␉#define fDeviceSupportsAsyncNotification␉fIOSCSIMultimediaCommandsDeviceReserved->fDeviceSupportsAsyncNotification␊ |
242 | ␉#define fDeviceSupportsFastSpindown␉␉␉fIOSCSIMultimediaCommandsDeviceReserved->fDeviceSupportsFastSpindown␊ |
243 | ␉#define fCDLoadingMechanism␉␉␉␉␉fIOSCSIMultimediaCommandsDeviceReserved->fCDLoadingMechanism␊ |
244 | ␉␊ |
245 | #ifndef __LP64__␊ |
246 | ␉␊ |
247 | ␉// This method will retreive the SCSI Primary Command Set object for␊ |
248 | ␉// the class. For subclasses, this will be overridden using a␊ |
249 | ␉// dynamic cast on the subclasses base command set object.␊ |
250 | ␉virtual SCSIPrimaryCommands *␉GetSCSIPrimaryCommandObject ( void );␊ |
251 | ␉␊ |
252 | #endif␉/* !__LP64__ */␊ |
253 | ␉␊ |
254 | ␉CDFeatures␉␉␉␉␉␉fSupportedCDFeatures;␊ |
255 | ␉DVDFeatures␉␉␉␉␉␉fSupportedDVDFeatures;␊ |
256 | ␊ |
257 | ␉UInt16␉␉␉␉␉␉␉fCurrentDiscSpeed;␉␊ |
258 | ␉bool␉␉␉␉␉␉␉fMediaChanged; ␊ |
259 | ␉bool␉␉␉␉␉␉␉fMediaPresent;␊ |
260 | ␉␊ |
261 | ␉// The byte count of each physical block on the media.␊ |
262 | ␉UInt32␉␉␉␉␉␉␉fMediaBlockSize;␊ |
263 | ␉␊ |
264 | ␉// The total number of blocks of fMediaBlockSize on the media.␊ |
265 | ␉UInt32␉␉␉␉␉␉␉fMediaBlockCount;␊ |
266 | ␉␊ |
267 | ␉// Flags used to indicate device feature␊ |
268 | ␉bool␉␉␉␉␉␉␉fMediaIsRemovable;␊ |
269 | ␉bool␉␉␉␉␉␉␉fMediaIsWriteProtected;␊ |
270 | ␉UInt32␉␉␉␉␉␉␉fMediaType;␊ |
271 | ␉␊ |
272 | ␉thread_call_t␉␉␉␉␉fPollingThread;␊ |
273 | ␉bool␉␉␉␉␉␉␉fDeviceSupportsLowPowerPolling;␊ |
274 | ␉bool␉␉␉␉␉␉␉fLowPowerPollingEnabled;␊ |
275 | ␉UInt32␉␉␉␉␉␉␉fPollingMode;␊ |
276 | ␉␊ |
277 | ␉enum␊ |
278 | ␉{␊ |
279 | ␉␉kPollingMode_Suspended␉␉= 0,␊ |
280 | ␉␉kPollingMode_NewMedia ␉␉= 1,␊ |
281 | ␉␉kPollingMode_MediaRemoval␉= 2␊ |
282 | ␉};␊ |
283 | ␉␊ |
284 | ␉virtual IOReturn␉setProperties ( OSObject * properties );␊ |
285 | ␉␊ |
286 | ␉virtual void ␉␉CreateStorageServiceNub ( void );␊ |
287 | ␉virtual bool␉␉DetermineDeviceCharacteristics ( void );␊ |
288 | ␉virtual IOReturn␉DetermineIfMediaIsRemovable ( void );␊ |
289 | ␉virtual IOReturn␉DetermineDeviceFeatures ( void );␊ |
290 | ␉virtual void␉␉DetermineMediaType ( void );␊ |
291 | ␉virtual bool␉␉CheckForDVDMediaType ( void );␊ |
292 | ␉virtual bool␉␉CheckForCDMediaType ( void );␊ |
293 | ␉virtual void␉␉PollForMedia ( void );␊ |
294 | ␉virtual void␉␉EnablePolling ( void );␊ |
295 | ␉virtual void␉␉DisablePolling ( void );␊ |
296 | ␉virtual void␉␉CheckWriteProtection ( void );␊ |
297 | ␉virtual bool␉␉ClearNotReadyStatus ( void );␊ |
298 | ␉␉␊ |
299 | ␉virtual IOReturn␉GetDeviceConfiguration ( void );␊ |
300 | ␉virtual IOReturn␉GetDeviceConfigurationSize ( UInt32 * size );␊ |
301 | ␉virtual IOReturn␉ParseFeatureList ( UInt32 numProfiles, UInt8 * firstFeaturePtr );␊ |
302 | ␉␊ |
303 | ␉virtual IOReturn␉GetMechanicalCapabilities ( void );␊ |
304 | ␉virtual IOReturn␉GetMechanicalCapabilitiesSize ( UInt32 * size );␊ |
305 | ␉virtual IOReturn␉ParseMechanicalCapabilities ( UInt8 * mechanicalCapabilitiesPtr );␊ |
306 | ␊ |
307 | ␉virtual IOReturn␉CheckForLowPowerPollingSupport ( void );␊ |
308 | ␉virtual IOReturn␉GetCurrentPowerStateOfDrive ( UInt32 * powerState );␊ |
309 | ␊ |
310 | ␉virtual IOReturn␉IssueRead ( IOMemoryDescriptor *␉buffer,␊ |
311 | ␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉startBlock,␊ |
312 | ␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉blockCount );␊ |
313 | ␊ |
314 | ␉virtual IOReturn␉IssueRead ( IOMemoryDescriptor *␉buffer,␊ |
315 | ␉␉␉␉␉␉␉␉␉void *␉␉␉␉␉clientData,␊ |
316 | ␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉startBlock,␊ |
317 | ␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉blockCount );␊ |
318 | ␉␊ |
319 | ␉virtual IOReturn␉IssueWrite ( IOMemoryDescriptor *␉buffer,␊ |
320 | ␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉startBlock,␊ |
321 | ␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉blockCount );␊ |
322 | ␉␊ |
323 | ␉virtual IOReturn␉IssueWrite ( IOMemoryDescriptor *␉buffer,␊ |
324 | ␉␉␉␉␉␉␉␉␉void *␉␉␉␉␉clientData,␊ |
325 | ␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉startBlock,␊ |
326 | ␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉blockCount );␊ |
327 | ␊ |
328 | virtual void␉␉SetMediaCharacteristics ( UInt32 blockSize, UInt32 blockCount );␊ |
329 | ␉virtual void␉␉ResetMediaCharacteristics ( void );␊ |
330 | ␊ |
331 | ␉UInt8␉␉␉␉ConvertBCDToHex ( UInt8 binaryCodedDigit );␊ |
332 | ␊ |
333 | ␉// ------ User Client Support ------␊ |
334 | ␉␊ |
335 | ␉virtual IOReturn ␉HandleSetUserClientExclusivityState ( IOService * userClient, bool state );␊ |
336 | ␊ |
337 | ␉// ----- Power Management Support ------␊ |
338 | ␉␊ |
339 | ␉// We override this method to set our power states and register ourselves␊ |
340 | ␉// as a power policy maker.␊ |
341 | ␉virtual void ␉␉InitializePowerManagement ( IOService * provider );␊ |
342 | ␉␊ |
343 | ␉// We override this method so that when we register for power management,␊ |
344 | ␉// we go to our active power state (which the drive is definitely in␊ |
345 | ␉// at startup time).␊ |
346 | ␉virtual UInt32␉␉GetInitialPowerState ( void );␊ |
347 | ␊ |
348 | ␉// We override this method in order to provide the number of transitions␊ |
349 | ␉// from Fully active to Sleep state so that the idle timer can be adjusted␊ |
350 | ␉// to the appropriate time period based on the disk spindown time set in␊ |
351 | ␉// the Energy Saver prefs panel.␊ |
352 | ␉virtual UInt32␉␉GetNumberOfPowerStateTransitions ( void );␊ |
353 | ␉␊ |
354 | ␉// The TicklePowerManager method is called to tell the power manager that the␊ |
355 | ␉// device needs to be in a certain power state to handle requests.␊ |
356 | ␉virtual void␉␉TicklePowerManager ( void );␊ |
357 | ␊ |
358 | ␉// The HandlePowerChange method is the state machine for power management.␊ |
359 | ␉// It is guaranteed to be on its own thread of execution (different from␊ |
360 | ␉// the power manager thread AND the workloop thread. This routine can␊ |
361 | ␉// send sync or async calls to the drive without worrying about threading␊ |
362 | ␉// issues.␊ |
363 | ␉virtual void␉␉HandlePowerChange ( void );␊ |
364 | ␊ |
365 | ␉// The HandleCheckPowerState (void) method is on the serialized side of the command␊ |
366 | ␉// gate and can change member variables safely without multi-threading issues.␊ |
367 | ␉// It's main purpose is to call the superclass' HandleCheckPowerState ( UInt32 maxPowerState )␊ |
368 | ␉// with the max power state the class registered with.␊ |
369 | ␉virtual void␉␉HandleCheckPowerState ( void );␊ |
370 | ␊ |
371 | ␉// The CheckMediaPresence method is called to see if the media which we␊ |
372 | ␉// anticipated being there is still there.␊ |
373 | ␉virtual bool␉␉CheckMediaPresence ( void );␊ |
374 | ␉␊ |
375 | ␉virtual bool␉␉InitializeDeviceSupport ( void );␊ |
376 | ␉virtual void␉␉StartDeviceSupport ( void );␊ |
377 | ␉virtual void␉␉SuspendDeviceSupport ( void );␊ |
378 | ␉virtual void␉␉ResumeDeviceSupport ( void );␊ |
379 | ␉virtual void␉␉StopDeviceSupport ( void );␊ |
380 | ␉virtual void␉␉TerminateDeviceSupport ( void );␊ |
381 | ␉␊ |
382 | ␉virtual void␉␉free ( void );␊ |
383 | ␉␊ |
384 | #ifndef __LP64__␊ |
385 | ␊ |
386 | ␉virtual bool ␉␉CreateCommandSetObjects ( void );␊ |
387 | ␉virtual void ␉␉FreeCommandSetObjects ( void );␊ |
388 | ␊ |
389 | #endif␉/* !__LP64__ */␊ |
390 | ␊ |
391 | ␉virtual IOReturn␉VerifyDeviceState ( void );␊ |
392 | ␊ |
393 | ␊ |
394 | public:␊ |
395 | ␉␊ |
396 | ␉virtual IOReturn ␉setAggressiveness ( unsigned long type, unsigned long minutes );␊ |
397 | ␉␊ |
398 | ␉virtual IOReturn␉SyncReadWrite ( ␉IOMemoryDescriptor *␉buffer,␊ |
399 | ␉␉␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉startBlock,␊ |
400 | ␉␉␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉blockCount );␊ |
401 | ␉␊ |
402 | ␉virtual IOReturn␉AsyncReadWrite (␉IOMemoryDescriptor *␉buffer,␊ |
403 | ␉␉␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉block,␊ |
404 | ␉␉␉␉␉␉␉␉␉␉␉UInt64␉␉␉␉␉nblks,␊ |
405 | ␉␉␉␉␉␉␉␉␉␉␉void *␉␉␉␉␉clientData );␊ |
406 | ␊ |
407 | ␉virtual IOReturn␉EjectTheMedia ( void );␊ |
408 | ␉virtual IOReturn␉GetTrayState ( UInt8 * trayState );␊ |
409 | ␉virtual IOReturn␉SetTrayState ( UInt8 trayState );␊ |
410 | ␉virtual IOReturn␉FormatMedia ( UInt64 byteCapacity );␊ |
411 | ␉virtual UInt32␉␉GetFormatCapacities ( ␉UInt64 * capacities,␊ |
412 | ␉␉␉␉␉␉␉␉␉␉␉␉UInt32 capacitiesMaxCount ) const;␊ |
413 | ␉virtual IOReturn␉LockUnlockMedia ( bool doLock );␊ |
414 | ␉virtual IOReturn␉SynchronizeCache ( void );␊ |
415 | ␉virtual IOReturn␉ReportBlockSize ( UInt64 * blockSize );␊ |
416 | ␉virtual IOReturn␉ReportEjectability ( bool * isEjectable );␊ |
417 | ␉virtual IOReturn␉ReportLockability ( bool * isLockable );␊ |
418 | ␉virtual IOReturn␉ReportPollRequirements ( bool * pollIsRequired,␊ |
419 | ␉␉␉␉␉␉␉␉␉␉␉␉ bool * pollIsExpensive );␊ |
420 | ␉virtual IOReturn␉ReportMaxReadTransfer ( UInt64 ␉blockSize,␊ |
421 | ␉␉␉␉␉␉␉␉␉␉␉␉ UInt64 * ␉max );␊ |
422 | ␉virtual IOReturn␉ReportMaxValidBlock ( UInt64 * maxBlock );␊ |
423 | ␉virtual IOReturn␉ReportMaxWriteTransfer ( UInt64␉blockSize,␊ |
424 | ␉␉␉␉␉␉␉␉␉␉␉␉UInt64 * max );␊ |
425 | ␉virtual IOReturn␉ReportMediaState ( ␉bool * mediaPresent,␊ |
426 | ␉␉␉␉␉␉␉␉␉␉␉bool * changed );␊ |
427 | ␉virtual IOReturn␉ReportRemovability ( bool * isRemovable );␊ |
428 | ␉virtual IOReturn␉ReportWriteProtection ( bool * isWriteProtected );␊ |
429 | ␉␊ |
430 | ␉static ␉void␉␉sPollForMedia ( void * pdtDriver, void * refCon );␊ |
431 | ␊ |
432 | ␉/* CD Specific */␊ |
433 | ␉virtual IOReturn␉SetMediaAccessSpeed ( UInt16 kilobytesPerSecond );␊ |
434 | ␉␊ |
435 | ␉virtual IOReturn␉GetMediaAccessSpeed ( UInt16 * kilobytesPerSecond );␊ |
436 | ␊ |
437 | ␉virtual IOReturn␉AsyncReadCD ( ␉IOMemoryDescriptor * buffer,␊ |
438 | ␉␉␉␉␉␉␉␉␉␉UInt32 block,␊ |
439 | ␉␉␉␉␉␉␉␉␉␉UInt32 nblks,␊ |
440 | ␉␉␉␉␉␉␉␉␉␉CDSectorArea sectorArea,␊ |
441 | ␉␉␉␉␉␉␉␉␉␉CDSectorType sectorType,␊ |
442 | ␉␉␉␉␉␉␉␉␉␉void *␉clientData );␊ |
443 | ␉␊ |
444 | ␉virtual IOReturn␉ReadISRC ( UInt8 track, CDISRC isrc );␊ |
445 | ␉␊ |
446 | ␉virtual IOReturn␉ReadMCN ( CDMCN mcn);␊ |
447 | ␉␊ |
448 | ␉virtual IOReturn␉ReadTOC ( IOMemoryDescriptor * buffer );␊ |
449 | ␊ |
450 | #ifndef __LP64__␊ |
451 | ␉␊ |
452 | ␉virtual IOReturn␉AudioPause ( bool pause );␊ |
453 | ␉␊ |
454 | ␉virtual IOReturn␉AudioPlay ( CDMSF timeStart, CDMSF timeStop );␊ |
455 | ␉␊ |
456 | ␉virtual IOReturn␉AudioScan ( CDMSF timeStart, bool reverse );␊ |
457 | ␉␊ |
458 | ␉virtual IOReturn␉AudioStop ( void );␊ |
459 | ␉␊ |
460 | ␉virtual IOReturn␉GetAudioStatus ( CDAudioStatus * status );␊ |
461 | ␉␊ |
462 | ␉virtual IOReturn␉GetAudioVolume ( UInt8 * leftVolume, UInt8 * rightVolume );␊ |
463 | ␉␊ |
464 | ␉virtual IOReturn␉SetAudioVolume ( UInt8 leftVolume, UInt8 rightVolume );␊ |
465 | ␊ |
466 | #endif␉/* !__LP64__ */␊ |
467 | ␉␊ |
468 | ␉/* DVD Specific */␊ |
469 | ␉virtual UInt32␉␉␉GetMediaType␉␉( void );␊ |
470 | ␊ |
471 | ␉virtual IOReturn␉␉ReportKey␉␉␉( IOMemoryDescriptor * buffer,␊ |
472 | ␉␉␉␉␉␉␉␉␉␉␉␉ const DVDKeyClass keyClass,␊ |
473 | ␉␉␉␉␉␉␉␉␉␉␉␉ const UInt32 lba,␊ |
474 | ␉␉␉␉␉␉␉␉␉␉␉␉ const UInt8 agid,␊ |
475 | ␉␉␉␉␉␉␉␉␉␉␉␉ const DVDKeyFormat keyFormat );␊ |
476 | ␉␉␉␉␉␉␉␉␉␉␉␉ ␊ |
477 | ␉virtual IOReturn␉␉SendKey␉␉␉␉( IOMemoryDescriptor * buffer,␊ |
478 | ␉␉␉␉␉␉␉␉␉␉␉␉ const DVDKeyClass keyClass,␊ |
479 | ␉␉␉␉␉␉␉␉␉␉␉␉ const UInt8 agid,␊ |
480 | ␉␉␉␉␉␉␉␉␉␉␉␉ const DVDKeyFormat keyFormat );␊ |
481 | ␉␉␉␉␉␉␉␉␉␉␉␉ ␊ |
482 | ␉virtual IOReturn␉␉ReadDVDStructure ␉( ␉IOMemoryDescriptor * ␉␉buffer,␊ |
483 | ␉␉␉␉␉␉␉␉␉␉␉␉␉const UInt32 ␉␉␉␉length,␊ |
484 | ␉␉␉␉␉␉␉␉␉␉␉␉␉const UInt8␉␉␉␉␉structureFormat,␊ |
485 | ␉␉␉␉␉␉␉␉␉␉␉␉␉const UInt32␉␉␉␉logicalBlockAddress,␊ |
486 | ␉␉␉␉␉␉␉␉␉␉␉␉␉const UInt8␉␉␉␉␉layer,␊ |
487 | ␉␉␉␉␉␉␉␉␉␉␉␉␉const UInt8 ␉␉␉␉agid );␊ |
488 | ␊ |
489 | ␉// The block size decoding for Read CD and Read CD MSF as defined in table 255␊ |
490 | bool␉GetBlockSize (␊ |
491 | ␉␉␉␉␉␉UInt32 *␉␉␉␉␉requestedByteCount,␊ |
492 | ␉␉␉␉␉␉SCSICmdField3Bit ␉␉␉EXPECTED_SECTOR_TYPE,␊ |
493 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉SYNC,␊ |
494 | ␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉HEADER_CODES,␊ |
495 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉USER_DATA,␊ |
496 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉EDC_ECC,␊ |
497 | ␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉ERROR_FIELD,␊ |
498 | ␉␉␉␉␉␉SCSICmdField3Bit ␉␉␉SUBCHANNEL_SELECTION_BITS );␊ |
499 | ␉␊ |
500 | ␉SCSICmdField4Byte ConvertMSFToLBA ( SCSICmdField3Byte MSF );␊ |
501 | ␊ |
502 | #ifndef __LP64__␊ |
503 | ␊ |
504 | ␉// Command methods to access all commands available to MMC based devices.␊ |
505 | ␉// The BLANK command as defined in section 6.1.1␊ |
506 | ␉virtual bool BLANK (␊ |
507 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
508 | ␉␉ ␉␉␉SCSICmdField1Bit ␉␉␉IMMED, ␊ |
509 | ␉␉␉␉␉␉SCSICmdField3Bit ␉␉␉BLANKING_TYPE, ␊ |
510 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉START_ADDRESS_TRACK_NUMBER, ␊ |
511 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
512 | ␊ |
513 | ␉// The CLOSE TRACK/SESSION command as defined in section 6.1.2␊ |
514 | virtual bool CLOSE_TRACK_SESSION (␊ |
515 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
516 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉IMMED, ␊ |
517 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉SESSION, ␊ |
518 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉TRACK, ␊ |
519 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉TRACK_NUMBER, ␊ |
520 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
521 | ␊ |
522 | ␉// The FORMAT UNIT command as defined in section 6.1.3␊ |
523 | virtual bool FORMAT_UNIT (␊ |
524 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
525 | ␉␉ ␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
526 | ␉␉ ␉␉␉IOByteCount␉␉␉␉␉parameterListSize,␊ |
527 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉FMT_DATA, ␊ |
528 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉CMP_LIST, ␊ |
529 | ␉␉␉␉␉␉SCSICmdField3Bit ␉␉␉FORMAT_CODE, ␊ |
530 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉INTERLEAVE_VALUE, ␊ |
531 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
532 | ␊ |
533 | #endif␉/* !__LP64__ */␊ |
534 | ␉␊ |
535 | ␉␊ |
536 | ␉// The GET CONFIGURATION command as defined in section 6.1.4␊ |
537 | virtual bool GET_CONFIGURATION (␊ |
538 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
539 | ␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer, ␊ |
540 | ␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉RT, ␊ |
541 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉STARTING_FEATURE_NUMBER, ␊ |
542 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉ALLOCATION_LENGTH, ␊ |
543 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
544 | ␊ |
545 | ␉// The GET EVENT/STATUS NOTIFICATION command as defined in section 6.1.5␊ |
546 | virtual bool GET_EVENT_STATUS_NOTIFICATION (␊ |
547 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
548 | ␉ ␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
549 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉IMMED, ␊ |
550 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉NOTIFICATION_CLASS_REQUEST, ␊ |
551 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉ALLOCATION_LENGTH, ␊ |
552 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
553 | ␊ |
554 | ␉// The GET PERFORMANCE command as defined in section 6.1.6␊ |
555 | virtual bool GET_PERFORMANCE (␊ |
556 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
557 | ␉ ␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
558 | ␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉TOLERANCE, ␊ |
559 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉WRITE, ␊ |
560 | ␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉EXCEPT, ␊ |
561 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉STARTING_LBA, ␊ |
562 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉MAXIMUM_NUMBER_OF_DESCRIPTORS, ␊ |
563 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
564 | ␊ |
565 | ␉// The LOAD/UNLOAD MEDIUM command as defined in section 6.1.7␊ |
566 | virtual bool LOAD_UNLOAD_MEDIUM (␊ |
567 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
568 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉IMMED, ␊ |
569 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉LO_UNLO, ␊ |
570 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉START, ␊ |
571 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉SLOT, ␊ |
572 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
573 | ␊ |
574 | ␉// The MECHANISM STATUS command as defined in section 6.1.8␊ |
575 | virtual bool MECHANISM_STATUS (␊ |
576 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
577 | ␉ ␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
578 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉ALLOCATION_LENGTH, ␊ |
579 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
580 | ␊ |
581 | #ifndef __LP64__␊ |
582 | ␊ |
583 | ␉// The PAUSE/RESUME command as defined in section 6.1.9␊ |
584 | virtual bool PAUSE_RESUME (␊ |
585 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
586 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉RESUME, ␊ |
587 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
588 | ␊ |
589 | ␉// The PLAY AUDIO (10) command as defined in section 6.1.10␊ |
590 | virtual bool PLAY_AUDIO_10 (␊ |
591 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
592 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉RELADR, ␊ |
593 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉STARTING_LOGICAL_BLOCK_ADDRESS, ␊ |
594 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉PLAY_LENGTH, ␊ |
595 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
596 | ␊ |
597 | ␉// The PLAY AUDIO (12) command as defined in section 6.1.11␊ |
598 | virtual bool PLAY_AUDIO_12 (␊ |
599 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
600 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉RELADR, ␊ |
601 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉STARTING_LOGICAL_BLOCK_ADDRESS, ␊ |
602 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉PLAY_LENGTH, ␊ |
603 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
604 | ␊ |
605 | ␉// The PLAY AUDIO MSF command as defined in section 6.1.12␊ |
606 | virtual bool PLAY_AUDIO_MSF (␊ |
607 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
608 | ␉␉␉␉␉␉SCSICmdField3Byte ␉␉␉STARTING_MSF, ␊ |
609 | ␉␉␉␉␉␉SCSICmdField3Byte ␉␉␉ENDING_MSF, ␊ |
610 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
611 | ␉␊ |
612 | ␉/*********************** LEGACY COMMAND SUPPORT ***********************/␊ |
613 | ␉// The PLAY CD command as defined in section 6.1.13␊ |
614 | virtual bool PLAY_CD (␊ |
615 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
616 | ␉␉␉␉␉␉SCSICmdField3Bit ␉␉␉EXPECTED_SECTOR_TYPE,␊ |
617 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉CMSF,␊ |
618 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉STARTING_LOGICAL_BLOCK_ADDRESS, ␊ |
619 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉PLAY_LENGTH_IN_BLOCKS, ␊ |
620 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉SPEED,␊ |
621 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉PORT2,␊ |
622 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉PORT1,␊ |
623 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉COMPOSITE,␊ |
624 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉AUDIO,␊ |
625 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
626 | ␉/*********************** END LEGACY COMMAND SUPPORT *******************/␊ |
627 | ␊ |
628 | #endif␉/* !__LP64__ */␊ |
629 | ␉␊ |
630 | ␉virtual bool READ_10 (␊ |
631 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
632 | ␉␉ ␉␉␉IOMemoryDescriptor ␉␉␉*dataBuffer, ␊ |
633 | ␉␉ ␉␉␉UInt32␉␉␉␉␉␉blockSize,␊ |
634 | ␉␉ ␉␉␉SCSICmdField1Bit ␉␉␉DPO, ␊ |
635 | ␉␉ ␉␉␉SCSICmdField1Bit ␉␉␉FUA,␊ |
636 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉RELADR, ␊ |
637 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉LOGICAL_BLOCK_ADDRESS, ␊ |
638 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉TRANSFER_LENGTH, ␊ |
639 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
640 | ␉␊ |
641 | #ifndef __LP64__␊ |
642 | ␉␊ |
643 | ␉/*********************** LEGACY COMMAND SUPPORT ***********************/␊ |
644 | ␉// The READ BUFFER CAPACITY command as defined in section 6.1.14␊ |
645 | virtual bool READ_BUFFER_CAPACITY (␊ |
646 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
647 | ␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
648 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉ALLOCATION_LENGTH, ␊ |
649 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
650 | ␉/*********************** END LEGACY COMMAND SUPPORT *******************/␊ |
651 | ␉␊ |
652 | #endif␉/* !__LP64__ */␊ |
653 | ␉␊ |
654 | ␉// The READ CD command as defined in section 6.1.15␊ |
655 | virtual bool READ_CD (␊ |
656 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
657 | ␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer, ␊ |
658 | ␉␉␉␉␉␉SCSICmdField3Bit ␉␉␉EXPECTED_SECTOR_TYPE,␊ |
659 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉RELADR,␊ |
660 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉STARTING_LOGICAL_BLOCK_ADDRESS, ␊ |
661 | ␉␉␉␉␉␉SCSICmdField3Byte ␉␉␉TRANSFER_LENGTH, ␊ |
662 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉SYNC,␊ |
663 | ␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉HEADER_CODES,␊ |
664 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉USER_DATA,␊ |
665 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉EDC_ECC,␊ |
666 | ␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉ERROR_FIELD,␊ |
667 | ␉␉␉␉␉␉SCSICmdField3Bit ␉␉␉SUBCHANNEL_SELECTION_BITS,␊ |
668 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
669 | ␊ |
670 | ␉// The READ CD MSF command as defined in section 6.1.16␊ |
671 | virtual bool READ_CD_MSF (␊ |
672 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
673 | ␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer, ␊ |
674 | ␉␉␉␉␉␉SCSICmdField3Bit ␉␉␉EXPECTED_SECTOR_TYPE,␊ |
675 | ␉␉␉␉␉␉SCSICmdField3Byte ␉␉␉STARTING_MSF, ␊ |
676 | ␉␉␉␉␉␉SCSICmdField3Byte ␉␉␉ENDING_MSF, ␊ |
677 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉SYNC,␊ |
678 | ␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉HEADER_CODES,␊ |
679 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉USER_DATA,␊ |
680 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉EDC_ECC,␊ |
681 | ␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉ERROR_FIELD,␊ |
682 | ␉␉␉␉␉␉SCSICmdField3Bit ␉␉␉SUBCHANNEL_SELECTION_BITS,␊ |
683 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
684 | ␊ |
685 | ␉// The READ CAPACITY command as defined in section 6.1.17␊ |
686 | virtual bool READ_CAPACITY (␊ |
687 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
688 | ␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer, ␊ |
689 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉RELADR,␊ |
690 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉LOGICAL_BLOCK_ADDRESS,␊ |
691 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉PMI,␊ |
692 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
693 | ␊ |
694 | ␉// The READ DISC INFORMATION command as defined in section 6.1.18␊ |
695 | virtual bool READ_DISC_INFORMATION (␊ |
696 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
697 | ␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer, ␊ |
698 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉ALLOCATION_LENGTH, ␊ |
699 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
700 | ␊ |
701 | ␉// The READ DVD STRUCTURE command as defined in section 6.1.19␊ |
702 | virtual bool READ_DVD_STRUCTURE (␊ |
703 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
704 | ␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
705 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉ADDRESS,␊ |
706 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉LAYER_NUMBER, ␊ |
707 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉FORMAT, ␊ |
708 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉ALLOCATION_LENGTH, ␊ |
709 | ␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉AGID,␊ |
710 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
711 | ␊ |
712 | ␉// The READ FORMAT CAPACITIES command as defined in section 6.1.20␊ |
713 | virtual bool READ_FORMAT_CAPACITIES (␊ |
714 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
715 | ␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
716 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉ALLOCATION_LENGTH, ␊ |
717 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
718 | ␊ |
719 | #ifndef __LP64__␊ |
720 | ␉␊ |
721 | ␉/*********************** LEGACY COMMAND SUPPORT ***********************/␊ |
722 | ␉// The READ HEADER command as defined in section 6.1.21␊ |
723 | virtual bool READ_HEADER (␊ |
724 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
725 | ␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
726 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉MSF,␊ |
727 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉LOGICAL_BLOCK_ADDRESS,␊ |
728 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉ALLOCATION_LENGTH, ␊ |
729 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
730 | ␉/*********************** END LEGACY COMMAND SUPPORT ***********************/␊ |
731 | ␊ |
732 | ␉/*********************** LEGACY COMMAND SUPPORT ***********************/␊ |
733 | ␉// The READ MASTER CUE command as defined in section 6.1.22␊ |
734 | virtual bool READ_MASTER_CUE (␊ |
735 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
736 | ␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
737 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉SHEET_NUMBER, ␊ |
738 | ␉␉␉␉␉␉SCSICmdField3Byte ␉␉␉ALLOCATION_LENGTH, ␊ |
739 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
740 | ␉/*********************** END LEGACY COMMAND SUPPORT ***********************/␊ |
741 | ␊ |
742 | #endif␉/* !__LP64__ */␊ |
743 | ␉␊ |
744 | ␉// The READ SUB-CHANNEL command as defined in section 6.1.23␊ |
745 | virtual bool READ_SUB_CHANNEL (␊ |
746 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
747 | ␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
748 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉MSF,␊ |
749 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉SUBQ,␊ |
750 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉SUB_CHANNEL_PARAMETER_LIST, ␊ |
751 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉TRACK_NUMBER, ␊ |
752 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉ALLOCATION_LENGTH, ␊ |
753 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
754 | ␊ |
755 | ␉// The READ TOC/PMA/ATIP command as defined in section 6.1.24/25␊ |
756 | virtual bool READ_TOC_PMA_ATIP (␊ |
757 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
758 | ␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer, ␊ |
759 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉MSF,␊ |
760 | ␉␉␉␉␉␉SCSICmdField4Bit ␉␉␉FORMAT,␊ |
761 | ␉␉␉␉␉␉SCSICmdField1Byte␉␉␉TRACK_SESSION_NUMBER,␊ |
762 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉ALLOCATION_LENGTH, ␊ |
763 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
764 | ␊ |
765 | ␉// The READ TRACK INFORMATION command as defined in section 6.1.26␊ |
766 | virtual bool READ_TRACK_INFORMATION (␊ |
767 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
768 | ␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
769 | ␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉ADDRESS_NUMBER_TYPE,␊ |
770 | ␉␉␉␉␉␉SCSICmdField4Byte␉␉␉LOGICAL_BLOCK_ADDRESS_TRACK_SESSION_NUMBER,␊ |
771 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉ALLOCATION_LENGTH, ␊ |
772 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
773 | ␊ |
774 | #ifndef __LP64__␊ |
775 | ␉/*********************** LEGACY COMMAND SUPPORT ***********************/␊ |
776 | ␉// The REPAIR TRACK command as defined in section 6.1.27␊ |
777 | virtual bool REPAIR_TRACK (␊ |
778 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
779 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉TRACK_NUMBER, ␊ |
780 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
781 | ␉/*********************** END LEGACY COMMAND SUPPORT ***********************/␊ |
782 | ␉␊ |
783 | ␉// The REPORT KEY command as defined in section 6.1.28␊ |
784 | virtual bool REPORT_KEY (␊ |
785 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
786 | ␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
787 | ␉␉␉␉␉␉SCSICmdField4Byte␉␉␉LOGICAL_BLOCK_ADDRESS,␊ |
788 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉ALLOCATION_LENGTH, ␊ |
789 | ␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉AGID,␊ |
790 | ␉␉␉␉␉␉SCSICmdField6Bit ␉␉␉KEY_FORMAT,␊ |
791 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
792 | ␉␊ |
793 | ␉// The RESERVE TRACK command as defined in section 6.1.29␊ |
794 | virtual bool RESERVE_TRACK (␊ |
795 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
796 | ␉␉␉␉␉␉SCSICmdField4Byte␉␉␉RESERVATION_SIZE,␊ |
797 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
798 | ␉␊ |
799 | ␉// The SCAN command as defined in section 6.1.30␊ |
800 | virtual bool SCAN (␊ |
801 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
802 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉DIRECT,␊ |
803 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉RELADR,␊ |
804 | ␉␉␉␉␉␉SCSICmdField4Byte␉␉␉SCAN_STARTING_ADDRESS_FIELD,␊ |
805 | ␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉TYPE,␊ |
806 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
807 | ␊ |
808 | ␉// The SEND CUE SHEET command as defined in section 6.1.31␊ |
809 | virtual bool SEND_CUE_SHEET (␊ |
810 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
811 | ␉ ␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
812 | ␉␉␉␉␉␉SCSICmdField3Byte␉␉␉CUE_SHEET_SIZE,␊ |
813 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
814 | ␊ |
815 | ␉// The SEND DVD STRUCTURE command as defined in section 6.1.32␊ |
816 | virtual bool SEND_DVD_STRUCTURE (␊ |
817 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
818 | ␉ ␉ ␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
819 | ␉␉␉␉␉␉SCSICmdField1Byte␉␉␉FORMAT,␊ |
820 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉STRUCTURE_DATA_LENGTH, ␊ |
821 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
822 | ␊ |
823 | ␉// The SEND EVENT command as defined in section 6.1.33␊ |
824 | virtual bool SEND_EVENT (␊ |
825 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
826 | ␉ ␉␉ ␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
827 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉IMMED, ␊ |
828 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉PARAMETER_LIST_LENGTH, ␊ |
829 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
830 | ␉␊ |
831 | ␉// The SEND KEY command as defined in section 6.1.34␊ |
832 | virtual bool SEND_KEY (␊ |
833 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
834 | ␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
835 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉PARAMETER_LIST_LENGTH, ␊ |
836 | ␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉AGID,␊ |
837 | ␉␉␉␉␉␉SCSICmdField6Bit ␉␉␉KEY_FORMAT,␊ |
838 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
839 | ␊ |
840 | ␉// The SEND OPC INFORMATION command as defined in section 6.1.35␊ |
841 | virtual bool SEND_OPC_INFORMATION (␊ |
842 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
843 | ␉ ␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
844 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉DO_OPC, ␊ |
845 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉PARAMETER_LIST_LENGTH, ␊ |
846 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
847 | #endif␉/* !__LP64__ */␊ |
848 | ␊ |
849 | ␉/*********************** LEGACY COMMAND SUPPORT ***********************/␊ |
850 | ␉// The SET CD SPEED command as defined in section 6.1.36␊ |
851 | virtual bool SET_CD_SPEED (␊ |
852 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
853 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉LOGICAL_UNIT_READ_SPEED, ␊ |
854 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉LOGICAL_UNIT_WRITE_SPEED, ␊ |
855 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
856 | ␉/*********************** END LEGACY COMMAND SUPPORT ***********************/␊ |
857 | ␊ |
858 | ␉// The SET READ AHEAD command as defined in section 6.1.37␊ |
859 | virtual bool SET_READ_AHEAD (␊ |
860 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
861 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉TRIGGER_LOGICAL_BLOCK_ADDRESS, ␊ |
862 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉READ_AHEAD_LOGICAL_BLOCK_ADDRESS, ␊ |
863 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
864 | ␊ |
865 | ␉// The SET STREAMING command as defined in section 6.1.38␊ |
866 | virtual bool SET_STREAMING (␊ |
867 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
868 | ␉ ␉␉ ␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
869 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉PARAMETER_LIST_LENGTH, ␊ |
870 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
871 | ␉␊ |
872 | ␉virtual bool START_STOP_UNIT ( ␊ |
873 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
874 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉IMMED, ␊ |
875 | ␉␉␉␉␉␉SCSICmdField4Bit ␉␉␉POWER_CONDITIONS, ␊ |
876 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉LOEJ, ␊ |
877 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉START, ␊ |
878 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
879 | ␊ |
880 | #ifndef __LP64__␊ |
881 | ␉␊ |
882 | ␉// The STOP PLAY/SCAN command as defined in section 6.1.39␊ |
883 | virtual bool STOP_PLAY_SCAN (␊ |
884 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
885 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
886 | ␊ |
887 | #endif␉/* !__LP64__ */␊ |
888 | ␊ |
889 | ␉// The SYNCHRONIZE CACHE command as defined in section 6.1.40␊ |
890 | virtual bool SYNCHRONIZE_CACHE (␊ |
891 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
892 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉IMMED, ␊ |
893 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉RELADR, ␊ |
894 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉LOGICAL_BLOCK_ADDRESS, ␊ |
895 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉NUMBER_OF_BLOCKS, ␊ |
896 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
897 | ␊ |
898 | ␉// The WRITE (10) command as defined in section 6.1.41␊ |
899 | virtual bool WRITE_10 (␊ |
900 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
901 | ␉␉ ␉␉␉IOMemoryDescriptor *␉␉dataBuffer, ␊ |
902 | ␉␉ ␉␉␉UInt32␉␉␉␉␉␉blockSize,␊ |
903 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉DPO, ␊ |
904 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉FUA, ␊ |
905 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉RELADR, ␊ |
906 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉LOGICAL_BLOCK_ADDRESS, ␊ |
907 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉TRANSFER_LENGTH, ␊ |
908 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
909 | ␊ |
910 | ␉// The WRITE AND VERIFY (10) command as defined in section 6.1.42␊ |
911 | virtual bool WRITE_AND_VERIFY_10 (␊ |
912 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
913 | ␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
914 | ␉␉ ␉␉␉UInt32␉␉␉␉␉␉blockSize,␊ |
915 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉DPO, ␊ |
916 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉BYT_CHK, ␊ |
917 | ␉␉␉␉␉␉SCSICmdField1Bit ␉␉␉RELADR, ␊ |
918 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉LOGICAL_BLOCK_ADDRESS, ␊ |
919 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉TRANSFER_LENGTH, ␊ |
920 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
921 | ␉␊ |
922 | ␉/* Added with 10.1.3 */␊ |
923 | ␉OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 1 );␊ |
924 | ␉␊ |
925 | ␉virtual IOReturn␉ReadTOC (␉IOMemoryDescriptor *␉buffer,␊ |
926 | ␉␉␉␉␉␉␉␉␉CDTOCFormat␉␉␉␉format,␊ |
927 | ␉␉␉␉␉␉␉␉␉UInt8␉␉␉␉␉msf,␊ |
928 | ␉␉␉␉␉␉␉␉␉UInt32␉␉␉␉␉trackSessionNumber,␊ |
929 | ␉␉␉␉␉␉␉␉␉UInt16 *␉␉␉␉actualByteCount );␊ |
930 | ␉␊ |
931 | ␉/* Added with 10.1.3 */␊ |
932 | ␉OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 2 );␊ |
933 | ␊ |
934 | ␉virtual IOReturn␉ReadDiscInfo (␉IOMemoryDescriptor *␉buffer,␊ |
935 | ␉␉␉␉␉␉␉␉␉␉UInt16 *␉␉␉␉actualByteCount );␊ |
936 | ␉␊ |
937 | ␉/* Added with 10.1.3 */␊ |
938 | ␉OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 3 );␊ |
939 | ␉␊ |
940 | ␉virtual IOReturn␉ReadTrackInfo (␉IOMemoryDescriptor *␉buffer,␊ |
941 | ␉␉␉␉␉␉␉␉␉␉UInt32␉␉␉␉␉address,␊ |
942 | ␉␉␉␉␉␉␉␉␉␉CDTrackInfoAddressType␉addressType,␊ |
943 | ␉␉␉␉␉␉␉␉␉␉UInt16 *␉␉␉␉actualByteCount );␊ |
944 | ␉␊ |
945 | ␉/* Added with 10.2 */␊ |
946 | ␉OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 4 );␊ |
947 | ␉␊ |
948 | ␉virtual IOReturn␉PowerDownHandler ( void * ␉␉refCon,␊ |
949 | ␉␉␉␉␉␉␉␉␉␉ UInt32 ␉␉messageType,␊ |
950 | ␉␉␉␉␉␉␉␉␉␉ IOService * ␉provider,␊ |
951 | ␉␉␉␉␉␉␉␉␉␉ void * ␉␉messageArgument,␊ |
952 | ␉␉␉␉␉␉␉␉␉␉ vm_size_t ␉argSize );␊ |
953 | ␉␊ |
954 | ␉/* Added with 10.3.3 */␊ |
955 | ␉OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 5 );␊ |
956 | ␉␊ |
957 | ␉␊ |
958 | protected:␊ |
959 | ␉␊ |
960 | ␉␊ |
961 | ␉virtual void AsyncReadWriteCompletion ( SCSITaskIdentifier completedTask );␊ |
962 | ␉␊ |
963 | ␉␊ |
964 | public:␊ |
965 | ␉␊ |
966 | ␉␊ |
967 | ␉/* Added with 10.5 */␊ |
968 | OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 6 );␊ |
969 | ␉␊ |
970 | ␉virtual␉IOReturn␉ReadDiscStructure (␉IOMemoryDescriptor * ␉␉buffer,␊ |
971 | ␉␉␉␉␉␉␉␉␉␉␉const UInt32 ␉␉␉␉length,␊ |
972 | ␉␉␉␉␉␉␉␉␉␉␉const UInt8␉␉␉␉␉structureFormat,␊ |
973 | ␉␉␉␉␉␉␉␉␉␉␉const UInt32␉␉␉␉logicalBlockAddress,␊ |
974 | ␉␉␉␉␉␉␉␉␉␉␉const UInt8␉␉␉␉␉layer,␊ |
975 | ␉␉␉␉␉␉␉␉␉␉␉const UInt8 ␉␉␉␉agid,␊ |
976 | ␉␉␉␉␉␉␉␉␉␉␉const UInt8␉␉␉␉␉mediaType );␊ |
977 | ␉␊ |
978 | ␉␊ |
979 | ␉bool␉␉CheckForBDMediaType ( void );␊ |
980 | ␉␊ |
981 | ␉␊ |
982 | bool␉␉READ_DISC_STRUCTURE (␊ |
983 | ␉␉␉␉␉␉SCSITaskIdentifier␉␉␉request,␊ |
984 | ␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
985 | ␉␉␉␉␉␉SCSICmdField4Bit ␉␉␉MEDIA_TYPE,␊ |
986 | ␉␉␉␉␉␉SCSICmdField4Byte ␉␉␉ADDRESS,␊ |
987 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉LAYER_NUMBER, ␊ |
988 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉FORMAT, ␊ |
989 | ␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉ALLOCATION_LENGTH, ␊ |
990 | ␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉AGID,␊ |
991 | ␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL );␊ |
992 | ␉␊ |
993 | ␉␊ |
994 | OSMetaClassDeclareReservedUsed ( IOSCSIMultimediaCommandsDevice, 7 );␊ |
995 | ␉␊ |
996 | ␉virtual␉IOReturn␉ReserveTrack (␉UInt8␉␉reservationType,␊ |
997 | ␉␉␉␉␉␉␉␉␉␉UInt8␉␉reservationFormat,␊ |
998 | ␉␉␉␉␉␉␉␉␉␉UInt64␉␉ReservationParameter );␊ |
999 | ␉␊ |
1000 | ␉␊ |
1001 | ␉bool␉␉RESERVE_TRACK_V2 (␉SCSITaskIdentifier␉␉request,␊ |
1002 | ␉␉␉␉␉␉␉␉␉SCSICmdField1Bit␉␉RMZ,␊ |
1003 | ␉␉␉␉␉␉␉␉␉SCSICmdField1Bit␉␉ARSV,␊ |
1004 | ␉␉␉␉␉␉␉␉␉SCSICmdField7Byte␉␉RESERVATION_PARAMETER,␊ |
1005 | ␉␉␉␉␉␉␉␉␉SCSICmdField1Byte ␉␉CONTROL␉␉␉␉␉);␊ |
1006 | ␉␊ |
1007 | ␉␊ |
1008 | ␉bool␉␉REPORT_KEY_V2 (␉SCSITaskIdentifier␉␉␉request,␊ |
1009 | ␉␉␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
1010 | ␉␉␉␉␉␉␉␉SCSICmdField4Byte␉␉␉LOGICAL_BLOCK_ADDRESS,␊ |
1011 | ␉␉␉␉␉␉␉␉SCSICmdField1Byte␉␉␉KEY_CLASS,␊ |
1012 | ␉␉␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉ALLOCATION_LENGTH,␊ |
1013 | ␉␉␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉AGID,␊ |
1014 | ␉␉␉␉␉␉␉␉SCSICmdField6Bit ␉␉␉KEY_FORMAT,␊ |
1015 | ␉␉␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL␉␉␉␉␉);␊ |
1016 | ␉␊ |
1017 | ␉␊ |
1018 | ␉bool␉␉SEND_KEY_V2 (␉SCSITaskIdentifier␉␉␉request,␊ |
1019 | ␉␉␉␉␉␉␉␉IOMemoryDescriptor *␉␉dataBuffer,␊ |
1020 | ␉␉␉␉␉␉␉␉SCSICmdField1Byte␉␉␉KEY_CLASS,␊ |
1021 | ␉␉␉␉␉␉␉␉SCSICmdField2Byte ␉␉␉PARAMETER_LIST_LENGTH,␊ |
1022 | ␉␉␉␉␉␉␉␉SCSICmdField2Bit ␉␉␉AGID,␊ |
1023 | ␉␉␉␉␉␉␉␉SCSICmdField6Bit ␉␉␉KEY_FORMAT,␊ |
1024 | ␉␉␉␉␉␉␉␉SCSICmdField1Byte ␉␉␉CONTROL␉␉␉␉␉);␊ |
1025 | ␉␊ |
1026 | ␉␊ |
1027 | protected:␊ |
1028 | ␉␊ |
1029 | ␉␊ |
1030 | ␉void␉␉SetPollingMode ( UInt32 newPollingMode );␊ |
1031 | ␉␊ |
1032 | ␉␊ |
1033 | public:␊ |
1034 | ␉␊ |
1035 | ␉␊ |
1036 | ␉/* 10.6.0 */␊ |
1037 | ␉␊ |
1038 | ␉IOReturn␉RequestIdle ( void );␊ |
1039 | ␉␊ |
1040 | private:␊ |
1041 | ␉␊ |
1042 | ␉// Space reserved for future expansion.␊ |
1043 | OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, ␉8 );␊ |
1044 | OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, ␉9 );␊ |
1045 | OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 10 );␊ |
1046 | OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 11 );␊ |
1047 | OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 12 );␊ |
1048 | OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 13 );␊ |
1049 | OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 14 );␊ |
1050 | OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 15 );␊ |
1051 | OSMetaClassDeclareReservedUnused ( IOSCSIMultimediaCommandsDevice, 16 );␊ |
1052 | ␊ |
1053 | };␊ |
1054 | ␊ |
1055 | #endif /* defined(KERNEL) && defined(__cplusplus) */␊ |
1056 | ␊ |
1057 | #endif /* _IOKIT_IO_SCSI_MULTIMEDIA_COMMANDS_DEVICE_H_ */␊ |
1058 |