1 #define MPATH_XFER_HOST_DEV 0 /*data transfer from initiator to target */
2 #define MPATH_XFER_DEV_HOST 1 /*data transfer from target to initiator */
3 #define MPATH_XFER_NONE 2 /*no data transfer */
4 #define MPATH_XFER_UNKNOWN 3 /*data transfer direction is unknown */
7 static const char * pr_type_strs[] = {
13 "Write Exclusive, registrants only",
14 "Exclusive Access, registrants only",
15 "Write Exclusive, all registrants",
16 "Exclusive Access, all registrants",
17 "obsolete [9]", "obsolete [0xa]", "obsolete [0xb]", "obsolete [0xc]",
18 "obsolete [0xd]", "obsolete [0xe]", "obsolete [0xf]",
22 typedef unsigned int LWORD; /* unsigned numeric, bit patterns */
23 typedef unsigned char BYTE; /* unsigned numeric, bit patterns */
25 typedef struct SenseData
28 BYTE Segment_Number; /* not applicable to DAC */
30 BYTE Information[ 4 ];
32 LWORD Command_Specific_Info;
35 BYTE Field_Replaceable_Unit;
36 BYTE Sense_Key_Specific_Info[ 3 ];
37 BYTE Recovery_Action[ 2 ];
44 BYTE Additional_FRU_Info[ 8 ];
45 BYTE Error_Specific_Info[ 3 ];
46 BYTE Error_Detection_Point[ 4 ];
47 BYTE Original_CDB[10];
49 BYTE Host_Descriptor[ 2 ];
50 BYTE Serial_Number[ 16 ];
51 BYTE Array_SW_Revision[ 4 ];
52 BYTE Data_Xfer_Operation;
56 BYTE Xfer_Start_Drive_ID;
57 BYTE Drive_SW_Revision[ 4 ];
58 BYTE Drive_Product_ID[ 16 ];
59 BYTE PowerUp_Status[ 2 ];
61 BYTE Drive_Sense_ID[ 2 ];
62 BYTE Drive_Sense_Data[ 32 ];
66 #define MPATH_PRIN_CMD 0x5e
67 #define MPATH_PRIN_CMDLEN 10
68 #define MPATH_PROUT_CMD 0x5f
69 #define MPATH_PROUT_CMDLEN 10
75 #define SAM_STAT_GOOD 0x00
76 #define SAM_STAT_CHECK_CONDITION 0x02
77 #define SAM_STAT_CONDITION_MET 0x04
78 #define SAM_STAT_BUSY 0x08
79 #define SAM_STAT_INTERMEDIATE 0x10
80 #define SAM_STAT_INTERMEDIATE_CONDITION_MET 0x14
81 #define SAM_STAT_RESERVATION_CONFLICT 0x18
82 #define SAM_STAT_COMMAND_TERMINATED 0x22 /* obsolete in SAM-3 */
83 #define SAM_STAT_TASK_SET_FULL 0x28
84 #define SAM_STAT_ACA_ACTIVE 0x30
85 #define SAM_STAT_TASK_ABORTED 0x40
87 #define STATUS_MASK 0x3e
94 #define RECOVERED_ERROR 0x01
95 #define NOT_READY 0x02
96 #define MEDIUM_ERROR 0x03
97 #define HARDWARE_ERROR 0x04
98 #define ILLEGAL_REQUEST 0x05
99 #define UNIT_ATTENTION 0x06
100 #define DATA_PROTECT 0x07
101 #define BLANK_CHECK 0x08
102 #define COPY_ABORTED 0x0a
103 #define ABORTED_COMMAND 0x0b
104 #define VOLUME_OVERFLOW 0x0d
105 #define MISCOMPARE 0x0e
109 #define DRIVER_OK 0x00