]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme: add spinup control feature (fid=0x1A)
authorGollu Appalanaidu <anaidu.gollu@samsung.com>
Wed, 25 Aug 2021 17:32:17 +0000 (23:02 +0530)
committerDaniel Wagner <dwagner@suse.de>
Mon, 15 Nov 2021 11:06:29 +0000 (12:06 +0100)
Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[dwagner: ported from monolitic, removed nvme.h change, part of
          libnvme]
qiSigned-off-by: Daniel Wagner <dwagner@suse.de>

nvme-print.c

index 268cc2ed9d61e12acbbf7047be730af8c8b15889..424769a42ceb743e5ed6ecfa020047382ebad3e4 100644 (file)
@@ -5380,6 +5380,7 @@ const char *nvme_feature_to_string(enum nvme_features_id feature)
        case NVME_FEAT_FID_HOST_BEHAVIOR:return "Host Behavior";
        case NVME_FEAT_FID_SANITIZE:    return "Sanitize";
        case NVME_FEAT_FID_LBA_STS_INTERVAL: return "LBA Status Interval";
+       case NVME_FEAT_FID_SPINUP_CONTROL:      return "Spinup Control";
        }
        /*
         * We don't use the "default:" statement to let the compiler warning if
@@ -5841,6 +5842,9 @@ void nvme_feature_show_fields(enum nvme_features_id fid, unsigned int result, un
        case NVME_FEAT_FID_RRL:
                printf("\tRead Recovery Level (RRL): %u\n", result & 0xf);
                break;
+       case NVME_FEAT_FID_SPINUP_CONTROL:
+               printf("\tSpinup control feature Enabled: %s\n", (result & 1) ? "True" : "False");
+               break;
        default:
                break;
        }