drivers/net/ethernet/broadcom/bnx2.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/broadcom/bnx2.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/broadcom/bnx2.h- Extension
.h- Size
- 332985 bytes
- Lines
- 7466
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- 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 bnx2_tx_bdstruct bnx2_rx_bdstruct status_blockstruct status_block_msixstruct statistics_blockstruct l2_fhdrstruct bnx2_sw_bdstruct bnx2_sw_pgstruct bnx2_sw_tx_bdstruct flash_specstruct bnx2_irqstruct bnx2_tx_ring_infostruct bnx2_rx_ring_infostruct bnx2_napistruct bnx2struct cpu_regstruct bnx2_fw_file_sectionstruct bnx2_mips_fw_file_entrystruct bnx2_rv2p_fw_file_entrystruct bnx2_mips_fw_filestruct bnx2_rv2p_fw_file
Annotated Snippet
struct bnx2_tx_bd {
u32 tx_bd_haddr_hi;
u32 tx_bd_haddr_lo;
u32 tx_bd_mss_nbytes;
#define TX_BD_TCP6_OFF2_SHL (14)
u32 tx_bd_vlan_tag_flags;
#define TX_BD_FLAGS_CONN_FAULT (1<<0)
#define TX_BD_FLAGS_TCP6_OFF0_MSK (3<<1)
#define TX_BD_FLAGS_TCP6_OFF0_SHL (1)
#define TX_BD_FLAGS_TCP_UDP_CKSUM (1<<1)
#define TX_BD_FLAGS_IP_CKSUM (1<<2)
#define TX_BD_FLAGS_VLAN_TAG (1<<3)
#define TX_BD_FLAGS_COAL_NOW (1<<4)
#define TX_BD_FLAGS_DONT_GEN_CRC (1<<5)
#define TX_BD_FLAGS_END (1<<6)
#define TX_BD_FLAGS_START (1<<7)
#define TX_BD_FLAGS_SW_OPTION_WORD (0x1f<<8)
#define TX_BD_FLAGS_TCP6_OFF4_SHL (12)
#define TX_BD_FLAGS_SW_FLAGS (1<<13)
#define TX_BD_FLAGS_SW_SNAP (1<<14)
#define TX_BD_FLAGS_SW_LSO (1<<15)
};
/*
* rx_bd definition
*/
struct bnx2_rx_bd {
u32 rx_bd_haddr_hi;
u32 rx_bd_haddr_lo;
u32 rx_bd_len;
u32 rx_bd_flags;
#define RX_BD_FLAGS_NOPUSH (1<<0)
#define RX_BD_FLAGS_DUMMY (1<<1)
#define RX_BD_FLAGS_END (1<<2)
#define RX_BD_FLAGS_START (1<<3)
};
#define BNX2_RX_ALIGN 16
/*
* status_block definition
*/
struct status_block {
u32 status_attn_bits;
#define STATUS_ATTN_BITS_LINK_STATE (1L<<0)
#define STATUS_ATTN_BITS_TX_SCHEDULER_ABORT (1L<<1)
#define STATUS_ATTN_BITS_TX_BD_READ_ABORT (1L<<2)
#define STATUS_ATTN_BITS_TX_BD_CACHE_ABORT (1L<<3)
#define STATUS_ATTN_BITS_TX_PROCESSOR_ABORT (1L<<4)
#define STATUS_ATTN_BITS_TX_DMA_ABORT (1L<<5)
#define STATUS_ATTN_BITS_TX_PATCHUP_ABORT (1L<<6)
#define STATUS_ATTN_BITS_TX_ASSEMBLER_ABORT (1L<<7)
#define STATUS_ATTN_BITS_RX_PARSER_MAC_ABORT (1L<<8)
#define STATUS_ATTN_BITS_RX_PARSER_CATCHUP_ABORT (1L<<9)
#define STATUS_ATTN_BITS_RX_MBUF_ABORT (1L<<10)
#define STATUS_ATTN_BITS_RX_LOOKUP_ABORT (1L<<11)
#define STATUS_ATTN_BITS_RX_PROCESSOR_ABORT (1L<<12)
#define STATUS_ATTN_BITS_RX_V2P_ABORT (1L<<13)
#define STATUS_ATTN_BITS_RX_BD_CACHE_ABORT (1L<<14)
#define STATUS_ATTN_BITS_RX_DMA_ABORT (1L<<15)
#define STATUS_ATTN_BITS_COMPLETION_ABORT (1L<<16)
#define STATUS_ATTN_BITS_HOST_COALESCE_ABORT (1L<<17)
#define STATUS_ATTN_BITS_MAILBOX_QUEUE_ABORT (1L<<18)
#define STATUS_ATTN_BITS_CONTEXT_ABORT (1L<<19)
#define STATUS_ATTN_BITS_CMD_SCHEDULER_ABORT (1L<<20)
#define STATUS_ATTN_BITS_CMD_PROCESSOR_ABORT (1L<<21)
#define STATUS_ATTN_BITS_MGMT_PROCESSOR_ABORT (1L<<22)
#define STATUS_ATTN_BITS_MAC_ABORT (1L<<23)
#define STATUS_ATTN_BITS_TIMER_ABORT (1L<<24)
#define STATUS_ATTN_BITS_DMAE_ABORT (1L<<25)
#define STATUS_ATTN_BITS_FLSH_ABORT (1L<<26)
#define STATUS_ATTN_BITS_GRC_ABORT (1L<<27)
#define STATUS_ATTN_BITS_EPB_ERROR (1L<<30)
#define STATUS_ATTN_BITS_PARITY_ERROR (1L<<31)
u32 status_attn_bits_ack;
#if defined(__BIG_ENDIAN)
u16 status_tx_quick_consumer_index0;
u16 status_tx_quick_consumer_index1;
u16 status_tx_quick_consumer_index2;
u16 status_tx_quick_consumer_index3;
u16 status_rx_quick_consumer_index0;
u16 status_rx_quick_consumer_index1;
u16 status_rx_quick_consumer_index2;
u16 status_rx_quick_consumer_index3;
u16 status_rx_quick_consumer_index4;
u16 status_rx_quick_consumer_index5;
Annotation
- Detected declarations: `struct bnx2_tx_bd`, `struct bnx2_rx_bd`, `struct status_block`, `struct status_block_msix`, `struct statistics_block`, `struct l2_fhdr`, `struct bnx2_sw_bd`, `struct bnx2_sw_pg`, `struct bnx2_sw_tx_bd`, `struct flash_spec`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.