1 #ifndef SCSI_VALUES_H
    2 #define SCSI_VALUES_H
    3 
    4 /* scsi/values.h
    5 
    6 	Error codes for SCSI-2 commands
    7 
    8    20-Mar-02   Chris Hodges     Created files
    9 
   10 */
   11 
   12 
   13 #define SCSI_GOOD                 0x00
   14 #define SCSI_CHECK_CONDITION      0x02
   15 #define SCSI_CONDITION_MET        0x04
   16 #define SCSI_BUSY                 0x08
   17 #define SCSI_INTERMEDIATE         0x10
   18 #define SCSI_IM_CONDITION_MET     0x14
   19 #define SCSI_RESERVATION_CONFLICT 0x18
   20 #define SCSI_TASK_SET_FULL        0x28
   21 #define SCSI_ACA_ACTIVE           0x30
   22 #define SCSI_TASK_ABORTED         0x40
   23 
   24 /* Peripheral qualifiers */
   25 
   26 #define PQ_MASK                   0xe0
   27 #define PQ_CONNECTED              0x00
   28 #define PQ_NOT_CONNECTED          0x20
   29 #define PQ_DEAD_LUN               0x60
   30 
   31 /* Peripheral device type */
   32 
   33 #define PDT_MASK                  0x1f
   34 #define PDT_DIRECT_ACCESS         0x00
   35 #define PDT_SEQUENTIAL_ACCESS     0x01
   36 #define PDT_PRINTER               0x02
   37 #define PDT_PROCESSOR             0x03
   38 #define PDT_WORM                  0x04
   39 #define PDT_CDROM                 0x05
   40 #define PDT_SCANNER               0x06
   41 #define PDT_OPTICAL               0x07
   42 #define PDT_MEDIUM_CHANGER        0x08
   43 #define PDT_COMMUNICATIONS        0x09
   44 #define PDT_RAID                  0x0c
   45 #define PDT_ENCLOSURE             0x0d
   46 #define PDT_SIMPLE_DIRECT_ACCESS  0x0e
   47 #define PDT_OPTICAL_CARD          0x0f
   48 #define PDT_OBJECT_BASED          0x11
   49 #define PDT_UNKNOWN               0x1f
   50 
   51 /* Sense keys */
   52 #define SK_MASK                   0x0f
   53 #define SK_NO_SENSE               0x00
   54 #define SK_RECOVERED_ERROR        0x01
   55 #define SK_NOT_READY              0x02
   56 #define SK_MEDIUM_ERROR           0x03
   57 #define SK_HARDWARE_ERROR         0x04
   58 #define SK_ILLEGAL_REQUEST        0x05
   59 #define SK_UNIT_ATTENTION         0x06
   60 #define SK_DATA_PROTECT           0x07
   61 #define SK_BLANK_CHECK            0x08
   62 #define SK_VENDOR_SPECIFIC        0x09
   63 #define SK_COPY_ABORTED           0x0a
   64 #define SK_ABORTED_COMMAND        0x0b
   65 #define SK_VOLUME_OVERFLOW        0x0d
   66 #define SK_MISCOMPARE             0x0e
   67 
   68 #endif /* SCSI_VALUES_H */