summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorJavier González <javier@javigon.com>2018-10-09 13:12:12 +0200
committerJens Axboe <axboe@kernel.dk>2018-10-09 08:25:08 -0600
commit6fd05cad5ee1290b276dd8ed90a1e019b1fa577a (patch)
tree43547d56a60bb9048936879966963ac1bba2db4c /drivers/nvme
parentd672d92d9c433c365fd6cdb4da1c02562b5f1178 (diff)
downloadlinux-6fd05cad5ee1290b276dd8ed90a1e019b1fa577a.tar.bz2
lightnvm: do no update csecs and sos on 1.2
1.2 devices exposes their data and metadata size through the separate identify command. Make sure that the NVMe LBA format does not override these values. 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')
-rw-r--r--drivers/nvme/host/lightnvm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index 7d0a4d3b0a48..a4f3b263cd6c 100644
--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -977,6 +977,9 @@ void nvme_nvm_update_nvm_info(struct nvme_ns *ns)
struct nvm_dev *ndev = ns->ndev;
struct nvm_geo *geo = &ndev->geo;
+ if (geo->version == NVM_OCSSD_SPEC_12)
+ return;
+
geo->csecs = 1 << ns->lba_shift;
geo->sos = ns->ms;
}