target device). 'result' is a 32 bit unsigned integer that
                    can be viewed as 4 related bytes. The SCSI status value is
                    in the LSB. See include/scsi/scsi.h status_byte(),
-                   msg_byte(), host_byte() and driver_byte() macros and
-                   related constants.
+                   msg_byte() and host_byte() macros and related constants.
     sense_buffer
                 - an array (maximum size: SCSI_SENSE_BUFFERSIZE bytes) that
                    should be written when the SCSI status (LSB of 'result')
 
         */
        hdr->device_status = job->result & 0xff;
        hdr->transport_status = host_byte(job->result);
-       hdr->driver_status = driver_byte(job->result);
+       hdr->driver_status = 0;
        hdr->info = 0;
        if (hdr->device_status || hdr->transport_status || hdr->driver_status)
                hdr->info |= SG_INFO_CHECK;
 
         */
        hdr->device_status = sreq->result & 0xff;
        hdr->transport_status = host_byte(sreq->result);
-       hdr->driver_status = driver_byte(sreq->result);
+       hdr->driver_status = 0;
        if (scsi_status_is_check_condition(sreq->result))
                hdr->driver_status = DRIVER_SENSE;
        hdr->info = 0;
 
        hdr->masked_status = status_byte(req->result);
        hdr->msg_status = msg_byte(req->result);
        hdr->host_status = host_byte(req->result);
-       hdr->driver_status = driver_byte(req->result);
+       hdr->driver_status = 0;
        if (scsi_status_is_check_condition(hdr->status))
                hdr->driver_status = DRIVER_SENSE;
        hdr->info = 0;
 
 "DID_TRANSPORT_DISRUPTED", "DID_TRANSPORT_FAILFAST", "DID_TARGET_FAILURE",
 "DID_NEXUS_FAILURE", "DID_ALLOC_FAILURE", "DID_MEDIUM_ERROR" };
 
-static const char * const driverbyte_table[]={
-"DRIVER_OK", "DRIVER_BUSY", "DRIVER_SOFT",  "DRIVER_MEDIA", "DRIVER_ERROR",
-"DRIVER_INVALID", "DRIVER_TIMEOUT", "DRIVER_HARD", "DRIVER_SENSE"};
-
 const char *scsi_hostbyte_string(int result)
 {
        const char *hb_string = NULL;
 }
 EXPORT_SYMBOL(scsi_hostbyte_string);
 
-const char *scsi_driverbyte_string(int result)
-{
-       const char *db_string = NULL;
-       int db = driver_byte(result);
-
-       if (db < ARRAY_SIZE(driverbyte_table))
-               db_string = driverbyte_table[db];
-       return db_string;
-}
-EXPORT_SYMBOL(scsi_driverbyte_string);
-
 #define scsi_mlreturn_name(result)     { result, #result }
 static const struct value_name_pair scsi_mlreturn_arr[] = {
        scsi_mlreturn_name(NEEDS_RETRY),
 
        size_t off, logbuf_len;
        const char *mlret_string = scsi_mlreturn_string(disposition);
        const char *hb_string = scsi_hostbyte_string(cmd->result);
-       const char *db_string = scsi_driverbyte_string(cmd->result);
        unsigned long cmd_age = (jiffies - cmd->jiffies_at_alloc) / HZ;
 
        logbuf = scsi_log_reserve_buffer(&logbuf_len);
        if (WARN_ON(off >= logbuf_len))
                goto out_printk;
 
-       if (db_string)
-               off += scnprintf(logbuf + off, logbuf_len - off,
-                                "driverbyte=%s ", db_string);
-       else
-               off += scnprintf(logbuf + off, logbuf_len - off,
-                                "driverbyte=0x%02x ",
-                                driver_byte(cmd->result));
+       off += scnprintf(logbuf + off, logbuf_len - off,
+                        "driverbyte=DRIVER_OK ");
 
        off += scnprintf(logbuf + off, logbuf_len - off,
                         "cmd_age=%lus", cmd_age);
 
 void sd_print_result(const struct scsi_disk *sdkp, const char *msg, int result)
 {
        const char *hb_string = scsi_hostbyte_string(result);
-       const char *db_string = scsi_driverbyte_string(result);
 
-       if (hb_string || db_string)
+       if (hb_string)
                sd_printk(KERN_INFO, sdkp,
                          "%s: Result: hostbyte=%s driverbyte=%s\n", msg,
                          hb_string ? hb_string : "invalid",
-                         db_string ? db_string : "invalid");
+                         "DRIVER_OK");
        else
                sd_printk(KERN_INFO, sdkp,
-                         "%s: Result: hostbyte=0x%02x driverbyte=0x%02x\n",
-                         msg, host_byte(result), driver_byte(result));
+                         "%s: Result: hostbyte=0x%02x driverbyte=%s\n",
+                         msg, host_byte(result), "DRIVER_OK");
 }
 
         * care is taken to avoid unnecessary additional work such as
         * memcpy's that could be avoided.
         */
