summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorMatias Bjørling <mb@lightnvm.io>2018-03-30 00:04:54 +0200
committerJens Axboe <axboe@kernel.dk>2018-03-30 01:29:09 +0200
commitff12581ec702d6c4607f614107d4816c21c6be56 (patch)
tree118060e6639946049674ccc4158a9f7fc940eb0a /drivers/nvme
parentlightnvm: remove mlc pairs structure (diff)
downloadlinux-ff12581ec702d6c4607f614107d4816c21c6be56.tar.xz
linux-ff12581ec702d6c4607f614107d4816c21c6be56.zip
lightnvm: remove multiple groups in 1.2 data structure
Only one id group from the 1.2 specification is supported. Make sure that only the first group is accessible. Signed-off-by: Matias Bjørling <mb@lightnvm.io> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/lightnvm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index 940c9b9a2a09..dc0b1335c7c6 100644
--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -166,7 +166,8 @@ struct nvme_nvm_id {
__le32 dom;
struct nvme_nvm_addr_format ppaf;
__u8 resv[228];
- struct nvme_nvm_id_group groups[4];
+ struct nvme_nvm_id_group group;
+ __u8 resv2[2880];
} __packed;
struct nvme_nvm_bb_tbl {
@@ -208,7 +209,7 @@ static int init_grps(struct nvm_id *nvm_id, struct nvme_nvm_id *nvme_nvm_id)
if (nvme_nvm_id->cgrps != 1)
return -EINVAL;
- src = &nvme_nvm_id->groups[0];
+ src = &nvme_nvm_id->group;
grp = &nvm_id->grp;
grp->mtype = src->mtype;