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