drivers/net/ethernet/mellanox/mlx4/en_port.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx4/en_port.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx4/en_port.h- Extension
.h- Size
- 14375 bytes
- Lines
- 587
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct mlx4_set_vlan_fltr_mboxstruct mlx4_en_query_port_contextstruct mlx4_en_stat_out_mboxenum mlx4_link_mode
Annotated Snippet
struct mlx4_set_vlan_fltr_mbox {
__be32 entry[VLAN_FLTR_SIZE];
};
enum {
MLX4_MCAST_CONFIG = 0,
MLX4_MCAST_DISABLE = 1,
MLX4_MCAST_ENABLE = 2,
};
enum mlx4_link_mode {
MLX4_1000BASE_CX_SGMII = 0,
MLX4_1000BASE_KX = 1,
MLX4_10GBASE_CX4 = 2,
MLX4_10GBASE_KX4 = 3,
MLX4_10GBASE_KR = 4,
MLX4_20GBASE_KR2 = 5,
MLX4_40GBASE_CR4 = 6,
MLX4_40GBASE_KR4 = 7,
MLX4_56GBASE_KR4 = 8,
MLX4_10GBASE_CR = 12,
MLX4_10GBASE_SR = 13,
MLX4_40GBASE_SR4 = 15,
MLX4_56GBASE_CR4 = 17,
MLX4_56GBASE_SR4 = 18,
MLX4_100BASE_TX = 24,
MLX4_1000BASE_T = 25,
MLX4_10GBASE_T = 26,
};
#define MLX4_PROT_MASK(link_mode) (1<<link_mode)
enum {
MLX4_EN_100M_SPEED = 0x04,
MLX4_EN_10G_SPEED_XAUI = 0x00,
MLX4_EN_10G_SPEED_XFI = 0x01,
MLX4_EN_1G_SPEED = 0x02,
MLX4_EN_20G_SPEED = 0x08,
MLX4_EN_40G_SPEED = 0x40,
MLX4_EN_56G_SPEED = 0x20,
MLX4_EN_OTHER_SPEED = 0x0f,
};
struct mlx4_en_query_port_context {
u8 link_up;
#define MLX4_EN_LINK_UP_MASK 0x80
#define MLX4_EN_ANC_MASK 0x40
u8 autoneg;
#define MLX4_EN_AUTONEG_MASK 0x80
__be16 mtu;
u8 reserved2;
u8 link_speed;
#define MLX4_EN_SPEED_MASK 0x6f
u16 reserved3[5];
__be64 mac;
u8 transceiver;
};
struct mlx4_en_stat_out_mbox {
/* Received frames with a length of 64 octets */
__be64 R64_prio_0;
__be64 R64_prio_1;
__be64 R64_prio_2;
__be64 R64_prio_3;
__be64 R64_prio_4;
__be64 R64_prio_5;
__be64 R64_prio_6;
__be64 R64_prio_7;
__be64 R64_novlan;
/* Received frames with a length of 127 octets */
__be64 R127_prio_0;
__be64 R127_prio_1;
__be64 R127_prio_2;
__be64 R127_prio_3;
__be64 R127_prio_4;
__be64 R127_prio_5;
__be64 R127_prio_6;
__be64 R127_prio_7;
__be64 R127_novlan;
/* Received frames with a length of 255 octets */
__be64 R255_prio_0;
__be64 R255_prio_1;
__be64 R255_prio_2;
__be64 R255_prio_3;
__be64 R255_prio_4;
__be64 R255_prio_5;
__be64 R255_prio_6;
__be64 R255_prio_7;
Annotation
- Detected declarations: `struct mlx4_set_vlan_fltr_mbox`, `struct mlx4_en_query_port_context`, `struct mlx4_en_stat_out_mbox`, `enum mlx4_link_mode`.
- 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.