drivers/net/ethernet/8390/apne.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/8390/apne.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/8390/apne.c- Extension
.c- Size
- 17108 bytes
- Lines
- 615
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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/module.hlinux/kernel.hlinux/errno.hlinux/pci.hlinux/init.hlinux/delay.hlinux/netdevice.hlinux/etherdevice.hlinux/interrupt.hlinux/jiffies.hasm/io.hasm/setup.hasm/amigaints.hasm/amigahw.hasm/amigayle.hasm/amipcmcia.h8390.h
Detected Declarations
function apne_probefunction apne_probe1function apne_reset_8390function apne_get_8390_hdrfunction apne_block_inputfunction apne_block_outputfunction apne_interruptfunction apne_module_initfunction apne_module_exitfunction init_pcmciamodule init apne_module_init
Annotated Snippet
module_init(apne_module_init);
module_exit(apne_module_exit);
static int init_pcmcia(void)
{
u_char config;
#ifndef MANUAL_CONFIG
u_char tuple[32];
int offset_len;
#endif
u_long offset;
pcmcia_reset();
pcmcia_program_voltage(PCMCIA_0V);
pcmcia_access_speed(PCMCIA_SPEED_250NS);
pcmcia_write_enable();
#ifdef MANUAL_CONFIG
config = MANUAL_CONFIG;
#else
/* get and write config byte to enable IO port */
if (pcmcia_copy_tuple(CISTPL_CFTABLE_ENTRY, tuple, 32) < 3)
return 0;
config = tuple[2] & 0x3f;
#endif
#ifdef MANUAL_OFFSET
offset = MANUAL_OFFSET;
#else
if (pcmcia_copy_tuple(CISTPL_CONFIG, tuple, 32) < 6)
return 0;
offset_len = (tuple[2] & 0x3) + 1;
offset = 0;
while(offset_len--) {
offset = (offset << 8) | tuple[4+offset_len];
}
#endif
out_8(GAYLE_ATTRIBUTE+offset, config);
return 1;
}
MODULE_DESCRIPTION("National Semiconductor 8390 Amiga PCMCIA ethernet driver");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/errno.h`, `linux/pci.h`, `linux/init.h`, `linux/delay.h`, `linux/netdevice.h`, `linux/etherdevice.h`.
- Detected declarations: `function apne_probe`, `function apne_probe1`, `function apne_reset_8390`, `function apne_get_8390_hdr`, `function apne_block_input`, `function apne_block_output`, `function apne_interrupt`, `function apne_module_init`, `function apne_module_exit`, `function init_pcmcia`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration 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.