NVME_CSI_NVM, len, log);
}
+int nvme_get_log_supported_log_pages(int fd, bool rae,
+ struct nvme_supported_log_pages *log)
+{
+ BUILD_ASSERT(sizeof(struct nvme_supported_log_pages) == 1024);
+ return __nvme_get_log(fd, NVME_LOG_LID_SUPPORTED_LOG_PAGES, rae,
+ sizeof(*log), log);
+}
+
int nvme_get_log_error(int fd, unsigned nr_entries, bool rae,
struct nvme_error_log_page *log)
{
return nvme_get_nsid_log(fd, lid, NVME_NSID_ALL, len, log);
}
+/** nvme_get_log_supported_log_pages() - Retrieve nmve supported log pages
+ * @fd: File descriptor of nvme device
+ * @rae: Retain asynchronous events
+ * @log: Array of LID supported and Effects data structures
+ *
+ * Return: The nvme command status if a response was received (see
+ * &enum nvme_status_field) or -1 with errno set otherwise.
+ */
+int nvme_get_log_supported_log_pages(int fd, bool rae,
+ struct nvme_supported_log_pages *log);
+
/**
* nvme_get_log_error() - Retrieve nvme error log
* @fd: File descriptor of nvme device
* @NVME_LOG_LSI_NONE: Use to omit a log lsi command parameter
* @NVME_LOG_LPO_NONE: Use to omit a log lpo command parameter
* @NVME_IDENTIFY_DATA_SIZE: The transfer size for nvme identify commands
+ * @NVME_LOG_SUPPORTED_LOG_PAGES_MAX: The lagest possible index in the supported
+ * log pages log.
* @NVME_ID_NVMSET_LIST_MAX: The largest possible nvmset index in identify
* nvmeset
* @NVME_ID_UUID_LIST_MAX: The largest possible uuid index in identify
NVME_LOG_LSI_NONE = 0,
NVME_LOG_LPO_NONE = 0,
NVME_IDENTIFY_DATA_SIZE = 4096,
+ NVME_LOG_SUPPORTED_LOG_PAGES_MAX = 256,
NVME_ID_NVMSET_LIST_MAX = 31,
NVME_ID_UUID_LIST_MAX = 127,
NVME_ID_CTRL_LIST_MAX = 2047,
struct nvme_id_domain_attr domain_attr[NVME_ID_DOMAIN_LIST_MAX];
};
+/**
+ * struct nvme_supported_log_pages -
+ * @lid_support:
+ *
+ * Supported Log Pages (Log Identifier 00h)
+ */
+struct nvme_supported_log_pages {
+ __le32 lid_support[NVME_LOG_SUPPORTED_LOG_PAGES_MAX];
+};
+
/**
* struct nvme_error_log_page - Error Information Log Entry (Log Identifier 01h)
* @error_count: Error Count: a 64-bit incrementing error count,
/**
* enum nvme_cmd_get_log_lid -
+ * @NVME_LOG_LID_SUPPORTED_LOG_PAGES:
* @NVME_LOG_LID_ERROR:
* @NVME_LOG_LID_SMART:
* @NVME_LOG_LID_FW_SLOT:
* @NVME_LOG_LID_ZNS_CHANGED_ZONES:
*/
enum nvme_cmd_get_log_lid {
+ NVME_LOG_LID_SUPPORTED_LOG_PAGES = 0x00,
NVME_LOG_LID_ERROR = 0x01,
NVME_LOG_LID_SMART = 0x02,
NVME_LOG_LID_FW_SLOT = 0x03,