From: Caleb Sander Date: Fri, 8 Sep 2023 18:21:04 +0000 (-0600) Subject: ioctl: correct feature IDs in Get/Set Features commands X-Git-Tag: v1.6~22 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=85631b44c09a5060f346cf2b2a9d5dee744ffe2e;p=users%2Fsagi%2Flibnvme.git ioctl: correct feature IDs in Get/Set Features commands Several nvme_{g,s}et_features_*() functions use the wrong feature ID. Correct them so the intended feature is requested. Signed-off-by: Caleb Sander --- diff --git a/src/nvme/ioctl.c b/src/nvme/ioctl.c index ec0ac6b6..91429f47 100644 --- a/src/nvme/ioctl.c +++ b/src/nvme/ioctl.c @@ -678,6 +678,7 @@ int nvme_set_features_timestamp(int fd, bool save, __u64 timestamp) struct nvme_set_features_args args = { .args_size = sizeof(args), .fd = fd, + .fid = NVME_FEAT_FID_TIMESTAMP, .nsid = NVME_NSID_NONE, .cdw11 = 0, .cdw12 = 0, @@ -998,7 +999,7 @@ int nvme_get_features_irq_config(int fd, enum nvme_get_features_sel sel, struct nvme_get_features_args args = { .args_size = sizeof(args), .fd = fd, - .fid = NVME_FEAT_FID_LBA_RANGE, + .fid = NVME_FEAT_FID_IRQ_CONFIG, .nsid = NVME_NSID_NONE, .sel = sel, .cdw11 = iv, @@ -1031,7 +1032,7 @@ int nvme_get_features_auto_pst(int fd, enum nvme_get_features_sel sel, struct nvme_get_features_args args = { .args_size = sizeof(args), .fd = fd, - .fid = NVME_FEAT_FID_LBA_RANGE, + .fid = NVME_FEAT_FID_AUTO_PST, .nsid = NVME_NSID_NONE, .sel = sel, .cdw11 = 0,