Commit f750c4eb authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Jim Harris
Browse files

nvme: apply Identify CNS quirk to NS ID Descriptor



Avoid sending CNS values other than 0 and 1 to controllers with the
Identify CNS quirk added in commit 6442451b ("nvme: add a quirk for
identify 0x2").

This probably doesn't affect either of the controllers with the quirk in
practice, since this command is already only sent to controllers that
report NVMe version 1.3 or newer, but let's add the check anyway for
consistency.

Change-Id: I858c28ab7d43714c501dd22d6797259054f0f0a8
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410941


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent d6d097a1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -124,7 +124,8 @@ int nvme_ns_identify_update(struct spdk_nvme_ns *ns)
	}

	memset(ns->id_desc_list, 0, sizeof(ns->id_desc_list));
	if (ns->ctrlr->vs.raw >= SPDK_NVME_VERSION(1, 3, 0)) {
	if (ns->ctrlr->vs.raw >= SPDK_NVME_VERSION(1, 3, 0) &&
	    !(ns->ctrlr->quirks & NVME_QUIRK_IDENTIFY_CNS)) {
		SPDK_DEBUGLOG(SPDK_LOG_NVME, "Attempting to retrieve NS ID Descriptor List\n");
		status.done = false;
		rc = nvme_ctrlr_cmd_identify(ns->ctrlr, SPDK_NVME_IDENTIFY_NS_ID_DESCRIPTOR_LIST, 0, ns->id,