lnvm: add a quirk for identify LightNVM device

Change-Id: I841d7b47bc85498abb608944587e7b7585138263
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/411588
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Xiaodong Liu 2018-05-14 21:03:06 +08:00 committed by Changpeng Liu
parent 269a479064
commit c6ae008db5
2 changed files with 10 additions and 1 deletions

View File

@ -99,6 +99,13 @@ extern pid_t g_spdk_nvme_pid;
*/
#define NVME_QUIRK_IDENTIFY_CNS 0x40
/*
* The controller supports LightNVM command set if matching additional
* condition, like the first byte (value 0x1) in the vendor specific
* bits of the namespace identify structure is set.
*/
#define NVME_QUIRK_LIGHTNVM 0x80
#define NVME_MAX_ASYNC_EVENTS (8)
#define NVME_MIN_TIMEOUT_PERIOD (5)

View File

@ -73,7 +73,8 @@ static const struct nvme_quirk nvme_quirks[] = {
NVME_QUIRK_IDENTIFY_CNS
},
{ {SPDK_PCI_VID_CNEXLABS, 0x1f1f, SPDK_PCI_ANY_ID, SPDK_PCI_ANY_ID},
NVME_QUIRK_IDENTIFY_CNS
NVME_QUIRK_IDENTIFY_CNS |
NVME_QUIRK_LIGHTNVM
},
{ {0x0000, 0x0000, 0x0000, 0x0000}, 0}
};
@ -120,6 +121,7 @@ nvme_get_quirks(const struct spdk_pci_id *id)
PRINT_QUIRK(NVME_QUIRK_DELAY_AFTER_QUEUE_ALLOC);
PRINT_QUIRK(NVME_QUIRK_READ_ZERO_AFTER_DEALLOCATE);
PRINT_QUIRK(NVME_QUIRK_IDENTIFY_CNS);
PRINT_QUIRK(NVME_QUIRK_LIGHTNVM);
return quirk->flags;
}