diff options
author | Jens Axboe <axboe@kernel.dk> | 2017-09-11 15:56:49 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-09-11 15:56:49 -0600 |
commit | be1c704329a51cbcf019f971c5d2023c0226d9cd (patch) | |
tree | eea96c1d9a6f0a86a3eee1f4cda07ab60c69914d /drivers/nvme/host/core.c | |
parent | 0b045bd1c1c2819b33f4522e3efa4666d1ecf1a4 (diff) | |
parent | 1359798f9d4082eb04575efdd19512fbd9c28464 (diff) |
Merge branch 'nvme-4.14' of git://git.infradead.org/nvme into for-linus
Pull NVMe fixes from Christoph:
"Below are a few small fixes for the current merge window:
- fix string.h compilation failures with the new memcpy_and_pad
helper (Martin Wilck)
- fix incorrect dereference of a PCI data structure in the lightnvm
support code (me)
- HMB fixes (Akinobu Mita and me)"
Diffstat (limited to 'drivers/nvme/host/core.c')
-rw-r--r-- | drivers/nvme/host/core.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 277a7a02cba5..acc816b67582 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1897,6 +1897,8 @@ int nvme_init_identify(struct nvme_ctrl *ctrl) ctrl->cntlid = le16_to_cpu(id->cntlid); ctrl->hmpre = le32_to_cpu(id->hmpre); ctrl->hmmin = le32_to_cpu(id->hmmin); + ctrl->hmminds = le32_to_cpu(id->hmminds); + ctrl->hmmaxd = le16_to_cpu(id->hmmaxd); } kfree(id); @@ -2377,10 +2379,11 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid) nvme_report_ns_ids(ctrl, ns->ns_id, id, ns->eui, ns->nguid, &ns->uuid); - if (nvme_nvm_ns_supported(ns, id) && - nvme_nvm_register(ns, disk_name, node)) { - dev_warn(ctrl->device, "%s: LightNVM init failure\n", __func__); - goto out_free_id; + if ((ctrl->quirks & NVME_QUIRK_LIGHTNVM) && id->vs[0] == 0x1) { + if (nvme_nvm_register(ns, disk_name, node)) { + dev_warn(ctrl->device, "LightNVM init failure\n"); + goto out_free_id; + } } disk = alloc_disk_node(0, node); |