Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1270256
| Path | csiph.com!goblin2!goblin.stu.neva.ru!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Matias Bjørling <m@bjorling.me> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 05/13] lightnvm: expose mccap in identify command |
| Date | Mon, 16 Nov 2015 15:50:02 +0100 |
| Message-ID | <qvtgu-6H-29@gated-at.bofh.it> (permalink) |
| References | <qvt6N-8uH-3@gated-at.bofh.it> |
| X-Original-To | linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, axboe@fb.com |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=xryPROIzb8qRmw+aCdW+xPoI55TNLY8XZs+n39fKRkc=; b=M8DodefXH5n7ogmVFVD5j2+VBcug1p03/w3+/4pxGeEzc8xCoCD5r4nnBKQmjrf98Z Z4KYtDRyMzyOilkr5ahl2G4twNQF744TdgvSo0O+udhv410CiHPGwwkJW9yNAXYjd53t /x2Axeo2rktnqLbYoArAM2MMax7PFSe2qkLAs= |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=xryPROIzb8qRmw+aCdW+xPoI55TNLY8XZs+n39fKRkc=; b=RQVkLSjUTTz5Huo2YJsvf1qc9O0hZRbvOsSJh6xt2qHr2eWe4RES4Z3pKoljn47Mtc 55DqUm8WGemb4qL3SnWosHsSRVFwnbp0biYEJNznEt5L0vEZmIlmwiOZnNxqs+sOR5X4 +yxSwgc3F5K2O1GFx3J2PhaDWPbDFCStqvAZ+vuO9LuNHBV3sR5i9FySZM22QytIZtDW lFN3rIxn2I52HzW+mUKxE1RiPAyS7WRY+bv24UP3WISz24EirEYkMImaRqa2yGHtN89s Dj/VdS4C89dEebM/DRHd8SKsDnJdNZvzH5iQ/mHEFy6behmbT1AOsBVgAPv1/iynlspQ TmTg== |
| X-Gm-Message-State | ALoCoQm33Lw9uf7xYidHGuoGI33TF5dGw8AoMI59mW71TnacsfuDjC2ORUc4xPKHsjRRwx8/USJ5 |
| X-Received | by 10.28.153.137 with SMTP id b131mr20547925wme.3.1447684650457; Mon, 16 Nov 2015 06:37:30 -0800 (PST) |
| X-Mailer | git-send-email 2.1.4 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 60 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Matias Bjørling <m@bjorling.me> |
| X-Original-Date | Mon, 16 Nov 2015 15:34:39 +0100 |
| X-Original-Message-ID | <1447684487-25539-6-git-send-email-m@bjorling.me> |
| X-Original-References | <1447684487-25539-1-git-send-email-m@bjorling.me> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1270256 |
Show key headers only | View raw
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/13] lightnvm updates for 4.4-rc2 Matias Bjørling <m@bjorling.me> - 2015-11-16 15:40 +0100 [PATCH 01/13] MAINTAINERS: Add linux-block list to LightNVM for patches Matias Bjørling <m@bjorling.me> - 2015-11-16 15:40 +0100 [PATCH 02/13] lightnvm: change max_phys_sect to uint Matias Bjørling <m@bjorling.me> - 2015-11-16 15:50 +0100 [PATCH 05/13] lightnvm: expose mccap in identify command Matias Bjørling <m@bjorling.me> - 2015-11-16 15:50 +0100 [PATCH 03/13] lightnvm: update bad block table format Matias Bjørling <m@bjorling.me> - 2015-11-16 15:50 +0100 [PATCH 04/13] lightnvm: update alignments for identify command Matias Bjørling <m@bjorling.me> - 2015-11-16 15:50 +0100 [PATCH 06/13] lightnvm: remove unused attrs in nvm_id structs Matias Bjørling <m@bjorling.me> - 2015-11-16 15:50 +0100 Re: [PATCH 00/13] lightnvm updates for 4.4-rc2 Jens Axboe <axboe@fb.com> - 2015-11-16 23:30 +0100
csiph-web