Root/
Source at commit 1166 created 13 years 10 days ago. By meklort, Fixed recent Makefile changes. Please do not use /Users/evan/SourceCode/tmp/chameleon/trunk or VPATH. the *only* time you should use /Users/evan/SourceCode/tmp/chameleon/trunk is when setting the SRCROOT variable. Also note that very soon make pkg is going to be removed. The pkg build script in trunk is very out of date. Instead please use the package maker at http://forge.voodooprojects.org/p/chameleonApplications/. Once this is ready for trunk it will be merged. | |
---|---|
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_SCSI_CMDS_INQUIRY_H_␊ |
25 | #define _IOKIT_SCSI_CMDS_INQUIRY_H_␊ |
26 | ␊ |
27 | ␊ |
28 | //-----------------------------------------------------------------------------␊ |
29 | //␉Includes␊ |
30 | //-----------------------------------------------------------------------------␊ |
31 | ␊ |
32 | #if KERNEL␊ |
33 | #include <IOKit/IOTypes.h>␊ |
34 | #else␊ |
35 | #include <CoreFoundation/CoreFoundation.h>␊ |
36 | #endif␊ |
37 | ␊ |
38 | ␊ |
39 | /*! @header SCSI Inquiry Definitions␊ |
40 | ␉@discussion␊ |
41 | ␉This file contains all definitions for the data returned from␊ |
42 | ␉the INQUIRY (0x12) command.␊ |
43 | */␊ |
44 | ␊ |
45 | ␊ |
46 | /*!␊ |
47 | * @enum Payload sizes␊ |
48 | * @discussion␊ |
49 | * Definitions for sizes related to the INQUIRY data.␊ |
50 | * @constant kINQUIRY_StandardDataHeaderSize␊ |
51 | * INQUIRY data header size.␊ |
52 | * @constant kINQUIRY_MaximumDataSize␊ |
53 | * Maximum size for INQUIRY data.␊ |
54 | */␊ |
55 | enum␊ |
56 | {␊ |
57 | ␉kINQUIRY_StandardDataHeaderSize␉␉␉= 5,␊ |
58 | ␉kINQUIRY_MaximumDataSize␉␉␉␉= 255␉␊ |
59 | };␊ |
60 | ␊ |
61 | ␊ |
62 | /*!␊ |
63 | @enum INQUIRY field sizes␊ |
64 | @discussion␊ |
65 | Sizes for some of the inquiry data fields.␊ |
66 | @constant kINQUIRY_VENDOR_IDENTIFICATION_Length␊ |
67 | Size of VENDOR_IDENTIFICATION field.␊ |
68 | @constant kINQUIRY_PRODUCT_IDENTIFICATION_Length␊ |
69 | Size of PRODUCT_IDENTIFICATION field.␊ |
70 | @constant kINQUIRY_PRODUCT_REVISION_LEVEL_Length␊ |
71 | Size of PRODUCT_REVISION_LEVEL field.␊ |
72 | */␊ |
73 | enum␊ |
74 | {␊ |
75 | ␉kINQUIRY_VENDOR_IDENTIFICATION_Length␉= 8,␊ |
76 | ␉kINQUIRY_PRODUCT_IDENTIFICATION_Length␉= 16,␊ |
77 | ␉kINQUIRY_PRODUCT_REVISION_LEVEL_Length␉= 4␊ |
78 | };␊ |
79 | ␊ |
80 | ␊ |
81 | /*!␊ |
82 | @struct SCSICmd_INQUIRY_StandardData␊ |
83 | @discussion␊ |
84 | This structure defines the format of the required standard data that is ␊ |
85 | returned for the INQUIRY command. This is the data that is required to␊ |
86 | be returned from all devices.␊ |
87 | */␊ |
88 | typedef struct SCSICmd_INQUIRY_StandardData␊ |
89 | {␊ |
90 | ␉UInt8␉␉PERIPHERAL_DEVICE_TYPE;␉␉␉␉// 7-5 = Qualifier. 4-0 = Device type.␊ |
91 | ␉UInt8␉␉RMB;␉␉␉␉␉␉␉␉// 7 = removable␊ |
92 | ␉UInt8␉␉VERSION;␉␉␉␉␉␉␉// 7/6 = ISO/IEC, 5-3 = ECMA, 2-0 = ANSI.␊ |
93 | ␉UInt8␉␉RESPONSE_DATA_FORMAT;␉␉␉␉// 7 = AERC, 6 = Obsolete, 5 = NormACA, 4 = HiSup 3-0 = Response data format. (SPC-3 obsoletes AERC)␊ |
94 | ␉␉␉␉␉␉␉␉␉␉␉␉␉// If ANSI Version = 0, this is ATAPI and bits 7-4 = ATAPI version.␊ |
95 | ␉UInt8␉␉ADDITIONAL_LENGTH;␉␉␉␉␉// Number of additional bytes available in inquiry data␊ |
96 | ␉UInt8␉␉SCCSReserved;␉␉␉␉␉␉// SCC-2 device flag and reserved fields (SPC-3 adds PROTECT 3PC TPGS, and ACC)␊ |
97 | ␉UInt8␉␉flags1;␉␉␉␉␉␉␉␉// First byte of support flags (See SPC-3 section 6.4.2)␊ |
98 | ␉UInt8␉␉flags2;␉␉␉␉␉␉␉␉// Second byte of support flags (Byte 7) (See SPC-3 section 6.4.2)␊ |
99 | ␉char␉␉VENDOR_IDENTIFICATION[kINQUIRY_VENDOR_IDENTIFICATION_Length];␊ |
100 | ␉char␉␉PRODUCT_IDENTIFICATION[kINQUIRY_PRODUCT_IDENTIFICATION_Length];␊ |
101 | ␉char␉␉PRODUCT_REVISION_LEVEL[kINQUIRY_PRODUCT_REVISION_LEVEL_Length];␊ |
102 | } SCSICmd_INQUIRY_StandardData;␊ |
103 | typedef SCSICmd_INQUIRY_StandardData * SCSICmd_INQUIRY_StandardDataPtr;␊ |
104 | ␊ |
105 | ␊ |
106 | /*!␊ |
107 | @struct SCSICmd_INQUIRY_StandardDataAll␊ |
108 | @discussion␊ |
109 | This structure defines the all of the fields that can be returned in␊ |
110 | repsonse to the INQUIRy request for the standard data. There is no␊ |
111 | requirement as to how much of the additional data must be returned by a device.␊ |
112 | */␊ |
113 | typedef struct SCSICmd_INQUIRY_StandardDataAll␊ |
114 | {␊ |
115 | ␉UInt8␉␉PERIPHERAL_DEVICE_TYPE;␉␉␉␉// 7-5 = Qualifier. 4-0 = Device type.␊ |
116 | ␉UInt8␉␉RMB;␉␉␉␉␉␉␉␉// 7 = removable␊ |
117 | ␉UInt8␉␉VERSION;␉␉␉␉␉␉␉// 7/6 = ISO/IEC, 5-3 = ECMA, 2-0 = ANSI.␊ |
118 | ␉UInt8␉␉RESPONSE_DATA_FORMAT;␉␉␉␉// 7 = AERC, 6 = Obsolete, 5 = NormACA, 4 = HiSup 3-0 = Response data format.␊ |
119 | ␉␉␉␉␉␉␉␉␉␉␉␉␉// If ANSI Version = 0, this is ATAPI and bits 7-4 = ATAPI version.␊ |
120 | ␉UInt8␉␉ADDITIONAL_LENGTH;␉␉␉␉␉// Number of additional bytes available in inquiry data␊ |
121 | ␉UInt8␉␉SCCSReserved;␉␉␉␉␉␉// SCC-2 device flag and reserved fields␊ |
122 | ␉UInt8␉␉flags1;␉␉␉␉␉␉␉␉// First byte of support flags (Byte 6)␊ |
123 | ␉UInt8␉␉flags2;␉␉␉␉␉␉␉␉// Second byte of support flags (Byte 7)␊ |
124 | ␉char␉␉VENDOR_IDENTIFICATION[kINQUIRY_VENDOR_IDENTIFICATION_Length];␊ |
125 | ␉char␉␉PRODUCT_IDENTIFICATION[kINQUIRY_PRODUCT_IDENTIFICATION_Length];␊ |
126 | ␉char␉␉PRODUCT_REVISION_LEVEL[kINQUIRY_PRODUCT_REVISION_LEVEL_Length];␊ |
127 | ␉␊ |
128 | ␉// Following is the optional data that may be returned by a device.␊ |
129 | ␉UInt8␉␉VendorSpecific1[20];␊ |
130 | ␉UInt8␉␉flags3;␉␉␉␉␉␉␉␉// Third byte of support flags, mainly SPI-3 (Byte 56)␊ |
131 | ␉UInt8␉␉Reserved1;␊ |
132 | ␉UInt16␉␉VERSION_DESCRIPTOR[8];␊ |
133 | ␉UInt8␉␉Reserved2[22];␊ |
134 | ␉UInt8␉␉VendorSpecific2[160];␊ |
135 | } SCSICmd_INQUIRY_StandardDataAll;␊ |
136 | ␊ |
137 | ␊ |
138 | /*!␊ |
139 | @enum Peripheral Qualifier␊ |
140 | @discussion␊ |
141 | Inquiry Peripheral Qualifier definitions␊ |
142 | @constant kINQUIRY_PERIPHERAL_QUALIFIER_Connected␊ |
143 | Peripheral Device is connected.␊ |
144 | @constant kINQUIRY_PERIPHERAL_QUALIFIER_SupportedButNotConnected␊ |
145 | Peripheral Device is supported, but not connected.␊ |
146 | @constant kINQUIRY_PERIPHERAL_QUALIFIER_NotSupported␊ |
147 | Peripheral Device is not supported.␊ |
148 | @constant kINQUIRY_PERIPHERAL_QUALIFIER_Mask␊ |
149 | Mask to use for PERIPHERAL_DEVICE_TYPE field.␊ |
150 | */␊ |
151 | enum␊ |
152 | {␊ |
153 | ␉kINQUIRY_PERIPHERAL_QUALIFIER_Connected␉␉␉␉␉= 0x00,␊ |
154 | ␉kINQUIRY_PERIPHERAL_QUALIFIER_SupportedButNotConnected␉= 0x20,␊ |
155 | ␉kINQUIRY_PERIPHERAL_QUALIFIER_NotSupported␉␉␉␉= 0x60,␊ |
156 | ␉kINQUIRY_PERIPHERAL_QUALIFIER_Mask␉␉␉␉␉␉= 0xE0␊ |
157 | };␊ |
158 | ␊ |
159 | ␊ |
160 | /*!␊ |
161 | @enum Peripheral Device types␊ |
162 | @discussion␊ |
163 | Inquiry Peripheral Device type definitions␊ |
164 | @constant kINQUIRY_PERIPHERAL_TYPE_DirectAccessSBCDevice␊ |
165 | SBC Device.␊ |
166 | @constant kINQUIRY_PERIPHERAL_TYPE_SequentialAccessSSCDevice␊ |
167 | Sequential Access (Tape) SSC Device.␊ |
168 | @constant kINQUIRY_PERIPHERAL_TYPE_PrinterSSCDevice␊ |
169 | SSC Device.␊ |
170 | @constant kINQUIRY_PERIPHERAL_TYPE_ProcessorSPCDevice␊ |
171 | SPC Device.␊ |
172 | @constant kINQUIRY_PERIPHERAL_TYPE_WriteOnceSBCDevice␊ |
173 | SBC Device.␊ |
174 | @constant kINQUIRY_PERIPHERAL_TYPE_CDROM_MMCDevice␊ |
175 | MMC Device.␊ |
176 | @constant kINQUIRY_PERIPHERAL_TYPE_ScannerSCSI2Device␊ |
177 | SCSI2 Device.␊ |
178 | @constant kINQUIRY_PERIPHERAL_TYPE_OpticalMemorySBCDevice␊ |
179 | SBC Device.␊ |
180 | @constant kINQUIRY_PERIPHERAL_TYPE_MediumChangerSMCDevice␊ |
181 | SMC Device.␊ |
182 | @constant kINQUIRY_PERIPHERAL_TYPE_CommunicationsSSCDevice␊ |
183 | Comms SSC Device.␊ |
184 | @constant kINQUIRY_PERIPHERAL_TYPE_StorageArrayControllerSCC2Device␊ |
185 | SCC2 Device.␊ |
186 | @constant kINQUIRY_PERIPHERAL_TYPE_EnclosureServicesSESDevice␊ |
187 | SES Device.␊ |
188 | @constant kINQUIRY_PERIPHERAL_TYPE_SimplifiedDirectAccessRBCDevice␊ |
189 | RBC Device.␊ |
190 | @constant kINQUIRY_PERIPHERAL_TYPE_OpticalCardReaderOCRWDevice␊ |
191 | OCRW Device.␊ |
192 | @constant kINQUIRY_PERIPHERAL_TYPE_ObjectBasedStorageDevice␊ |
193 | OSD device.␊ |
194 | @constant kINQUIRY_PERIPHERAL_TYPE_AutomationDriveInterface␊ |
195 | Automation Drive Interface device.␊ |
196 | @constant kINQUIRY_PERIPHERAL_TYPE_WellKnownLogicalUnit␊ |
197 | Well known logical unit.␊ |
198 | @constant kINQUIRY_PERIPHERAL_TYPE_UnknownOrNoDeviceType␊ |
199 | Unknown or no device.␊ |
200 | @constant kINQUIRY_PERIPHERAL_TYPE_Mask␊ |
201 | Mask to use for PERIPHERAL_DEVICE_TYPE field.␊ |
202 | */␊ |
203 | enum␊ |
204 | {␊ |
205 | ␉kINQUIRY_PERIPHERAL_TYPE_DirectAccessSBCDevice␉␉␉␉= 0x00,␊ |
206 | ␉kINQUIRY_PERIPHERAL_TYPE_SequentialAccessSSCDevice␉␉␉= 0x01,␊ |
207 | ␉kINQUIRY_PERIPHERAL_TYPE_PrinterSSCDevice␉␉␉␉␉= 0x02,␊ |
208 | ␉kINQUIRY_PERIPHERAL_TYPE_ProcessorSPCDevice␉␉␉␉␉= 0x03,␊ |
209 | ␉kINQUIRY_PERIPHERAL_TYPE_WriteOnceSBCDevice␉␉␉␉␉= 0x04,␊ |
210 | ␉kINQUIRY_PERIPHERAL_TYPE_CDROM_MMCDevice␉␉␉␉␉= 0x05,␊ |
211 | ␉kINQUIRY_PERIPHERAL_TYPE_ScannerSCSI2Device␉␉␉␉␉= 0x06,␊ |
212 | ␉kINQUIRY_PERIPHERAL_TYPE_OpticalMemorySBCDevice␉␉␉␉= 0x07,␊ |
213 | ␉kINQUIRY_PERIPHERAL_TYPE_MediumChangerSMCDevice␉␉␉␉= 0x08,␊ |
214 | ␉kINQUIRY_PERIPHERAL_TYPE_CommunicationsSSCDevice␉␉␉= 0x09,␊ |
215 | ␉/* 0x0A - 0x0B ASC IT8 Graphic Arts Prepress Devices */␊ |
216 | ␉kINQUIRY_PERIPHERAL_TYPE_StorageArrayControllerSCC2Device␉= 0x0C,␊ |
217 | ␉kINQUIRY_PERIPHERAL_TYPE_EnclosureServicesSESDevice␉␉␉= 0x0D,␊ |
218 | ␉kINQUIRY_PERIPHERAL_TYPE_SimplifiedDirectAccessRBCDevice␉= 0x0E,␊ |
219 | ␉kINQUIRY_PERIPHERAL_TYPE_OpticalCardReaderOCRWDevice␉␉= 0x0F,␊ |
220 | ␉/* 0x10 - 0x1E Reserved Device Types */␊ |
221 | ␉kINQUIRY_PERIPHERAL_TYPE_ObjectBasedStorageDevice␉␉␉= 0x11,␊ |
222 | ␉kINQUIRY_PERIPHERAL_TYPE_AutomationDriveInterface␉␉␉= 0x12,␊ |
223 | ␉kINQUIRY_PERIPHERAL_TYPE_WellKnownLogicalUnit␉␉␉␉= 0x1E,␊ |
224 | ␉kINQUIRY_PERIPHERAL_TYPE_UnknownOrNoDeviceType␉␉␉␉= 0x1F,␊ |
225 | ␉␊ |
226 | ␉␊ |
227 | ␉kINQUIRY_PERIPHERAL_TYPE_Mask␉␉␉␉␉␉␉␉= 0x1F␊ |
228 | };␊ |
229 | ␊ |
230 | ␊ |
231 | /*!␊ |
232 | @enum Removable Bit field definitions␊ |
233 | @discussion␊ |
234 | Inquiry Removable Bit field definitions␊ |
235 | @constant kINQUIRY_PERIPHERAL_RMB_MediumFixed␊ |
236 | Medium type is fixed disk.␊ |
237 | @constant kINQUIRY_PERIPHERAL_RMB_MediumRemovable␊ |
238 | Medium type is removable disk.␊ |
239 | @constant kINQUIRY_PERIPHERAL_RMB_BitMask␊ |
240 | Mask to use for RMB field.␊ |
241 | */␊ |
242 | enum␊ |
243 | {␊ |
244 | ␉kINQUIRY_PERIPHERAL_RMB_MediumFixed ␉␉␉␉␉␉= 0x00,␊ |
245 | ␉kINQUIRY_PERIPHERAL_RMB_MediumRemovable ␉␉␉␉␉= 0x80,␊ |
246 | ␉kINQUIRY_PERIPHERAL_RMB_BitMask ␉␉␉␉␉␉␉= 0x80␊ |
247 | };␊ |
248 | ␊ |
249 | ␊ |
250 | /*!␊ |
251 | @enum Version field definitions␊ |
252 | @discussion␊ |
253 | Definitions for bits/masks in the INQUIRY Version field.␊ |
254 | @constant kINQUIRY_ISO_IEC_VERSION_Mask␊ |
255 | Mask for valid bits for ISO/IEC Version.␊ |
256 | @constant kINQUIRY_ECMA_VERSION_Mask␊ |
257 | Mask for valid bits for ECMA Version.␊ |
258 | @constant kINQUIRY_ANSI_VERSION_NoClaimedConformance␊ |
259 | No ANSI conformance claimed by the device server.␊ |
260 | @constant kINQUIRY_ANSI_VERSION_SCSI_1_Compliant␊ |
261 | SCSI-1 conformance claimed by the device server.␊ |
262 | @constant kINQUIRY_ANSI_VERSION_SCSI_2_Compliant␊ |
263 | SCSI-2 conformance claimed by the device server.␊ |
264 | @constant kINQUIRY_ANSI_VERSION_SCSI_SPC_Compliant␊ |
265 | SPC conformance claimed by the device server.␊ |
266 | @constant kINQUIRY_ANSI_VERSION_SCSI_SPC_2_Compliant␊ |
267 | SPC-2 conformance claimed by the device server.␊ |
268 | @constant kINQUIRY_ANSI_VERSION_SCSI_SPC_3_Compliant␊ |
269 | SPC-3 conformance claimed by the device server.␊ |
270 | @constant kINQUIRY_ANSI_VERSION_Mask␊ |
271 | Mask for valid bits for ANSI Version.␊ |
272 | */␊ |
273 | enum␊ |
274 | {␊ |
275 | ␉kINQUIRY_ISO_IEC_VERSION_Mask␉␉␉␉␉␉␉␉= 0xC0,␊ |
276 | ␉␊ |
277 | ␉kINQUIRY_ECMA_VERSION_Mask␉␉␉␉␉␉␉␉␉= 0x38,␊ |
278 | ␉␊ |
279 | ␉kINQUIRY_ANSI_VERSION_NoClaimedConformance␉␉␉␉␉= 0x00,␊ |
280 | ␉kINQUIRY_ANSI_VERSION_SCSI_1_Compliant␉␉␉␉␉␉= 0x01,␊ |
281 | ␉kINQUIRY_ANSI_VERSION_SCSI_2_Compliant␉␉␉␉␉␉= 0x02,␊ |
282 | ␉kINQUIRY_ANSI_VERSION_SCSI_SPC_Compliant␉␉␉␉␉= 0x03,␊ |
283 | ␉kINQUIRY_ANSI_VERSION_SCSI_SPC_2_Compliant␉␉␉␉␉= 0x04,␊ |
284 | ␉kINQUIRY_ANSI_VERSION_SCSI_SPC_3_Compliant␉␉␉␉␉= 0x05,␊ |
285 | ␉kINQUIRY_ANSI_VERSION_Mask␉␉␉␉␉␉␉␉␉= 0x07␊ |
286 | };␊ |
287 | ␊ |
288 | ␊ |
289 | /*!␊ |
290 | @enum Response Data Format field definitions␊ |
291 | @discussion␊ |
292 | Definitions for bits/masks in the INQUIRY RESPONSE_DATA_FORMAT field.␊ |
293 | @constant kINQUIRY_Byte3_HISUP_Bit␊ |
294 | HISUP bit definition.␊ |
295 | @constant kINQUIRY_Byte3_NORMACA_Bit␊ |
296 | NORMACA bit definition.␊ |
297 | @constant kINQUIRY_Byte3_AERC_Bit␊ |
298 | AERC bit definition.␊ |
299 | @constant kINQUIRY_RESPONSE_DATA_FORMAT_Mask␊ |
300 | Mask for valid bits for RESPONSE_DATA_FORMAT.␊ |
301 | @constant kINQUIRY_Byte3_HISUP_Mask␊ |
302 | Mask to use to test the HISUP bit.␊ |
303 | @constant kINQUIRY_Byte3_NORMACA_Mask␊ |
304 | Mask to use to test the NORMACA bit.␊ |
305 | @constant kINQUIRY_Byte3_AERC_Mask␊ |
306 | Mask to use to test the AERC bit.␊ |
307 | */␊ |
308 | enum␊ |
309 | {␊ |
310 | ␉// Bit definitions␊ |
311 | ␉// Bits 0-3: RESPONSE DATA FORMAT␊ |
312 | ␉kINQUIRY_Byte3_HISUP_Bit␉␉␉␉= 4,␊ |
313 | ␉kINQUIRY_Byte3_NORMACA_Bit␉␉␉␉= 5,␊ |
314 | ␉// Bit 6 is Obsolete␊ |
315 | ␉kINQUIRY_Byte3_AERC_Bit␉␉␉␉␉= 7,␊ |
316 | ␉␊ |
317 | ␉// Masks␊ |
318 | ␉kINQUIRY_RESPONSE_DATA_FORMAT_Mask␉␉= 0x0F, // Bits 0-3␊ |
319 | ␉kINQUIRY_Byte3_HISUP_Mask␉␉␉␉= (1 << kINQUIRY_Byte3_HISUP_Bit),␊ |
320 | ␉kINQUIRY_Byte3_NORMACA_Mask␉␉␉␉= (1 << kINQUIRY_Byte3_NORMACA_Bit),␊ |
321 | ␉// Bit 6 is Obsolete␊ |
322 | ␉kINQUIRY_Byte3_AERC_Mask␉␉␉␉= (1 << kINQUIRY_Byte3_AERC_Bit)␊ |
323 | };␊ |
324 | ␊ |
325 | ␊ |
326 | /*!␊ |
327 | @enum SCCS field definitions␊ |
328 | @discussion␊ |
329 | Definitions for bits/masks in the INQUIRY SCCSReserved field.␊ |
330 | @constant kINQUIRY_Byte5_SCCS_Bit␊ |
331 | SCCS bit definition.␊ |
332 | @constant kINQUIRY_Byte5_ACC_Bit␊ |
333 | ACC bit definition.␊ |
334 | @constant kINQUIRY_Byte5_3PC_Bit␊ |
335 | 3PC bit definition.␊ |
336 | @constant kINQUIRY_Byte5_PROTECT_Bit␊ |
337 | PROTECT bit definition.␊ |
338 | @constant kINQUIRY_Byte5_SCCS_Mask␊ |
339 | Mask to use to test the SCCS bit.␊ |
340 | @constant kINQUIRY_Byte5_ACC_Mask␊ |
341 | Mask to use to test the ACC bit.␊ |
342 | @constant kINQUIRY_Byte5_TPGS_Mask␊ |
343 | Mask to use for the TPGS bits.␊ |
344 | @constant kINQUIRY_Byte5_3PC_Mask␊ |
345 | Mask to use to test the 3PC bit.␊ |
346 | @constant kINQUIRY_Byte5_PROTECT_Mask␊ |
347 | Mask to use to test the PROTECT bit.␊ |
348 | */␊ |
349 | enum␊ |
350 | {␊ |
351 | ␉// Bit definitions␊ |
352 | ␉kINQUIRY_Byte5_SCCS_Bit␉␉␉␉␉= 7,␊ |
353 | ␉kINQUIRY_Byte5_ACC_Bit␉␉␉␉␉= 6,␊ |
354 | ␉// Bits 4-5: TPGS␊ |
355 | ␉kINQUIRY_Byte5_3PC_Bit␉␉␉␉␉= 3,␊ |
356 | ␉// Bits 1-2: Reserved␊ |
357 | ␉kINQUIRY_Byte5_PROTECT_Bit␉␉␉␉= 0,␊ |
358 | ␉␊ |
359 | ␉// Masks␊ |
360 | ␉kINQUIRY_Byte5_SCCS_Mask␉␉␉␉= (1 << kINQUIRY_Byte5_SCCS_Bit),␊ |
361 | ␉kINQUIRY_Byte5_ACC_Mask␉␉␉␉␉= (1 << kINQUIRY_Byte5_ACC_Bit),␊ |
362 | ␉kINQUIRY_Byte5_TPGS_Mask␉␉␉␉= 0x18,␊ |
363 | ␉kINQUIRY_Byte5_3PC_Mask␉␉␉␉␉= (1 << kINQUIRY_Byte5_3PC_Bit),␊ |
364 | ␉// Bits 1-2: Reserved␊ |
365 | ␉kINQUIRY_Byte5_PROTECT_Mask␉␉␉␉= (1 << kINQUIRY_Byte5_PROTECT_Bit)␊ |
366 | };␊ |
367 | ␊ |
368 | ␊ |
369 | /*!␊ |
370 | @enum flags1 field definitions␊ |
371 | @discussion␊ |
372 | Definitions for bits/masks in the INQUIRY flags1 field.␊ |
373 | @constant kINQUIRY_Byte6_ADDR16_Bit␊ |
374 | ADDR16 bit definition.␊ |
375 | @constant kINQUIRY_Byte6_MCHNGR_Bit␊ |
376 | MCHNGR bit definition.␊ |
377 | @constant kINQUIRY_Byte6_MULTIP_Bit␊ |
378 | MULTIP bit definition.␊ |
379 | @constant kINQUIRY_Byte6_VS_Bit␊ |
380 | VS bit definition.␊ |
381 | @constant kINQUIRY_Byte6_ENCSERV_Bit␊ |
382 | ENCSERV bit definition.␊ |
383 | @constant kINQUIRY_Byte6_BQUE_Bit␊ |
384 | BQUE bit definition.␊ |
385 | @constant kINQUIRY_Byte6_ADDR16_Mask␊ |
386 | Mask to use to test the ADDR16 bit.␊ |
387 | @constant kINQUIRY_Byte6_MCHNGR_Mask␊ |
388 | Mask to use to test the MCHNGR bit.␊ |
389 | @constant kINQUIRY_Byte6_MULTIP_Mask␊ |
390 | Mask to use to test the MULTIP bit.␊ |
391 | @constant kINQUIRY_Byte6_VS_Mask␊ |
392 | Mask to use to test the VS bit.␊ |
393 | @constant kINQUIRY_Byte6_ENCSERV_Mask␊ |
394 | Mask to use to test the ENCSERV bit.␊ |
395 | @constant kINQUIRY_Byte6_BQUE_Mask␊ |
396 | Mask to use to test the BQUE bit.␊ |
397 | */␊ |
398 | enum␊ |
399 | {␊ |
400 | ␉// Byte offset␊ |
401 | ␉kINQUIRY_Byte6_Offset␉␉␉␉␉= 6,␊ |
402 | ␉␊ |
403 | ␉// Bit definitions␊ |
404 | ␉kINQUIRY_Byte6_ADDR16_Bit␉␉␉␉= 0,␉// SPI Specific␊ |
405 | ␉// Bit 1 is Obsolete␊ |
406 | ␉// Bit 2 is Obsolete␊ |
407 | ␉kINQUIRY_Byte6_MCHNGR_Bit␉␉␉␉= 3,␊ |
408 | ␉kINQUIRY_Byte6_MULTIP_Bit␉␉␉␉= 4,␊ |
409 | ␉kINQUIRY_Byte6_VS_Bit␉␉␉␉␉= 5,␉␊ |
410 | ␉kINQUIRY_Byte6_ENCSERV_Bit␉␉␉␉= 6,␉␊ |
411 | ␉kINQUIRY_Byte6_BQUE_Bit␉␉␉␉␉= 7,␉␊ |
412 | ␊ |
413 | ␉// Masks␊ |
414 | ␉kINQUIRY_Byte6_ADDR16_Mask␉␉␉␉= (1 << kINQUIRY_Byte6_ADDR16_Bit),␉// SPI Specific␊ |
415 | ␉// Bit 1 is Obsolete␊ |
416 | ␉// Bit 2 is Obsolete␊ |
417 | ␉kINQUIRY_Byte6_MCHNGR_Mask␉␉␉␉= (1 << kINQUIRY_Byte6_MCHNGR_Bit),␊ |
418 | ␉kINQUIRY_Byte6_MULTIP_Mask␉␉␉␉= (1 << kINQUIRY_Byte6_MULTIP_Bit),␊ |
419 | ␉kINQUIRY_Byte6_VS_Mask␉␉␉␉␉= (1 << kINQUIRY_Byte6_VS_Bit),␊ |
420 | ␉kINQUIRY_Byte6_ENCSERV_Mask␉␉␉␉= (1 << kINQUIRY_Byte6_ENCSERV_Bit),␊ |
421 | ␉kINQUIRY_Byte6_BQUE_Mask␉␉␉␉= (1 << kINQUIRY_Byte6_BQUE_Bit)␊ |
422 | };␊ |
423 | ␊ |
424 | ␊ |
425 | /*!␊ |
426 | @enum flags2 field definitions␊ |
427 | @discussion␊ |
428 | Definitions for bits/masks in the INQUIRY flags2 field.␊ |
429 | @constant kINQUIRY_Byte7_VS_Bit␊ |
430 | VS bit definition.␊ |
431 | @constant kINQUIRY_Byte7_CMDQUE_Bit␊ |
432 | CMDQUE bit definition.␊ |
433 | @constant kINQUIRY_Byte7_TRANDIS_Bit␊ |
434 | TRANDIS bit definition.␊ |
435 | @constant kINQUIRY_Byte7_LINKED_Bit␊ |
436 | LINKED bit definition.␊ |
437 | @constant kINQUIRY_Byte7_SYNC_Bit␊ |
438 | SYNC bit definition.␊ |
439 | @constant kINQUIRY_Byte7_WBUS16_Bit␊ |
440 | WBUS16 bit definition.␊ |
441 | @constant kINQUIRY_Byte7_RELADR_Bit␊ |
442 | RELADR bit definition.␊ |
443 | @constant kINQUIRY_Byte7_VS_Mask␊ |
444 | Mask to use to test the VS bit.␊ |
445 | @constant kINQUIRY_Byte7_CMDQUE_Mask␊ |
446 | Mask to use to test the CMDQUE bit.␊ |
447 | @constant kINQUIRY_Byte7_TRANDIS_Mask␊ |
448 | Mask to use to test the TRANDIS bit.␊ |
449 | @constant kINQUIRY_Byte7_LINKED_Mask␊ |
450 | Mask to use to test the LINKED bit.␊ |
451 | @constant kINQUIRY_Byte7_SYNC_Mask␊ |
452 | Mask to use to test the SYNC bit.␊ |
453 | @constant kINQUIRY_Byte7_WBUS16_Mask␊ |
454 | Mask to use to test the WBUS16 bit.␊ |
455 | @constant kINQUIRY_Byte7_RELADR_Mask␊ |
456 | Mask to use to test the RELADR bit.␊ |
457 | */␊ |
458 | enum␊ |
459 | {␊ |
460 | ␉// Byte offset␊ |
461 | ␉kINQUIRY_Byte7_Offset␉␉␉␉␉= 7,␊ |
462 | ␉␊ |
463 | ␉// Bit definitions␊ |
464 | ␉kINQUIRY_Byte7_VS_Bit␉␉␉␉␉= 0,␊ |
465 | ␉kINQUIRY_Byte7_CMDQUE_Bit␉␉␉␉= 1,␊ |
466 | ␉kINQUIRY_Byte7_TRANDIS_Bit␉␉␉␉= 2,␉// SPI Specific␊ |
467 | ␉kINQUIRY_Byte7_LINKED_Bit␉␉␉␉= 3,␊ |
468 | ␉kINQUIRY_Byte7_SYNC_Bit␉␉␉␉␉= 4,␉// SPI Specific␊ |
469 | ␉kINQUIRY_Byte7_WBUS16_Bit␉␉␉␉= 5,␉// SPI Specific␊ |
470 | ␉// Bit 6 is Obsolete␊ |
471 | ␉kINQUIRY_Byte7_RELADR_Bit␉␉␉␉= 7,␊ |
472 | ␉␊ |
473 | ␉// Masks␊ |
474 | ␉kINQUIRY_Byte7_VS_Mask␉␉␉␉␉= (1 << kINQUIRY_Byte7_VS_Bit),␊ |
475 | ␉kINQUIRY_Byte7_CMDQUE_Mask␉␉␉␉= (1 << kINQUIRY_Byte7_CMDQUE_Bit),␊ |
476 | ␉kINQUIRY_Byte7_TRANDIS_Mask␉␉␉␉= (1 << kINQUIRY_Byte7_TRANDIS_Bit),// SPI Specific␊ |
477 | ␉kINQUIRY_Byte7_LINKED_Mask␉␉␉␉= (1 << kINQUIRY_Byte7_LINKED_Bit),␊ |
478 | ␉kINQUIRY_Byte7_SYNC_Mask␉␉␉␉= (1 << kINQUIRY_Byte7_SYNC_Bit),␉// SPI Specific␊ |
479 | ␉kINQUIRY_Byte7_WBUS16_Mask␉␉␉␉= (1 << kINQUIRY_Byte7_WBUS16_Bit),␉// SPI Specific␊ |
480 | ␉// Bit 6 is Obsolete␊ |
481 | ␉kINQUIRY_Byte7_RELADR_Mask␉␉␉␉= (1 << kINQUIRY_Byte7_RELADR_Bit)␊ |
482 | };␊ |
483 | ␊ |
484 | ␊ |
485 | /*!␊ |
486 | @enum Byte 56 features field definitions␊ |
487 | @discussion␊ |
488 | Definitions for bits/masks in the INQUIRY Byte 56 field.␊ |
489 | Inquiry Byte 56 features (for devices that report an ANSI VERSION of␊ |
490 | kINQUIRY_ANSI_VERSION_SCSI_SPC_Compliant or later).␊ |
491 | These are SPI-3 Specific.␊ |
492 | @constant kINQUIRY_Byte56_IUS_Bit␊ |
493 | IUS bit definition.␊ |
494 | @constant kINQUIRY_Byte56_QAS_Bit␊ |
495 | QAS bit definition.␊ |
496 | @constant kINQUIRY_Byte56_IUS_Mask␊ |
497 | Mask to use to test the IUS bit.␊ |
498 | @constant kINQUIRY_Byte56_QAS_Mask␊ |
499 | Mask to use to test the QAS bit.␊ |
500 | @constant kINQUIRY_Byte56_CLOCKING_Mask␊ |
501 | Mask to use to test CLOCKING bits.␊ |
502 | @constant kINQUIRY_Byte56_CLOCKING_ONLY_ST␊ |
503 | Single-transition clocking only.␊ |
504 | @constant kINQUIRY_Byte56_CLOCKING_ONLY_DT␊ |
505 | Double-transition clocking only.␊ |
506 | @constant kINQUIRY_Byte56_CLOCKING_ST_AND_DT␊ |
507 | Single-transition and double-transition clocking.␊ |
508 | */␊ |
509 | enum␊ |
510 | {␊ |
511 | ␉// Byte offset␊ |
512 | ␉kINQUIRY_Byte56_Offset␉␉␉␉␉= 56,␊ |
513 | ␊ |
514 | ␉// Bit definitions␊ |
515 | ␉kINQUIRY_Byte56_IUS_Bit␉␉␉␉␉= 0,␊ |
516 | ␉kINQUIRY_Byte56_QAS_Bit␉␉␉␉␉= 1,␊ |
517 | ␉// Bits 2 and 3 are the CLOCKING bits␊ |
518 | ␉// All other bits are reserved␊ |
519 | ␉␊ |
520 | ␉kINQUIRY_Byte56_IUS_Mask␉␉␉␉= (1 << kINQUIRY_Byte56_IUS_Bit),␊ |
521 | ␉kINQUIRY_Byte56_QAS_Mask␉␉␉␉= (1 << kINQUIRY_Byte56_QAS_Bit),␊ |
522 | ␉kINQUIRY_Byte56_CLOCKING_Mask␉␉␉= 0x0C,␊ |
523 | ␊ |
524 | ␉// Definitions for the CLOCKING bits␊ |
525 | ␉kINQUIRY_Byte56_CLOCKING_ONLY_ST␉␉= 0x00,␊ |
526 | ␉kINQUIRY_Byte56_CLOCKING_ONLY_DT␉␉= 0x04,␊ |
527 | ␉// kINQUIRY_Byte56_CLOCKING_RESERVED␉= 0x08,␊ |
528 | ␉kINQUIRY_Byte56_CLOCKING_ST_AND_DT␉␉= 0x0C␊ |
529 | };␊ |
530 | ␊ |
531 | ␊ |
532 | /*!␊ |
533 | @define kINQUIRY_VERSION_DESCRIPTOR_MaxCount␊ |
534 | Maximum number of INQUIRY version descriptors supported.␊ |
535 | */␊ |
536 | #define␉kINQUIRY_VERSION_DESCRIPTOR_MaxCount␉␉8␊ |
537 | ␊ |
538 | ␊ |
539 | /*!␊ |
540 | @enum kINQUIRY_VERSION_DESCRIPTOR_SAT␊ |
541 | SAT specification version descriptor.␊ |
542 | */␊ |
543 | enum␊ |
544 | {␊ |
545 | ␉kINQUIRY_VERSION_DESCRIPTOR_SAT␉␉␉␉␉= 0x1EA0␊ |
546 | };␊ |
547 | ␊ |
548 | ␊ |
549 | /*␊ |
550 | IORegistry property names for information derived from the Inquiry data.␊ |
551 | The Peripheral Device Type is the only property that the ␊ |
552 | generic Logical Unit Drivers will use to match. These properties are␊ |
553 | listed in order of matching priority. First is the Peripheral Device Type.␊ |
554 | Second is the Vendor Identification. Third is the Product Identification.␊ |
555 | Last is the Product Revision Level. To match a particular product, you would␊ |
556 | specify the Peripheral Device Type, Vendor Identification, and Product␊ |
557 | Identification. To restrict the match to a particular firmware revision, you␊ |
558 | would add the Product Revision Level. To not match on a particular product,␊ |
559 | but on a particular vendor's products, you would only include the ␊ |
560 | Peripheral Device Type and the Vendor Identification.␊ |
561 | */␊ |
562 | ␊ |
563 | /*!␊ |
564 | @define kIOPropertySCSIPeripheralDeviceType␊ |
565 | SCSI Peripheral Device Type as reported in the INQUIRY data.␊ |
566 | */␊ |
567 | #define kIOPropertySCSIPeripheralDeviceType␉␉␉"Peripheral Device Type"␊ |
568 | ␊ |
569 | /*!␊ |
570 | @define kIOPropertySCSIPeripheralDeviceTypeSize␊ |
571 | Size of the kIOPropertySCSIPeripheralDeviceType key.␊ |
572 | */␊ |
573 | #define kIOPropertySCSIPeripheralDeviceTypeSize␉␉8␊ |
574 | ␊ |
575 | /* These properties are listed in order of matching priority */␊ |
576 | ␊ |
577 | /*!␊ |
578 | @define kIOPropertySCSIVendorIdentification␊ |
579 | Vendor ID as reported in the INQUIRY data. Additional space characters (0x20)␊ |
580 | are truncated.␊ |
581 | */␊ |
582 | #define kIOPropertySCSIVendorIdentification␉␉␉"Vendor Identification"␊ |
583 | ␊ |
584 | /*!␊ |
585 | @define kIOPropertySCSIProductIdentification␊ |
586 | Product ID as reported in the INQUIRY data. Additional space characters (0x20)␊ |
587 | are truncated.␊ |
588 | */␊ |
589 | #define kIOPropertySCSIProductIdentification␉␉"Product Identification"␊ |
590 | ␊ |
591 | /*!␊ |
592 | @define kIOPropertySCSIProductRevisionLevel␊ |
593 | Product Revision Level as reported in the INQUIRY data.␊ |
594 | */␊ |
595 | #define kIOPropertySCSIProductRevisionLevel␉␉␉"Product Revision Level"␊ |
596 | ␊ |
597 | ␊ |
598 | /*!␊ |
599 | @enum INQUIRY Page Codes␊ |
600 | @discussion INQUIRY Page Codes to be used when EVPD is set in the␊ |
601 | INQUIRY command.␊ |
602 | @constant kINQUIRY_Page00_PageCode␊ |
603 | Page Code 00h.␊ |
604 | @constant kINQUIRY_Page80_PageCode␊ |
605 | Page Code 80h.␊ |
606 | @constant kINQUIRY_Page83_PageCode␊ |
607 | Page Code 83h.␊ |
608 | @constant kINQUIRY_Page89_PageCode␊ |
609 | Page Code 89h.␊ |
610 | */␊ |
611 | enum␊ |
612 | {␊ |
613 | ␉kINQUIRY_Page00_PageCode␉␉␉␉= 0x00,␊ |
614 | ␉kINQUIRY_Page80_PageCode␉␉␉␉= 0x80,␊ |
615 | ␉kINQUIRY_Page83_PageCode␉␉␉␉= 0x83,␊ |
616 | ␉kINQUIRY_Page89_PageCode␉␉␉␉= 0x89␊ |
617 | };␉␊ |
618 | ␊ |
619 | ␊ |
620 | /*!␊ |
621 | @struct SCSICmd_INQUIRY_Page00_Header␊ |
622 | @discussion INQUIRY Page 00h Header.␊ |
623 | */␊ |
624 | typedef struct SCSICmd_INQUIRY_Page00_Header␊ |
625 | {␊ |
626 | ␉UInt8␉␉PERIPHERAL_DEVICE_TYPE;␉␉␉␉// 7-5 = Qualifier. 4-0 = Device type.␊ |
627 | ␉UInt8␉␉PAGE_CODE;␉␉␉␉␉␉␉// Must be equal to 00h␊ |
628 | ␉UInt8␉␉RESERVED;␉␉␉␉␉␉␉// reserved field␊ |
629 | ␉UInt8␉␉PAGE_LENGTH;␉␉␉␉␉␉// n-3 bytes␊ |
630 | } SCSICmd_INQUIRY_Page00_Header;␊ |
631 | ␊ |
632 | ␊ |
633 | /*!␊ |
634 | @struct SCSICmd_INQUIRY_Page80_Header␊ |
635 | @discussion INQUIRY Page 80h Header.␊ |
636 | */␊ |
637 | typedef struct SCSICmd_INQUIRY_Page80_Header␊ |
638 | {␊ |
639 | ␉UInt8␉␉PERIPHERAL_DEVICE_TYPE;␉␉␉␉// 7-5 = Qualifier. 4-0 = Device type.␊ |
640 | ␉UInt8␉␉PAGE_CODE;␉␉␉␉␉␉␉// Must be equal to 80h␊ |
641 | ␉UInt8␉␉RESERVED;␉␉␉␉␉␉␉// reserved field␊ |
642 | ␉UInt8␉␉PAGE_LENGTH;␉␉␉␉␉␉// n-3 bytes␊ |
643 | ␉UInt8␉␉PRODUCT_SERIAL_NUMBER;␉␉␉␉// 4-n␊ |
644 | } SCSICmd_INQUIRY_Page80_Header;␊ |
645 | ␊ |
646 | ␊ |
647 | /*!␊ |
648 | @define kIOPropertySCSIINQUIRYUnitSerialNumber␊ |
649 | Key that describes the INQUIRY Unit Serial Number in the IORegistry.␊ |
650 | */␊ |
651 | #define kIOPropertySCSIINQUIRYUnitSerialNumber␉␉"INQUIRY Unit Serial Number"␊ |
652 | ␊ |
653 | ␊ |
654 | /*!␊ |
655 | @struct SCSICmd_INQUIRY_Page83_Header␊ |
656 | @discussion INQUIRY Page 83h Header.␊ |
657 | */␊ |
658 | typedef struct SCSICmd_INQUIRY_Page83_Header␊ |
659 | {␊ |
660 | ␉UInt8␉␉PERIPHERAL_DEVICE_TYPE;␉␉␉␉// 7-5 = Qualifier. 4-0 = Device type.␊ |
661 | ␉UInt8␉␉PAGE_CODE;␉␉␉␉␉␉␉// Must be equal to 83h␊ |
662 | ␉UInt8␉␉RESERVED;␉␉␉␉␉␉␉// reserved field␊ |
663 | ␉UInt8␉␉PAGE_LENGTH;␉␉␉␉␉␉// n-3 bytes␊ |
664 | } SCSICmd_INQUIRY_Page83_Header;␊ |
665 | ␊ |
666 | ␊ |
667 | /*!␊ |
668 | @struct SCSICmd_INQUIRY_Page83_Header_SPC_16␊ |
669 | @discussion INQUIRY Page 83h Header used with the 16 byte INQUIRY command.␊ |
670 | */␊ |
671 | typedef struct SCSICmd_INQUIRY_Page83_Header_SPC_16␊ |
672 | {␊ |
673 | ␉UInt8␉␉PERIPHERAL_DEVICE_TYPE;␉␉␉␉// 7-5 = Qualifier. 4-0 = Device type.␊ |
674 | ␉UInt8␉␉PAGE_CODE;␉␉␉␉␉␉␉// Must be equal to 83h␊ |
675 | ␉UInt16␉␉PAGE_LENGTH;␉␉␉␉␉␉// n-3 bytes␊ |
676 | } SCSICmd_INQUIRY_Page83_Header_SPC_16;␊ |
677 | ␊ |
678 | ␊ |
679 | /*!␊ |
680 | @struct SCSICmd_INQUIRY_Page83_Identification_Descriptor␊ |
681 | @discussion INQUIRY Page 83h Identification Descriptor.␊ |
682 | */␊ |
683 | typedef struct SCSICmd_INQUIRY_Page83_Identification_Descriptor␊ |
684 | {␊ |
685 | ␉UInt8␉␉CODE_SET;␉␉␉␉␉␉␉// 7-4 = Protocol Identifier. 3-0 = Code Set␊ |
686 | ␉UInt8␉␉IDENTIFIER_TYPE;␉␉␉␉␉// 7 = PIV 5-4 = ASSOCIATION 3-0 = Identifier␊ |
687 | ␉UInt8␉␉RESERVED;␉␉␉␉␉␉␉␊ |
688 | ␉UInt8␉␉IDENTIFIER_LENGTH;␊ |
689 | ␉UInt8␉␉IDENTIFIER;␊ |
690 | } SCSICmd_INQUIRY_Page83_Identification_Descriptor;␊ |
691 | ␊ |
692 | ␊ |
693 | /*!␊ |
694 | @enum INQUIRY Page 83h Code Set␊ |
695 | @discussion␊ |
696 | Definitions for the Code Set field.␊ |
697 | @constant kINQUIRY_Page83_CodeSetBinaryData␊ |
698 | The identifier contains binary data.␊ |
699 | @constant kINQUIRY_Page83_CodeSetASCIIData␊ |
700 | The identifier contains ASCII data.␊ |
701 | @constant kINQUIRY_Page83_CodeSetUTF8Data␊ |
702 | The identifier contains UTF-8 data.␊ |
703 | */␊ |
704 | enum␊ |
705 | {␊ |
706 | ␉kINQUIRY_Page83_CodeSetReserved␉␉␉= 0x0,␊ |
707 | ␉kINQUIRY_Page83_CodeSetBinaryData␉␉= 0x1,␊ |
708 | ␉kINQUIRY_Page83_CodeSetASCIIData␉␉= 0x2,␊ |
709 | ␉kINQUIRY_Page83_CodeSetUTF8Data␉␉␉= 0x3,␊ |
710 | ␉// 0x4 - 0xF reserved␊ |
711 | ␉kINQUIRY_Page83_CodeSetMask␉␉␉␉= 0xF␊ |
712 | };␉␊ |
713 | ␊ |
714 | ␊ |
715 | /*!␊ |
716 | @enum INQUIRY Page 83h Association␊ |
717 | @discussion␊ |
718 | Definitions for the Association field.␊ |
719 | @constant kINQUIRY_Page83_AssociationLogicalUnit␊ |
720 | Association of the identifier is with the logical unit.␊ |
721 | @constant kINQUIRY_Page83_AssociationDevice␊ |
722 | Association of the identifier is with the device (same as logical unit in SPC-2).␊ |
723 | @constant kINQUIRY_Page83_AssociationTargetPort␊ |
724 | Association of the identifier is with the target port.␊ |
725 | @constant kINQUIRY_Page83_AssociationTargetDevice␊ |
726 | Association of the identifier is with the target device (i.e. all ports).␊ |
727 | @constant kINQUIRY_Page83_AssociationMask␊ |
728 | Mask to use to determine association.␊ |
729 | */␊ |
730 | enum␊ |
731 | {␉␊ |
732 | ␉// SPC-3 - Association is changed to be specific to ␊ |
733 | ␉// Logical Units␊ |
734 | ␉kINQUIRY_Page83_AssociationLogicalUnit␉= 0x00,␊ |
735 | ␉␊ |
736 | ␉// Backwards compatibility for SPC-2␊ |
737 | ␉kINQUIRY_Page83_AssociationDevice ␉␉= kINQUIRY_Page83_AssociationLogicalUnit,␊ |
738 | ␉␊ |
739 | ␉// Association is related to a Target Port␊ |
740 | ␉kINQUIRY_Page83_AssociationTargetPort␉= 0x10,␊ |
741 | ␉␊ |
742 | ␉// SPC-3 - Added as specific association to␊ |
743 | ␉// a Target device.␊ |
744 | ␉kINQUIRY_Page83_AssociationTargetDevice␉= 0x20,␊ |
745 | ␉␊ |
746 | ␉kINQUIRY_Page83_AssociationMask␉␉␉= 0x30␊ |
747 | };␉␊ |
748 | ␉␉␊ |
749 | ␊ |
750 | /*!␊ |
751 | @enum INQUIRY Page 83h Identifier Type␊ |
752 | @discussion␊ |
753 | Definitions for the Identifier Type field.␊ |
754 | @constant kINQUIRY_Page83_IdentifierTypeUndefined␊ |
755 | Undefined Identifier Type.␊ |
756 | @constant kINQUIRY_Page83_IdentifierTypeVendorID␊ |
757 | Vendor Specific Identifier Type.␊ |
758 | @constant kINQUIRY_Page83_IdentifierTypeIEEE_EUI64␊ |
759 | EUI-64 Identifier Type.␊ |
760 | @constant kINQUIRY_Page83_IdentifierTypeNAAIdentifier␊ |
761 | NAA Identifier Type.␊ |
762 | @constant kINQUIRY_Page83_IdentifierTypeRelativePortIdentifier␊ |
763 | Relative Target Port Identifier Type.␊ |
764 | @constant kINQUIRY_Page83_IdentifierTypeTargetPortGroup␊ |
765 | Target Port Group Identifier Type.␊ |
766 | @constant kINQUIRY_Page83_IdentifierTypeLogicalUnitGroup␊ |
767 | Logical Unit Group Identifier Type.␊ |
768 | @constant kINQUIRY_Page83_IdentifierTypeMD5LogicalUnitIdentifier␊ |
769 | MD5 Logical Unit Identifier Type.␊ |
770 | @constant kINQUIRY_Page83_IdentifierTypeSCSINameString␊ |
771 | SCSI Name String Identifier Type.␊ |
772 | @constant kINQUIRY_Page83_IdentifierTypeMask␊ |
773 | Mask to use to determine association.␊ |
774 | @constant kINQUIRY_Page83_ProtocolIdentifierValidBit␊ |
775 | PIV Bit definition.␊ |
776 | @constant kINQUIRY_Page83_ProtocolIdentifierValidMask␊ |
777 | Mask to use to determine if PIV is set.␊ |
778 | */␊ |
779 | enum␊ |
780 | {␊ |
781 | ␉kINQUIRY_Page83_IdentifierTypeUndefined␉␉␉␉␉= 0,␊ |
782 | ␉kINQUIRY_Page83_IdentifierTypeVendorID␉␉␉␉␉= 1,␊ |
783 | ␉kINQUIRY_Page83_IdentifierTypeIEEE_EUI64␉␉␉␉= 2,␊ |
784 | ␉kINQUIRY_Page83_IdentifierTypeNAAIdentifier␉␉␉␉= 3,␊ |
785 | ␉kINQUIRY_Page83_IdentifierTypeRelativePortIdentifier␉= 4,␊ |
786 | ␉kINQUIRY_Page83_IdentifierTypeTargetPortGroup␉␉␉= 5,␊ |
787 | ␉kINQUIRY_Page83_IdentifierTypeLogicalUnitGroup␉␉␉= 6,␊ |
788 | ␉kINQUIRY_Page83_IdentifierTypeMD5LogicalUnitIdentifier = 7,␊ |
789 | ␉kINQUIRY_Page83_IdentifierTypeSCSINameString␉␉␉= 8,␊ |
790 | ␉// 0x9 - 0xF Reserved␊ |
791 | ␉␊ |
792 | ␉kINQUIRY_Page83_IdentifierTypeMask␉␉␉␉␉␉= 0xF,␊ |
793 | ␉␊ |
794 | ␉kINQUIRY_Page83_ProtocolIdentifierValidBit␉␉␉␉= 7,␊ |
795 | ␉kINQUIRY_Page83_ProtocolIdentifierValidMask␉␉␉␉= (1 << kINQUIRY_Page83_ProtocolIdentifierValidBit)␊ |
796 | ␉␊ |
797 | };␉␊ |
798 | ␊ |
799 | // Backwards compatibility␊ |
800 | #define kINQUIRY_Page83_IdentifierTypeFCNameIdentifier␉␉kINQUIRY_Page83_IdentifierTypeNAAIdentifier␊ |
801 | ␊ |
802 | ␊ |
803 | /*!␊ |
804 | @enum Protocol Identifier values␊ |
805 | @discussion␊ |
806 | Definitions for the protocol identifier values.␊ |
807 | @constant kSCSIProtocolIdentifier_FibreChannel␊ |
808 | FibreChannel Protocol Identifier.␊ |
809 | @constant kSCSIProtocolIdentifier_ParallelSCSI␊ |
810 | Parallel SCSI Protocol Identifier.␊ |
811 | @constant kSCSIProtocolIdentifier_SSA␊ |
812 | SSA Protocol Identifier.␊ |
813 | @constant kSCSIProtocolIdentifier_FireWire␊ |
814 | FireWire (IEEE-1394) Protocol Identifier.␊ |
815 | @constant kSCSIProtocolIdentifier_RDMA␊ |
816 | RDMA Protocol Identifier.␊ |
817 | @constant kSCSIProtocolIdentifier_iSCSI␊ |
818 | iSCSI Protocol Identifier.␊ |
819 | @constant kSCSIProtocolIdentifier_SAS␊ |
820 | SAS Protocol Identifier.␊ |
821 | @constant kSCSIProtocolIdentifier_ADT␊ |
822 | ADT Protocol Identifier.␊ |
823 | @constant kSCSIProtocolIdentifier_ATAPI␊ |
824 | ATAPI Protocol Identifier.␊ |
825 | @constant kSCSIProtocolIdentifier_None␊ |
826 | No Protocol Identifier.␊ |
827 | */␊ |
828 | enum␊ |
829 | {␊ |
830 | ␉kSCSIProtocolIdentifier_FibreChannel␉␉␉␉␉= 0,␊ |
831 | ␉kSCSIProtocolIdentifier_ParallelSCSI␉␉␉␉␉= 1,␊ |
832 | ␉kSCSIProtocolIdentifier_SSA␉␉␉␉␉␉␉␉= 2,␊ |
833 | ␉kSCSIProtocolIdentifier_FireWire␉␉␉␉␉␉= 3,␊ |
834 | ␉kSCSIProtocolIdentifier_RDMA␉␉␉␉␉␉␉= 4,␊ |
835 | ␉kSCSIProtocolIdentifier_iSCSI␉␉␉␉␉␉␉= 5,␊ |
836 | ␉kSCSIProtocolIdentifier_SAS␉␉␉␉␉␉␉␉= 6,␊ |
837 | ␉kSCSIProtocolIdentifier_ADT␉␉␉␉␉␉␉␉= 7,␊ |
838 | ␉kSCSIProtocolIdentifier_ATAPI␉␉␉␉␉␉␉= 8,␊ |
839 | ␉// 0x9-0xE Reserved␊ |
840 | ␉kSCSIProtocolIdentifier_None␉␉␉␉␉␉␉= 0xF␊ |
841 | };␊ |
842 | ␊ |
843 | ␊ |
844 | /*!␊ |
845 | @define kIOPropertySCSIINQUIRYDeviceIdentification␊ |
846 | Device Identification key.␊ |
847 | */␊ |
848 | #define kIOPropertySCSIINQUIRYDeviceIdentification␉␉"INQUIRY Device Identification"␊ |
849 | ␊ |
850 | ␊ |
851 | /*!␊ |
852 | @define kIOPropertySCSIINQUIRYDeviceIdCodeSet␊ |
853 | Code Set type key.␊ |
854 | */␊ |
855 | #define kIOPropertySCSIINQUIRYDeviceIdCodeSet␉␉␉"Code Set"␊ |
856 | ␊ |
857 | ␊ |
858 | /*!␊ |
859 | @define kIOPropertySCSIINQUIRYDeviceIdType␊ |
860 | Identifier Type key.␊ |
861 | */␊ |
862 | #define kIOPropertySCSIINQUIRYDeviceIdType␉␉␉␉"Identifier Type"␊ |
863 | ␊ |
864 | ␊ |
865 | /*!␊ |
866 | @define kIOPropertySCSIINQUIRYDeviceIdAssociation␊ |
867 | Association key.␊ |
868 | */␊ |
869 | #define kIOPropertySCSIINQUIRYDeviceIdAssociation␉␉"Association"␊ |
870 | ␊ |
871 | ␊ |
872 | /*!␊ |
873 | @define kIOPropertySCSIINQUIRYDeviceIdentifier␊ |
874 | Identifier key (data or string).␊ |
875 | */␊ |
876 | #define kIOPropertySCSIINQUIRYDeviceIdentifier␉␉␉"Identifier"␊ |
877 | ␉␉␊ |
878 | ␊ |
879 | /*!␊ |
880 | @struct SCSICmd_INQUIRY_Page89_Data␊ |
881 | @discussion INQUIRY Page 89h data as defined in the SAT 1.0␊ |
882 | specification. This section contians all structures and␊ |
883 | definitions used by the INQUIRY command in response to a request␊ |
884 | for page 89h - ATA information VPD Page.␊ |
885 | */␊ |
886 | typedef struct SCSICmd_INQUIRY_Page89_Data␊ |
887 | {␊ |
888 | ␉UInt8␉␉PERIPHERAL_DEVICE_TYPE;␉␉␉␉// 7-5 = Qualifier. 4-0 = Device type.␊ |
889 | ␉UInt8␉␉PAGE_CODE;␉␉␉␉␉␉␉// Must be equal to 89h␊ |
890 | ␉UInt16␉␉PAGE_LENGTH;␉␉␉␉␉␉// Must be equal to 238h␊ |
891 | ␉UInt32␉␉Reserved;␊ |
892 | ␉UInt8␉␉SAT_VENDOR_IDENTIFICATION[kINQUIRY_VENDOR_IDENTIFICATION_Length];␊ |
893 | ␉UInt8␉␉SAT_PRODUCT_IDENTIFICATION[kINQUIRY_PRODUCT_IDENTIFICATION_Length];␊ |
894 | ␉UInt8␉␉SAT_PRODUCT_REVISION_LEVEL[kINQUIRY_PRODUCT_REVISION_LEVEL_Length];␊ |
895 | ␉UInt8␉␉ATA_DEVICE_SIGNATURE[20];␊ |
896 | ␉UInt8␉␉COMMAND_CODE;␊ |
897 | ␉UInt8␉␉Reserved2[3];␊ |
898 | ␉UInt8␉␉IDENTIFY_DATA[512];␊ |
899 | } SCSICmd_INQUIRY_Page89_Data;␊ |
900 | ␊ |
901 | ␊ |
902 | /*!␊ |
903 | @define kIOPropertySATVendorIdentification␊ |
904 | Vendor Identification of the SATL.␊ |
905 | */␊ |
906 | #define kIOPropertySATVendorIdentification␉␉␉"SAT Vendor Identification"␊ |
907 | ␊ |
908 | ␊ |
909 | /*!␊ |
910 | @define kIOPropertySATProductIdentification␊ |
911 | Product Identification of the SATL.␊ |
912 | */␊ |
913 | #define kIOPropertySATProductIdentification␉␉␉"SAT Product Identification"␊ |
914 | ␊ |
915 | ␊ |
916 | /*!␊ |
917 | @define kIOPropertySATProductRevisonLevel␊ |
918 | Product Revision Level of the SATL.␊ |
919 | */␊ |
920 | #define kIOPropertySATProductRevisonLevel␉␉␉"SAT Product Revision Level"␊ |
921 | ␊ |
922 | ␊ |
923 | #endif␉/* _IOKIT_SCSI_CMDS_INQUIRY_H_ */␊ |
924 |