Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1307034
| From | Matias Bjørling <m@bjorling.me> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 20/25] lightnvm: add mccap support |
| Date | 2016-01-12 08:00 +0100 |
| Message-ID | <qQ15W-5F9-49@gated-at.bofh.it> (permalink) |
| References | <qQ15T-5F9-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Some flash media has extended capabilities, such as programming SLC
pages on MLC/TLC flash, erase/program suspend, scramble and encryption.
MCCAP is introduced to detect support for these capabilities in the
command set.
Signed-off-by: Matias Bjørling <m@bjorling.me>
---
drivers/lightnvm/core.c | 1 +
include/linux/lightnvm.h | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index e5e3963..5199c12 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -376,6 +376,7 @@ static int nvm_core_init(struct nvm_dev *dev)
dev->sec_size = grp->csecs;
dev->oob_size = grp->sos;
dev->sec_per_pg = grp->fpg_sz / grp->csecs;
+ dev->mccap = grp->mccap;
memcpy(&dev->ppaf, &id->ppaf, sizeof(struct nvm_addr_format));
dev->plane_mode = NVM_PLANE_SINGLE;
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index aa35907..b90d283 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -61,6 +61,12 @@ enum {
NVM_BLK_T_GRWN_BAD = 0x2,
NVM_BLK_T_DEV = 0x4,
NVM_BLK_T_HOST = 0x8,
+
+ /* Memory capabilities */
+ NVM_ID_CAP_SLC = 0x1,
+ NVM_ID_CAP_CMD_SUSPEND = 0x2,
+ NVM_ID_CAP_SCRAMBLE = 0x4,
+ NVM_ID_CAP_ENCRYPT = 0x8,
};
struct nvm_id_group {
@@ -278,6 +284,7 @@ struct nvm_dev {
int blks_per_lun;
int sec_size;
int oob_size;
+ int mccap;
struct nvm_addr_format ppaf;
/* Calculated/Cached values. These do not reflect the actual usable
--
2.1.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/25] LightNVM patches for 4.5 Matias Bjørling <m@bjorling.me> - 2016-01-12 08:00 +0100
[PATCH 24/25] lightnvm: use system block for mm initialization Matias Bjørling <m@bjorling.me> - 2016-01-12 08:00 +0100
[PATCH 03/25] lightnvm: add check after mempool allocation Matias Bjørling <m@bjorling.me> - 2016-01-12 08:00 +0100
[PATCH 07/25] lightnvm: refactor end_io functions for sync Matias Bjørling <m@bjorling.me> - 2016-01-12 08:00 +0100
[PATCH 20/25] lightnvm: add mccap support Matias Bjørling <m@bjorling.me> - 2016-01-12 08:00 +0100
[PATCH 05/25] lightnvm: move ppa erase logic to core Matias Bjørling <m@bjorling.me> - 2016-01-12 08:00 +0100
[PATCH 09/25] lightnvm: check bi_error in gc Matias Bjørling <m@bjorling.me> - 2016-01-12 08:00 +0100
[PATCH 22/25] lightnvm: core on-disk initialization Matias Bjørling <m@bjorling.me> - 2016-01-12 08:00 +0100
Re: [PATCH 00/25] LightNVM patches for 4.5 Jens Axboe <axboe@fb.com> - 2016-01-12 16:20 +0100
Re: [PATCH 00/25] LightNVM patches for 4.5 Matias Bjorling <m@bjorling.me> - 2016-01-13 01:10 +0100
csiph-web