summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host
diff options
context:
space:
mode:
authorJavier González <javier@cnexlabs.com>2018-03-30 00:05:12 +0200
committerJens Axboe <axboe@kernel.dk>2018-03-30 01:29:09 +0200
commitf1d4e8121f3fc25f9be94c6de6b8f5f788ad0265 (patch)
treee63647ba5652bbc5a1502a486a0df459df2e2b82 /drivers/nvme/host
parentlightnvm: add minor version to generic geometry (diff)
downloadlinux-f1d4e8121f3fc25f9be94c6de6b8f5f788ad0265.tar.xz
linux-f1d4e8121f3fc25f9be94c6de6b8f5f788ad0265.zip
lightnvm: add shorten OCSSD version in geo
Create a shorten version to use in the generic geometry. Signed-off-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <mb@lightnvm.io> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/host')
-rw-r--r--drivers/nvme/host/lightnvm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index de4105544956..f7f7769e7588 100644
--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -299,6 +299,9 @@ static int nvme_nvm_setup_12(struct nvme_nvm_id12 *id,
geo->major_ver_id = id->ver_id;
geo->minor_ver_id = 2;
+ /* Set compacted version for upper layers */
+ geo->version = NVM_OCSSD_SPEC_12;
+
geo->nr_chnls = src->num_ch;
geo->nr_luns = src->num_lun;
geo->all_luns = geo->nr_chnls * geo->nr_luns;
@@ -384,6 +387,9 @@ static int nvme_nvm_setup_20(struct nvme_nvm_id20 *id,
geo->major_ver_id = id->mjr;
geo->minor_ver_id = id->mnr;
+ /* Set compacted version for upper layers */
+ geo->version = NVM_OCSSD_SPEC_20;
+
if (!(geo->major_ver_id == 2 && geo->minor_ver_id == 0)) {
pr_err("nvm: OCSSD version not supported (v%d.%d)\n",
geo->major_ver_id, geo->minor_ver_id);