drivers/scsi/advansys.c
Source file repositories/reference/linux-study-clean/drivers/scsi/advansys.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/advansys.c- Extension
.c- Size
- 345380 bytes
- Lines
- 11554
- Domain
- Driver Families
- Bucket
- drivers/scsi
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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.hlinux/string.hlinux/kernel.hlinux/types.hlinux/ioport.hlinux/interrupt.hlinux/delay.hlinux/slab.hlinux/mm.hlinux/proc_fs.hlinux/init.hlinux/blkdev.hlinux/isa.hlinux/eisa.hlinux/pci.hlinux/spinlock.hlinux/dma-mapping.hlinux/firmware.hlinux/dmapool.hasm/io.hscsi/scsi_cmnd.hscsi/scsi_device.hscsi/scsi_tcq.hscsi/scsi.hscsi/scsi_host.h
Detected Declarations
struct asc_dvc_varstruct adv_dvc_varstruct adv_scsi_req_qstruct asc_statsstruct asc_boardstruct advansys_cmdstruct eisa_scsi_datafunction asc_prt_asc_dvc_varfunction asc_prt_asc_dvc_cfgfunction asc_prt_adv_dvc_varfunction asc_prt_adv_dvc_cfgfunction asc_prt_scsi_hostfunction asc_prt_hexfunction asc_prt_asc_scsi_qfunction asc_prt_asc_qdone_infofunction asc_prt_adv_sgblockfunction asc_prt_adv_scsi_req_qfunction advansys_infofunction asc_prt_board_devicesfunction asc_prt_adv_biosfunction asc_get_eeprom_stringfunction asc_prt_asc_board_eepromfunction asc_prt_adv_board_eepromfunction asc_prt_driver_conffunction asc_prt_asc_board_infofunction asc_prt_adv_board_infofunction asc_prt_board_statsfunction advansys_show_infofunction asc_scsi_donefunction AscSetBankfunction AscSetChipIHfunction AscStartChipfunction AscStopChipfunction AscIsChipHaltedfunction AscResetChipAndScsiBusfunction AscFindSignaturefunction AscEnableInterruptfunction AscDisableInterruptfunction AscReadLramBytefunction AscReadLramWordfunction AscMemWordSetLramfunction AscWriteLramWordfunction AscWriteLramBytefunction AscMemWordCopyPtrToLramfunction AscMemDWordCopyPtrToLramfunction AscMemWordCopyPtrFromLramfunction AscMemSumLramWordfunction AscInitLram
Annotated Snippet
static struct pci_driver advansys_pci_driver = {
.name = DRV_NAME,
.id_table = advansys_pci_tbl,
.probe = advansys_pci_probe,
.remove = advansys_pci_remove,
};
static int __init advansys_init(void)
{
int error;
error = isa_register_driver(&advansys_vlb_driver,
ASC_IOADR_TABLE_MAX_IX);
if (error)
goto fail;
error = eisa_driver_register(&advansys_eisa_driver);
if (error)
goto unregister_vlb;
error = pci_register_driver(&advansys_pci_driver);
if (error)
goto unregister_eisa;
return 0;
unregister_eisa:
eisa_driver_unregister(&advansys_eisa_driver);
unregister_vlb:
isa_unregister_driver(&advansys_vlb_driver);
fail:
return error;
}
static void __exit advansys_exit(void)
{
pci_unregister_driver(&advansys_pci_driver);
eisa_driver_unregister(&advansys_eisa_driver);
isa_unregister_driver(&advansys_vlb_driver);
}
module_init(advansys_init);
module_exit(advansys_exit);
MODULE_DESCRIPTION("AdvanSys SCSI Adapter driver");
MODULE_LICENSE("GPL");
MODULE_FIRMWARE("advansys/mcode.bin");
MODULE_FIRMWARE("advansys/3550.bin");
MODULE_FIRMWARE("advansys/38C0800.bin");
MODULE_FIRMWARE("advansys/38C1600.bin");
Annotation
- Immediate include surface: `linux/module.h`, `linux/string.h`, `linux/kernel.h`, `linux/types.h`, `linux/ioport.h`, `linux/interrupt.h`, `linux/delay.h`, `linux/slab.h`.
- Detected declarations: `struct asc_dvc_var`, `struct adv_dvc_var`, `struct adv_scsi_req_q`, `struct asc_stats`, `struct asc_board`, `struct advansys_cmd`, `struct eisa_scsi_data`, `function asc_prt_asc_dvc_var`, `function asc_prt_asc_dvc_cfg`, `function asc_prt_adv_dvc_var`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: pattern 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.