1
0
Fork 0

Merging upstream version 2.12.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-03-20 08:10:44 +01:00
parent 078c0dbcc0
commit 635faa7346
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
571 changed files with 10718 additions and 2738 deletions

View file

@ -82,12 +82,34 @@ const char *nvme_cmd_to_string(int admin, __u8 opcode)
case nvme_admin_virtual_mgmt: return "Virtualization Management";
case nvme_admin_nvme_mi_send: return "NVMe-MI Send";
case nvme_admin_nvme_mi_recv: return "NVMe-MI Receive";
case nvme_admin_capacity_mgmt: return "Capacity Management";
case nvme_admin_discovery_info_mgmt:return "Discovery Information Management (DIM)";
case nvme_admin_fabric_zoning_recv:return "Fabric Zoning Receive";
case nvme_admin_lockdown: return "Lockdown";
case nvme_admin_fabric_zoning_lookup:return "Fabric Zoning Lookup";
case nvme_admin_clear_export_nvm_res:
return "Clear Exported NVM Resource Configuration";
case nvme_admin_fabric_zoning_send:return "Fabric Zoning Send";
case nvme_admin_create_export_nvms:return "Create Exported NVM Subsystem";
case nvme_admin_manage_export_nvms:return "Manage Exported NVM Subsystem";
case nvme_admin_manage_export_ns:return "Manage Exported Namespace";
case nvme_admin_manage_export_port:return "Manage Exported Port";
case nvme_admin_send_disc_log_page:return "Send Discovery Log Page";
case nvme_admin_track_send: return "Track Send";
case nvme_admin_track_receive: return "Track Receive";
case nvme_admin_migration_send: return "Migration Send";
case nvme_admin_migration_receive:return "Migration Receive";
case nvme_admin_ctrl_data_queue:return "Controller Data Queue";
case nvme_admin_dbbuf: return "Doorbell Buffer Config";
case nvme_admin_fabrics: return "Fabrics Commands";
case nvme_admin_format_nvm: return "Format NVM";
case nvme_admin_security_send: return "Security Send";
case nvme_admin_security_recv: return "Security Receive";
case nvme_admin_sanitize_nvm: return "Sanitize";
case nvme_admin_load_program: return "Load Program";
case nvme_admin_get_lba_status: return "Get LBA Status";
case nvme_admin_program_act_mgmt:return "Program Activation Management";
case nvme_admin_mem_range_set_mgmt:return "Memory Range Set Management";
}
} else {
switch (opcode) {
@ -718,11 +740,10 @@ void nvme_show_fw_log(struct nvme_firmware_slot *fw_log,
nvme_print(fw_log, flags, fw_log, devname);
}
void nvme_show_changed_ns_list_log(struct nvme_ns_list *log,
const char *devname,
nvme_print_flags_t flags)
void nvme_show_changed_ns_list_log(struct nvme_ns_list *log, const char *devname,
nvme_print_flags_t flags, bool alloc)
{
nvme_print(ns_list_log, flags, log, devname);
nvme_print(ns_list_log, flags, log, devname, alloc);
}
void nvme_print_effects_log_pages(struct list_head *list,
@ -756,11 +777,21 @@ const char *nvme_log_to_string(__u8 lid)
case NVME_LOG_LID_MI_CMD_SUPPORTED_EFFECTS: return "NVMe-MI Commands Supported and Effects";
case NVME_LOG_LID_CMD_AND_FEAT_LOCKDOWN: return "Command and Feature Lockdown";
case NVME_LOG_LID_BOOT_PARTITION: return "Boot Partition";
case NVME_LOG_LID_ROTATIONAL_MEDIA_INFO: return "Rotational Media Information";
case NVME_LOG_LID_DISPERSED_NS_PARTICIPATING_NSS:return "Dispersed Namespace Participating NVM Subsystems";
case NVME_LOG_LID_MGMT_ADDR_LIST: return "Management Address List";
case NVME_LOG_LID_PHY_RX_EOM: return "Physical Interface Receiver Eye Opening Measurement";
case NVME_LOG_LID_REACHABILITY_GROUPS: return "Reachability Groups";
case NVME_LOG_LID_REACHABILITY_ASSOCIATIONS: return "Reachability Associations";
case NVME_LOG_LID_CHANGED_ALLOC_NS_LIST: return "Changed Allocated Namespace List";
case NVME_LOG_LID_FDP_CONFIGS: return "FDP Configurations";
case NVME_LOG_LID_FDP_RUH_USAGE: return "Reclaim Unit Handle Usage";
case NVME_LOG_LID_FDP_STATS: return "FDP Statistics";
case NVME_LOG_LID_FDP_EVENTS: return "FDP Events";
case NVME_LOG_LID_DISCOVER: return "Discovery";
case NVME_LOG_LID_HOST_DISCOVER: return "Host Discovery";
case NVME_LOG_LID_AVE_DISCOVER: return "AVE Discovery";
case NVME_LOG_LID_PULL_MODEL_DDC_REQ: return "Pull Model DDC Request";
case NVME_LOG_LID_RESERVATION: return "Reservation Notification";
case NVME_LOG_LID_SANITIZE: return "Sanitize Status";
case NVME_LOG_LID_ZNS_CHANGED_ZONES: return "Changed Zone List";
@ -797,6 +828,10 @@ static bool is_fahrenheit_country(const char *country)
return false;
}
#ifndef LC_MEASUREMENT
#define LC_MEASUREMENT LC_ALL
#endif
static bool is_temperature_fahrenheit(void)
{
const char *locale, *underscore;
@ -861,42 +896,50 @@ void nvme_show_sanitize_log(struct nvme_sanitize_log_page *sanitize,
const char *nvme_feature_to_string(enum nvme_features_id feature)
{
switch (feature) {
case NVME_FEAT_FID_ARBITRATION: return "Arbitration";
case NVME_FEAT_FID_POWER_MGMT: return "Power Management";
case NVME_FEAT_FID_LBA_RANGE: return "LBA Range Type";
case NVME_FEAT_FID_TEMP_THRESH: return "Temperature Threshold";
case NVME_FEAT_FID_ERR_RECOVERY:return "Error Recovery";
case NVME_FEAT_FID_VOLATILE_WC: return "Volatile Write Cache";
case NVME_FEAT_FID_NUM_QUEUES: return "Number of Queues";
case NVME_FEAT_FID_IRQ_COALESCE:return "Interrupt Coalescing";
case NVME_FEAT_FID_IRQ_CONFIG: return "Interrupt Vector Configuration";
case NVME_FEAT_FID_WRITE_ATOMIC:return "Write Atomicity Normal";
case NVME_FEAT_FID_ASYNC_EVENT: return "Async Event Configuration";
case NVME_FEAT_FID_AUTO_PST: return "Autonomous Power State Transition";
case NVME_FEAT_FID_HOST_MEM_BUF:return "Host Memory Buffer";
case NVME_FEAT_FID_TIMESTAMP: return "Timestamp";
case NVME_FEAT_FID_KATO: return "Keep Alive Timer";
case NVME_FEAT_FID_HCTM: return "Host Controlled Thermal Management";
case NVME_FEAT_FID_NOPSC: return "Non-Operational Power State Config";
case NVME_FEAT_FID_RRL: return "Read Recovery Level";
case NVME_FEAT_FID_PLM_CONFIG: return "Predictable Latency Mode Config";
case NVME_FEAT_FID_PLM_WINDOW: return "Predictable Latency Mode Window";
case NVME_FEAT_FID_ARBITRATION: return "Arbitration";
case NVME_FEAT_FID_POWER_MGMT: return "Power Management";
case NVME_FEAT_FID_LBA_RANGE: return "LBA Range Type";
case NVME_FEAT_FID_TEMP_THRESH: return "Temperature Threshold";
case NVME_FEAT_FID_ERR_RECOVERY: return "Error Recovery";
case NVME_FEAT_FID_VOLATILE_WC: return "Volatile Write Cache";
case NVME_FEAT_FID_NUM_QUEUES: return "Number of Queues";
case NVME_FEAT_FID_IRQ_COALESCE: return "Interrupt Coalescing";
case NVME_FEAT_FID_IRQ_CONFIG: return "Interrupt Vector Configuration";
case NVME_FEAT_FID_WRITE_ATOMIC: return "Write Atomicity Normal";
case NVME_FEAT_FID_ASYNC_EVENT: return "Async Event Configuration";
case NVME_FEAT_FID_AUTO_PST: return "Autonomous Power State Transition";
case NVME_FEAT_FID_HOST_MEM_BUF: return "Host Memory Buffer";
case NVME_FEAT_FID_TIMESTAMP: return "Timestamp";
case NVME_FEAT_FID_KATO: return "Keep Alive Timer";
case NVME_FEAT_FID_HCTM: return "Host Controlled Thermal Management";
case NVME_FEAT_FID_NOPSC: return "Non-Operational Power State Config";
case NVME_FEAT_FID_RRL: return "Read Recovery Level";
case NVME_FEAT_FID_PLM_CONFIG: return "Predictable Latency Mode Config";
case NVME_FEAT_FID_PLM_WINDOW: return "Predictable Latency Mode Window";
case NVME_FEAT_FID_LBA_STS_INTERVAL: return "LBA Status Interval";
case NVME_FEAT_FID_HOST_BEHAVIOR: return "Host Behavior";
case NVME_FEAT_FID_SANITIZE: return "Sanitize";
case NVME_FEAT_FID_SANITIZE: return "Sanitize";
case NVME_FEAT_FID_ENDURANCE_EVT_CFG: return "Endurance Event Group Configuration";
case NVME_FEAT_FID_IOCS_PROFILE: return "I/O Command Set Profile";
case NVME_FEAT_FID_SPINUP_CONTROL: return "Spinup Control";
case NVME_FEAT_FID_POWER_LOSS_SIGNAL: return "Power Loss Signaling Config";
case NVME_FEAT_FID_PERF_CHARACTERISTICS:return "Performance Characteristics";
case NVME_FEAT_FID_FDP: return "Flexible Direct Placement";
case NVME_FEAT_FID_FDP_EVENTS: return "Flexible Direct Placement Events";
case NVME_FEAT_FID_NS_ADMIN_LABEL: return "Namespace Admin Label";
case NVME_FEAT_FID_KEY_VALUE: return "Key Value Configuration";
case NVME_FEAT_FID_CTRL_DATA_QUEUE: return "Controller Data Queue";
case NVME_FEAT_FID_EMB_MGMT_CTRL_ADDR: return "Embedded Management Controller Address";
case NVME_FEAT_FID_HOST_MGMT_AGENT_ADDR:return "Host Management Agent Address";
case NVME_FEAT_FID_ENH_CTRL_METADATA: return "Enhanced Controller Metadata";
case NVME_FEAT_FID_CTRL_METADATA: return "Controller Metadata";
case NVME_FEAT_FID_NS_METADATA: return "Namespace Metadata";
case NVME_FEAT_FID_SW_PROGRESS: return "Software Progress";
case NVME_FEAT_FID_HOST_ID: return "Host Identifier";
case NVME_FEAT_FID_RESV_MASK: return "Reservation Notification Mask";
case NVME_FEAT_FID_RESV_PERSIST:return "Reservation Persistence";
case NVME_FEAT_FID_NS_METADATA: return "Namespace Metadata";
case NVME_FEAT_FID_SW_PROGRESS: return "Software Progress";
case NVME_FEAT_FID_HOST_ID: return "Host Identifier";
case NVME_FEAT_FID_RESV_MASK: return "Reservation Notification Mask";
case NVME_FEAT_FID_RESV_PERSIST: return "Reservation Persistence";
case NVME_FEAT_FID_WRITE_PROTECT: return "Namespace Write Protect";
case NVME_FEAT_FID_FDP: return "Flexible Direct Placement";
case NVME_FEAT_FID_FDP_EVENTS: return "Flexible Direct Placement Events";
case NVME_FEAT_FID_BP_WRITE_PROTECT: return "Boot Partition Write Protection Config";
}
/*
* We don't use the "default:" statement to let the compiler warning if
@ -1181,6 +1224,28 @@ const char *nvme_pel_ehai_pit_to_string(enum nvme_pel_ehai_pit pit)
return "Reserved";
}
const char *nvme_ssi_state_to_string(__u8 state)
{
switch (state) {
case NVME_SANITIZE_SSI_IDLE:
return "Idle state";
case NVME_SANITIZE_SSI_RESTRICT_PROCESSING:
return "Restricted Processing State";
case NVME_SANITIZE_SSI_RESTRICT_FAILURE:
return "Restricted Failure State";
case NVME_SANITIZE_SSI_UNRESTRICT_PROCESSING:
return "Unrestricted Processing State";
case NVME_SANITIZE_SSI_UNRESTRICT_FAILURE:
return "Unrestricted Failure State";
case NVME_SANITIZE_SSI_MEDIA_VERIFICATION:
return "Media Verification State";
case NVME_SANITIZE_SSI_POST_VERIF_DEALLOC:
return "Post-Verification Deallocation State";
default:
return "Reserved";
}
}
const char *nvme_register_symbol_to_string(int offset)
{
switch (offset) {
@ -1247,6 +1312,58 @@ const char *nvme_register_symbol_to_string(int offset)
return "unknown";
}
const char *nvme_time_scale_to_string(__u8 ts)
{
switch (ts) {
case 0:
return "1 microsecond";
case 1:
return "10 microseconds";
case 2:
return "100 microseconds";
case 3:
return "1 millisecond";
case 4:
return "10 milliseconds";
case 5:
return "100 milliseconds";
case 6:
return "1 second";
case 7:
return "10 seconds";
case 8:
return "100 seconds";
case 9:
return "1,000 seconds";
case 0xa:
return "10,000 seconds";
case 0xb:
return "100,000 seconds";
case 0xc:
return "1,000,000 seconds";
default:
break;
}
return "Reserved";
}
const char *nvme_pls_mode_to_string(__u8 mode)
{
switch (mode) {
case 0:
return "not enabled";
case 1:
return "enabled with Emergency Power Fail";
case 2:
return "enabled with Forced Quiescence";
default:
break;
}
return "Reserved";
}
void nvme_feature_show(enum nvme_features_id fid, int sel, unsigned int result)
{
nvme_print(show_feature, NORMAL, fid, sel, result);
@ -1374,3 +1491,48 @@ void nvme_show_finish(void)
{
nvme_print_output_format(show_finish);
}
void nvme_show_mgmt_addr_list_log(struct nvme_mgmt_addr_list_log *ma_list, nvme_print_flags_t flags)
{
nvme_print(mgmt_addr_list_log, flags, ma_list);
}
void nvme_show_rotational_media_info_log(struct nvme_rotational_media_info_log *info,
nvme_print_flags_t flags)
{
nvme_print(rotational_media_info_log, flags, info);
}
void nvme_show_dispersed_ns_psub_log(struct nvme_dispersed_ns_participating_nss_log *log,
nvme_print_flags_t flags)
{
nvme_print(dispersed_ns_psub_log, flags, log);
}
void nvme_show_reachability_groups_log(struct nvme_reachability_groups_log *log,
__u64 len, nvme_print_flags_t flags)
{
nvme_print(reachability_groups_log, flags, log, len);
}
void nvme_show_reachability_associations_log(struct nvme_reachability_associations_log *log,
__u64 len, nvme_print_flags_t flags)
{
nvme_print(reachability_associations_log, flags, log, len);
}
void nvme_show_host_discovery_log(struct nvme_host_discover_log *log, nvme_print_flags_t flags)
{
nvme_print(host_discovery_log, flags, log);
}
void nvme_show_ave_discovery_log(struct nvme_ave_discover_log *log, nvme_print_flags_t flags)
{
nvme_print(ave_discovery_log, flags, log);
}
void nvme_show_pull_model_ddc_req_log(struct nvme_pull_model_ddc_req_log *log,
nvme_print_flags_t flags)
{
nvme_print(pull_model_ddc_req_log, flags, log);
}