drivers/net/ethernet/marvell/sky2.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/marvell/sky2.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/marvell/sky2.h- Extension
.h- Size
- 92216 bytes
- Lines
- 2429
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct sky2_tx_lestruct sky2_rx_lestruct sky2_status_lestruct tx_ring_infostruct rx_ring_infostruct sky2_statsstruct sky2_portstruct sky2_hwenum pci_dev_reg_1enum pci_dev_reg_2enum pci_dev_reg_3enum pci_dev_reg_4enum pci_dev_reg_5enum pci_cfg_reg1enum csr_regsenum yukon_xl_revenum yukon_ec_revenum yukon_ec_u_revenum yukon_fe_revenum yukon_fe_p_revenum yukon_ex_revenum yukon_supr_revenum yukon_prm_revenum led_modeenum status_cssenum flow_controlfunction sky2_is_copperfunction sky2_read32function sky2_read16function sky2_read8function sky2_write32function sky2_write16function sky2_write8function gma_read16function gma_read32function gma_read64function get_stats32function get_stats64function gma_write16function gma_set_addrfunction sky2_pci_read32function sky2_pci_read16function sky2_pci_write32function sky2_pci_write16
Annotated Snippet
struct sky2_tx_le {
__le32 addr;
__le16 length; /* also vlan tag or checksum start */
u8 ctrl;
u8 opcode;
} __packed;
struct sky2_rx_le {
__le32 addr;
__le16 length;
u8 ctrl;
u8 opcode;
} __packed;
struct sky2_status_le {
__le32 status; /* also checksum */
__le16 length; /* also vlan tag */
u8 css;
u8 opcode;
} __packed;
struct tx_ring_info {
struct sk_buff *skb;
unsigned long flags;
#define TX_MAP_SINGLE 0x0001
#define TX_MAP_PAGE 0x0002
DEFINE_DMA_UNMAP_ADDR(mapaddr);
DEFINE_DMA_UNMAP_LEN(maplen);
};
struct rx_ring_info {
struct sk_buff *skb;
dma_addr_t data_addr;
DEFINE_DMA_UNMAP_LEN(data_size);
dma_addr_t frag_addr[ETH_JUMBO_MTU >> PAGE_SHIFT ?: 1];
};
enum flow_control {
FC_NONE = 0,
FC_TX = 1,
FC_RX = 2,
FC_BOTH = 3,
};
struct sky2_stats {
struct u64_stats_sync syncp;
u64 packets;
u64 bytes;
};
struct sky2_port {
struct sky2_hw *hw;
struct net_device *netdev;
unsigned port;
u32 msg_enable;
spinlock_t phy_lock;
struct tx_ring_info *tx_ring;
struct sky2_tx_le *tx_le;
struct sky2_stats tx_stats;
u16 tx_ring_size;
u16 tx_cons; /* next le to check */
u16 tx_prod; /* next le to use */
u16 tx_next; /* debug only */
u16 tx_pending;
u16 tx_last_mss;
u32 tx_last_upper;
u32 tx_tcpsum;
struct rx_ring_info *rx_ring ____cacheline_aligned_in_smp;
struct sky2_rx_le *rx_le;
struct sky2_stats rx_stats;
u16 rx_next; /* next re to check */
u16 rx_put; /* next le index to use */
u16 rx_pending;
u16 rx_data_size;
u16 rx_nfrags;
unsigned long last_rx;
struct {
unsigned long last;
u32 mac_rp;
u8 mac_lev;
u8 fifo_rp;
u8 fifo_lev;
} check;
Annotation
- Detected declarations: `struct sky2_tx_le`, `struct sky2_rx_le`, `struct sky2_status_le`, `struct tx_ring_info`, `struct rx_ring_info`, `struct sky2_stats`, `struct sky2_port`, `struct sky2_hw`, `enum pci_dev_reg_1`, `enum pci_dev_reg_2`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.