drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_net.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_net.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_net.h
Extension
.h
Size
11273 bytes
Lines
431
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 octep_ctrl_net_h2f_req_cmd_mtu {
	/* enum octep_ctrl_net_cmd */
	u16 cmd;
	/* 0-65535 */
	u16 val;
};

/* get/set mac request */
struct octep_ctrl_net_h2f_req_cmd_mac {
	/* enum octep_ctrl_net_cmd */
	u16 cmd;
	/* xx:xx:xx:xx:xx:xx */
	u8 addr[ETH_ALEN];
};

/* get/set link state, rx state */
struct octep_ctrl_net_h2f_req_cmd_state {
	/* enum octep_ctrl_net_cmd */
	u16 cmd;
	/* enum octep_ctrl_net_state */
	u16 state;
};

/* link info */
struct octep_ctrl_net_link_info {
	/* Bitmap of Supported link speeds/modes */
	u64 supported_modes;
	/* Bitmap of Advertised link speeds/modes */
	u64 advertised_modes;
	/* Autonegotation state; bit 0=disabled; bit 1=enabled */
	u8 autoneg;
	/* Pause frames setting. bit 0=disabled; bit 1=enabled */
	u8 pause;
	/* Negotiated link speed in Mbps */
	u32 speed;
};

/* get/set link info */
struct octep_ctrl_net_h2f_req_cmd_link_info {
	/* enum octep_ctrl_net_cmd */
	u16 cmd;
	/* struct octep_ctrl_net_link_info */
	struct octep_ctrl_net_link_info info;
};

/* offloads */
struct octep_ctrl_net_offloads {
	/* supported rx offloads OCTEP_RX_OFFLOAD_* */
	u16 rx_offloads;
	/* supported tx offloads OCTEP_TX_OFFLOAD_* */
	u16 tx_offloads;
	/* reserved */
	u32 reserved_offloads;
	/* extra offloads */
	u64 ext_offloads;
};

/* get/set offloads */
struct octep_ctrl_net_h2f_req_cmd_offloads {
	/* enum octep_ctrl_net_cmd */
	u16 cmd;
	/* struct octep_ctrl_net_offloads */
	struct octep_ctrl_net_offloads offloads;
};

/* Host to fw request data */
struct octep_ctrl_net_h2f_req {
	union octep_ctrl_net_req_hdr hdr;
	union {
		struct octep_ctrl_net_h2f_req_cmd_mtu mtu;
		struct octep_ctrl_net_h2f_req_cmd_mac mac;
		struct octep_ctrl_net_h2f_req_cmd_state link;
		struct octep_ctrl_net_h2f_req_cmd_state rx;
		struct octep_ctrl_net_h2f_req_cmd_link_info link_info;
		struct octep_ctrl_net_h2f_req_cmd_offloads offloads;
	};
} __packed;

union octep_ctrl_net_resp_hdr {
	u64 words[1];
	struct {
		/* sender id */
		u16 sender;
		/* receiver id */
		u16 receiver;
		/* octep_ctrl_net_h2t_cmd */
		u16 cmd;
		/* octep_ctrl_net_reply */
		u16 reply;
	} s;

Annotation

Implementation Notes