drivers/net/ethernet/qlogic/netxen/netxen_nic.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/qlogic/netxen/netxen_nic.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/qlogic/netxen/netxen_nic.h- Extension
.h- Size
- 50902 bytes
- Lines
- 1870
- 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.
- 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
linux/module.hlinux/kernel.hlinux/types.hlinux/ioport.hlinux/pci.hlinux/netdevice.hlinux/etherdevice.hlinux/ip.hlinux/in.hlinux/tcp.hlinux/skbuff.hlinux/firmware.hlinux/ethtool.hlinux/mii.hlinux/timer.hlinux/vmalloc.hasm/io.hasm/byteorder.hnetxen_nic_hdr.hnetxen_nic_hw.h
Detected Declarations
struct netxen_rcv_ringstruct netxen_sts_ringstruct netxen_ring_ctxstruct cmd_desc_type0struct rcv_descstruct status_descstruct uni_table_descstruct uni_data_descstruct netxen_skb_fragstruct netxen_recv_crbstruct netxen_cmd_bufferstruct netxen_rx_bufferstruct netxen_hardware_contextstruct netxen_adapter_statsstruct nx_host_rds_ringstruct nx_host_sds_ringstruct nx_host_tx_ringstruct netxen_recv_contextstruct _cdrp_cmdstruct netxen_cmd_argsstruct nx_ip_liststruct netxen_minidumpstruct netxen_minidump_template_hdrstruct netxen_common_entry_hdrstruct netxen_minidump_entrystruct netxen_minidump_entry_rdromstruct netxen_minidump_entry_crbstruct netxen_minidump_entry_rdmemstruct netxen_minidump_entry_cachestruct netxen_minidump_entry_rdocmstruct netxen_minidump_entry_muxstruct netxen_minidump_entry_queuestruct netxen_dummy_dmastruct netxen_adapterstruct netxen_brdinfostruct netxen_dimm_cfgfunction netxen_nic_get_brd_name_by_typefunction netxen_tx_avail
Annotated Snippet
struct netxen_rcv_ring {
__le64 addr;
__le32 size;
__le32 rsrvd;
};
struct netxen_sts_ring {
__le64 addr;
__le32 size;
__le16 msi_index;
__le16 rsvd;
} ;
struct netxen_ring_ctx {
/* one command ring */
__le64 cmd_consumer_offset;
__le64 cmd_ring_addr;
__le32 cmd_ring_size;
__le32 rsrvd;
/* three receive rings */
struct netxen_rcv_ring rcv_rings[NUM_RCV_DESC_RINGS];
__le64 sts_ring_addr;
__le32 sts_ring_size;
__le32 ctx_id;
__le64 rsrvd_2[3];
__le32 sts_ring_count;
__le32 rsrvd_3;
struct netxen_sts_ring sts_rings[NUM_STS_DESC_RINGS];
} __attribute__ ((aligned(64)));
/*
* Following data structures describe the descriptors that will be used.
* Added fileds of tcpHdrSize and ipHdrSize, The driver needs to do it only when
* we are doing LSO (above the 1500 size packet) only.
*/
/*
* The size of reference handle been changed to 16 bits to pass the MSS fields
* for the LSO packet
*/
#define FLAGS_CHECKSUM_ENABLED 0x01
#define FLAGS_LSO_ENABLED 0x02
#define FLAGS_IPSEC_SA_ADD 0x04
#define FLAGS_IPSEC_SA_DELETE 0x08
#define FLAGS_VLAN_TAGGED 0x10
#define FLAGS_VLAN_OOB 0x40
#define netxen_set_tx_vlan_tci(cmd_desc, v) \
(cmd_desc)->vlan_TCI = cpu_to_le16(v);
#define netxen_set_cmd_desc_port(cmd_desc, var) \
((cmd_desc)->port_ctxid |= ((var) & 0x0F))
#define netxen_set_cmd_desc_ctxid(cmd_desc, var) \
((cmd_desc)->port_ctxid |= ((var) << 4 & 0xF0))
#define netxen_set_tx_port(_desc, _port) \
(_desc)->port_ctxid = ((_port) & 0xf) | (((_port) << 4) & 0xf0)
#define netxen_set_tx_flags_opcode(_desc, _flags, _opcode) \
(_desc)->flags_opcode = \
cpu_to_le16(((_flags) & 0x7f) | (((_opcode) & 0x3f) << 7))
#define netxen_set_tx_frags_len(_desc, _frags, _len) \
(_desc)->nfrags__length = \
cpu_to_le32(((_frags) & 0xff) | (((_len) & 0xffffff) << 8))
struct cmd_desc_type0 {
u8 tcp_hdr_offset; /* For LSO only */
u8 ip_hdr_offset; /* For LSO only */
__le16 flags_opcode; /* 15:13 unused, 12:7 opcode, 6:0 flags */
__le32 nfrags__length; /* 31:8 total len, 7:0 frag count */
__le64 addr_buffer2;
__le16 reference_handle;
__le16 mss;
u8 port_ctxid; /* 7:4 ctxid 3:0 port */
u8 total_hdr_length; /* LSO only : MAC+IP+TCP Hdr size */
__le16 conn_id; /* IPSec offoad only */
__le64 addr_buffer3;
__le64 addr_buffer1;
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/types.h`, `linux/ioport.h`, `linux/pci.h`, `linux/netdevice.h`, `linux/etherdevice.h`, `linux/ip.h`.
- Detected declarations: `struct netxen_rcv_ring`, `struct netxen_sts_ring`, `struct netxen_ring_ctx`, `struct cmd_desc_type0`, `struct rcv_desc`, `struct status_desc`, `struct uni_table_desc`, `struct uni_data_desc`, `struct netxen_skb_frag`, `struct netxen_recv_crb`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- 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.