From: Hannes Reinecke <hare@suse.de>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
Bart van Assche <bvanassche@acm.org>,
James Bottomley <james.bottomley@hansenpartnership.com>,
linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>
Subject: [PATCH 44/52] scsi: do not use DRIVER_INVALID
Date: Mon, 4 Nov 2019 10:01:43 +0100 [thread overview]
Message-ID: <20191104090151.129140-45-hare@suse.de> (raw)
In-Reply-To: <20191104090151.129140-1-hare@suse.de>
Use DID_ERROR instead of DRIVER_INVALID, as it really doesn't
matter if the driver or the device didn't understand the command.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
drivers/scsi/constants.c | 3 +--
drivers/scsi/hptiop.c | 2 +-
drivers/scsi/mvumi.c | 4 ++--
drivers/scsi/vmw_pvscsi.c | 3 ---
include/scsi/scsi.h | 2 --
include/trace/events/scsi.h | 3 +--
6 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c
index 1780837ea11e..1cee98534bfd 100644
--- a/drivers/scsi/constants.c
+++ b/drivers/scsi/constants.c
@@ -407,8 +407,7 @@ static const char * const hostbyte_table[]={
"DID_NEXUS_FAILURE" };
static const char * const driverbyte_table[]={
-"DRIVER_OK", "DRIVER_BUSY", "DRIVER_SOFT", "DRIVER_MEDIA", "DRIVER_ERROR",
-"DRIVER_INVALID"};
+"DRIVER_OK", "DRIVER_BUSY", "DRIVER_SOFT", "DRIVER_MEDIA", "DRIVER_ERROR"};
const char *scsi_hostbyte_string(int result)
{
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c
index 6a2561f26e38..e940d297fb96 100644
--- a/drivers/scsi/hptiop.c
+++ b/drivers/scsi/hptiop.c
@@ -761,7 +761,7 @@ static void hptiop_finish_scsi_req(struct hptiop_hba *hba, u32 tag,
break;
default:
- scp->result = DRIVER_INVALID << 24 | DID_ABORT << 16;
+ scp->result = (DID_ABORT << 16);
break;
}
diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
index 91eb879692c3..c53e74e796d8 100644
--- a/drivers/scsi/mvumi.c
+++ b/drivers/scsi/mvumi.c
@@ -1319,7 +1319,7 @@ static void mvumi_complete_cmd(struct mvumi_hba *mhba, struct mvumi_cmd *cmd,
}
break;
default:
- scmd->result |= (DRIVER_INVALID << 24) | (DID_ABORT << 16);
+ scmd->result |= (DID_ABORT << 16);
break;
}
@@ -2126,7 +2126,7 @@ static enum blk_eh_timer_return mvumi_timed_out(struct scsi_cmnd *scmd)
else
atomic_dec(&mhba->fw_outstanding);
- scmd->result = (DRIVER_INVALID << 24) | (DID_ABORT << 16);
+ scmd->result = (DID_ABORT << 16);
scmd->SCp.ptr = NULL;
if (scsi_bufflen(scmd)) {
dma_unmap_sg(&mhba->pdev->dev, scsi_sglist(scmd),
diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
index 74e5ed940952..76ed02f4920b 100644
--- a/drivers/scsi/vmw_pvscsi.c
+++ b/drivers/scsi/vmw_pvscsi.c
@@ -590,9 +590,6 @@ static void pvscsi_complete_request(struct pvscsi_adapter *adapter,
case BTSTAT_LUNMISMATCH:
case BTSTAT_TAGREJECT:
case BTSTAT_BADMSG:
- cmd->result = (DRIVER_INVALID << 24);
- /* fall through */
-
case BTSTAT_HAHARDWARE:
case BTSTAT_INVPHASE:
case BTSTAT_HATIMEOUT:
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index 274cc9e77634..4afb5e8a0a58 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -170,8 +170,6 @@ static inline int scsi_is_wlun(u64 lun)
#define DRIVER_MEDIA 0x03
#define DRIVER_ERROR 0x04
-#define DRIVER_INVALID 0x05
-
/*
* Internal return values.
*/
diff --git a/include/trace/events/scsi.h b/include/trace/events/scsi.h
index a1b4da442c5c..83bc7d97a469 100644
--- a/include/trace/events/scsi.h
+++ b/include/trace/events/scsi.h
@@ -131,8 +131,7 @@
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_ERROR))
#define scsi_msgbyte_name(result) { result, #result }
#define show_msgbyte_name(val) \
--
2.16.4
next prev parent reply other threads:[~2019-11-04 9:02 UTC|newest]
Thread overview: 90+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-04 9:00 [PATCHv3 00/52] Revamp SCSI result values Hannes Reinecke
2019-11-04 9:01 ` [PATCH 01/52] aic7xxx,aic79xxx: remove driver-defined SAM status definitions Hannes Reinecke
2019-11-04 9:01 ` [PATCH 02/52] bfa: drop driver-defined SCSI status codes Hannes Reinecke
2019-11-04 9:01 ` [PATCH 03/52] wd33c93: use SCSI status Hannes Reinecke
2019-11-04 9:01 ` [PATCH 04/52] acornscsi: use standard defines Hannes Reinecke
2019-11-04 9:01 ` [PATCH 05/52] libata-scsi: use standard SAM status codes Hannes Reinecke
2019-11-04 17:36 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 06/52] ib_srp: " Hannes Reinecke
2019-11-04 17:36 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 07/52] 3w-xxxx: " Hannes Reinecke
2019-11-04 17:37 ` Bart Van Assche
2019-11-05 2:06 ` adam radford
2019-11-04 9:01 ` [PATCH 08/52] arcmsr: " Hannes Reinecke
2019-11-04 17:37 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 09/52] dc395x: " Hannes Reinecke
2019-11-04 17:38 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 10/52] megaraid: " Hannes Reinecke
2019-11-04 17:39 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 11/52] megaraid_mboxi: " Hannes Reinecke
2019-11-04 17:39 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 12/52] gdth: " Hannes Reinecke
2019-11-04 17:40 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 13/52] dpt_i2o: " Hannes Reinecke
2019-11-04 17:40 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 14/52] nsp_cs: " Hannes Reinecke
2019-11-04 17:42 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 15/52] nsp32: fixup status handling Hannes Reinecke
2019-11-04 9:01 ` [PATCH 16/52] dc395: drop private SAM status code definitions Hannes Reinecke
2019-11-04 17:42 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 17/52] qla4xxx: use standard SAM status definitions Hannes Reinecke
2019-11-04 17:43 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 18/52] scsi: change status_byte() to return the standard SCSI status Hannes Reinecke
2019-11-04 17:45 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 19/52] target_core: Fixup target_complete_cmd() usage Hannes Reinecke
2019-11-04 9:01 ` [PATCH 20/52] sg: use SAM status definitions and avoid using masked_status Hannes Reinecke
2019-11-05 6:03 ` Douglas Gilbert
2019-11-04 9:01 ` [PATCH 21/52] initio: use standard SAM status definitions Hannes Reinecke
2019-11-04 17:46 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 22/52] scsi: Kill obsolete linux-specific status codes Hannes Reinecke
2019-11-04 17:46 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 23/52] scsi: introduce set_status_byte() Hannes Reinecke
2019-11-04 9:01 ` [PATCH 24/52] advansys: kill driver_defined status byte accessors Hannes Reinecke
2019-11-04 9:01 ` [PATCH 25/52] scsi: introduce scsi_build_sense() Hannes Reinecke
2019-11-04 17:47 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 26/52] libata-scsi: use scsi_build_sense() Hannes Reinecke
2019-11-04 9:01 ` [PATCH 27/52] zfcp: " Hannes Reinecke
2019-11-04 17:49 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 28/52] 3w-xxxx: " Hannes Reinecke
2019-11-04 17:49 ` Bart Van Assche
2019-11-05 2:13 ` adam radford
2019-11-04 9:01 ` [PATCH 29/52] libiscsi: " Hannes Reinecke
2019-11-04 17:49 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 30/52] lpfc: " Hannes Reinecke
2019-11-04 9:01 ` [PATCH 31/52] mpt3sas: " Hannes Reinecke
2019-11-04 9:01 ` [PATCH 32/52] mvumi: " Hannes Reinecke
2019-11-04 17:50 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 33/52] myrb: " Hannes Reinecke
2019-11-04 9:01 ` [PATCH 34/52] myrs: " Hannes Reinecke
2019-11-04 17:50 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 35/52] ps3rom: " Hannes Reinecke
2019-11-04 9:01 ` [PATCH 36/52] qla2xxx: " Hannes Reinecke
2019-11-04 17:51 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 37/52] scsi_debug: " Hannes Reinecke
2019-11-05 6:03 ` Douglas Gilbert
2019-11-04 9:01 ` [PATCH 38/52] smartpqi: " Hannes Reinecke
2019-11-04 9:01 ` [PATCH 39/52] stex: " Hannes Reinecke
2019-11-04 17:52 ` Bart Van Assche
2019-11-04 9:01 ` [PATCH 40/52] scsi: Kill DRIVER_SENSE Hannes Reinecke
2019-11-19 8:32 ` Martin Wilck
2019-11-04 9:01 ` [PATCH 41/52] scsi: Kill DRIVER_HARD Hannes Reinecke
2019-11-04 9:01 ` [PATCH 42/52] scsi_error: use DID_TIME_OUT instead of DRIVER_TIMEOUT Hannes Reinecke
2019-11-04 9:01 ` [PATCH 43/52] scsi: Kill DRIVER_TIMEOUT Hannes Reinecke
2019-11-04 9:01 ` Hannes Reinecke [this message]
2019-11-04 9:01 ` [PATCH 45/52] st: return error code in st_scsi_execute() Hannes Reinecke
2019-11-04 9:01 ` [PATCH 46/52] scsi_ioctl: return error code when blk_rq_map_kern() fails Hannes Reinecke
2019-11-04 9:01 ` [PATCH 47/52] scsi_dh_alua: do not interpret DRIVER_ERROR Hannes Reinecke
2019-11-04 9:01 ` [PATCH 48/52] 3w-9xxx: Kill unreachable code in twa_interrupt() Hannes Reinecke
2019-11-05 2:04 ` adam radford
2019-11-04 9:01 ` [PATCH 49/52] xen-scsiback: stop using DRIVER_ERROR Hannes Reinecke
2019-11-04 9:01 ` [PATCH 50/52] scsi: " Hannes Reinecke
2019-11-04 9:01 ` [PATCH 51/52] scsi: Kill DRIVER_MEDIA, DRIVER_SOFT, and DRIVER_BUSY Hannes Reinecke
2019-11-04 9:01 ` [PATCH 52/52] scsi: Drop the now obsolete driver_byte definitions Hannes Reinecke
2019-11-19 9:02 ` Martin Wilck
2019-11-19 9:31 ` Hannes Reinecke
2019-11-19 11:03 ` Martin Wilck
2019-11-19 11:56 ` Hannes Reinecke
2019-11-15 7:42 ` [PATCHv3 00/52] Revamp SCSI result values Hannes Reinecke
2019-11-19 3:35 ` Martin K. Petersen
2019-11-19 7:10 ` Hannes Reinecke
2019-11-20 3:10 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191104090151.129140-45-hare@suse.de \
--to=hare@suse.de \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).