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.

Dependency Surface

Detected Declarations

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

Implementation Notes