Skip to contentSkip to conversation

nvme: add missing path related status values

PATCH In review Max Gurtovoy 3 participants 6 messages Apr 28, 2022 – May 10, 2022 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 nvme: add missing path related status values

The following path related status code from the NVM specification were
added: Internal Path Error (00h) and Controller Pathing Error (60h).

---
 include/linux/nvme.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/nvme.h +2 -0
index f626a445d1a8..bbabdc7600da 100644
@@ -1679,9 +1679,11 @@ enum {
 	/*
 	 * Path-related Errors:
 	 */
+	NVME_SC_INTERNAL_PATH_ERROR	= 0x300,
 	NVME_SC_ANA_PERSISTENT_LOSS	= 0x301,
 	NVME_SC_ANA_INACCESSIBLE	= 0x302,
 	NVME_SC_ANA_TRANSITION		= 0x303,
+	NVME_SC_CTRL_PATH_ERROR		= 0x360,
 	NVME_SC_HOST_PATH_ERROR		= 0x370,
 	NVME_SC_HOST_ABORTED_CMD	= 0x371,
 
Signature · 1 line
2.18.2
#1 lore raw

PATCH 2/2 nvme: add missing status values to verbose logging

The following status values were added: NVME_SC_INTERNAL_PATH_ERROR, NVME_SC_CTRL_PATH_ERROR and NVME_SC_HOST_ABORTED_CMD.

---
 drivers/nvme/host/constants.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/nvme/host/constants.c +3 -0
index 6c2aa8eefb55..1dd1d78de295 100644
@@ -154,10 +154,13 @@ static const char * const nvme_statuses[] = {
 	[NVME_SC_COMPARE_FAILED] = "Compare Failure",
 	[NVME_SC_ACCESS_DENIED] = "Access Denied",
 	[NVME_SC_UNWRITTEN_BLOCK] = "Deallocated or Unwritten Logical Block",
+	[NVME_SC_INTERNAL_PATH_ERROR] = "Internal Pathing Error",
 	[NVME_SC_ANA_PERSISTENT_LOSS] = "Asymmetric Access Persistent Loss",
 	[NVME_SC_ANA_INACCESSIBLE] = "Asymmetric Access Inaccessible",
 	[NVME_SC_ANA_TRANSITION] = "Asymmetric Access Transition",
+	[NVME_SC_CTRL_PATH_ERROR] = "Controller Pathing Error",
 	[NVME_SC_HOST_PATH_ERROR] = "Host Pathing Error",
+	[NVME_SC_HOST_ABORTED_CMD] = "Host Aborted Command",
 };
 
 const unsigned char *nvme_get_error_status_str(u16 status)
Signature · 1 line
2.18.2
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] nvme: add missing status values to verbose logging

Quoted 16 lines · Max Gurtovoy

The following status values were added: NVME_SC_INTERNAL_PATH_ERROR, NVME_SC_CTRL_PATH_ERROR and NVME_SC_HOST_ABORTED_CMD.

---
  drivers/nvme/host/constants.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/nvme/host/constants.c +0 -0
