drivers/scsi/nsp32.c
Source file repositories/reference/linux-study-clean/drivers/scsi/nsp32.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/nsp32.c- Extension
.c- Size
- 87897 bytes
- Lines
- 3406
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/init.hlinux/kernel.hlinux/string.hlinux/timer.hlinux/ioport.hlinux/major.hlinux/blkdev.hlinux/interrupt.hlinux/pci.hlinux/delay.hlinux/ctype.hlinux/dma-mapping.hasm/dma.hasm/io.hscsi/scsi.hscsi/scsi_cmnd.hscsi/scsi_device.hscsi/scsi_host.hscsi/scsi_ioctl.hnsp32.hnsp32_io.hnsp32_debug.c
Detected Declarations
function nsp32_messagefunction nsp32_dmessagefunction nsp32_build_identifyfunction nsp32_build_sdtrfunction nsp32_build_nopfunction nsp32_build_rejectfunction nsp32_start_timerfunction nsp32_selection_autoparafunction SCSIfunction udelayfunction nsp32_reselectionfunction nsp32_setup_sg_tablefunction scsi_for_each_sgfunction nsp32_queuecommand_lckfunction DEF_SCSI_QCMDfunction do_nsp32_isrfunction nsp32_show_infofunction nsp32_scsi_donefunction nsp32_busfree_occurfunction nsp32_adjust_busfreefunction nsp32_msgout_occurfunction nsp32_restart_autoscsifunction nsp32_msgin_occurfunction happenedfunction nsp32_analyze_sdtrfunction nsp32_search_period_entryfunction nsp32_set_asyncfunction nsp32_set_max_syncfunction nsp32_set_sync_entryfunction nsp32_wait_reqfunction nsp32_wait_sackfunction nsp32_sack_assertfunction nsp32_sack_negatefunction nsp32_detectfunction nsp32_releasefunction nsp32_eh_abortfunction nsp32_do_bus_resetfunction nsp32_eh_host_resetfunction nsp32_getprom_paramfunction AT24C01Afunction nsp32_getprom_c16function AT24C01Afunction nsp32_prom_setfunction nsp32_prom_getfunction nsp32_prom_startfunction nsp32_prom_stopfunction nsp32_prom_write_bitfunction nsp32_prom_read_bit
Annotated Snippet
static struct pci_driver nsp32_driver = {
.name = "nsp32",
.id_table = nsp32_pci_table,
.probe = nsp32_probe,
.remove = nsp32_remove,
#ifdef CONFIG_PM
.suspend = nsp32_suspend,
.resume = nsp32_resume,
#endif
};
/*********************************************************************
* Moule entry point
*/
static int __init init_nsp32(void) {
nsp32_msg(KERN_INFO, "loading...");
return pci_register_driver(&nsp32_driver);
}
static void __exit exit_nsp32(void) {
nsp32_msg(KERN_INFO, "unloading...");
pci_unregister_driver(&nsp32_driver);
}
module_init(init_nsp32);
module_exit(exit_nsp32);
/* end */
Annotation
- Immediate include surface: `linux/module.h`, `linux/init.h`, `linux/kernel.h`, `linux/string.h`, `linux/timer.h`, `linux/ioport.h`, `linux/major.h`, `linux/blkdev.h`.
- Detected declarations: `function nsp32_message`, `function nsp32_dmessage`, `function nsp32_build_identify`, `function nsp32_build_sdtr`, `function nsp32_build_nop`, `function nsp32_build_reject`, `function nsp32_start_timer`, `function nsp32_selection_autopara`, `function SCSI`, `function udelay`.
- 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.