drivers/net/ethernet/marvell/skge.h

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

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/marvell/skge.h
Extension
.h
Size
102846 bytes
Lines
2580
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 skge_rx_desc {
	u32		control;
	u32		next_offset;
	u32		dma_lo;
	u32		dma_hi;
	u32		status;
	u32		timestamp;
	u16		csum2;
	u16		csum1;
	u16		csum2_start;
	u16		csum1_start;
};

struct skge_tx_desc {
	u32		control;
	u32		next_offset;
	u32		dma_lo;
	u32		dma_hi;
	u32		status;
	u32		csum_offs;
	u16		csum_write;
	u16		csum_start;
	u32		rsvd;
};

struct skge_element {
	struct skge_element	*next;
	void			*desc;
	struct sk_buff  	*skb;
	DEFINE_DMA_UNMAP_ADDR(mapaddr);
	DEFINE_DMA_UNMAP_LEN(maplen);
};

struct skge_ring {
	struct skge_element *to_clean;
	struct skge_element *to_use;
	struct skge_element *start;
	unsigned long	    count;
};


struct skge_hw {
	void __iomem  	     *regs;
	struct pci_dev	     *pdev;
	spinlock_t	     hw_lock;
	u32		     intr_mask;
	struct net_device    *dev[2];

	u8	     	     chip_id;
	u8		     chip_rev;
	u8		     copper;
	u8		     ports;
	u8		     phy_type;

	u32	     	     ram_size;
	u32	     	     ram_offset;
	u16		     phy_addr;
	spinlock_t	     phy_lock;
	struct tasklet_struct phy_task;

	char		     irq_name[]; /* skge@pci:000:04:00.0 */
};

enum pause_control {
	FLOW_MODE_NONE 		= 1, /* No Flow-Control */
	FLOW_MODE_LOC_SEND	= 2, /* Local station sends PAUSE */
	FLOW_MODE_SYMMETRIC	= 3, /* Both stations may send PAUSE */
	FLOW_MODE_SYM_OR_REM	= 4, /* Both stations may send PAUSE or
				      * just the remote station may send PAUSE
				      */
};

enum pause_status {
	FLOW_STAT_INDETERMINATED=0,	/* indeterminated */
	FLOW_STAT_NONE,			/* No Flow Control */
	FLOW_STAT_REM_SEND,		/* Remote Station sends PAUSE */
	FLOW_STAT_LOC_SEND,		/* Local station sends PAUSE */
	FLOW_STAT_SYMMETRIC,		/* Both station may send PAUSE */
};


struct skge_port {
	struct skge_hw	     *hw;
	struct net_device    *netdev;
	struct napi_struct   napi;
	int		     port;
	u32		     msg_enable;

	struct skge_ring     tx_ring;

Annotation

Implementation Notes