2 * linux/drivers/message/fusion/scsi3.h
3 * SCSI-3 definitions and macros.
4 * (Ultimately) SCSI-3 definitions; for now, inheriting
7 * Copyright (c) 1996-2004 Steven J. Ralston
8 * Written By: Steven J. Ralston (19960517)
9 * (mailto:sjralston1@netscape.net)
10 * (mailto:mpt_linux_developer@lsil.com)
12 * $Id: scsi3.h,v 1.9 2002/02/27 18:45:02 sralston Exp $
15 #ifndef SCSI3_H_INCLUDED
16 #define SCSI3_H_INCLUDED
17 /***************************************************************************/
19 /****************************************************************************
24 #include <linux/types.h>
26 #ifndef U_STUFF_DEFINED
27 #define U_STUFF_DEFINED
28 typedef unsigned char u8;
29 typedef unsigned short u16;
30 typedef unsigned int u32;
34 /****************************************************************************
42 #define CMD_TestUnitReady 0x00
43 #define CMD_RezeroUnit 0x01 /* direct-access devices */
44 #define CMD_Rewind 0x01 /* sequential-access devices */
45 #define CMD_RequestSense 0x03
46 #define CMD_FormatUnit 0x04
47 #define CMD_ReassignBlock 0x07
48 #define CMD_Read6 0x08
49 #define CMD_Write6 0x0A
50 #define CMD_WriteFilemark 0x10
51 #define CMD_Space 0x11
52 #define CMD_Inquiry 0x12
53 #define CMD_ModeSelect6 0x15
54 #define CMD_ModeSense6 0x1A
55 #define CMD_Reserve6 0x16
56 #define CMD_Release6 0x17
57 #define CMD_Erase 0x19
58 #define CMD_StartStopUnit 0x1b /* direct-access devices */
59 #define CMD_LoadUnload 0x1b /* sequential-access devices */
60 #define CMD_ReceiveDiagnostic 0x1C
61 #define CMD_SendDiagnostic 0x1D
62 #define CMD_ReadCapacity 0x25
63 #define CMD_Read10 0x28
64 #define CMD_Write10 0x2A
65 #define CMD_WriteVerify 0x2E
66 #define CMD_Verify 0x2F
67 #define CMD_SynchronizeCache 0x35
68 #define CMD_ReadDefectData 0x37
69 #define CMD_WriteBuffer 0x3B
70 #define CMD_ReadBuffer 0x3C
71 #define CMD_ReadLong 0x3E
72 #define CMD_LogSelect 0x4C
73 #define CMD_LogSense 0x4D
74 #define CMD_ModeSelect10 0x55
75 #define CMD_Reserve10 0x56
76 #define CMD_Release10 0x57
77 #define CMD_ModeSense10 0x5A
78 #define CMD_PersistReserveIn 0x5E
79 #define CMD_PersistReserveOut 0x5F
80 #define CMD_ReportLuns 0xA0
85 #define CONTROL_BYTE_NACA_BIT 0x04
86 #define CONTROL_BYTE_Flag_BIT 0x02
87 #define CONTROL_BYTE_Link_BIT 0x01
92 #define MSG_COMPLETE 0x00
93 #define MSG_EXTENDED 0x01
94 #define MSG_SAVE_POINTERS 0x02
95 #define MSG_RESTORE_POINTERS 0x03
96 #define MSG_DISCONNECT 0x04
97 #define MSG_IDERROR 0x05
98 #define MSG_ABORT 0x06
99 #define MSG_REJECT 0x07
101 #define MSG_PARITY_ERROR 0x09
102 #define MSG_LINKED_CMD_COMPLETE 0x0a
103 #define MSG_LCMD_COMPLETE_W_FLG 0x0b
104 #define MSG_BUS_DEVICE_RESET 0x0c
105 #define MSG_ABORT_TAG 0x0d
106 #define MSG_CLEAR_QUEUE 0x0e
107 #define MSG_INITIATE_RECOVERY 0x0f
109 #define MSG_RELEASE_RECOVRY 0x10
110 #define MSG_TERMINATE_IO 0x11
112 #define MSG_SIMPLE_QUEUE 0x20
113 #define MSG_HEAD_OF_QUEUE 0x21
114 #define MSG_ORDERED_QUEUE 0x22
115 #define MSG_IGNORE_WIDE_RESIDUE 0x23
117 #define MSG_IDENTIFY 0x80
118 #define MSG_IDENTIFY_W_DISC 0xc0
123 #define PHS_DATA_OUT 0x00
124 #define PHS_DATA_IN 0x01
125 #define PHS_COMMAND 0x02
126 #define PHS_STATUS 0x03
127 #define PHS_MSG_OUT 0x06
128 #define PHS_MSG_IN 0x07
133 #define STS_GOOD 0x00
134 #define STS_CHECK_CONDITION 0x02
135 #define STS_CONDITION_MET 0x04
136 #define STS_BUSY 0x08
137 #define STS_INTERMEDIATE 0x10
138 #define STS_INTERMEDIATE_CONDITION_MET 0x14
139 #define STS_RESERVATION_CONFLICT 0x18
140 #define STS_COMMAND_TERMINATED 0x22
141 #define STS_TASK_SET_FULL 0x28
142 #define STS_QUEUE_FULL 0x28
143 #define STS_ACA_ACTIVE 0x30
145 #define STS_VALID_MASK 0x3e
147 #define SCSI_STATUS(x) ((x) & STS_VALID_MASK)
152 #define QTAG_SIMPLE 0x20
153 #define QTAG_HEAD_OF_Q 0x21
154 #define QTAG_ORDERED 0x22
157 * SCSI Sense Key Definitons
159 #define SK_NO_SENSE 0x00
160 #define SK_RECOVERED_ERROR 0x01
161 #define SK_NOT_READY 0x02
162 #define SK_MEDIUM_ERROR 0x03
163 #define SK_HARDWARE_ERROR 0x04
164 #define SK_ILLEGAL_REQUEST 0x05
165 #define SK_UNIT_ATTENTION 0x06
166 #define SK_DATA_PROTECT 0x07
167 #define SK_BLANK_CHECK 0x08
168 #define SK_VENDOR_SPECIFIC 0x09
169 #define SK_COPY_ABORTED 0x0a
170 #define SK_ABORTED_COMMAND 0x0b
171 #define SK_EQUAL 0x0c
172 #define SK_VOLUME_OVERFLOW 0x0d
173 #define SK_MISCOMPARE 0x0e
174 #define SK_RESERVED 0x0f
178 #define SCSI_MAX_INQUIRY_BYTES 96
179 #define SCSI_STD_INQUIRY_BYTES 36
181 #undef USE_SCSI_COMPLETE_INQDATA
183 * Structure definition for SCSI Inquiry Data
185 * NOTE: The following structure is 96 bytes in size
186 * iff USE_SCSI_COMPLETE_INQDATA IS defined above (i.e. w/ "#define").
187 * If USE_SCSI_COMPLETE_INQDATA is NOT defined above (i.e. w/ "#undef")
188 * then the following structure is only 36 bytes in size.
189 * THE CHOICE IS YOURS!
191 typedef struct SCSI_Inquiry_Data
193 #ifdef USE_SCSI_COMPLETE_INQDATA
194 u8 InqByte[SCSI_MAX_INQUIRY_BYTES];
196 u8 InqByte[SCSI_STD_INQUIRY_BYTES];
200 * the following structure works only for little-endian (Intel,
201 * LSB first (1234) byte order) systems with 4-byte ints.
203 u32 Periph_Device_Type : 5,
204 Periph_Qualifier : 3,
205 Device_Type_Modifier : 7,
210 Response_Data_Format : 4,
213 u32 Additional_Length : 8,
225 u8 Revision_Level [4];
226 #ifdef USE_SCSI_COMPLETE_INQDATA
227 u8 Vendor_Specific[20];
233 } SCSI_Inquiry_Data_t;
235 #define INQ_PERIPHINFO_BYTE 0
236 #define INQ_Periph_Qualifier_MASK 0xe0
237 #define INQ_Periph_Device_Type_MASK 0x1f
239 #define INQ_Peripheral_Qualifier(inqp) \
240 (int)((*((u8*)(inqp)+INQ_PERIPHINFO_BYTE) & INQ_Periph_Qualifier_MASK) >> 5)
241 #define INQ_Peripheral_Device_Type(inqp) \
242 (int)(*((u8*)(inqp)+INQ_PERIPHINFO_BYTE) & INQ_Periph_Device_Type_MASK)
245 #define INQ_DEVTYPEMOD_BYTE 1
246 #define INQ_RMB_BIT 0x80
247 #define INQ_Device_Type_Modifier_MASK 0x7f
249 #define INQ_Removable_Medium(inqp) \
250 (int)(*((u8*)(inqp)+INQ_DEVTYPEMOD_BYTE) & INQ_RMB_BIT)
251 #define INQ_Device_Type_Modifier(inqp) \
252 (int)(*((u8*)(inqp)+INQ_DEVTYPEMOD_BYTE) & INQ_Device_Type_Modifier_MASK)
255 #define INQ_VERSIONINFO_BYTE 2
256 #define INQ_ISO_Version_MASK 0xc0
257 #define INQ_ECMA_Version_MASK 0x38
258 #define INQ_ANSI_Version_MASK 0x07
260 #define INQ_ISO_Version(inqp) \
261 (int)(*((u8*)(inqp)+INQ_VERSIONINFO_BYTE) & INQ_ISO_Version_MASK)
262 #define INQ_ECMA_Version(inqp) \
263 (int)(*((u8*)(inqp)+INQ_VERSIONINFO_BYTE) & INQ_ECMA_Version_MASK)
264 #define INQ_ANSI_Version(inqp) \
265 (int)(*((u8*)(inqp)+INQ_VERSIONINFO_BYTE) & INQ_ANSI_Version_MASK)
269 #define INQ_AERC_BIT 0x80
270 #define INQ_TrmTsk_BIT 0x40
271 #define INQ_NormACA_BIT 0x20
272 #define INQ_RDF_MASK 0x0F
274 #define INQ_AER_Capable(inqp) \
275 (int)(*((u8*)(inqp)+INQ_BYTE3) & INQ_AERC_BIT)
276 #define INQ_TrmTsk(inqp) \
277 (int)(*((u8*)(inqp)+INQ_BYTE3) & INQ_TrmTsk_BIT)
278 #define INQ_NormACA(inqp) \
279 (int)(*((u8*)(inqp)+INQ_BYTE3) & INQ_NormACA_BIT)
280 #define INQ_Response_Data_Format(inqp) \
281 (int)(*((u8*)(inqp)+INQ_BYTE3) & INQ_RDF_MASK)
284 #define INQ_CAPABILITY_BYTE 7
285 #define INQ_RelAdr_BIT 0x80
286 #define INQ_WBus32_BIT 0x40
287 #define INQ_WBus16_BIT 0x20
288 #define INQ_Sync_BIT 0x10
289 #define INQ_Linked_BIT 0x08
290 /* INQ_Reserved BIT 0x40 */
291 #define INQ_CmdQue_BIT 0x02
292 #define INQ_SftRe_BIT 0x01
294 #define IS_RelAdr_DEV(inqp) \
295 (int)(*((u8*)(inqp)+INQ_CAPABILITY_BYTE) & INQ_RelAdr_BIT)
296 #define IS_WBus32_DEV(inqp) \
297 (int)(*((u8*)(inqp)+INQ_CAPABILITY_BYTE) & INQ_WBus32_BIT)
298 #define IS_WBus16_DEV(inqp) \
299 (int)(*((u8*)(inqp)+INQ_CAPABILITY_BYTE) & INQ_WBus16_BIT)
300 #define IS_Sync_DEV(inqp) \
301 (int)(*((u8*)(inqp)+INQ_CAPABILITY_BYTE) & INQ_Sync_BIT)
302 #define IS_Linked_DEV(inqp) \
303 (int)(*((u8*)(inqp)+INQ_CAPABILITY_BYTE) & INQ_Linked_BIT)
304 #define IS_CmdQue_DEV(inqp) \
305 (int)(*((u8*)(inqp)+INQ_CAPABILITY_BYTE) & INQ_CmdQue_BIT)
306 #define IS_SftRe_DEV(inqp) \
307 (int)(*((u8*)(inqp)+INQ_CAPABILITY_BYTE) & INQ_SftRe_BIT)
309 #define INQ_Width_BITS \
310 (INQ_WBus32_BIT | INQ_WBus16_BIT)
311 #define IS_Wide_DEV(inqp) \
312 (int)(*((u8*)(inqp)+INQ_CAPABILITY_BYTE) & INQ_Width_BITS)
316 * SCSI peripheral device types
318 #define SCSI_TYPE_DAD 0x00 /* Direct Access Device */
319 #define SCSI_TYPE_SAD 0x01 /* Sequential Access Device */
320 #define SCSI_TYPE_TAPE SCSI_TYPE_SAD
321 #define SCSI_TYPE_PRT 0x02 /* Printer */
322 #define SCSI_TYPE_PROC 0x03 /* Processor */
323 #define SCSI_TYPE_WORM 0x04
324 #define SCSI_TYPE_CDROM 0x05
325 #define SCSI_TYPE_SCAN 0x06 /* Scanner */
326 #define SCSI_TYPE_OPTICAL 0x07 /* Magneto/Optical */
327 #define SCSI_TYPE_CHANGER 0x08
328 #define SCSI_TYPE_COMM 0x09 /* Communications device */
329 #define SCSI_TYPE_UNKNOWN 0x1f
330 #define SCSI_TYPE_UNCONFIGURED_LUN 0x7f
332 #define SCSI_TYPE_MAX_KNOWN SCSI_TYPE_COMM
335 * Peripheral Qualifiers
337 #define DEVICE_PRESENT 0x00
338 #define LUN_NOT_PRESENT 0x01
339 #define LUN_NOT_SUPPORTED 0x03
355 #define SCSI_MAX_SENSE_BYTES 255
356 #define SCSI_STD_SENSE_BYTES 18
357 #define SCSI_PAD_SENSE_BYTES (SCSI_MAX_SENSE_BYTES - SCSI_STD_SENSE_BYTES)
359 #undef USE_SCSI_COMPLETE_SENSE
361 * Structure definition for SCSI Sense Data
363 * NOTE: The following structure is 255 bytes in size
364 * iiff USE_SCSI_COMPLETE_SENSE IS defined above (i.e. w/ "#define").
365 * If USE_SCSI_COMPLETE_SENSE is NOT defined above (i.e. w/ "#undef")
366 * then the following structure is only 19 bytes in size.
367 * THE CHOICE IS YOURS!
370 typedef struct SCSI_Sense_Data
372 #ifdef USE_SCSI_COMPLETE_SENSE
373 u8 SenseByte[SCSI_MAX_SENSE_BYTES];
375 u8 SenseByte[SCSI_STD_SENSE_BYTES];
379 * the following structure works only for little-endian (Intel,
380 * LSB first (1234) byte order) systems with 4-byte ints.
382 u8 Error_Code :4, // 0x00
386 u8 Segment_Number // 0x01
388 u8 Sense_Key :4, // 0x02
390 Incorrect_Length_Indicator:1,
394 u8 Information_MSB; // 0x03
395 u8 Information_Byte2; // 0x04
396 u8 Information_Byte1; // 0x05
397 u8 Information_LSB; // 0x06
398 u8 Additional_Length; // 0x07
400 u32 Command_Specific_Information; // 0x08 - 0x0b
402 u8 Additional_Sense_Code; // 0x0c
403 u8 Additional_Sense_Code_Qualifier; // 0x0d
404 u8 Field_Replaceable_Unit_Code; // 0x0e
405 u8 Illegal_Req_Bit_Pointer :3, // 0x0f
406 Illegal_Req_Bit_Valid :1,
407 Illegal_Req_Reserved :2,
408 Illegal_Req_Cmd_Data :1,
409 Sense_Key_Specific_Valid :1
411 u16 Sense_Key_Specific_Data; // 0x10 - 0x11
413 #ifdef USE_SCSI_COMPLETE_SENSE
414 u8 Additional_Sense_Data[SCSI_PAD_SENSE_BYTES];
416 u8 Additional_Sense_Data[1];
424 #define SD_ERRCODE_BYTE 0
425 #define SD_Valid_BIT 0x80
426 #define SD_Error_Code_MASK 0x7f
427 #define SD_Valid(sdp) \
428 (int)(*((u8*)(sdp)+SD_ERRCODE_BYTE) & SD_Valid_BIT)
429 #define SD_Error_Code(sdp) \
430 (int)(*((u8*)(sdp)+SD_ERRCODE_BYTE) & SD_Error_Code_MASK)
433 #define SD_SEGNUM_BYTE 1
434 #define SD_Segment_Number(sdp) (int)(*((u8*)(sdp)+SD_SEGNUM_BYTE))
437 #define SD_SENSEKEY_BYTE 2
438 #define SD_Filemark_BIT 0x80
439 #define SD_EOM_BIT 0x40
440 #define SD_ILI_BIT 0x20
441 #define SD_Sense_Key_MASK 0x0f
442 #define SD_Filemark(sdp) \
443 (int)(*((u8*)(sdp)+SD_SENSEKEY_BYTE) & SD_Filemark_BIT)
444 #define SD_EOM(sdp) \
445 (int)(*((u8*)(sdp)+SD_SENSEKEY_BYTE) & SD_EOM_BIT)
446 #define SD_ILI(sdp) \
447 (int)(*((u8*)(sdp)+SD_SENSEKEY_BYTE) & SD_ILI_BIT)
448 #define SD_Sense_Key(sdp) \
449 (int)(*((u8*)(sdp)+SD_SENSEKEY_BYTE) & SD_Sense_Key_MASK)
452 #define SD_INFO3_BYTE 3
453 #define SD_INFO2_BYTE 4
454 #define SD_INFO1_BYTE 5
455 #define SD_INFO0_BYTE 6
456 #define SD_Information3(sdp) (int)(*((u8*)(sdp)+SD_INFO3_BYTE))
457 #define SD_Information2(sdp) (int)(*((u8*)(sdp)+SD_INFO2_BYTE))
458 #define SD_Information1(sdp) (int)(*((u8*)(sdp)+SD_INFO1_BYTE))
459 #define SD_Information0(sdp) (int)(*((u8*)(sdp)+SD_INFO0_BYTE))
462 #define SD_ADDL_LEN_BYTE 7
463 #define SD_Additional_Sense_Length(sdp) \
464 (int)(*((u8*)(sdp)+SD_ADDL_LEN_BYTE))
465 #define SD_Addl_Sense_Len SD_Additional_Sense_Length
468 #define SD_CMD_SPECIFIC3_BYTE 8
469 #define SD_CMD_SPECIFIC2_BYTE 9
470 #define SD_CMD_SPECIFIC1_BYTE 10
471 #define SD_CMD_SPECIFIC0_BYTE 11
472 #define SD_Cmd_Specific_Info3(sdp) (int)(*((u8*)(sdp)+SD_CMD_SPECIFIC3_BYTE))
473 #define SD_Cmd_Specific_Info2(sdp) (int)(*((u8*)(sdp)+SD_CMD_SPECIFIC2_BYTE))
474 #define SD_Cmd_Specific_Info1(sdp) (int)(*((u8*)(sdp)+SD_CMD_SPECIFIC1_BYTE))
475 #define SD_Cmd_Specific_Info0(sdp) (int)(*((u8*)(sdp)+SD_CMD_SPECIFIC0_BYTE))
478 #define SD_ADDL_SENSE_CODE_BYTE 12
479 #define SD_Additional_Sense_Code(sdp) \
480 (int)(*((u8*)(sdp)+SD_ADDL_SENSE_CODE_BYTE))
481 #define SD_Addl_Sense_Code SD_Additional_Sense_Code
482 #define SD_ASC SD_Additional_Sense_Code
485 #define SD_ADDL_SENSE_CODE_QUAL_BYTE 13
486 #define SD_Additional_Sense_Code_Qualifier(sdp) \
487 (int)(*((u8*)(sdp)+SD_ADDL_SENSE_CODE_QUAL_BYTE))
488 #define SD_Addl_Sense_Code_Qual SD_Additional_Sense_Code_Qualifier
489 #define SD_ASCQ SD_Additional_Sense_Code_Qualifier
492 #define SD_FIELD_REPL_UNIT_CODE_BYTE 14
493 #define SD_Field_Replaceable_Unit_Code(sdp) \
494 (int)(*((u8*)(sdp)+SD_FIELD_REPL_UNIT_CODE_BYTE))
495 #define SD_Field_Repl_Unit_Code SD_Field_Replaceable_Unit_Code
496 #define SD_FRUC SD_Field_Replaceable_Unit_Code
497 #define SD_FRU SD_Field_Replaceable_Unit_Code
501 * Sense-Key Specific offsets and macros.
503 #define SD_SKS2_BYTE 15
504 #define SD_SKS_Valid_BIT 0x80
505 #define SD_SKS_Cmd_Data_BIT 0x40
506 #define SD_SKS_Bit_Ptr_Valid_BIT 0x08
507 #define SD_SKS_Bit_Ptr_MASK 0x07
508 #define SD_SKS1_BYTE 16
509 #define SD_SKS0_BYTE 17
510 #define SD_Sense_Key_Specific_Valid(sdp) \
511 (int)(*((u8*)(sdp)+SD_SKS2_BYTE) & SD_SKS_Valid_BIT)
512 #define SD_SKS_Valid SD_Sense_Key_Specific_Valid
513 #define SD_SKS_CDB_Error(sdp) \
514 (int)(*((u8*)(sdp)+SD_SKS2_BYTE) & SD_SKS_Cmd_Data_BIT)
515 #define SD_Was_Illegal_Request SD_SKS_CDB_Error
516 #define SD_SKS_Bit_Pointer_Valid(sdp) \
517 (int)(*((u8*)(sdp)+SD_SKS2_BYTE) & SD_SKS_Bit_Ptr_Valid_BIT)
518 #define SD_SKS_Bit_Pointer(sdp) \
519 (int)(*((u8*)(sdp)+SD_SKS2_BYTE) & SD_SKS_Bit_Ptr_MASK)
520 #define SD_Field_Pointer(sdp) \
521 (int)( ((u16)(*((u8*)(sdp)+SD_SKS1_BYTE)) << 8) \
522 + *((u8*)(sdp)+SD_SKS0_BYTE) )
523 #define SD_Bad_Byte SD_Field_Pointer
524 #define SD_Actual_Retry_Count SD_Field_Pointer
525 #define SD_Progress_Indication SD_Field_Pointer
528 * Mode Sense Write Protect Mask
530 #define WRITE_PROTECT_MASK 0X80
535 #define OPTICAL_DEFAULT 0x00
536 #define OPTICAL_READ_ONLY_MEDIUM 0x01
537 #define OPTICAL_WRITE_ONCE_MEDIUM 0x02
538 #define OPTICAL_READ_WRITABLE_MEDIUM 0x03
539 #define OPTICAL_RO_OR_WO_MEDIUM 0x04
540 #define OPTICAL_RO_OR_RW_MEDIUM 0x05
541 #define OPTICAL_WO_OR_RW_MEDIUM 0x06
546 * Structure definition for READ6, WRITE6 (6-byte CDB)
548 typedef struct SCSI_RW6_CDB
551 LBA_HI :5, /* 5 MSBit's of the LBA */
553 LBA_MID :8, /* NOTE: total of 21 bits in LBA */
554 LBA_LO :8 ; /* Max LBA = 0x001fffff */
559 #define MAX_RW6_LBA ((u32)0x001fffff)
562 * Structure definition for READ10, WRITE10 (10-byte CDB)
564 * NOTE: ParityCheck bit is applicable only for VERIFY and WRITE VERIFY for
565 * the ADP-92 DAC only. In the SCSI2 spec. this same bit is defined as a
566 * FUA (forced unit access) bit for READs and WRITEs. Since this driver
567 * does not use the FUA, this bit is defined as it is used by the ADP-92.
568 * Also, for READ CAPACITY, only the OpCode field is used.
570 typedef struct SCSI_RW10_CDB
580 #define PARITY_CHECK 0x08 /* parity check bit - byte[1], bit 3 */
583 * Structure definition for data returned by READ CAPACITY cmd;
586 typedef struct READ_CAP_DATA
590 } SCSI_READ_CAP_DATA_t, *pSCSI_READ_CAP_DATA_t;
594 * Structure definition for FORMAT UNIT CDB (6-byte CDB)
596 typedef struct _SCSI_FORMAT_UNIT
603 } SCSI_FORMAT_UNIT_t;
606 * Structure definition for REQUEST SENSE (6-byte CDB)
608 typedef struct _SCSI_REQUEST_SENSE
619 * Structure definition for REPORT LUNS (12-byte CDB)
621 typedef struct _SCSI_REPORT_LUNS
625 u32 AllocationLength;
628 } SCSI_REPORT_LUNS_t, *pSCSI_REPORT_LUNS_t;
631 * (per-level) LUN information bytes
634 * Following doesn't work on ARMCC compiler
635 * [apparently] because it pads every struct
636 * to be multiple of 4 bytes!
637 * So SCSI_LUN_LEVELS_t winds up being 16
638 * bytes instead of 8!
640 typedef struct LUN_INFO
642 u8 AddrMethod_plus_LunOrBusNumber;
644 } SCSI_LUN_INFO_t, *pSCSI_LUN_INFO_t;
646 typedef struct LUN_LEVELS
648 SCSI_LUN_INFO_t LUN_0;
649 SCSI_LUN_INFO_t LUN_1;
650 SCSI_LUN_INFO_t LUN_2;
651 SCSI_LUN_INFO_t LUN_3;
652 } SCSI_LUN_LEVELS_t, *pSCSI_LUN_LEVELS_t;
655 * All 4 levels (8 bytes) of LUN information
657 typedef struct LUN_LEVELS
659 u8 LVL1_AddrMethod_plus_LunOrBusNumber;
661 u8 LVL2_AddrMethod_plus_LunOrBusNumber;
663 u8 LVL3_AddrMethod_plus_LunOrBusNumber;
665 u8 LVL4_AddrMethod_plus_LunOrBusNumber;
667 } SCSI_LUN_LEVELS_t, *pSCSI_LUN_LEVELS_t;
670 * Structure definition for data returned by REPORT LUNS cmd;
671 * LUN reporting parameter list format
673 typedef struct LUN_REPORT
677 SCSI_LUN_LEVELS_t LunInfo[1];
678 } SCSI_LUN_REPORT_t, *pSCSI_LUN_REPORT_t;
680 /****************************************************************************
685 /****************************************************************************
687 * Public Typedefs & Related Defines
690 /****************************************************************************
692 * Macros (embedded, above)
695 /****************************************************************************
700 /****************************************************************************
702 * Public Prototypes (module entry points)
706 /***************************************************************************/