index 6c2aa8eefb55..1dd1d78de295 100644
@@ -154,10 +154,13 @@ static const char * const nvme_statuses[] = {
  	[NVME_SC_COMPARE_FAILED] = "Compare Failure",
  	[NVME_SC_ACCESS_DENIED] = "Access Denied",
  	[NVME_SC_UNWRITTEN_BLOCK] = "Deallocated or Unwritten Logical Block",

drivers/nvme/host/constants.c static const char * const nvme_statuses[] = { · line 166

Quoted 10 lines
drivers/nvme/host/constants.c +3 -0
+	[NVME_SC_INTERNAL_PATH_ERROR] = "Internal Pathing Error",
  	[NVME_SC_ANA_PERSISTENT_LOSS] = "Asymmetric Access Persistent Loss",
  	[NVME_SC_ANA_INACCESSIBLE] = "Asymmetric Access Inaccessible",
  	[NVME_SC_ANA_TRANSITION] = "Asymmetric Access Transition",
+	[NVME_SC_CTRL_PATH_ERROR] = "Controller Pathing Error",
  	[NVME_SC_HOST_PATH_ERROR] = "Host Pathing Error",
+	[NVME_SC_HOST_ABORTED_CMD] = "Host Aborted Command",
  };
 
  const unsigned char *nvme_get_error_status_str(u16 status)

As mentioned, maybe merge with the first patch.
But that's merely cosmetical.

Cheers,

Hannes

Signature · 4 lines
Dr. Hannes Reinecke                Kernel Storage Architect
[email protected]                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
#3 lore raw

Re: [PATCH 2/2] nvme: add missing status values to verbose logging

Quoted 21 lines · Hannes Reinecke
Quoted 20 lines · Max Gurtovoy

The following status values were added: NVME_SC_INTERNAL_PATH_ERROR, NVME_SC_CTRL_PATH_ERROR and NVME_SC_HOST_ABORTED_CMD.

---
  drivers/nvme/host/constants.c | 3 +++

  1 file changed, 3 insertions(+)
drivers/nvme/host/constants.c +1 -0
index 6c2aa8eefb55..1dd1d78de295 100644
@@ -154,10 +154,13 @@ static const char * const nvme_statuses[] = {
       [NVME_SC_COMPARE_FAILED] = "Compare Failure",
       [NVME_SC_ACCESS_DENIED] = "Access Denied",
       [NVME_SC_UNWRITTEN_BLOCK] = "Deallocated or Unwritten Logical Block",
+    [NVME_SC_INTERNAL_PATH_ERROR] = "Internal Pathing Error",
       [NVME_SC_ANA_PERSISTENT_LOSS] = "Asymmetric Access Persistent Loss",
       [NVME_SC_ANA_INACCESSIBLE] = "Asymmetric Access Inaccessible",
       [NVME_SC_ANA_TRANSITION] = "Asymmetric Access Transition",
Quoted 8 lines

drivers/nvme/host/constants.c static const char * const nvme_statuses[] = { · line 166

Quoted 5 lines
drivers/nvme/host/constants.c +2 -0
+    [NVME_SC_CTRL_PATH_ERROR] = "Controller Pathing Error",
       [NVME_SC_HOST_PATH_ERROR] = "Host Pathing Error",
+    [NVME_SC_HOST_ABORTED_CMD] = "Host Aborted Command",
   };
     const unsigned char *nvme_get_error_status_str(u16 status)

As mentioned, maybe merge with the first patch.
But that's merely cosmetical.

Thanks.

I'm fine with squashing it to 1 commit if needed.

Or it can be done during the merge to nvme tree.

Christoph, please comment what is preferred ?

Quoted 6 lines

Cheers,

Hannes

Reviewed-by on v1 1/2
#4 lore raw
In reply to Max Gurtovoy
Quoted 14 lines · Max Gurtovoy

The following path related status code from the NVM specification were
added: Internal Path Error (00h) and Controller Pathing Error (60h).

---
  include/linux/nvme.h | 2 ++
  1 file changed, 2 insertions(+)
include/linux/nvme.h +0 -0
index f626a445d1a8..bbabdc7600da 100644
@@ -1679,9 +1679,11 @@ enum {
  	/*

include/linux/nvme.h enum { · line 1689

Quoted 10 lines
include/linux/nvme.h +2 -0
  	 * Path-related Errors:
  	 */
+	NVME_SC_INTERNAL_PATH_ERROR	= 0x300,
  	NVME_SC_ANA_PERSISTENT_LOSS	= 0x301,
  	NVME_SC_ANA_INACCESSIBLE	= 0x302,
  	NVME_SC_ANA_TRANSITION		= 0x303,
+	NVME_SC_CTRL_PATH_ERROR		= 0x360,
  	NVME_SC_HOST_PATH_ERROR		= 0x370,
  	NVME_SC_HOST_ABORTED_CMD	= 0x371,
 

I would merge both patches.
However:

Cheers,

Hannes

Signature · 4 lines
Dr. Hannes Reinecke                Kernel Storage Architect
[email protected]                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer