drivers/net/ethernet/qlogic/qed/qed_ll2.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/qlogic/qed/qed_ll2.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/qlogic/qed/qed_ll2.h- Extension
.h- Size
- 7075 bytes
- Lines
- 261
- 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/kernel.hlinux/list.hlinux/mutex.hlinux/slab.hlinux/spinlock.hlinux/qed/qed_chain.hlinux/qed/qed_ll2_if.hqed.hqed_hsi.hqed_sp.h
Detected Declarations
struct qed_ll2_rx_packetstruct qed_ll2_tx_packetstruct qed_ll2_rx_queuestruct qed_ll2_tx_queuestruct qed_ll2_info
Annotated Snippet
struct qed_ll2_rx_packet {
struct list_head list_entry;
struct core_rx_bd_with_buff_len *rxq_bd;
dma_addr_t rx_buf_addr;
u16 buf_length;
void *cookie;
u8 placement_offset;
u16 parse_flags;
u16 packet_length;
u16 vlan;
u32 opaque_data[2];
};
struct qed_ll2_tx_packet {
struct list_head list_entry;
u16 bd_used;
bool notify_fw;
void *cookie;
/* Flexible Array of bds_set determined by max_bds_per_packet */
struct {
struct core_tx_bd *txq_bd;
dma_addr_t tx_frag;
u16 frag_len;
} bds_set[];
};
struct qed_ll2_rx_queue {
/* Lock protecting the Rx queue manipulation */
spinlock_t lock;
struct qed_chain rxq_chain;
struct qed_chain rcq_chain;
u8 rx_sb_index;
u8 ctx_based;
bool b_cb_registered;
__le16 *p_fw_cons;
struct list_head active_descq;
struct list_head free_descq;
struct list_head posting_descq;
struct qed_ll2_rx_packet *descq_array;
void __iomem *set_prod_addr;
struct core_pwm_prod_update_data db_data;
};
struct qed_ll2_tx_queue {
/* Lock protecting the Tx queue manipulation */
spinlock_t lock;
struct qed_chain txq_chain;
u8 tx_sb_index;
bool b_cb_registered;
__le16 *p_fw_cons;
struct list_head active_descq;
struct list_head free_descq;
struct list_head sending_descq;
u16 cur_completing_bd_idx;
void __iomem *doorbell_addr;
struct core_db_data db_msg;
u16 bds_idx;
u16 cur_send_frag_num;
u16 cur_completing_frag_num;
bool b_completing_packet;
void *descq_mem; /* memory for variable sized qed_ll2_tx_packet*/
struct qed_ll2_tx_packet *cur_send_packet;
struct qed_ll2_tx_packet cur_completing_packet;
};
struct qed_ll2_info {
/* Lock protecting the state of LL2 */
struct mutex mutex;
struct qed_ll2_acquire_data_inputs input;
u32 cid;
u8 my_id;
u8 queue_id;
u8 tx_stats_id;
bool b_active;
enum core_tx_dest tx_dest;
u8 tx_stats_en;
bool main_func_queue;
struct qed_ll2_cbs cbs;
struct qed_ll2_rx_queue rx_queue;
struct qed_ll2_tx_queue tx_queue;
};
extern const struct qed_ll2_ops qed_ll2_ops_pass;
/**
* qed_ll2_acquire_connection(): Allocate resources,
* starts rx & tx (if relevant) queues pair.
* Provides connecion handler as output
* parameter.
Annotation
- Immediate include surface: `linux/types.h`, `linux/kernel.h`, `linux/list.h`, `linux/mutex.h`, `linux/slab.h`, `linux/spinlock.h`, `linux/qed/qed_chain.h`, `linux/qed/qed_ll2_if.h`.
- Detected declarations: `struct qed_ll2_rx_packet`, `struct qed_ll2_tx_packet`, `struct qed_ll2_rx_queue`, `struct qed_ll2_tx_queue`, `struct qed_ll2_info`.
- 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.