drivers/scsi/aha152x.c
Source file repositories/reference/linux-study-clean/drivers/scsi/aha152x.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/aha152x.c- Extension
.c- Size
- 84750 bytes
- Lines
- 3428
- Domain
- Driver Families
- Bucket
- drivers/scsi
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hasm/irq.hlinux/io.hlinux/blkdev.hlinux/completion.hlinux/errno.hlinux/string.hlinux/wait.hlinux/ioport.hlinux/delay.hlinux/proc_fs.hlinux/interrupt.hlinux/init.hlinux/kernel.hlinux/isapnp.hlinux/spinlock.hlinux/workqueue.hlinux/list.hlinux/slab.hscsi/scsi.hscsi/scsi_cmnd.hscsi/scsi_dbg.hscsi/scsi_device.hscsi/scsi_eh.hscsi/scsi_host.hscsi/scsi_tcq.hscsi/scsi_transport_spi.hscsi/scsicam.haha152x.h
Detected Declarations
struct aha152x_cmd_privstruct aha152x_hostdatastruct aha152x_scdataenum aha152x_statefunction CMD_INC_RESIDfunction append_SCfunction swintrfunction aha152x_releasefunction statefunction aha152x_internal_queuefunction aha152x_queue_lckfunction DEF_SCSI_QCMDfunction aha152x_scsi_donefunction aha152x_abortfunction aha152x_device_resetfunction free_hard_reset_SCsfunction aha152x_bus_reset_hostfunction aha152x_bus_resetfunction reset_portsfunction hostfunction aha152x_biosparamfunction donefunction runfunction list_for_each_entryfunction intrfunction busfree_runfunction donefunction selto_runfunction seldi_runfunction msgi_runfunction msgi_endfunction msgo_initfunction msgo_runfunction msgo_endfunction cmd_initfunction cmd_runfunction cmd_endfunction status_runfunction datai_initfunction datai_runfunction datai_endfunction datao_initfunction datao_runfunction datao_endfunction update_statefunction parerr_runfunction rsti_runfunction is_complete
Annotated Snippet
module_init(aha152x_init);
module_exit(aha152x_exit);
#if !defined(MODULE)
static int __init aha152x_setup(char *str)
{
int ints[10];
get_options(str, ARRAY_SIZE(ints), ints);
if(setup_count>=ARRAY_SIZE(setup)) {
printk(KERN_ERR "aha152x: you can only configure up to two controllers\n");
return 1;
}
setup[setup_count].conf = str;
setup[setup_count].io_port = ints[0] >= 1 ? ints[1] : 0x340;
setup[setup_count].irq = ints[0] >= 2 ? ints[2] : 11;
setup[setup_count].scsiid = ints[0] >= 3 ? ints[3] : 7;
setup[setup_count].reconnect = ints[0] >= 4 ? ints[4] : 1;
setup[setup_count].parity = ints[0] >= 5 ? ints[5] : 1;
setup[setup_count].synchronous = ints[0] >= 6 ? ints[6] : 1;
setup[setup_count].delay = ints[0] >= 7 ? ints[7] : DELAY_DEFAULT;
setup[setup_count].ext_trans = ints[0] >= 8 ? ints[8] : 0;
if (ints[0] > 8)
printk(KERN_NOTICE "aha152x: usage: aha152x=<IOBASE>[,<IRQ>[,<SCSI ID>"
"[,<RECONNECT>[,<PARITY>[,<SYNCHRONOUS>[,<DELAY>[,<EXT_TRANS>]]]]]]]\n");
else
setup_count++;
return 1;
}
__setup("aha152x=", aha152x_setup);
#endif
#endif /* !AHA152X_PCMCIA */
Annotation
- Immediate include surface: `linux/module.h`, `asm/irq.h`, `linux/io.h`, `linux/blkdev.h`, `linux/completion.h`, `linux/errno.h`, `linux/string.h`, `linux/wait.h`.
- Detected declarations: `struct aha152x_cmd_priv`, `struct aha152x_hostdata`, `struct aha152x_scdata`, `enum aha152x_state`, `function CMD_INC_RESID`, `function append_SC`, `function swintr`, `function aha152x_release`, `function state`, `function aha152x_internal_queue`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- 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.