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: Jim Harris <james.r.harris@intel.com> Change-Id: I536033677a8364c955d562226e3feba4dbad0e07 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6454 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
06ace1efbf
commit
345bb2e89d
@ -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,11 +243,12 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
while (outstanding_commands) {
|
||||
spdk_nvme_ctrlr_process_admin_completions(ctrlr);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user