drivers/scsi/elx/efct/efct_driver.c
Source file repositories/reference/linux-study-clean/drivers/scsi/elx/efct/efct_driver.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/elx/efct/efct_driver.c- Extension
.c- Size
- 16634 bytes
- Lines
- 778
- 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.
- 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
efct_driver.hefct_hw.hefct_unsol.hefct_scsi.h
Detected Declarations
function efct_device_initfunction efct_device_shutdownfunction efct_device_allocfunction efct_teardown_msixfunction efct_efclib_configfunction efct_pci_modelfunction efct_device_attachfunction efct_device_detachfunction efct_fw_write_cbfunction efct_firmware_writefunction efct_fw_resetfunction efct_request_firmware_updatefunction efct_device_freefunction efct_device_interrupts_requiredfunction efct_intr_threadfunction efct_setup_msixfunction efct_pci_probefunction efct_pci_removefunction efct_device_prep_for_resetfunction efct_device_prep_for_recoverfunction efct_pci_io_error_detectedfunction efct_pci_io_slot_resetfunction efct_pci_io_resumefunction efct_initfunction efct_exitmodule init efct_init
Annotated Snippet
static struct pci_driver efct_pci_driver = {
.name = EFCT_DRIVER_NAME,
.id_table = efct_pci_table,
.probe = efct_pci_probe,
.remove = efct_pci_remove,
.err_handler = &efct_pci_err_handler,
};
static
int __init efct_init(void)
{
int rc;
rc = efct_device_init();
if (rc) {
pr_err("efct_device_init failed rc=%d\n", rc);
return rc;
}
rc = pci_register_driver(&efct_pci_driver);
if (rc) {
pr_err("pci_register_driver failed rc=%d\n", rc);
efct_device_shutdown();
}
return rc;
}
static void __exit efct_exit(void)
{
pci_unregister_driver(&efct_pci_driver);
efct_device_shutdown();
}
module_init(efct_init);
module_exit(efct_exit);
MODULE_VERSION(EFCT_DRIVER_VERSION);
MODULE_DESCRIPTION("Emulex Fibre Channel Target driver");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Broadcom");
Annotation
- Immediate include surface: `efct_driver.h`, `efct_hw.h`, `efct_unsol.h`, `efct_scsi.h`.
- Detected declarations: `function efct_device_init`, `function efct_device_shutdown`, `function efct_device_alloc`, `function efct_teardown_msix`, `function efct_efclib_config`, `function efct_pci_model`, `function efct_device_attach`, `function efct_device_detach`, `function efct_fw_write_cb`, `function efct_firmware_write`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: pattern implementation candidate.
- 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.