drivers/scsi/myrs.c
Source file repositories/reference/linux-study-clean/drivers/scsi/myrs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/myrs.c- Extension
.c- Size
- 90945 bytes
- Lines
- 3169
- 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/types.hlinux/delay.hlinux/interrupt.hlinux/pci.hlinux/raid_class.hlinux/unaligned.hscsi/scsi.hscsi/scsi_host.hscsi/scsi_device.hscsi/scsi_cmnd.hscsi/scsi_tcq.hmyrs.h
Detected Declarations
function myrs_reset_cmdfunction myrs_qcmdfunction myrs_exec_cmdfunction myrs_report_progressfunction myrs_get_ctlr_infofunction myrs_get_ldev_infofunction myrs_get_pdev_infofunction myrs_dev_opfunction myrs_translate_pdevfunction myrs_get_eventfunction myrs_get_fwstatusfunction myrs_enable_mmio_mboxfunction myrs_get_configfunction myrs_log_eventfunction raid_state_showfunction raid_state_storefunction raid_level_showfunction rebuild_showfunction rebuild_storefunction consistency_check_showfunction consistency_check_storefunction serial_showfunction ctlr_num_showfunction processor_showfunction model_showfunction ctlr_type_showfunction cache_size_showfunction firmware_showfunction discovery_storefunction flush_cache_storefunction disable_enclosure_messages_showfunction disable_enclosure_messages_storefunction myrs_host_resetfunction myrs_mode_sensefunction myrs_queuecommandfunction scsi_for_each_sgfunction myrs_translate_ldevfunction myrs_sdev_initfunction myrs_sdev_configurefunction myrs_sdev_destroyfunction myrs_is_raidfunction myrs_get_resyncfunction myrs_get_statefunction myrs_flush_cachefunction myrs_handle_scsifunction myrs_handle_cmdblkfunction myrs_monitorfunction shost_for_each_device
Annotated Snippet
static struct pci_driver myrs_pci_driver = {
.name = "myrs",
.id_table = myrs_id_table,
.probe = myrs_probe,
.remove = myrs_remove,
};
static int __init myrs_init_module(void)
{
int ret;
myrs_raid_template = raid_class_attach(&myrs_raid_functions);
if (!myrs_raid_template)
return -ENODEV;
ret = pci_register_driver(&myrs_pci_driver);
if (ret)
raid_class_release(myrs_raid_template);
return ret;
}
static void __exit myrs_cleanup_module(void)
{
pci_unregister_driver(&myrs_pci_driver);
raid_class_release(myrs_raid_template);
}
module_init(myrs_init_module);
module_exit(myrs_cleanup_module);
MODULE_DESCRIPTION("Mylex DAC960/AcceleRAID/eXtremeRAID driver (SCSI Interface)");
MODULE_AUTHOR("Hannes Reinecke <hare@suse.com>");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/types.h`, `linux/delay.h`, `linux/interrupt.h`, `linux/pci.h`, `linux/raid_class.h`, `linux/unaligned.h`, `scsi/scsi.h`.
- Detected declarations: `function myrs_reset_cmd`, `function myrs_qcmd`, `function myrs_exec_cmd`, `function myrs_report_progress`, `function myrs_get_ctlr_info`, `function myrs_get_ldev_info`, `function myrs_get_pdev_info`, `function myrs_dev_op`, `function myrs_translate_pdev`, `function myrs_get_event`.
- 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.