drivers/net/ethernet/actions/owl-emac.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/actions/owl-emac.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/actions/owl-emac.h
Extension
.h
Size
12450 bytes
Lines
281
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 owl_emac_addr_list {
	u8 addrs[OWL_EMAC_MAX_MULTICAST_ADDRS][ETH_ALEN];
	int count;
};

/* TX/RX descriptors */
struct owl_emac_ring_desc {
	u32 status;
	u32 control;
	u32 buf_addr;
	u32 reserved;		/* 2nd buffer address is not used */
};

struct owl_emac_ring {
	struct owl_emac_ring_desc *descs;
	dma_addr_t descs_dma;
	struct sk_buff **skbs;
	dma_addr_t *skbs_dma;
	unsigned int size;
	unsigned int head;
	unsigned int tail;
};

struct owl_emac_priv {
	struct net_device *netdev;
	void __iomem *base;

	struct clk_bulk_data clks[OWL_EMAC_NCLKS];
	struct reset_control *reset;

	struct owl_emac_ring rx_ring;
	struct owl_emac_ring tx_ring;

	struct mii_bus *mii;
	struct napi_struct napi;

	phy_interface_t phy_mode;
	unsigned int link;
	int speed;
	int duplex;
	int pause;
	struct owl_emac_addr_list mcaddr_list;

	struct work_struct mac_reset_task;

	u32 msg_enable;		/* Debug message level */
	spinlock_t lock;	/* Sync concurrent ring access */
};

#endif /* __OWL_EMAC_H__ */

Annotation

Implementation Notes