Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff12581e authored by Matias Bjørling's avatar Matias Bjørling Committed by Jens Axboe
Browse files

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: default avatarMatias Bjørling <mb@lightnvm.io>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d8a39cae
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;