#ifndef _LIBNVME_IOCTL_H
#define _LIBNVME_IOCTL_H
+#include <stddef.h>
#include <sys/ioctl.h>
#include "types.h"
static inline int nvme_get_nsid_log(int fd, enum nvme_cmd_get_log_lid lid,
__u32 nsid, __u32 len, void *log)
{
- return nvme_get_log(fd, lid, nsid, 0, 0, 0, false, 0, 0, len,
+ return nvme_get_log(fd, lid, nsid, 0, 0, 0, false, 0, NVME_CSI_NVM, len,
log);
}
static inline int nvme_get_features_data(int fd, enum nvme_features_id fid,
__u32 nsid, __u32 data_len, void *data, __u32 *result)
{
- return nvme_get_features(fd, fid, nsid, 0, 0, 0, data_len, data, result);
+ return nvme_get_features(fd, fid, nsid, NVME_GET_FEATURES_SEL_CURRENT,
+ 0, 0, data_len, data, result);
}
static inline int nvme_get_features_simple(int fd, enum nvme_features_id fid,
__u32 nsid, __u32 *result)
__u32 pmrsts = nvme_mmio_read32(regs + NVME_REG_PMRSTS);
__u32 pmrebs = nvme_mmio_read32(regs + NVME_REG_PMREBS);
__u32 pmrswtp = nvme_mmio_read32(regs + NVME_REG_PMRSWTP);
- __u64 pmrmsc = nvme_mmio_read64(regs + NVME_REG_PMRMSC);
+ __u64 pmrmsc = nvme_mmio_read32(regs + NVME_REG_PMRMSCL) |
+ (__u64)nvme_mmio_read64(regs + NVME_REG_PMRMSCU) << 32;
printf("%-10s : %llx\n", "CAP", cap);
printf(" %-8s : %llx\n", "MQES", NVME_CAP_MQES(cap));
return;
}
- printf("zamds:%u\n", zns_ctrl.zamds);
+ printf("zasl:%u\n", zns_ctrl.zasl);
if (nvme_zns_mgmt_recv(nvme_ns_get_fd(n), nvme_ns_get_nsid(n), 0,
NVME_ZNS_ZRA_REPORT_ZONES, NVME_ZNS_ZRAS_REPORT_ALL,