From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH v2 1/4] nvme: introduce ctrl attributes enumeration
Date: Tue, 30 Oct 2018 10:43:41 -0700 [thread overview]
Message-ID: <20181030174344.20171-2-sagi@grimberg.me> (raw)
In-Reply-To: <20181030174344.20171-1-sagi@grimberg.me>
We are growing more controller attributes, so use
a proper enumeration for it. For now just add the
128-bit hostid which we support.
Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
---
drivers/nvme/target/admin-cmd.c | 2 +-
include/linux/nvme.h | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index 1179f6314323..30778ffc46f5 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -304,7 +304,7 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req)
/* XXX: figure out what to do about RTD3R/RTD3 */
id->oaes = cpu_to_le32(NVMET_AEN_CFG_OPTIONAL);
- id->ctratt = cpu_to_le32(1 << 0);
+ id->ctratt = cpu_to_le32(NVME_CTRL_ATTR_HID_128_BIT);
id->oacs = 0;
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 818dbe9331be..753c83a5c01f 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -198,6 +198,10 @@ enum {
NVME_PS_FLAGS_NON_OP_STATE = 1 << 1,
};
+enum nvme_ctrl_attr {
+ NVME_CTRL_ATTR_HID_128_BIT = (1 << 0),
+};
+
struct nvme_id_ctrl {
__le16 vid;
__le16 ssvid;
--
2.17.1
next prev parent reply other threads:[~2018-10-30 17:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-30 17:43 [PATCH v2 0/4] traffic based keep alive support (TP 4024) Sagi Grimberg
2018-10-30 17:43 ` Sagi Grimberg [this message]
2018-10-30 20:32 ` [PATCH v2 1/4] nvme: introduce ctrl attributes enumeration Chaitanya Kulkarni
2018-11-02 8:00 ` Hannes Reinecke
2018-10-30 17:43 ` [PATCH v2 2/4] nvmet: support for traffic based keep-alive Sagi Grimberg
2018-11-02 8:04 ` Hannes Reinecke
2018-10-30 17:43 ` [PATCH v2 3/4] nvme-core: cache controller attributes Sagi Grimberg
2018-10-30 20:27 ` Chaitanya Kulkarni
2018-11-02 8:05 ` Hannes Reinecke
2018-10-30 17:43 ` [PATCH v2 4/4] nvme-core: support traffic based keep-alive based on controller support Sagi Grimberg
2018-11-02 8:06 ` Hannes Reinecke
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=20181030174344.20171-2-sagi@grimberg.me \
--to=sagi@grimberg.me \
/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).