drivers/net/ethernet/intel/ice/devlink/health.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/ice/devlink/health.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/ice/devlink/health.c- Extension
.c- Size
- 18741 bytes
- Lines
- 552
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
ice.hice_adminq_cmd.hhealth.h
Detected Declarations
struct ice_health_statusstruct ice_mdd_eventstruct ice_tx_hang_eventfunction ice_health_status_lookup_comparefunction ice_describe_status_codefunction ice_port_reporter_diagnosefunction ice_port_reporter_dumpfunction ice_fw_reporter_diagnosefunction ice_fw_reporter_dumpfunction ice_config_health_eventsfunction ice_process_health_status_eventfunction ice_devlink_health_reportfunction ice_mdd_reporter_dumpfunction ice_report_mdd_eventfunction ice_fmsg_put_ptrfunction ice_tx_hang_reporter_dumpfunction ice_prep_tx_hang_reportfunction ice_report_tx_hangfunction ice_init_devlink_repfunction ice_health_initfunction ice_deinit_devl_reporterfunction ice_health_deinitfunction ice_health_assign_healthy_statefunction ice_health_clear
Annotated Snippet
struct ice_health_status {
enum ice_aqc_health_status code;
const char *description;
const char *solution;
const char *data_label[ICE_HEALTH_STATUS_DATA_SIZE];
};
/*
* In addition to the health status codes provided below, the firmware might
* generate Health Status Codes that are not pertinent to the end-user.
* For instance, Health Code 0x1002 is triggered when the command fails.
* Such codes should be disregarded by the end-user.
* The below lookup requires to be sorted by code.
*/
static const char ice_common_port_solutions[] =
"Check your cable connection. Change or replace the module or cable. Manually set speed and duplex.";
static const char ice_port_number_label[] = "Port Number";
static const char ice_update_nvm_solution[] = "Update to the latest NVM image.";
static const struct ice_health_status ice_health_status_lookup[] = {
{ICE_AQC_HEALTH_STATUS_ERR_UNKNOWN_MOD_STRICT, "An unsupported module was detected.",
ice_common_port_solutions, {ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_ERR_MOD_TYPE, "Module type is not supported.",
"Change or replace the module or cable.", {ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_ERR_MOD_QUAL, "Module is not qualified.",
ice_common_port_solutions, {ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_ERR_MOD_COMM,
"Device cannot communicate with the module.",
"Check your cable connection. Change or replace the module or cable. Manually set speed and duplex.",
{ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_ERR_MOD_CONFLICT, "Unresolved module conflict.",
"Manually set speed/duplex or change the port option. If the problem persists, use a cable/module that is found in the supported modules and cables list for this device.",
{ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_ERR_MOD_NOT_PRESENT, "Module is not present.",
"Check that the module is inserted correctly. If the problem persists, use a cable/module that is found in the supported modules and cables list for this device.",
{ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_INFO_MOD_UNDERUTILIZED, "Underutilized module.",
"Change or replace the module or cable. Change the port option.",
{ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_ERR_UNKNOWN_MOD_LENIENT, "An unsupported module was detected.",
ice_common_port_solutions, {ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_ERR_INVALID_LINK_CFG, "Invalid link configuration.",
NULL, {ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_ERR_PORT_ACCESS, "Port hardware access error.",
ice_update_nvm_solution, {ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_ERR_PORT_UNREACHABLE, "A port is unreachable.",
"Change the port option. Update to the latest NVM image."},
{ICE_AQC_HEALTH_STATUS_INFO_PORT_SPEED_MOD_LIMITED, "Port speed is limited due to module.",
"Change the module or configure the port option to match the current module speed. Change the port option.",
{ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_ERR_PARALLEL_FAULT,
"All configured link modes were attempted but failed to establish link. The device will restart the process to establish link.",
"Check link partner connection and configuration.",
{ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_INFO_PORT_SPEED_PHY_LIMITED,
"Port speed is limited by PHY capabilities.",
"Change the module to align to port option.", {ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_ERR_NETLIST_TOPO, "LOM topology netlist is corrupted.",
ice_update_nvm_solution, {ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_ERR_NETLIST, "Unrecoverable netlist error.",
ice_update_nvm_solution, {ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_ERR_TOPO_CONFLICT, "Port topology conflict.",
"Change the port option. Update to the latest NVM image."},
{ICE_AQC_HEALTH_STATUS_ERR_LINK_HW_ACCESS, "Unrecoverable hardware access error.",
ice_update_nvm_solution, {ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_ERR_LINK_RUNTIME, "Unrecoverable runtime error.",
ice_update_nvm_solution, {ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_ERR_DNL_INIT, "Link management engine failed to initialize.",
ice_update_nvm_solution, {ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_ERR_PHY_FW_LOAD,
"Failed to load the firmware image in the external PHY.",
ice_update_nvm_solution, {ice_port_number_label}},
{ICE_AQC_HEALTH_STATUS_INFO_RECOVERY, "The device is in firmware recovery mode.",
ice_update_nvm_solution, {"Extended Error"}},
{ICE_AQC_HEALTH_STATUS_ERR_FLASH_ACCESS, "The flash chip cannot be accessed.",
"If issue persists, call customer support.", {"Access Type"}},
{ICE_AQC_HEALTH_STATUS_ERR_NVM_AUTH, "NVM authentication failed.",
ice_update_nvm_solution},
{ICE_AQC_HEALTH_STATUS_ERR_OROM_AUTH, "Option ROM authentication failed.",
ice_update_nvm_solution},
{ICE_AQC_HEALTH_STATUS_ERR_DDP_AUTH, "DDP package authentication failed.",
"Update to latest base driver and DDP package."},
{ICE_AQC_HEALTH_STATUS_ERR_NVM_COMPAT, "NVM image is incompatible.",
ice_update_nvm_solution},
{ICE_AQC_HEALTH_STATUS_ERR_OROM_COMPAT, "Option ROM is incompatible.",
ice_update_nvm_solution, {"Expected PCI Device ID", "Expected Module ID"}},
{ICE_AQC_HEALTH_STATUS_ERR_DCB_MIB,
"Supplied MIB file is invalid. DCB reverted to default configuration.",
"Disable FW-LLDP and check DCBx system configuration.",
Annotation
- Immediate include surface: `ice.h`, `ice_adminq_cmd.h`, `health.h`.
- Detected declarations: `struct ice_health_status`, `struct ice_mdd_event`, `struct ice_tx_hang_event`, `function ice_health_status_lookup_compare`, `function ice_describe_status_code`, `function ice_port_reporter_diagnose`, `function ice_port_reporter_dump`, `function ice_fw_reporter_diagnose`, `function ice_fw_reporter_dump`, `function ice_config_health_events`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.