Commit 345bb2e8 authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

nvme/identify: submit only one GET_FEATURE at a time



This is a workaround for issue #1799 that would require
a fix from Google Cloud Platform.  GCP NVMe SSDs do
not support overlapped GET_FEATURE commands - the
cdw0 value on completions get mixed up.

On GCP the result is that identify app reports only
1 SQ/CQ supported when in fact it supports 16.

We can easily workaround this in the identify app by
submitting one GET_FEATURE and then polling for its
completion before submitting the next one.

We may consider reverting this in the future should GCP
provide a fix, but there is really no harm in keeping
this patch long term since this isn't an I/O path issue.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I536033677a8364c955d562226e3feba4dbad0e07

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6454


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
parent 06ace1ef
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -228,7 +228,10 @@ get_features(struct spdk_nvme_ctrlr *ctrlr)
		SPDK_OCSSD_FEAT_MEDIA_FEEDBACK,
	};

	/* Submit several GET FEATURES commands and wait for them to complete */
	/* Submit only one GET FEATURES at a time. There is a known issue #1799
	 * with Google Cloud Platform NVMe SSDs that do not handle overlapped
	 * GET FEATURES commands correctly.
	 */
	outstanding_commands = 0;
	for (i = 0; i < SPDK_COUNTOF(features_to_get); i++) {
		if (!spdk_nvme_ctrlr_is_ocssd_supported(ctrlr) &&
@@ -240,13 +243,14 @@ get_features(struct spdk_nvme_ctrlr *ctrlr)
		} else {
			printf("get_feature(0x%02X) failed to submit command\n", features_to_get[i]);
		}
	}

		while (outstanding_commands) {
			spdk_nvme_ctrlr_process_admin_completions(ctrlr);
		}
	}

}

static int
get_error_log_page(struct spdk_nvme_ctrlr *ctrlr)
{