drivers/scsi/stex.c
Source file repositories/reference/linux-study-clean/drivers/scsi/stex.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/stex.c- Extension
.c- Size
- 49315 bytes
- Lines
- 2031
- 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/init.hlinux/errno.hlinux/kernel.hlinux/delay.hlinux/slab.hlinux/time.hlinux/pci.hlinux/blkdev.hlinux/interrupt.hlinux/types.hlinux/module.hlinux/spinlock.hlinux/ktime.hlinux/reboot.hasm/io.hasm/irq.hasm/byteorder.hscsi/scsi.hscsi/scsi_device.hscsi/scsi_cmnd.hscsi/scsi_host.hscsi/scsi_tcq.hscsi/scsi_dbg.hscsi/scsi_eh.h
Detected Declarations
struct st_sgitemstruct st_ss_sgitemstruct st_sgtablestruct st_msg_headerstruct handshake_framestruct req_msgstruct status_msgstruct ver_infostruct st_framestruct st_drvverstruct st_ccbstruct st_hbastruct st_card_infofunction stex_invalid_fieldfunction stex_map_sgfunction scsi_for_each_sgfunction stex_ss_map_sgfunction scsi_for_each_sgfunction stex_controller_infofunction stex_send_cmdfunction stex_ss_send_cmdfunction return_abnormal_statefunction stex_sdev_configurefunction stex_queuecommand_lckfunction DEF_SCSI_QCMDfunction stex_copy_datafunction stex_check_cmdfunction stex_mu_intrfunction stex_intrfunction stex_ss_mu_intrfunction stex_ss_intrfunction stex_common_handshakefunction stex_ss_handshakefunction stex_handshakefunction stex_abortfunction stex_hard_resetfunction stex_yos_resetfunction stex_ss_resetfunction stex_p3_resetfunction stex_do_resetfunction stex_resetfunction stex_reset_workfunction stex_biosparamfunction stex_request_irqfunction stex_free_irqfunction stex_probefunction stex_hba_stopfunction stex_hba_free
Annotated Snippet
static struct pci_driver stex_pci_driver = {
.name = DRV_NAME,
.id_table = stex_pci_tbl,
.probe = stex_probe,
.remove = stex_remove,
.shutdown = stex_shutdown,
.suspend = stex_suspend,
.resume = stex_resume,
};
static int __init stex_init(void)
{
printk(KERN_INFO DRV_NAME
": Promise SuperTrak EX Driver version: %s\n",
ST_DRIVER_VERSION);
return pci_register_driver(&stex_pci_driver);
}
static void __exit stex_exit(void)
{
pci_unregister_driver(&stex_pci_driver);
}
module_init(stex_init);
module_exit(stex_exit);
Annotation
- Immediate include surface: `linux/init.h`, `linux/errno.h`, `linux/kernel.h`, `linux/delay.h`, `linux/slab.h`, `linux/time.h`, `linux/pci.h`, `linux/blkdev.h`.
- Detected declarations: `struct st_sgitem`, `struct st_ss_sgitem`, `struct st_sgtable`, `struct st_msg_header`, `struct handshake_frame`, `struct req_msg`, `struct status_msg`, `struct ver_info`, `struct st_frame`, `struct st_drvver`.
- 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.