nvme: add a quirk for identify 0x2
Change-Id: I9cfc237a8514a1d323313851e14576ba2ba69077 Signed-off-by: Young Tack Jin <youngtack.jin@circuitblvd.com> Reviewed-on: https://review.gerrithub.io/410529 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
29c29ff9b6
commit
6442451b10
@ -49,6 +49,7 @@ extern "C" {
|
||||
#define SPDK_PCI_VID_MEMBLAZE 0x1c5f
|
||||
#define SPDK_PCI_VID_VIRTUALBOX 0x80ee
|
||||
#define SPDK_PCI_VID_VIRTIO 0x1af4
|
||||
#define SPDK_PCI_VID_CNEXLABS 0x1d1d
|
||||
|
||||
/**
|
||||
* PCI class code for NVMe devices.
|
||||
|
@ -819,7 +819,7 @@ nvme_ctrlr_identify_active_ns(struct spdk_nvme_ctrlr *ctrlr)
|
||||
return -ENOMEM;
|
||||
}
|
||||
status.done = false;
|
||||
if (ctrlr->vs.raw >= SPDK_NVME_VERSION(1, 1, 0)) {
|
||||
if (ctrlr->vs.raw >= SPDK_NVME_VERSION(1, 1, 0) && !(ctrlr->quirks & NVME_QUIRK_IDENTIFY_CNS)) {
|
||||
/*
|
||||
* Iterate through the pages and fetch each chunk of 1024 namespaces until
|
||||
* there are no more active namespaces
|
||||
|
@ -92,6 +92,11 @@
|
||||
*/
|
||||
#define NVME_QUIRK_READ_ZERO_AFTER_DEALLOCATE 0x20
|
||||
|
||||
/*
|
||||
* The controller doesn't handle Identify value others than 0 or 1 correctly.
|
||||
*/
|
||||
#define NVME_QUIRK_IDENTIFY_CNS 0x40
|
||||
|
||||
#define NVME_MAX_ASYNC_EVENTS (8)
|
||||
|
||||
#define NVME_MIN_TIMEOUT_PERIOD (5)
|
||||
|
@ -69,6 +69,12 @@ static const struct nvme_quirk nvme_quirks[] = {
|
||||
{ {SPDK_PCI_VID_VIRTUALBOX, 0x4e56, SPDK_PCI_ANY_ID, SPDK_PCI_ANY_ID},
|
||||
NVME_QUIRK_DELAY_AFTER_QUEUE_ALLOC
|
||||
},
|
||||
{ {SPDK_PCI_VID_INTEL, 0x5845, SPDK_PCI_ANY_ID, SPDK_PCI_ANY_ID},
|
||||
NVME_QUIRK_IDENTIFY_CNS
|
||||
},
|
||||
{ {SPDK_PCI_VID_CNEXLABS, 0x1f1f, SPDK_PCI_ANY_ID, SPDK_PCI_ANY_ID},
|
||||
NVME_QUIRK_IDENTIFY_CNS
|
||||
},
|
||||
{ {0x0000, 0x0000, 0x0000, 0x0000}, 0}
|
||||
};
|
||||
|
||||
@ -113,6 +119,7 @@ nvme_get_quirks(const struct spdk_pci_id *id)
|
||||
PRINT_QUIRK(NVME_INTEL_QUIRK_STRIPING);
|
||||
PRINT_QUIRK(NVME_QUIRK_DELAY_AFTER_QUEUE_ALLOC);
|
||||
PRINT_QUIRK(NVME_QUIRK_READ_ZERO_AFTER_DEALLOCATE);
|
||||
PRINT_QUIRK(NVME_QUIRK_IDENTIFY_CNS);
|
||||
|
||||
return quirk->flags;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user