nvme_spec: update Identify Controller SGLS field

In NVMe 1.3, the Identify Controller data SGLS field's definition was
changed; in NVMe 1.2, the first bit simply indicated whether SGLs were
supported, but in NVMe 1.3, the first two bits now indicate whether SGLs
are supported and whether they require Dword-aligned data.

Change-Id: I9181055a86f52ad939b65eca5af66a400594a696
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376027
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Daniel Verkamp 2017-08-28 14:00:57 -07:00 committed by Jim Harris
parent 6428de9e34
commit e3971c41ea
2 changed files with 16 additions and 3 deletions

View File

@ -622,7 +622,9 @@ print_controller(struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_transport
printf("Atomic Write Unit (PFail): %d\n", cdata->awupf + 1);
printf("Scatter-Gather List\n");
printf(" SGL Command Set: %s\n",
cdata->sgls.supported ? "Supported" : "Not Supported");
cdata->sgls.supported == SPDK_NVME_SGLS_SUPPORTED ? "Supported" :
cdata->sgls.supported == SPDK_NVME_SGLS_SUPPORTED_DWORD_ALIGNED ? "Supported (Dword aligned)" :
"Not Supported");
printf(" SGL Keyed: %s\n",
cdata->sgls.keyed_sgl ? "Supported" : "Not Supported");
printf(" SGL Bit Bucket Descriptor: %s\n",

View File

@ -849,6 +849,18 @@ enum spdk_nvmf_ctrlr_model {
#define SPDK_NVME_CTRLR_MN_LEN 40
#define SPDK_NVME_CTRLR_FR_LEN 8
/** Identify Controller data sgls.supported values */
enum spdk_nvme_sgls_supported {
/** SGLs are not supported */
SPDK_NVME_SGLS_NOT_SUPPORTED = 0,
/** SGLs are supported with no alignment or granularity requirement. */
SPDK_NVME_SGLS_SUPPORTED = 1,
/** SGLs are supported with a DWORD alignment and granularity requirement. */
SPDK_NVME_SGLS_SUPPORTED_DWORD_ALIGNED = 2,
};
struct __attribute__((packed)) spdk_nvme_ctrlr_data {
/* bytes 0-255: controller capabilities and features */
@ -1174,8 +1186,7 @@ struct __attribute__((packed)) spdk_nvme_ctrlr_data {
/** SGL support */
struct {
uint32_t supported : 1;
uint32_t reserved0 : 1;
uint32_t supported : 2;
uint32_t keyed_sgl : 1;
uint32_t reserved1 : 13;
uint32_t bit_bucket_descriptor : 1;