From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH 3/4] nvme-core: cache controller attributes
Date: Thu, 27 Sep 2018 18:15:36 -0700 [thread overview]
Message-ID: <20180928011537.30069-4-sagi@grimberg.me> (raw)
In-Reply-To: <20180928011537.30069-1-sagi@grimberg.me>
We get the controller attributes in identify, cache
them as we'll need them for traffic based keep alive
support.
Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
---
drivers/nvme/host/core.c | 1 +
drivers/nvme/host/nvme.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index ef6748f4ff47..6bb6214c0634 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2409,6 +2409,7 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
ctrl->sgls = le32_to_cpu(id->sgls);
ctrl->kas = le16_to_cpu(id->kas);
ctrl->max_namespaces = le32_to_cpu(id->mnan);
+ ctrl->ctratt = le32_to_cpu(id->ctratt);
if (id->rtd3e) {
/* us -> s */
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index bb4a2003c097..ee1c4fc0249c 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -193,6 +193,7 @@ struct nvme_ctrl {
u8 apsta;
u32 oaes;
u32 aen_result;
+ u32 ctratt;
unsigned int shutdown_timeout;
unsigned int kato;
bool subsystem;
--
2.17.1
next prev parent reply other threads:[~2018-09-28 1:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-28 1:15 [PATCH 0/4] traffic based keep alive support (TP 4024) Sagi Grimberg
2018-09-28 1:15 ` [PATCH 1/4] nvme: introduce ctrl attributes enumeration Sagi Grimberg
2018-09-28 1:15 ` [PATCH 2/4] nvmet: support for traffic based keep-alive Sagi Grimberg
2018-09-28 1:15 ` Sagi Grimberg [this message]
2018-09-28 1:15 ` [PATCH 4/4] nvme-core: support traffic based keep-alive based on controller support Sagi Grimberg
2018-10-17 7:05 ` Christoph Hellwig
2018-10-19 0:38 ` Sagi Grimberg
2018-10-19 6:00 ` Christoph Hellwig
2018-10-19 6:30 ` Sagi Grimberg
2018-10-16 1:07 ` [PATCH 0/4] traffic based keep alive support (TP 4024) Sagi Grimberg
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=20180928011537.30069-4-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).