All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matias Bjørling" <m@bjorling.me>
To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-nvme@lists.infradead.org, axboe@fb.com
Cc: "Matias Bjørling" <m@bjorling.me>
Subject: [PATCH 05/13] lightnvm: expose mccap in identify command
Date: Mon, 16 Nov 2015 15:34:39 +0100	[thread overview]
Message-ID: <1447684487-25539-6-git-send-email-m@bjorling.me> (raw)
In-Reply-To: <1447684487-25539-1-git-send-email-m@bjorling.me>

The mccap field is required for I/O command option support. It defines the
following flash access modes:

 * SLC mode
 * Erase/Program Suspension
 * Scramble On/Off
 * Encryption

It is slotted in between mpos and cpar, changing the offset for
cpar as well.

Signed-off-by: Matias Bjørling <m@bjorling.me>
---
 drivers/nvme/host/lightnvm.c | 4 +++-
 include/linux/lightnvm.h     | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index 60687ed..52b311c 100644
--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -169,8 +169,9 @@ struct nvme_nvm_id_group {
 	__le32			tbet;
 	__le32			tbem;
 	__le32			mpos;
+	__le32			mccap;
 	__le16			cpar;
-	__u8			reserved[910];
+	__u8			reserved[906];
 } __packed;
 
 struct nvme_nvm_addr_format {
@@ -265,6 +266,7 @@ static int init_grps(struct nvm_id *nvm_id, struct nvme_nvm_id *nvme_nvm_id)
 		dst->tbet = le32_to_cpu(src->tbet);
 		dst->tbem = le32_to_cpu(src->tbem);
 		dst->mpos = le32_to_cpu(src->mpos);
+		dst->mccap = le32_to_cpu(src->mccap);
 
 		dst->cpar = le16_to_cpu(src->cpar);
 	}
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index 9b3dc1b..2572856 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -74,6 +74,7 @@ struct nvm_id_group {
 	u32	tbet;
 	u32	tbem;
 	u32	mpos;
+	u32	mccap;
 	u16	cpar;
 	u8	res[913];
 } __packed;
-- 
2.1.4


WARNING: multiple messages have this Message-ID (diff)
From: m@bjorling.me (Matias Bjørling)
Subject: [PATCH 05/13] lightnvm: expose mccap in identify command
Date: Mon, 16 Nov 2015 15:34:39 +0100	[thread overview]
Message-ID: <1447684487-25539-6-git-send-email-m@bjorling.me> (raw)
In-Reply-To: <1447684487-25539-1-git-send-email-m@bjorling.me>

The mccap field is required for I/O command option support. It defines the
following flash access modes:

 * SLC mode
 * Erase/Program Suspension
 * Scramble On/Off
 * Encryption

It is slotted in between mpos and cpar, changing the offset for
cpar as well.

Signed-off-by: Matias Bj?rling <m at bjorling.me>
---
 drivers/nvme/host/lightnvm.c | 4 +++-
 include/linux/lightnvm.h     | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index 60687ed..52b311c 100644
--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -169,8 +169,9 @@ struct nvme_nvm_id_group {
 	__le32			tbet;
 	__le32			tbem;
 	__le32			mpos;
+	__le32			mccap;
 	__le16			cpar;
-	__u8			reserved[910];
+	__u8			reserved[906];
 } __packed;
 
 struct nvme_nvm_addr_format {
@@ -265,6 +266,7 @@ static int init_grps(struct nvm_id *nvm_id, struct nvme_nvm_id *nvme_nvm_id)
 		dst->tbet = le32_to_cpu(src->tbet);
 		dst->tbem = le32_to_cpu(src->tbem);
 		dst->mpos = le32_to_cpu(src->mpos);
+		dst->mccap = le32_to_cpu(src->mccap);
 
 		dst->cpar = le16_to_cpu(src->cpar);
 	}
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index 9b3dc1b..2572856 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -74,6 +74,7 @@ struct nvm_id_group {
 	u32	tbet;
 	u32	tbem;
 	u32	mpos;
+	u32	mccap;
 	u16	cpar;
 	u8	res[913];
 } __packed;
-- 
2.1.4

  parent reply	other threads:[~2015-11-16 14:41 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16 14:34 [PATCH 00/13] lightnvm updates for 4.4-rc2 Matias Bjørling
2015-11-16 14:34 ` Matias Bjørling
2015-11-16 14:34 ` [PATCH 01/13] MAINTAINERS: Add linux-block list to LightNVM for patches Matias Bjørling
2015-11-16 14:34   ` Matias Bjørling
2015-11-16 14:34 ` [PATCH 02/13] lightnvm: change max_phys_sect to uint Matias Bjørling
2015-11-16 14:34   ` Matias Bjørling
2015-11-16 14:34 ` [PATCH 03/13] lightnvm: update bad block table format Matias Bjørling
2015-11-16 14:34   ` Matias Bjørling
2015-11-16 14:34 ` [PATCH 04/13] lightnvm: update alignments for identify command Matias Bjørling
2015-11-16 14:34   ` Matias Bjørling
2015-11-16 14:34 ` Matias Bjørling [this message]
2015-11-16 14:34   ` [PATCH 05/13] lightnvm: expose mccap in " Matias Bjørling
2015-11-16 14:34 ` [PATCH 06/13] lightnvm: remove unused attrs in nvm_id structs Matias Bjørling
2015-11-16 14:34   ` Matias Bjørling
2015-11-16 14:34 ` [PATCH 07/13] lightnvm: check for NAND flash and its type Matias Bjørling
2015-11-16 14:34   ` Matias Bjørling
2015-11-16 14:34 ` [PATCH 08/13] lightnvm: prematurely activate nvm_dev Matias Bjørling
2015-11-16 14:34   ` Matias Bjørling
2015-11-16 14:34 ` [PATCH 09/13] lightnvm: prevent double free on init error Matias Bjørling
2015-11-16 14:34   ` Matias Bjørling
2015-11-16 14:34 ` [PATCH 10/13] lightnvm: remove linear and device addr modes Matias Bjørling
2015-11-16 14:34   ` Matias Bjørling
2015-11-16 14:34 ` [PATCH 11/13] nvme: missing ppaf copy Matias Bjørling
2015-11-16 14:34   ` Matias Bjørling
2015-11-16 14:34 ` [PATCH 12/13] nvme: remove reserved double word Matias Bjørling
2015-11-16 14:34   ` Matias Bjørling
2015-11-16 14:34 ` [PATCH 13/13] lightnvm: cleanup queue before target removal Matias Bjørling
2015-11-16 14:34   ` Matias Bjørling
2015-11-16 22:25 ` [PATCH 00/13] lightnvm updates for 4.4-rc2 Jens Axboe
2015-11-16 22:25   ` Jens Axboe

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=1447684487-25539-6-git-send-email-m@bjorling.me \
    --to=m@bjorling.me \
    --cc=axboe@fb.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    /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.