drivers/net/wan/wanxl.h
Source file repositories/reference/linux-study-clean/drivers/net/wan/wanxl.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wan/wanxl.h- Extension
.h- Size
- 4349 bytes
- Lines
- 150
- 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
#define RESET_WHILE_LOADING 0
/* you must rebuild the firmware if any of the following is changed */
#define DETECT_RAM 0 /* needed for > 4MB RAM, 16 MB maximum */
#define QUICC_MEMCPY_USES_PLX 1 /* must be used if the host has > 256 MB RAM */
#define STATUS_CABLE_V35 2
#define STATUS_CABLE_X21 3
#define STATUS_CABLE_V24 4
#define STATUS_CABLE_EIA530 5
#define STATUS_CABLE_INVALID 6
#define STATUS_CABLE_NONE 7
#define STATUS_CABLE_DCE 0x8000
#define STATUS_CABLE_DSR 0x0010
#define STATUS_CABLE_DCD 0x0008
#define STATUS_CABLE_PM_SHIFT 5
#define PDM_OFFSET 0x1000
#define TX_BUFFERS 10 /* per port */
#define RX_BUFFERS 30
#define RX_QUEUE_LENGTH 40 /* card->host queue length - per card */
#define PACKET_EMPTY 0x00
#define PACKET_FULL 0x10
#define PACKET_SENT 0x20 /* TX only */
#define PACKET_UNDERRUN 0x30 /* TX only */
#define PACKET_PORT_MASK 0x03 /* RX only */
/* bit numbers in PLX9060 doorbell registers */
#define DOORBELL_FROM_CARD_TX_0 0 /* packet sent by the card */
#define DOORBELL_FROM_CARD_TX_1 1
#define DOORBELL_FROM_CARD_TX_2 2
#define DOORBELL_FROM_CARD_TX_3 3
#define DOORBELL_FROM_CARD_RX 4
#define DOORBELL_FROM_CARD_CABLE_0 5 /* cable/PM/etc. changed */
#define DOORBELL_FROM_CARD_CABLE_1 6
#define DOORBELL_FROM_CARD_CABLE_2 7
#define DOORBELL_FROM_CARD_CABLE_3 8
#define DOORBELL_TO_CARD_OPEN_0 0
#define DOORBELL_TO_CARD_OPEN_1 1
#define DOORBELL_TO_CARD_OPEN_2 2
#define DOORBELL_TO_CARD_OPEN_3 3
#define DOORBELL_TO_CARD_CLOSE_0 4
#define DOORBELL_TO_CARD_CLOSE_1 5
#define DOORBELL_TO_CARD_CLOSE_2 6
#define DOORBELL_TO_CARD_CLOSE_3 7
#define DOORBELL_TO_CARD_TX_0 8 /* outbound packet queued */
#define DOORBELL_TO_CARD_TX_1 9
#define DOORBELL_TO_CARD_TX_2 10
#define DOORBELL_TO_CARD_TX_3 11
/* firmware-only status bits, starting from last DOORBELL_TO_CARD + 1 */
#define TASK_SCC_0 12
#define TASK_SCC_1 13
#define TASK_SCC_2 14
#define TASK_SCC_3 15
#define ALIGN32(x) (((x) + 3) & 0xFFFFFFFC)
#define BUFFER_LENGTH ALIGN32(HDLC_MAX_MRU + 4) /* 4 bytes for 32-bit CRC */
/* Address of TX and RX buffers in 68360 address space */
#define BUFFERS_ADDR 0x4000 /* 16 KB */
#ifndef __ASSEMBLER__
#define PLX_OFFSET 0
#else
#define PLX_OFFSET PLX + 0x80
#endif
#define PLX_MAILBOX_0 (PLX_OFFSET + 0x40)
#define PLX_MAILBOX_1 (PLX_OFFSET + 0x44)
#define PLX_MAILBOX_2 (PLX_OFFSET + 0x48)
#define PLX_MAILBOX_3 (PLX_OFFSET + 0x4C)
#define PLX_MAILBOX_4 (PLX_OFFSET + 0x50)
#define PLX_MAILBOX_5 (PLX_OFFSET + 0x54)
#define PLX_MAILBOX_6 (PLX_OFFSET + 0x58)
#define PLX_MAILBOX_7 (PLX_OFFSET + 0x5C)
#define PLX_DOORBELL_TO_CARD (PLX_OFFSET + 0x60)
#define PLX_DOORBELL_FROM_CARD (PLX_OFFSET + 0x64)
#define PLX_INTERRUPT_CS (PLX_OFFSET + 0x68)
#define PLX_CONTROL (PLX_OFFSET + 0x6C)
#ifdef __ASSEMBLER__
#define PLX_DMA_0_MODE (PLX + 0x100)
#define PLX_DMA_0_PCI (PLX + 0x104)
#define PLX_DMA_0_LOCAL (PLX + 0x108)
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.