nvme_spec: define OAES bits in Identify Controller

Add bitfields for Optional Asynchronous Events Supported.

Also add it to the nvme/identify example.

Change-Id: Ifeb1cf8af94286a6cf437ec4b6f9e8b752c7d2f9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2016-08-23 16:15:47 -07:00
parent 84812653be
commit 1efc92c7f8
2 changed files with 16 additions and 1 deletions

View File

@ -524,6 +524,11 @@ print_controller(struct spdk_nvme_ctrlr *ctrlr, struct spdk_pci_device *pci_dev)
(uint64_t)1 << (12 + cap.bits.mpsmin));
printf("Memory Page Size Maximum: %" PRIu64 " bytes\n",
(uint64_t)1 << (12 + cap.bits.mpsmax));
printf("Optional Asynchronous Events Supported\n");
printf(" Namespace Attribute Notices: %s\n",
cdata->oaes.ns_attribute_notices ? "Supported" : "Not Supported");
printf(" Firmware Activation Notices: %s\n",
cdata->oaes.fw_activation_notices ? "Supported" : "Not Supported");
printf("\n");
printf("Admin Command Set Attributes\n");

View File

@ -774,7 +774,17 @@ struct __attribute__((packed)) spdk_nvme_ctrlr_data {
uint32_t rtd3e;
/** optional asynchronous events supported */
uint32_t oaes;
struct {
uint32_t reserved1 : 8;
/** Supports sending Namespace Attribute Notices. */
uint32_t ns_attribute_notices : 1;
/** Supports sending Firmware Activation Notices. */
uint32_t fw_activation_notices : 1;
uint32_t reserved2 : 22;
} oaes;
/** controller attributes */
struct {