diff mbox series

scsi: core: Add DID_ALLOC_FAILURE and DID_MEDIUM_ERROR to hostbyte_table

Message ID CAMNNMLFtQOHsjWUMs+q_+z9XqQYZmR34ewoB-5LrCpzGp1Ppkw@mail.gmail.com (mailing list archive)
State Accepted
Headers show
Series scsi: core: Add DID_ALLOC_FAILURE and DID_MEDIUM_ERROR to hostbyte_table | expand

Commit Message

Nikhil Kshirsagar April 1, 2020, 3:55 a.m. UTC
Since DID_ALLOC_FAILURE and DID_MEDIUM_ERROR are missing from the
hostbyte_table, scsi debug logging prints their numeric values only.
Adding them to the hostbyte_table to allow the scsi debug log to print
those as strings.

Signed-off-by: Nikhil Kshirsagar <nkshirsa@redhat.com>
---

Comments

Christoph Hellwig April 1, 2020, 9:06 a.m. UTC | #1
On Wed, Apr 01, 2020 at 09:25:00AM +0530, Nikhil Kshirsagar wrote:
> Since DID_ALLOC_FAILURE and DID_MEDIUM_ERROR are missing from the
> hostbyte_table, scsi debug logging prints their numeric values only.
> Adding them to the hostbyte_table to allow the scsi debug log to print
> those as strings.
> 
> Signed-off-by: Nikhil Kshirsagar <nkshirsa@redhat.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
Martin K. Petersen April 2, 2020, 2:03 a.m. UTC | #2
Nikhil,

> Since DID_ALLOC_FAILURE and DID_MEDIUM_ERROR are missing from the
> hostbyte_table, scsi debug logging prints their numeric values only.
> Adding them to the hostbyte_table to allow the scsi debug log to print
> those as strings.

Applied to 5.7/scsi-queue, thanks!
diff mbox series

Patch

diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c
index d4c2a2e4c5d4..84d73f57292b 100644
--- a/drivers/scsi/constants.c
+++ b/drivers/scsi/constants.c
@@ -404,7 +404,7 @@  static const char * const hostbyte_table[]={
 "DID_ABORT", "DID_PARITY", "DID_ERROR", "DID_RESET", "DID_BAD_INTR",
 "DID_PASSTHROUGH", "DID_SOFT_ERROR", "DID_IMM_RETRY", "DID_REQUEUE",
 "DID_TRANSPORT_DISRUPTED", "DID_TRANSPORT_FAILFAST", "DID_TARGET_FAILURE",
-"DID_NEXUS_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",