Contiki 2.6

spc2_const.h

00001 /* SCSI operation codes */
00002 /* From SPC-2 */
00003 #define SCSI_CMD_EXTENDED_COPY                  0x83
00004 #define SCSI_CMD_INQUIRY                        0x12
00005 #define SCSI_CMD_LOG_SELECT                     0x4C
00006 #define SCSI_CMD_LOG_SENSE                      0x4D
00007 #define SCSI_CMD_MODE_SELECT_6                  0x15
00008 #define SCSI_CMD_MODE_SELECT_10                 0x55
00009 #define SCSI_CMD_MODE_SENSE_6                   0x1A
00010 #define SCSI_CMD_MODE_SENSE_10                  0x5A
00011 #define SCSI_CMD_MOVE_MEDIUM_ATTACHED           0xA7
00012 #define SCSI_CMD_PERSISTENT_RESERVE_IN          0x5E
00013 #define SCSI_CMD_PERSISTENT RESERVE OUT         0x5F
00014 #define SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL   0x1E
00015 #define SCSI_CMD_READ_BUFFER                    0x3C
00016 #define SCSI_CMD_READ_ELEMENT_STATUS_ATTACHED   0xB4
00017 #define SCSI_CMD_RECEIVE_COPY_RESULTS           0x84
00018 #define SCSI_CMD_RECEIVE_DIAGNOSTIC_RESULTS     0x1C
00019 #define SCSI_CMD_RELEASE_10                     0x57
00020 #define SCSI_CMD_RELEASE_6                      0x17
00021 #define SCSI_CMD_REPORT_DEVICE_IDENTIFIER       0xA3
00022 #define SCSI_CMD_REPORT_LUNS                    0xA0
00023 #define SCSI_CMD_REQUEST_SENSE                  0x03
00024 #define SCSI_CMD_RESERVE_10                     0x56
00025 #define SCSI_CMD_RESERVE_6                      0x16
00026 #define SCSI_CMD_SEND_DIAGNOSTIC                0x1D
00027 #define SCSI_CMD_SET_DEVICE_IDENTIFIER          0xA4
00028 #define SCSI_CMD_TEST_UNIT_READY                0x00
00029 #define SCSI_CMD_WRITE_BUFFER                   0x3B
00030 
00031 /* Flag field of INQUIRY command */
00032 #define SCSI_INQUIRY_FLAG_CMDDT 0x02
00033 #define SCSI_INQUIRY_FLAG_EVPD 0x01
00034 
00035 /* Constant for the standard inquiry data */
00036 #define SCSI_STD_INQUIRY_CONNECTED 0x00
00037 #define SCSI_STD_INQUIRY_NOT_CONNECTED 0x20
00038 
00039 #define SCSI_STD_INQUIRY_VERSION_NONE 0x00
00040 #define SCSI_STD_INQUIRY_VERSION_SPC2 0x04
00041 
00042 #define SCSI_STD_INQUIRY_TYPE_DIRECT_ACCESS 0x00
00043 #define SCSI_STD_INQUIRY_TYPE_SEQUENTIAL 0x01
00044 #define SCSI_STD_INQUIRY_TYPE_PRINTER 0x02
00045 #define SCSI_STD_INQUIRY_TYPE_PROCESSOR 0x03
00046 #define SCSI_STD_INQUIRY_TYPE_WRITE_ONCE 0x04
00047 #define SCSI_STD_INQUIRY_TYPE_CD_ROM 0x05
00048 #define SCSI_STD_INQUIRY_TYPE_SCANNER 0x06
00049 #define SCSI_STD_INQUIRY_TYPE_OPTICAL 0x07
00050 #define SCSI_STD_INQUIRY_TYPE_CHANGER 0x08
00051 #define SCSI_STD_INQUIRY_TYPE_COMM 0x09
00052 #define SCSI_STD_INQUIRY_TYPE_RAID 0x0C
00053 #define SCSI_STD_INQUIRY_TYPE_RBC 0x0E
00054 
00055 #define SCSI_STD_INQUIRY_FLAG1_RMB 0x80
00056 
00057 #define SCSI_STD_INQUIRY_FLAG2_AERC 0x80
00058 #define SCSI_STD_INQUIRY_FLAG2_NORMACA 0x20
00059 #define SCSI_STD_INQUIRY_FLAG2_HISUP 0x10
00060 #define SCSI_STD_INQUIRY_FLAG2_RESPONSE_FORMAT 0x02
00061 
00062 #define SCSI_STD_INQUIRY_FLAG3_SCCS 0x80
00063 
00064 #define SCSI_STD_INQUIRY_FLAG4_BQUE 0x80
00065 #define SCSI_STD_INQUIRY_FLAG4_ENCSERV 0x40
00066 #define SCSI_STD_INQUIRY_FLAG4_VS 0x20
00067 #define SCSI_STD_INQUIRY_FLAG4_MULTIP 0x10
00068 #define SCSI_STD_INQUIRY_FLAG4_MCHNGR 0x08
00069 #define SCSI_STD_INQUIRY_FLAG4_ADDR16 0x01
00070 
00071 #define SCSI_STD_INQUIRY_FLAG5_RELADR 0x80
00072 #define SCSI_STD_INQUIRY_FLAG5_WBUS 0x20
00073 #define SCSI_STD_INQUIRY_FLAG5_SYNC 0x10
00074 #define SCSI_STD_INQUIRY_FLAG5_LINKED 0x08
00075 #define SCSI_STD_INQUIRY_FLAG5_CMDQUE 0x02
00076 
00077 #define SCSI_SENSE_CURRENT_ERROR 0x70
00078 #define SCSI_SENSE_DEFERRED_ERROR 0x71
00079 #define SCSI_SENSE_INFORMATION_VALID 0x80
00080 #define SCSI_SENSE_FILEMARK 0x80
00081 #define SCSI_SENSE_EOM 0x40
00082 #define SCSI_SENSE_ILI 0x20
00083 
00084 #define SCSI_PAGE_DEVICE_IDENTIFICATION 0x83
00085 #define SCSI_PAGE_SUPPORTED_PAGES 0x00
00086 #define SCSI_PAGE_UNIT_SERIAL_NUMBER 0x80
00087 
00088 #define SCSI_CODE_SET_BINARY 0x01
00089 #define SCSI_CODE_SET_ACSII 0x02
00090 
00091 #define SCSI_ASSOCIATION_DEVICE 0x00
00092 #define SCSI_ASSOCIATION_PORT 0x10
00093 
00094 #define SCSI_IDENTIFIER_TYPE_NON_UNIQUE 0x00
00095 #define SCSI_IDENTIFIER_TYPE_VENDORID 0x01
00096 #define SCSI_IDENTIFIER_TYPE_EUI_64 0x02
00097 #define SCSI_IDENTIFIER_TYPE_FC_FS 0x03
00098 #define SCSI_IDENTIFIER_TYPE_PORT 0x04
00099 
00100 /* Mode parameters */
00101 #define SCSI_MODE_PAGE_SP 0x80
00102 #define SCSI_MODE_SELECT_PF 0x10
00103 #define SCSI_MODE_SELECT_SP 0x01
00104 #define SCSI_MODE_SENSE_DBD 0x08
00105 #define SCSI_MODE_SENSE_PAGE_CODE_MASK 0x3f
00106 #define SCSI_MODE_SENSE_PC_CURRENT 0x00
00107 #define SCSI_MODE_SENSE_PC_CHANGEABLE 0x40
00108 #define SCSI_MODE_SENSE_PC_DEFAULT 0x80
00109 #define SCSI_MODE_SENSE_PC_SAVED 0xc0
00110 #define SCSI_MODE_SENSE_ALL_PAGES 0x3f
00111 
00112