drivers/net/ethernet/alacritech/slic.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/alacritech/slic.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/alacritech/slic.h- Extension
.h- Size
- 17008 bytes
- Lines
- 574
- 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
linux/types.hlinux/netdevice.hlinux/spinlock_types.hlinux/dma-mapping.hlinux/pci.hlinux/list.hlinux/u64_stats_sync.h
Detected Declarations
struct slic_uprstruct slic_upr_liststruct slic_mojave_eepromstruct slic_oasis_eepromstruct slic_statsstruct slic_shmem_datastruct slic_shmemstruct slic_rx_info_oasisstruct slic_rx_info_mojavestruct slic_stat_descstruct slic_stat_queuestruct slic_tx_descstruct slic_tx_bufferstruct slic_tx_queuestruct slic_rx_descstruct slic_rx_bufferstruct slic_rx_queuestruct slic_devicefunction slic_readfunction slic_writefunction slic_flush_write
Annotated Snippet
struct slic_upr {
dma_addr_t paddr;
unsigned int type;
struct list_head list;
};
struct slic_upr_list {
bool pending;
struct list_head list;
/* upr list lock */
spinlock_t lock;
};
/* SLIC EEPROM structure for Mojave */
struct slic_mojave_eeprom {
__le16 id; /* 00 EEPROM/FLASH Magic code 'A5A5'*/
__le16 eeprom_code_size;/* 01 Size of EEPROM Codes (bytes * 4)*/
__le16 flash_size; /* 02 Flash size */
__le16 eeprom_size; /* 03 EEPROM Size */
__le16 vendor_id; /* 04 Vendor ID */
__le16 dev_id; /* 05 Device ID */
u8 rev_id; /* 06 Revision ID */
u8 class_code[3]; /* 07 Class Code */
u8 irqpin_dbg; /* 08 Debug Interrupt pin */
u8 irqpin; /* Network Interrupt Pin */
u8 min_grant; /* 09 Minimum grant */
u8 max_lat; /* Maximum Latency */
__le16 pci_stat; /* 10 PCI Status */
__le16 sub_vendor_id; /* 11 Subsystem Vendor Id */
__le16 sub_id; /* 12 Subsystem ID */
__le16 dev_id_dbg; /* 13 Debug Device Id */
__le16 ramrom; /* 14 Dram/Rom function */
__le16 dram_size2pci; /* 15 DRAM size to PCI (bytes * 64K) */
__le16 rom_size2pci; /* 16 ROM extension size to PCI (bytes * 4k) */
u8 pad[2]; /* 17 Padding */
u8 freetime; /* 18 FreeTime setting */
u8 ifctrl; /* 10-bit interface control (Mojave only) */
__le16 dram_size; /* 19 DRAM size (bytes * 64k) */
u8 mac[ETH_ALEN]; /* 20 MAC addresses */
u8 mac2[ETH_ALEN];
u8 pad2[6];
u16 dev_id2; /* Device ID for 2nd PCI function */
u8 irqpin2; /* Interrupt pin for 2nd PCI function */
u8 class_code2[3]; /* Class Code for 2nd PCI function */
u16 cfg_byte6; /* Config Byte 6 */
u16 pme_cap; /* Power Mgment capabilities */
u16 nwclk_ctrl; /* NetworkClockControls */
u8 fru_format; /* Alacritech FRU format type */
u8 fru_assembly[6]; /* Alacritech FRU information */
u8 fru_rev[2];
u8 fru_serial[14];
u8 fru_pad[3];
u8 oem_fru[28]; /* optional OEM FRU format type */
u8 pad3[4]; /* Pad to 128 bytes - includes 2 cksum bytes
* (if OEM FRU info exists) and two unusable
* bytes at the end
*/
};
/* SLIC EEPROM structure for Oasis */
struct slic_oasis_eeprom {
__le16 id; /* 00 EEPROM/FLASH Magic code 'A5A5' */
__le16 eeprom_code_size;/* 01 Size of EEPROM Codes (bytes * 4)*/
__le16 spidev0_cfg; /* 02 Flash Config for SPI device 0 */
__le16 spidev1_cfg; /* 03 Flash Config for SPI device 1 */
__le16 vendor_id; /* 04 Vendor ID */
__le16 dev_id; /* 05 Device ID (function 0) */
u8 rev_id; /* 06 Revision ID */
u8 class_code0[3]; /* 07 Class Code for PCI function 0 */
u8 irqpin1; /* 08 Interrupt pin for PCI function 1*/
u8 class_code1[3]; /* 09 Class Code for PCI function 1 */
u8 irqpin2; /* 10 Interrupt pin for PCI function 2*/
u8 irqpin0; /* Interrupt pin for PCI function 0*/
u8 min_grant; /* 11 Minimum grant */
u8 max_lat; /* Maximum Latency */
__le16 sub_vendor_id; /* 12 Subsystem Vendor Id */
__le16 sub_id; /* 13 Subsystem ID */
__le16 flash_size; /* 14 Flash size (bytes / 4K) */
__le16 dram_size2pci; /* 15 DRAM size to PCI (bytes / 64K) */
__le16 rom_size2pci; /* 16 Flash (ROM extension) size to PCI
* (bytes / 4K)
*/
__le16 dev_id1; /* 17 Device Id (function 1) */
__le16 dev_id2; /* 18 Device Id (function 2) */
__le16 dev_stat_cfg; /* 19 Device Status Config Bytes 6-7 */
__le16 pme_cap; /* 20 Power Mgment capabilities */
u8 msi_cap; /* 21 MSI capabilities */
u8 clock_div; /* Clock divider */
__le16 pci_stat_lo; /* 22 PCI Status bits 15:0 */
__le16 pci_stat_hi; /* 23 PCI Status bits 31:16 */
Annotation
- Immediate include surface: `linux/types.h`, `linux/netdevice.h`, `linux/spinlock_types.h`, `linux/dma-mapping.h`, `linux/pci.h`, `linux/list.h`, `linux/u64_stats_sync.h`.
- Detected declarations: `struct slic_upr`, `struct slic_upr_list`, `struct slic_mojave_eeprom`, `struct slic_oasis_eeprom`, `struct slic_stats`, `struct slic_shmem_data`, `struct slic_shmem`, `struct slic_rx_info_oasis`, `struct slic_rx_info_mojave`, `struct slic_stat_desc`.
- 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.