svn commit: r330802 - in head: sbin/nvmecontrol sys/dev/nvme
Alexander Motin
mav at FreeBSD.org
Mon Mar 12 16:31:26 UTC 2018
Author: mav
Date: Mon Mar 12 16:31:25 2018
New Revision: 330802
URL: https://svnweb.freebsd.org/changeset/base/330802
Log:
Print fuses and fna fields in identify data.
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
Modified:
head/sbin/nvmecontrol/identify.c
head/sys/dev/nvme/nvme.h
Modified: head/sbin/nvmecontrol/identify.c
==============================================================================
--- head/sbin/nvmecontrol/identify.c Mon Mar 12 16:04:10 2018 (r330801)
+++ head/sbin/nvmecontrol/identify.c Mon Mar 12 16:31:25 2018 (r330802)
@@ -196,6 +196,17 @@ print_controller(struct nvme_controller_data *cdata)
printf("Timestamp feature: %sSupported\n",
((oncs >> NVME_CTRLR_DATA_ONCS_TIMESTAMP_SHIFT) &
NVME_CTRLR_DATA_ONCS_TIMESTAMP_MASK) ? "" : "Not ");
+ printf("Fused Operation Support: %s%s\n",
+ (cdata->fuses == 0) ? "Not Supported" : "",
+ ((cdata->fuses >> NVME_CTRLR_DATA_FUSES_CNW_SHIFT) &
+ NVME_CTRLR_DATA_FUSES_CNW_MASK) ? "Compare and Write" : "");
+ printf("Format NVM Attributes: %s%s Erase, %s Format\n",
+ ((cdata->fna >> NVME_CTRLR_DATA_FNA_CRYPTO_ERASE_SHIFT) &
+ NVME_CTRLR_DATA_FNA_CRYPTO_ERASE_MASK) ? "Crypto Erase, " : "",
+ ((cdata->fna >> NVME_CTRLR_DATA_FNA_ERASE_ALL_SHIFT) &
+ NVME_CTRLR_DATA_FNA_ERASE_ALL_MASK) ? "All-NVM" : "Per-NS",
+ ((cdata->fna >> NVME_CTRLR_DATA_FNA_FORMAT_ALL_SHIFT) &
+ NVME_CTRLR_DATA_FNA_FORMAT_ALL_MASK) ? "All-NVM" : "Per-NS");
printf("Volatile Write Cache: %s\n",
vwc_present ? "Present" : "Not Present");
Modified: head/sys/dev/nvme/nvme.h
==============================================================================
--- head/sys/dev/nvme/nvme.h Mon Mar 12 16:04:10 2018 (r330801)
+++ head/sys/dev/nvme/nvme.h Mon Mar 12 16:31:25 2018 (r330802)
@@ -244,6 +244,18 @@
#define NVME_CTRLR_DATA_ONCS_TIMESTAMP_SHIFT (6)
#define NVME_CTRLR_DATA_ONCS_TIMESTAMP_MASK (0x1)
+/** Fused Operation Support */
+#define NVME_CTRLR_DATA_FUSES_CNW_SHIFT (0)
+#define NVME_CTRLR_DATA_FUSES_CNW_MASK (0x1)
+
+/** Format NVM Attributes */
+#define NVME_CTRLR_DATA_FNA_FORMAT_ALL_SHIFT (0)
+#define NVME_CTRLR_DATA_FNA_FORMAT_ALL_MASK (0x1)
+#define NVME_CTRLR_DATA_FNA_ERASE_ALL_SHIFT (1)
+#define NVME_CTRLR_DATA_FNA_ERASE_ALL_MASK (0x1)
+#define NVME_CTRLR_DATA_FNA_CRYPTO_ERASE_SHIFT (2)
+#define NVME_CTRLR_DATA_FNA_CRYPTO_ERASE_MASK (0x1)
+
/** volatile write cache */
#define NVME_CTRLR_DATA_VWC_PRESENT_SHIFT (0)
#define NVME_CTRLR_DATA_VWC_PRESENT_MASK (0x1)
More information about the svn-src-head
mailing list