--- linux/drivers/scsi/scsi.h 2003-05-14 18:09:21.000000000 +1000 +++ linux/drivers/scsi/scsi.h2569bk8cc 2003-05-16 09:47:11.469708960 +1000 @@ -90,12 +90,19 @@ * * These are set by: * - * status byte = set from target device + * status byte = set from target device (SCSI status value) * msg_byte = return status from host adapter itself. * host_byte = set by low-level driver to indicate status. * driver_byte = set by mid-level. + * + * Notes about following macros: + * scsi_status() returns a standard SCSI status value that may + * be compared with the SAM_STAT_... series of defines. + * status_byte() returns a shifted SCSI status value that matches + * CHECK_CONDITION and friends. status_byte() is deprecated. */ -#define status_byte(result) (((result) >> 1) & 0x1f) +#define scsi_status(result) ((result) & 0x7e) +#define status_byte(result) (((result) >> 1) & 0x1f) /* deprecated */ #define msg_byte(result) (((result) >> 8) & 0xff) #define host_byte(result) (((result) >> 16) & 0xff) #define driver_byte(result) (((result) >> 24) & 0xff)