drivers/net/ethernet/smsc/smsc9420.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/smsc/smsc9420.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/smsc/smsc9420.h- Extension
.h- Size
- 7887 bytes
- Lines
- 263
- 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.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#ifndef _SMSC9420_H
#define _SMSC9420_H
#define TX_RING_SIZE (32)
#define RX_RING_SIZE (128)
/* interrupt deassertion in multiples of 10us */
#define INT_DEAS_TIME (50)
#define SMSC_BAR (3)
#ifdef __BIG_ENDIAN
/* Register set is duplicated for BE at an offset of 0x200 */
#define LAN9420_CPSR_ENDIAN_OFFSET (0x200)
#else
#define LAN9420_CPSR_ENDIAN_OFFSET (0)
#endif
#define PCI_VENDOR_ID_9420 (0x1055)
#define PCI_DEVICE_ID_9420 (0xE420)
#define LAN_REGISTER_EXTENT (0x400)
#define SMSC9420_EEPROM_SIZE ((u32)11)
#define SMSC9420_EEPROM_MAGIC (0x9420)
#define PKT_BUF_SZ (VLAN_ETH_FRAME_LEN + NET_IP_ALIGN + 4)
/***********************************************/
/* DMA Controller Control and Status Registers */
/***********************************************/
#define BUS_MODE (0x00)
#define BUS_MODE_SWR_ (BIT(0))
#define BUS_MODE_DMA_BURST_LENGTH_1 (BIT(8))
#define BUS_MODE_DMA_BURST_LENGTH_2 (BIT(9))
#define BUS_MODE_DMA_BURST_LENGTH_4 (BIT(10))
#define BUS_MODE_DMA_BURST_LENGTH_8 (BIT(11))
#define BUS_MODE_DMA_BURST_LENGTH_16 (BIT(12))
#define BUS_MODE_DMA_BURST_LENGTH_32 (BIT(13))
#define BUS_MODE_DBO_ (BIT(20))
#define TX_POLL_DEMAND (0x04)
#define RX_POLL_DEMAND (0x08)
#define RX_BASE_ADDR (0x0C)
#define TX_BASE_ADDR (0x10)
#define DMAC_STATUS (0x14)
#define DMAC_STS_TS_ (7 << 20)
#define DMAC_STS_RS_ (7 << 17)
#define DMAC_STS_NIS_ (BIT(16))
#define DMAC_STS_AIS_ (BIT(15))
#define DMAC_STS_RWT_ (BIT(9))
#define DMAC_STS_RXPS_ (BIT(8))
#define DMAC_STS_RXBU_ (BIT(7))
#define DMAC_STS_RX_ (BIT(6))
#define DMAC_STS_TXUNF_ (BIT(5))
#define DMAC_STS_TXBU_ (BIT(2))
#define DMAC_STS_TXPS_ (BIT(1))
#define DMAC_STS_TX_ (BIT(0))
#define DMAC_CONTROL (0x18)
#define DMAC_CONTROL_TTM_ (BIT(22))
#define DMAC_CONTROL_SF_ (BIT(21))
#define DMAC_CONTROL_ST_ (BIT(13))
#define DMAC_CONTROL_OSF_ (BIT(2))
#define DMAC_CONTROL_SR_ (BIT(1))
#define DMAC_INTR_ENA (0x1C)
#define DMAC_INTR_ENA_NIS_ (BIT(16))
#define DMAC_INTR_ENA_AIS_ (BIT(15))
#define DMAC_INTR_ENA_RWT_ (BIT(9))
#define DMAC_INTR_ENA_RXPS_ (BIT(8))
#define DMAC_INTR_ENA_RXBU_ (BIT(7))
#define DMAC_INTR_ENA_RX_ (BIT(6))
#define DMAC_INTR_ENA_TXBU_ (BIT(2))
#define DMAC_INTR_ENA_TXPS_ (BIT(1))
#define DMAC_INTR_ENA_TX_ (BIT(0))
#define MISS_FRAME_CNTR (0x20)
#define TX_BUFF_ADDR (0x50)
#define RX_BUFF_ADDR (0x54)
/* Transmit Descriptor Bit Defs */
#define TDES0_OWN_ (0x80000000)
#define TDES0_ERROR_SUMMARY_ (0x00008000)
Annotation
- 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.