drivers/net/usb/lan78xx.h
Source file repositories/reference/linux-study-clean/drivers/net/usb/lan78xx.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/usb/lan78xx.h- Extension
.h- Size
- 31450 bytes
- Lines
- 883
- 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 _LAN78XX_H
#define _LAN78XX_H
/* USB Vendor Requests */
#define USB_VENDOR_REQUEST_WRITE_REGISTER 0xA0
#define USB_VENDOR_REQUEST_READ_REGISTER 0xA1
#define USB_VENDOR_REQUEST_GET_STATS 0xA2
/* Interrupt Endpoint status word bitfields */
#define INT_ENP_EEE_START_TX_LPI_INT BIT(26)
#define INT_ENP_EEE_STOP_TX_LPI_INT BIT(25)
#define INT_ENP_EEE_RX_LPI_INT BIT(24)
#define INT_ENP_RDFO_INT BIT(22)
#define INT_ENP_TXE_INT BIT(21)
#define INT_ENP_TX_DIS_INT BIT(19)
#define INT_ENP_RX_DIS_INT BIT(18)
#define INT_ENP_PHY_INT BIT(17)
#define INT_ENP_DP_INT BIT(16)
#define INT_ENP_MAC_ERR_INT BIT(15)
#define INT_ENP_TDFU_INT BIT(14)
#define INT_ENP_TDFO_INT BIT(13)
#define INT_ENP_UTX_FP_INT BIT(12)
#define TX_PKT_ALIGNMENT 4
#define RX_PKT_ALIGNMENT 4
/* Tx Command A */
#define TX_CMD_A_IGE_ (0x20000000)
#define TX_CMD_A_ICE_ (0x10000000)
#define TX_CMD_A_LSO_ (0x08000000)
#define TX_CMD_A_IPE_ (0x04000000)
#define TX_CMD_A_TPE_ (0x02000000)
#define TX_CMD_A_IVTG_ (0x01000000)
#define TX_CMD_A_RVTG_ (0x00800000)
#define TX_CMD_A_FCS_ (0x00400000)
#define TX_CMD_A_LEN_MASK_ (0x000FFFFF)
/* Tx Command B */
#define TX_CMD_B_MSS_SHIFT_ (16)
#define TX_CMD_B_MSS_MASK_ (0x3FFF0000)
#define TX_CMD_B_MSS_MIN_ ((unsigned short)8)
#define TX_CMD_B_VTAG_MASK_ (0x0000FFFF)
#define TX_CMD_B_VTAG_PRI_MASK_ (0x0000E000)
#define TX_CMD_B_VTAG_CFI_MASK_ (0x00001000)
#define TX_CMD_B_VTAG_VID_MASK_ (0x00000FFF)
/* Rx Command A */
#define RX_CMD_A_ICE_ (0x80000000)
#define RX_CMD_A_TCE_ (0x40000000)
#define RX_CMD_A_CSE_MASK_ (0xC0000000)
#define RX_CMD_A_IPV_ (0x20000000)
#define RX_CMD_A_PID_MASK_ (0x18000000)
#define RX_CMD_A_PID_NONE_IP_ (0x00000000)
#define RX_CMD_A_PID_TCP_IP_ (0x08000000)
#define RX_CMD_A_PID_UDP_IP_ (0x10000000)
#define RX_CMD_A_PID_IP_ (0x18000000)
#define RX_CMD_A_PFF_ (0x04000000)
#define RX_CMD_A_BAM_ (0x02000000)
#define RX_CMD_A_MAM_ (0x01000000)
#define RX_CMD_A_FVTG_ (0x00800000)
#define RX_CMD_A_RED_ (0x00400000)
#define RX_CMD_A_RX_ERRS_MASK_ (0xC03F0000)
#define RX_CMD_A_RWT_ (0x00200000)
#define RX_CMD_A_RUNT_ (0x00100000)
#define RX_CMD_A_LONG_ (0x00080000)
#define RX_CMD_A_RXE_ (0x00040000)
#define RX_CMD_A_DRB_ (0x00020000)
#define RX_CMD_A_FCS_ (0x00010000)
#define RX_CMD_A_UAM_ (0x00008000)
#define RX_CMD_A_ICSM_ (0x00004000)
#define RX_CMD_A_LEN_MASK_ (0x00003FFF)
#define RX_CMD_A_RX_HARD_ERRS_MASK_ \
(RX_CMD_A_RX_ERRS_MASK_ & ~RX_CMD_A_CSE_MASK_)
/* Rx Command B */
#define RX_CMD_B_CSUM_SHIFT_ (16)
#define RX_CMD_B_CSUM_MASK_ (0xFFFF0000)
#define RX_CMD_B_VTAG_MASK_ (0x0000FFFF)
#define RX_CMD_B_VTAG_PRI_MASK_ (0x0000E000)
#define RX_CMD_B_VTAG_CFI_MASK_ (0x00001000)
#define RX_CMD_B_VTAG_VID_MASK_ (0x00000FFF)
/* Rx Command C */
#define RX_CMD_C_WAKE_SHIFT_ (15)
#define RX_CMD_C_WAKE_ (0x8000)
#define RX_CMD_C_REF_FAIL_SHIFT_ (14)
#define RX_CMD_C_REF_FAIL_ (0x4000)
/* SCSRs */
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.