drivers/net/ethernet/huawei/hinic/hinic_port.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/huawei/hinic/hinic_port.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/huawei/hinic/hinic_port.h- Extension
.h- Size
- 17373 bytes
- Lines
- 901
- 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
linux/types.hlinux/ethtool.hlinux/etherdevice.hlinux/bitops.hhinic_dev.h
Detected Declarations
struct hinic_version_infostruct hinic_port_mac_cmdstruct hinic_port_mtu_cmdstruct hinic_port_vlan_cmdstruct hinic_port_rx_mode_cmdstruct hinic_port_link_cmdstruct hinic_port_state_cmdstruct hinic_port_link_statusstruct hinic_cable_plug_eventstruct hinic_link_err_eventstruct hinic_port_func_state_cmdstruct hinic_port_capstruct hinic_link_mode_cmdstruct hinic_speed_cmdstruct hinic_set_autoneg_cmdstruct hinic_link_ksettings_infostruct hinic_tso_configstruct hinic_checksum_offloadstruct hinic_rq_numstruct hinic_lro_configstruct hinic_lro_timerstruct hinic_vlan_cfgstruct hinic_vlan_filterstruct hinic_rss_template_mgmtstruct hinic_rss_template_keystruct hinic_rss_context_tblstruct hinic_rss_context_tablestruct hinic_rss_indirect_tblstruct hinic_rss_indir_tablestruct hinic_rss_keystruct hinic_rss_engine_typestruct hinic_rss_configstruct hinic_statsstruct hinic_vport_statsstruct hinic_phy_port_statsstruct hinic_port_stats_infostruct hinic_port_statsstruct hinic_cmd_vport_statsstruct hinic_tx_rate_cfg_max_minstruct hinic_tx_rate_cfgstruct hinic_spoofchk_setstruct hinic_pause_configstruct hinic_set_pfcstruct hinic_port_loopbackstruct hinic_led_infostruct hinic_cmd_get_light_module_absstruct hinic_cmd_get_std_sfp_infostruct hinic_cmd_update_fw
Annotated Snippet
struct hinic_version_info {
u8 status;
u8 version;
u8 rsvd[6];
u8 ver[HINIC_FW_VERSION_NAME];
u8 time[HINIC_COMPILE_TIME_LEN];
};
enum hinic_rx_mode {
HINIC_RX_MODE_UC = BIT(0),
HINIC_RX_MODE_MC = BIT(1),
HINIC_RX_MODE_BC = BIT(2),
HINIC_RX_MODE_MC_ALL = BIT(3),
HINIC_RX_MODE_PROMISC = BIT(4),
};
enum hinic_port_link_state {
HINIC_LINK_STATE_DOWN,
HINIC_LINK_STATE_UP,
};
enum hinic_port_state {
HINIC_PORT_DISABLE = 0,
HINIC_PORT_ENABLE = 3,
};
enum hinic_func_port_state {
HINIC_FUNC_PORT_DISABLE = 0,
HINIC_FUNC_PORT_ENABLE = 2,
};
enum hinic_autoneg_cap {
HINIC_AUTONEG_UNSUPPORTED,
HINIC_AUTONEG_SUPPORTED,
};
enum hinic_autoneg_state {
HINIC_AUTONEG_DISABLED,
HINIC_AUTONEG_ACTIVE,
};
enum hinic_duplex {
HINIC_DUPLEX_HALF,
HINIC_DUPLEX_FULL,
};
enum hinic_speed {
HINIC_SPEED_10MB_LINK = 0,
HINIC_SPEED_100MB_LINK,
HINIC_SPEED_1000MB_LINK,
HINIC_SPEED_10GB_LINK,
HINIC_SPEED_25GB_LINK,
HINIC_SPEED_40GB_LINK,
HINIC_SPEED_100GB_LINK,
HINIC_SPEED_UNKNOWN = 0xFF,
};
enum hinic_link_mode {
HINIC_10GE_BASE_KR = 0,
HINIC_40GE_BASE_KR4 = 1,
HINIC_40GE_BASE_CR4 = 2,
HINIC_100GE_BASE_KR4 = 3,
HINIC_100GE_BASE_CR4 = 4,
HINIC_25GE_BASE_KR_S = 5,
HINIC_25GE_BASE_CR_S = 6,
HINIC_25GE_BASE_KR = 7,
HINIC_25GE_BASE_CR = 8,
HINIC_GE_BASE_KX = 9,
HINIC_LINK_MODE_NUMBERS,
HINIC_SUPPORTED_UNKNOWN = 0xFFFF,
};
enum hinic_port_type {
HINIC_PORT_TP, /* BASET */
HINIC_PORT_AUI,
HINIC_PORT_MII,
HINIC_PORT_FIBRE, /* OPTICAL */
HINIC_PORT_BNC,
HINIC_PORT_ELEC,
HINIC_PORT_COPPER, /* PORT_DA */
HINIC_PORT_AOC,
HINIC_PORT_BACKPLANE,
HINIC_PORT_NONE = 0xEF,
HINIC_PORT_OTHER = 0xFF,
};
enum hinic_valid_link_settings {
Annotation
- Immediate include surface: `linux/types.h`, `linux/ethtool.h`, `linux/etherdevice.h`, `linux/bitops.h`, `hinic_dev.h`.
- Detected declarations: `struct hinic_version_info`, `struct hinic_port_mac_cmd`, `struct hinic_port_mtu_cmd`, `struct hinic_port_vlan_cmd`, `struct hinic_port_rx_mode_cmd`, `struct hinic_port_link_cmd`, `struct hinic_port_state_cmd`, `struct hinic_port_link_status`, `struct hinic_cable_plug_event`, `struct hinic_link_err_event`.
- 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.