All of lore.kernel.org
 help / color / mirror / Atom feed
From: minwoo.im.dev@gmail.com (Minwoo Im)
Subject: [PATCH 2/2] nvme-cli: add a status code of Firmware Commit command
Date: Sat, 16 Dec 2017 03:02:51 +0900	[thread overview]
Message-ID: <1513360971-15566-3-git-send-email-minwoo.im.dev@gmail.com> (raw)
In-Reply-To: <1513360971-15566-1-git-send-email-minwoo.im.dev@gmail.com>

NVMe 1.3 spec introduced Boot Partition feature with Boot Partition
Write Prohibited status code for Firmware Commit command.

Add this status code and print statement when parsing error code.

Signed-off-by: Minwoo Im <minwoo.im.dev at gmail.com>
---
 linux/nvme.h | 1 +
 nvme-print.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/linux/nvme.h b/linux/nvme.h
index e21610f..a15e6b8 100644
--- a/linux/nvme.h
+++ b/linux/nvme.h
@@ -1188,6 +1188,7 @@ enum {
 	NVME_SC_NS_NOT_ATTACHED		= 0x11a,
 	NVME_SC_THIN_PROV_NOT_SUPP	= 0x11b,
 	NVME_SC_CTRL_LIST_INVALID	= 0x11c,
+	NVME_SC_BP_WRITE_PROHIBITED	= 0x11e,
 
 	/*
 	 * I/O Command Set Specific - NVM commands:
diff --git a/nvme-print.c b/nvme-print.c
index 87f0766..ef00c41 100644
--- a/nvme-print.c
+++ b/nvme-print.c
@@ -1206,6 +1206,7 @@ char *nvme_status_to_string(__u32 status)
 	case NVME_SC_NS_NOT_ATTACHED:		return "NS_NOT_ATTACHED";
 	case NVME_SC_THIN_PROV_NOT_SUPP:	return "THIN_PROVISIONING_NOT_SUPPORTED";
 	case NVME_SC_CTRL_LIST_INVALID:		return "CONTROLLER_LIST_INVALID";
+	case NVME_SC_BP_WRITE_PROHIBITED:	return "BOOT PARTITION WRITE PROHIBITED";
 	case NVME_SC_BAD_ATTRIBUTES:		return "BAD_ATTRIBUTES";
 	case NVME_SC_WRITE_FAULT:		return "WRITE_FAULT";
 	case NVME_SC_READ_ERROR:		return "READ_ERROR";
-- 
2.7.4

      parent reply	other threads:[~2017-12-15 18:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15 18:02 [PATCH 0/2] nvme-cli: update Firmware Activate command Minwoo Im
2017-12-15 18:02 ` [PATCH 1/2] nvme-cli: update Firmware Activate command for new feature Minwoo Im
2017-12-15 18:23   ` Keith Busch
2017-12-17  3:02     ` Minwoo Im
2017-12-15 18:02 ` Minwoo Im [this message]

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=1513360971-15566-3-git-send-email-minwoo.im.dev@gmail.com \
    --to=minwoo.im.dev@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.