drivers/net/ethernet/freescale/enetc/enetc_mailbox.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/freescale/enetc/enetc_mailbox.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/freescale/enetc/enetc_mailbox.h
Extension
.h
Size
6589 bytes
Lines
171
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 enetc_msg_swbd {
	void *vaddr;
	dma_addr_t dma;
	int size;
};

/* The generic VSI-to-PSI message header */
struct enetc_msg_header {
	__be16 crc16;
	u8 class_id;
	u8 cmd_id;
	u8 proto_ver;
	u8 len;
	u8 resv0;
	u8 cookie;
	u8 resv2[8];
};

struct enetc_mac_addr {
	u8 addr[ETH_ALEN]; /* Network byte order */
};

/* Message format of class_id 0x20 for exact MAC filter.
 * cmd_id 0x0: set primary MAC
 * cmd_id 0x1: Add entries to MAC address filter table
 * cmd_id 0x2: Delete entries from MAC address filter table
 * Note that cmd_id 0x1 and 0x2 are not supported yet.
 */
struct enetc_msg_mac_exact_filter {
	struct enetc_msg_header hdr;
	u8 mac_cnt; /* No need to set for cmd_id 0 */
	u8 resv[3];
	struct enetc_mac_addr mac[];
};

/* The generic message format applies to the following messages:
 * Get IP revision message, class_id 0xf0.
 * cmd_id 1: get IP minor revision
 */
struct enetc_msg_generic {
	struct enetc_msg_header hdr;
	u8 resv[16];
};

#endif

Annotation

Implementation Notes