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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/interrupt.h
Detected Declarations
struct skge_rx_descstruct skge_tx_descstruct skge_elementstruct skge_ringstruct skge_hwstruct skge_portenum csr_regsenum pause_controlenum pause_statusfunction skge_read32function skge_read16function skge_read8function skge_write32function skge_write16function skge_write8function xm_read32function xm_read16function xm_write32function xm_write16function xm_outhashfunction xm_outaddrfunction gma_read16function gma_read32function gma_write16function gma_set_addr
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
- Immediate include surface: `linux/interrupt.h`.
- Detected declarations: `struct skge_rx_desc`, `struct skge_tx_desc`, `struct skge_element`, `struct skge_ring`, `struct skge_hw`, `struct skge_port`, `enum csr_regs`, `enum pause_control`, `enum pause_status`, `function skge_read32`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.