summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.com>2021-04-27 10:30:20 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2021-05-31 22:48:22 -0400
commit54c29086195fd72b6a290ef367e71f73fa657b1f (patch)
tree10e8b7eb6cb3e5eb9843c7a0bc17d1b8af7bc33b /include
parentb840abeffc23c5bf2e4dd53f0448d72bdedf1666 (diff)
downloadlinux-54c29086195fd72b6a290ef367e71f73fa657b1f.tar.bz2
scsi: core: Drop the now obsolete driver_byte definitions
The driver_byte field in the result is now unused, so we can drop the definitions. Link: https://lore.kernel.org/r/20210427083046.31620-15-hare@suse.de Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/scsi/scsi.h16
-rw-r--r--include/scsi/scsi_cmnd.h4
-rw-r--r--include/scsi/sg.h2
-rw-r--r--include/trace/events/scsi.h15
4 files changed, 3 insertions, 34 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index 57f0ca00ddda..bd8eb6033bf4 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -153,20 +153,6 @@ static inline int scsi_status_is_check_condition(int status)
#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.
*/
enum scsi_disposition {
@@ -197,12 +183,10 @@ enum scsi_disposition {
* 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)
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 4e2a8f2a3045..e7986b9babaf 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -325,10 +325,6 @@ static inline void set_host_byte(struct scsi_cmnd *cmd, char status)
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)
{
diff --git a/include/scsi/sg.h b/include/scsi/sg.h
index d5c17775c3b4..e9dd5477ca7a 100644
--- a/include/scsi/sg.h
+++ b/include/scsi/sg.h
@@ -142,6 +142,8 @@ struct compat_sg_io_hdr {
* 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 */
diff --git a/include/trace/events/scsi.h b/include/trace/events/scsi.h
index f624969a4f14..428cca71c2ba 100644
--- a/include/trace/events/scsi.h
+++ b/include/trace/events/scsi.h
@@ -124,19 +124,6 @@
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, \
@@ -327,7 +314,7 @@ DECLARE_EVENT_CLASS(scsi_cmd_done_timeout_template,
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))