nvme: add SHST_COMPLETE quirk for VMWare emulated SSDs
VMWare Workstation NVMe emulation does not seem to write the SHST_COMPLETE bit within 10 seconds, resulting in an ERRLOG during detach/shutdown. So add a quirk to cover these VMWare SSDs. But rather than squashing the ERRLOG completely for these SSDs, just add a message instead indicating this is somewhat expected on these VMWare emulated SSDs. Fixes issue #676. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I3dfcb631feda639926fd712f1f41abb66cbf2096 Reviewed-on: https://review.gerrithub.io/c/445942 (master) Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447591 Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
90c60fc372
commit
c828d09d3a
@ -51,6 +51,7 @@ extern "C" {
|
|||||||
#define SPDK_PCI_VID_VIRTUALBOX 0x80ee
|
#define SPDK_PCI_VID_VIRTUALBOX 0x80ee
|
||||||
#define SPDK_PCI_VID_VIRTIO 0x1af4
|
#define SPDK_PCI_VID_VIRTIO 0x1af4
|
||||||
#define SPDK_PCI_VID_CNEXLABS 0x1d1d
|
#define SPDK_PCI_VID_CNEXLABS 0x1d1d
|
||||||
|
#define SPDK_PCI_VID_VMWARE 0x15ad
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PCI class code for NVMe devices.
|
* PCI class code for NVMe devices.
|
||||||
|
@ -544,6 +544,9 @@ nvme_ctrlr_shutdown(struct spdk_nvme_ctrlr *ctrlr)
|
|||||||
} while (ms_waited < shutdown_timeout_ms);
|
} while (ms_waited < shutdown_timeout_ms);
|
||||||
|
|
||||||
SPDK_ERRLOG("did not shutdown within %u milliseconds\n", shutdown_timeout_ms);
|
SPDK_ERRLOG("did not shutdown within %u milliseconds\n", shutdown_timeout_ms);
|
||||||
|
if (ctrlr->quirks & NVME_QUIRK_SHST_COMPLETE) {
|
||||||
|
SPDK_ERRLOG("likely due to shutdown handling in the VMWare emulated NVMe SSD\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -116,6 +116,13 @@ extern pid_t g_spdk_nvme_pid;
|
|||||||
*/
|
*/
|
||||||
#define NVME_INTEL_QUIRK_NO_LOG_PAGES 0x100
|
#define NVME_INTEL_QUIRK_NO_LOG_PAGES 0x100
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The controller does not set SHST_COMPLETE in a reasonable amount of time. This
|
||||||
|
* is primarily seen in virtual VMWare NVMe SSDs. This quirk merely adds an additional
|
||||||
|
* error message that on VMWare NVMe SSDs, the shutdown timeout may be expected.
|
||||||
|
*/
|
||||||
|
#define NVME_QUIRK_SHST_COMPLETE 0x200
|
||||||
|
|
||||||
#define NVME_MAX_ASYNC_EVENTS (8)
|
#define NVME_MAX_ASYNC_EVENTS (8)
|
||||||
|
|
||||||
#define NVME_MIN_TIMEOUT_PERIOD (5)
|
#define NVME_MIN_TIMEOUT_PERIOD (5)
|
||||||
|
@ -83,6 +83,9 @@ static const struct nvme_quirk nvme_quirks[] = {
|
|||||||
NVME_QUIRK_IDENTIFY_CNS |
|
NVME_QUIRK_IDENTIFY_CNS |
|
||||||
NVME_QUIRK_OCSSD
|
NVME_QUIRK_OCSSD
|
||||||
},
|
},
|
||||||
|
{ {SPDK_PCI_VID_VMWARE, 0x07f0, SPDK_PCI_ANY_ID, SPDK_PCI_ANY_ID},
|
||||||
|
NVME_QUIRK_SHST_COMPLETE
|
||||||
|
},
|
||||||
{ {0x0000, 0x0000, 0x0000, 0x0000}, 0}
|
{ {0x0000, 0x0000, 0x0000, 0x0000}, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user