-       if (driver_byte(result) != 0 &&         /* An error occurred */
+       if (status_byte(result) == SAM_STAT_CHECK_CONDITION &&
            (SCpnt->sense_buffer[0] & 0x7f) == 0x70) { /* Sense current */
                switch (SCpnt->sense_buffer[2]) {
                case MEDIUM_ERROR:
 
                err = result;
                goto out;
        }
-       if (driver_byte(result) != 0) {
+       if (status_byte(result) == SAM_STAT_CHECK_CONDITION) {
                switch (sshdr->sense_key) {
                case UNIT_ATTENTION:
                        SDev->changed = 1;
 
        if (!debugging) { /* Abnormal conditions for tape */
                if (!cmdstatp->have_sense)
                        st_printk(KERN_WARNING, STp,
-                              "Error %x (driver bt 0x%x, host bt 0x%x).\n",
-                              result, driver_byte(result), host_byte(result));
+                              "Error %x (driver bt 0, host bt 0x%x).\n",
+                              result, host_byte(result));
                else if (cmdstatp->have_sense &&
                         scode != NO_SENSE &&
                         scode != RECOVERED_ERROR &&
 
 {
        struct scsiback_tpg *tpg = pending_req->v2p->tpg;
 
-       pr_err("[%s:%d] cmnd[0]=%02x -> st=%02x msg=%02x host=%02x drv=%02x\n",
+       pr_err("[%s:%d] cmnd[0]=%02x -> st=%02x msg=%02x host=%02x\n",
               tpg->tport->tport_name, pending_req->v2p->lun,
               pending_req->cmnd[0], status_byte(errors), msg_byte(errors),
-              host_byte(errors), driver_byte(errors));
+              host_byte(errors));
 }
 
 static void scsiback_fast_flush_area(struct vscsibk_pend *req)
 
 #define DID_TRANSPORT_MARGINAL 0x14 /* Transport marginal errors */
 #define DRIVER_OK       0x00   /* Driver status                           */
 
-/*
- *  These indicate the error that occurred, and what is available.
- */
-
-#define DRIVER_BUSY         0x01
-#define DRIVER_SOFT         0x02
-#define DRIVER_MEDIA        0x03
-#define DRIVER_ERROR        0x04
-
-#define DRIVER_INVALID      0x05
-#define DRIVER_TIMEOUT      0x06
-#define DRIVER_HARD         0x07
-#define DRIVER_SENSE       0x08
-
 /*
  * Internal return values.
  */
  *      status byte = set from target device
  *      msg_byte    = return status from host adapter itself.
  *      host_byte   = set by low-level driver to indicate status.
- *      driver_byte = set by mid-level.
  */
 #define status_byte(result) (((result) >> 1) & 0x7f)
 #define msg_byte(result)    (((result) >> 8) & 0xff)
 #define host_byte(result)   (((result) >> 16) & 0xff)
-#define driver_byte(result) (((result) >> 24) & 0xff)
 
 #define sense_class(sense)  (((sense) >> 4) & 0x7)
 #define sense_error(sense)  ((sense) & 0xf)
 
        cmd->result = (cmd->result & 0xff00ffff) | (status << 16);
 }
 
-static inline void set_driver_byte(struct scsi_cmnd *cmd, char status)
-{
-       cmd->result = (cmd->result & 0x00ffffff) | (status << 24);
-}
 
 static inline unsigned scsi_transfer_length(struct scsi_cmnd *scmd)
 {
 
  * keep setting this byte to be compatible with previous releases.
  */
 #define DRIVER_SENSE 0x08
+/* Obsolete driver_byte() declaration */
+#define driver_byte(result) (((result) >> 24) & 0xff)
 
 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 */
 
                scsi_hostbyte_name(DID_TRANSPORT_DISRUPTED),    \
                scsi_hostbyte_name(DID_TRANSPORT_FAILFAST))
 
-#define scsi_driverbyte_name(result)   { result, #result }
-#define show_driverbyte_name(val)                              \
-       __print_symbolic(val,                                   \
-               scsi_driverbyte_name(DRIVER_OK),                \
-               scsi_driverbyte_name(DRIVER_BUSY),              \
-               scsi_driverbyte_name(DRIVER_SOFT),              \
-               scsi_driverbyte_name(DRIVER_MEDIA),             \
-               scsi_driverbyte_name(DRIVER_ERROR),             \
-               scsi_driverbyte_name(DRIVER_INVALID),           \
-               scsi_driverbyte_name(DRIVER_TIMEOUT),           \
-               scsi_driverbyte_name(DRIVER_HARD),              \
-               scsi_driverbyte_name(DRIVER_SENSE))
-
 #define scsi_msgbyte_name(result)      { result, #result }
 #define show_msgbyte_name(val)                                 \
        __print_symbolic(val,                                   \
                  show_opcode_name(__entry->opcode),
                  __parse_cdb(__get_dynamic_array(cmnd), __entry->cmd_len),
                  __print_hex(__get_dynamic_array(cmnd), __entry->cmd_len),
-                 show_driverbyte_name(((__entry->result) >> 24) & 0xff),
+                 "DRIVER_OK",
                  show_hostbyte_name(((__entry->result) >> 16) & 0xff),
                  show_msgbyte_name(((__entry->result) >> 8) & 0xff),
                  show_statusbyte_name(__entry->result & 0xff))