drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h- Extension
.h- Size
- 7988 bytes
- Lines
- 278
- 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/pci.hqlcnic.h
Detected Declarations
struct qlcnic_bc_payloadstruct qlcnic_bc_hdrstruct qlcnic_trans_liststruct qlcnic_bc_transstruct qlcnic_resourcesstruct qlcnic_vportstruct qlcnic_vf_infostruct qlcnic_async_cmdstruct qlcnic_back_channelstruct qlcnic_sriovenum qlcnic_bc_commandsenum qlcnic_trans_stateenum qlcnic_vf_stateenum qlcnic_vlan_modefunction qlcnic_sriov_enable_checkfunction qlcnic_sriov_pf_disablefunction qlcnic_sriov_pf_reset
Annotated Snippet
struct qlcnic_bc_payload {
u64 payload[126];
};
struct qlcnic_bc_hdr {
#if defined(__LITTLE_ENDIAN)
u8 version;
u8 msg_type:4;
u8 rsvd1:3;
u8 op_type:1;
u8 num_cmds;
u8 num_frags;
u8 frag_num;
u8 cmd_op;
u16 seq_id;
u64 rsvd3;
#elif defined(__BIG_ENDIAN)
u8 num_frags;
u8 num_cmds;
u8 op_type:1;
u8 rsvd1:3;
u8 msg_type:4;
u8 version;
u16 seq_id;
u8 cmd_op;
u8 frag_num;
u64 rsvd3;
#endif
};
enum qlcnic_bc_commands {
QLCNIC_BC_CMD_CHANNEL_INIT = 0x0,
QLCNIC_BC_CMD_CHANNEL_TERM = 0x1,
QLCNIC_BC_CMD_GET_ACL = 0x2,
QLCNIC_BC_CMD_CFG_GUEST_VLAN = 0x3,
};
#define QLCNIC_83XX_SRIOV_VF_MAX_MAC 2
#define QLC_BC_CMD 1
struct qlcnic_trans_list {
/* Lock for manipulating list */
spinlock_t lock;
struct list_head wait_list;
int count;
};
enum qlcnic_trans_state {
QLC_INIT = 0,
QLC_WAIT_FOR_CHANNEL_FREE,
QLC_WAIT_FOR_RESP,
QLC_ABORT,
QLC_END,
};
struct qlcnic_bc_trans {
u8 func_id;
u8 active;
u8 curr_rsp_frag;
u8 curr_req_frag;
u16 cmd_id;
u16 req_pay_size;
u16 rsp_pay_size;
u32 trans_id;
enum qlcnic_trans_state trans_state;
struct list_head list;
struct qlcnic_bc_hdr *req_hdr;
struct qlcnic_bc_hdr *rsp_hdr;
struct qlcnic_bc_payload *req_pay;
struct qlcnic_bc_payload *rsp_pay;
struct completion resp_cmpl;
struct qlcnic_vf_info *vf;
};
enum qlcnic_vf_state {
QLC_BC_VF_SEND = 0,
QLC_BC_VF_RECV,
QLC_BC_VF_CHANNEL,
QLC_BC_VF_STATE,
QLC_BC_VF_FLR,
QLC_BC_VF_SOFT_FLR,
};
enum qlcnic_vlan_mode {
QLC_NO_VLAN_MODE = 0,
QLC_PVID_MODE,
QLC_GUEST_VLAN_MODE,
};
struct qlcnic_resources {
Annotation
- Immediate include surface: `linux/types.h`, `linux/pci.h`, `qlcnic.h`.
- Detected declarations: `struct qlcnic_bc_payload`, `struct qlcnic_bc_hdr`, `struct qlcnic_trans_list`, `struct qlcnic_bc_trans`, `struct qlcnic_resources`, `struct qlcnic_vport`, `struct qlcnic_vf_info`, `struct qlcnic_async_cmd`, `struct qlcnic_back_channel`, `struct qlcnic_sriov`.
- 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.