Commit 54c29086 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen
Browse files

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: default avatarBart Van Assche <bvanassche@acm.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent b840abef
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1174,8 +1174,7 @@ Members of interest:
                   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')
+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ static int bsg_transport_complete_rq(struct request *rq, struct sg_io_v4 *hdr)
	 */
	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;
+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ static int bsg_scsi_complete_rq(struct request *rq, struct sg_io_v4 *hdr)
	 */
	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;
+1 −1
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ static int blk_complete_sghdr_rq(struct request *rq, struct sg_io_hdr *hdr,
	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;
+0 −15
Original line number Diff line number Diff line
@@ -406,10 +406,6 @@ static const char * const hostbyte_table[]={
"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;
@@ -421,17 +417,6 @@ const char *scsi_hostbyte_string(int result)
}
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),
Loading