rbc_const.h

00001 #ifndef __RBC_CONST_H__7YXZF39S33__
00002 #define __RBC_CONST_H__7YXZF39S33__
00003 
00004 #include <spc2_const.h>
00005 
00006 /* SCSI operation codes */
00007 /* Additional commands for RBC */
00008 
00009 #define SCSI_CMD_FORMAT_UNIT                    0x04
00010 #define SCSI_CMD_READ_10                        0x28
00011 #define SCSI_CMD_READ_CAPACITY                  0x25
00012 #define SCSI_CMD_START_STOP_UNIT                0x1B
00013 #define SCSI_CMD_SYNCHRONIZE_CACHE              0x35
00014 #define SCSI_CMD_TEST_UNIT_READY                0x00
00015 #define SCSI_CMD_VERIFY_10                      0x2F
00016 #define SCSI_CMD_WRITE_10                       0x2A
00017 
00018 /* Status codes */
00019 /* From SAM-2 */
00020 #define SCSI_STATUS_GOOD                        0x00
00021 #define SCSI_STATUS_CHECK_CONDITION             0x02
00022 #define SCSI_STATUS_CONDITION _MET              0x04
00023 #define SCSI_STATUS_BUSY                        0x08 
00024 #define SCSI_STATUS_INTERMEDIATE                0x10 
00025 #define SCSI_STATUS_INTERMEDIATE_CONDITION_MET  0x14
00026 #define SCSI_STATUS_RESERVATION_CONFLICT        0x18
00027 #define SCSI_STATUS_TASK_SET_FULL               0x28
00028 #define SCSI_STATUS_ACA_ACTIVE                  0x30
00029 #define SCSI_STATUS_TASK_ABORTED                0x40
00030 
00031 /* Sense keys */
00032 #define SCSI_SENSE_KEY_NO_SENSE         0x0
00033 #define SCSI_SENSE_KEY_RECOVERED_ERROR  0x1
00034 #define SCSI_SENSE_KEY_NOT_READY        0x2
00035 #define SCSI_SENSE_KEY_MEDIUM_ERROR     0x3
00036 #define SCSI_SENSE_KEY_HARDWARE_ERROR   0x4
00037 #define SCSI_SENSE_KEY_ILLEGAL_REQUEST  0x5
00038 #define SCSI_SENSE_KEY_UNIT_ATTENTION   0x6
00039 #define SCSI_SENSE_KEY_DATA_PROTECT     0x7
00040 #define SCSI_SENSE_KEY_BLANK_CHECK      0x8
00041 #define SCSI_SENSE_KEY_VENDOR_SPECIFIC  0x9
00042 #define SCSI_SENSE_KEY_COPY_ABORTED     0xA
00043 #define SCSI_SENSE_KEY_ABORTED_COMMAND  0xB
00044 #define SCSI_SENSE_KEY_VOLUME_OVERFLOW  0xD
00045 #define SCSI_SENSE_KEY_MISCOMPARE       0xE
00046 
00047 /* Additional sense codes */
00048 #define SCSI_ASC_NO_SENSE 0x0000
00049 #define SCSI_ASC_INVALID_COMMAND_OPERATION 0x2000
00050 #define SCSI_ASC_INVALID_FIELD_IN_PARAMETER_LIST 0x2600
00051 
00052 #define SCSI_ASC_INVALID_FIELD_IN_CDB 0x2400
00053 
00054 /* RBC mode page */
00055 #define SCSI_MODE_RBC_DEVICE_PAGE 0x06
00056 #define SCSI_MODE_WCD 0x01
00057 #define SCSI_MODE_READD 0x08
00058 #define SCSI_MODE_WRITED 0x04
00059 #define SCSI_MODE_FORMATD 0x02
00060 #define SCSI_MODE_LOCKD 0x01
00061 
00062 /* WRITE(10) command flags */
00063 
00064 #define SCSI_WRITE_FUA 0x08
00065 
00066 #endif /* __RBC_CONST_H__7YXZF39S33__ */

Generated on Mon Apr 11 14:23:35 2011 for Contiki 2.5 by  doxygen 1.6.1