Skip to content

Commit 85631b4

Browse files
calebsanderigaw
authored andcommitted
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 <[email protected]>
1 parent 18b3316 commit 85631b4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/nvme/ioctl.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@ int nvme_set_features_timestamp(int fd, bool save, __u64 timestamp)
678678
struct nvme_set_features_args args = {
679679
.args_size = sizeof(args),
680680
.fd = fd,
681+
.fid = NVME_FEAT_FID_TIMESTAMP,
681682
.nsid = NVME_NSID_NONE,
682683
.cdw11 = 0,
683684
.cdw12 = 0,
@@ -998,7 +999,7 @@ int nvme_get_features_irq_config(int fd, enum nvme_get_features_sel sel,
998999
struct nvme_get_features_args args = {
9991000
.args_size = sizeof(args),
10001001
.fd = fd,
1001-
.fid = NVME_FEAT_FID_LBA_RANGE,
1002+
.fid = NVME_FEAT_FID_IRQ_CONFIG,
10021003
.nsid = NVME_NSID_NONE,
10031004
.sel = sel,
10041005
.cdw11 = iv,
@@ -1031,7 +1032,7 @@ int nvme_get_features_auto_pst(int fd, enum nvme_get_features_sel sel,
10311032
struct nvme_get_features_args args = {
10321033
.args_size = sizeof(args),
10331034
.fd = fd,
1034-
.fid = NVME_FEAT_FID_LBA_RANGE,
1035+
.fid = NVME_FEAT_FID_AUTO_PST,
10351036
.nsid = NVME_NSID_NONE,
10361037
.sel = sel,
10371038
.cdw11 = 0,

0 commit comments

Comments
 (0)