diff options
Diffstat (limited to 'include/scsi/sg.h')
| -rw-r--r-- | include/scsi/sg.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/scsi/sg.h b/include/scsi/sg.h index e9dd5477ca7a..843cefb8efce 100644 --- a/include/scsi/sg.h +++ b/include/scsi/sg.h @@ -145,6 +145,26 @@ struct compat_sg_io_hdr { /* Obsolete driver_byte() declaration */ #define driver_byte(result) (((result) >> 24) & 0xff) +/* + * Original linux SCSI Status codes. They are shifted 1 bit right + * from those found in the SCSI standards. + */ + +#define GOOD 0x00 +#define CHECK_CONDITION 0x01 +#define CONDITION_GOOD 0x02 +#define BUSY 0x04 +#define INTERMEDIATE_GOOD 0x08 +#define INTERMEDIATE_C_GOOD 0x0a +#define RESERVATION_CONFLICT 0x0c +#define COMMAND_TERMINATED 0x11 +#define QUEUE_FULL 0x14 +#define ACA_ACTIVE 0x18 +#define TASK_ABORTED 0x20 + +/* Obsolete status_byte() declaration */ +#define status_byte(result) (((result) >> 1) & 0x7f) + typedef struct sg_scsi_id { /* used by SG_GET_SCSI_ID ioctl() */ int host_no; /* as in "scsi<n>" where 'n' is one of 0, 1, 2 etc */ int channel; |
