summaryrefslogtreecommitdiffstats
path: root/nvme-print.h
diff options
context:
space:
mode:
Diffstat (limited to 'nvme-print.h')
-rw-r--r--nvme-print.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/nvme-print.h b/nvme-print.h
index 4533474..b17172e 100644
--- a/nvme-print.h
+++ b/nvme-print.h
@@ -16,6 +16,8 @@ typedef struct nvme_effects_log_node {
#define nvme_show_error(msg, ...) nvme_show_message(true, msg, ##__VA_ARGS__)
#define nvme_show_result(msg, ...) nvme_show_message(false, msg, ##__VA_ARGS__)
+#define POWER_OF_TWO(exponent) (1 << (exponent))
+
void d(unsigned char *buf, int len, int width, int group);
void d_raw(unsigned char *buf, unsigned len);
@@ -26,6 +28,7 @@ struct print_ops {
void (*phy_rx_eom_log)(struct nvme_phy_rx_eom_log *log, __u16 controller);
void (*ctrl_list)(struct nvme_ctrl_list *ctrl_list);
void (*ctrl_registers)(void *bar, bool fabrics);
+ void (*ctrl_register)(int offset, uint64_t value);
void (*directive)(__u8 type, __u8 oper, __u16 spec, __u32 nsid, __u32 result, void *buf, __u32 len);
void (*discovery_log)(struct nvmf_discovery_log *log, int numrec);
void (*effects_log_list)(struct list_head *list);
@@ -205,6 +208,7 @@ void nvme_show_media_unit_stat_log(struct nvme_media_unit_stat_log *mus,
void nvme_show_supported_cap_config_log(struct nvme_supported_cap_config_list_log *caplog,
enum nvme_print_flags flags);
void nvme_show_ctrl_registers(void *bar, bool fabrics, enum nvme_print_flags flags);
+void nvme_show_ctrl_register(void *bar, bool fabrics, int offset, enum nvme_print_flags flags);
void nvme_show_single_property(int offset, uint64_t prop, enum nvme_print_flags flags);
void nvme_show_id_ns_descs(void *data, unsigned nsid, enum nvme_print_flags flags);
void nvme_show_lba_status(struct nvme_lba_status *list, unsigned long len,
@@ -291,9 +295,10 @@ const char *nvme_log_to_string(__u8 lid);
const char *nvme_nss_hw_error_to_string(__u16 error_code);
const char *nvme_pel_event_to_string(int type);
const char *nvme_register_pmr_hsts_to_string(__u8 hsts);
-const char *nvme_register_pmr_pmrszu_to_string(__u8 pmrszu);
+const char *nvme_register_unit_to_string(__u8 unit);
const char *nvme_register_szu_to_string(__u8 szu);
const char *nvme_register_to_string(int reg);
+const char *nvme_register_symbol_to_string(int offset);
const char *nvme_resv_notif_to_string(__u8 type);
const char *nvme_select_to_string(int sel);
const char *nvme_sstat_status_to_string(__u16 status);
@@ -302,6 +307,8 @@ const char *nvme_zone_state_to_string(__u8 state);
const char *nvme_zone_type_to_string(__u8 cond);
const char *nvme_plm_window_to_string(__u32 plm);
const char *nvme_ns_wp_cfg_to_string(enum nvme_ns_write_protect_cfg state);
+const char *nvme_pel_rci_rcpit_to_string(enum nvme_pel_rci_rcpit rcpit);
+const char *nvme_pel_ehai_pit_to_string(enum nvme_pel_ehai_pit pit);
void nvme_dev_full_path(nvme_ns_t n, char *path, size_t len);
void nvme_generic_full_path(nvme_ns_t n, char *path, size_t len);
@@ -310,4 +317,7 @@ void nvme_show_perror(const char *msg);
void nvme_show_error_status(int status, const char *msg, ...);
void nvme_show_init(void);
void nvme_show_finish(void);
+bool nvme_is_fabrics_reg(int offset);
+bool nvme_registers_cmbloc_support(__u32 cmbsz);
+bool nvme_registers_pmrctl_ready(__u32 pmrctl);
#endif /* NVME_PRINT_H */