drivers/scsi/qla2xxx/qla_os.c
Source file repositories/reference/linux-study-clean/drivers/scsi/qla2xxx/qla_os.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/qla2xxx/qla_os.c- Extension
.c- Size
- 237783 bytes
- Lines
- 8384
- 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
qla_def.hlinux/bitfield.hlinux/moduleparam.hlinux/vmalloc.hlinux/delay.hlinux/kthread.hlinux/mutex.hlinux/kobject.hlinux/slab.hlinux/refcount.hlinux/crash_dump.hlinux/trace_events.hlinux/trace.hlinux/irq.hscsi/scsi_tcq.hscsi/scsicam.hscsi/scsi_transport.hscsi/scsi_transport_fc.hqla_target.h
Detected Declarations
function qla2x00_start_timerfunction qla2x00_restart_timerfunction qla2x00_stop_timerfunction qla_init_base_qpairfunction qla2x00_alloc_queuesfunction qla2x00_free_req_quefunction qla2x00_free_rsp_quefunction qla2x00_free_queuesfunction qla2x00_pci_info_strfunction qla24xx_pci_info_strfunction qla2x00_fw_version_strfunction qla24xx_fw_version_strfunction qla2x00_sp_free_dmafunction qla2x00_sp_complfunction qla2xxx_qpair_sp_free_dmafunction list_for_each_entry_safefunction list_for_each_entry_safefunction qla2xxx_qpair_sp_complfunction qla2xxx_queuecommandfunction qla2xxx_mqueuecommandfunction Successfunction test_bitfunction test_fcport_countfunction list_for_each_entryfunction qla2x00_wait_for_sess_deletionfunction qla2x00_wait_for_hba_readyfunction qla2x00_wait_for_chip_resetfunction test_bitfunction qla2xxx_eh_abortfunction __qla2x00_eh_wait_for_pending_commandsfunction qla2x00_eh_wait_for_pending_commandsfunction qla2xxx_eh_device_resetfunction qla2xxx_eh_target_resetfunction qla2xxx_eh_bus_resetfunction qla2xxx_eh_host_resetfunction qla2x00_loop_resetfunction qla2x00_abort_srbfunction __qla2x00_abort_all_cmdsfunction qla2x00_abort_all_cmdsfunction qla2xxx_sdev_initfunction qla2xxx_sdev_configurefunction qla2xxx_sdev_destroyfunction qla2x00_config_dma_addressingfunction qla2x00_enable_intrsfunction qla2x00_disable_intrsfunction qla24xx_enable_intrsfunction qla24xx_disable_intrsfunction qla2x00_iospace_config
Annotated Snippet
static struct pci_driver qla2xxx_pci_driver = {
.name = QLA2XXX_DRIVER_NAME,
.id_table = qla2xxx_pci_tbl,
.probe = qla2x00_probe_one,
.remove = qla2x00_remove_one,
.shutdown = qla2x00_shutdown,
.err_handler = &qla2xxx_err_handler,
};
static const struct file_operations apidev_fops = {
.owner = THIS_MODULE,
.llseek = noop_llseek,
};
/**
* qla2x00_module_init - Module initialization.
**/
static int __init
qla2x00_module_init(void)
{
int ret = 0;
BUILD_BUG_ON(sizeof(cmd_a64_entry_t) != 64);
BUILD_BUG_ON(sizeof(cmd_entry_t) != 64);
BUILD_BUG_ON(sizeof(cont_a64_entry_t) != 64);
BUILD_BUG_ON(sizeof(cont_entry_t) != 64);
BUILD_BUG_ON(sizeof(init_cb_t) != 96);
BUILD_BUG_ON(sizeof(mrk_entry_t) != 64);
BUILD_BUG_ON(sizeof(ms_iocb_entry_t) != 64);
BUILD_BUG_ON(sizeof(request_t) != 64);
BUILD_BUG_ON(sizeof(struct abort_entry_24xx) != 64);
BUILD_BUG_ON(sizeof(struct abort_iocb_entry_fx00) != 64);
BUILD_BUG_ON(sizeof(struct abts_entry_24xx) != 64);
BUILD_BUG_ON(sizeof(struct access_chip_84xx) != 64);
BUILD_BUG_ON(sizeof(struct access_chip_rsp_84xx) != 64);
BUILD_BUG_ON(sizeof(struct cmd_bidir) != 64);
BUILD_BUG_ON(sizeof(struct cmd_nvme) != 64);
BUILD_BUG_ON(sizeof(struct cmd_type_6) != 64);
BUILD_BUG_ON(sizeof(struct cmd_type_7) != 64);
BUILD_BUG_ON(sizeof(struct cmd_type_7_fx00) != 64);
BUILD_BUG_ON(sizeof(struct cmd_type_crc_2) != 64);
BUILD_BUG_ON(sizeof(struct ct_entry_24xx) != 64);
BUILD_BUG_ON(sizeof(struct ct_fdmi1_hba_attributes) != 2604);
BUILD_BUG_ON(sizeof(struct ct_fdmi2_hba_attributes) != 4424);
BUILD_BUG_ON(sizeof(struct ct_fdmi2_port_attributes) != 4164);
BUILD_BUG_ON(sizeof(struct ct_fdmi_hba_attr) != 260);
BUILD_BUG_ON(sizeof(struct ct_fdmi_port_attr) != 260);
BUILD_BUG_ON(sizeof(struct ct_rsp_hdr) != 16);
BUILD_BUG_ON(sizeof(struct ctio_crc2_to_fw) != 64);
BUILD_BUG_ON(sizeof(struct device_reg_24xx) != 256);
BUILD_BUG_ON(sizeof(struct device_reg_25xxmq) != 24);
BUILD_BUG_ON(sizeof(struct device_reg_2xxx) != 256);
BUILD_BUG_ON(sizeof(struct device_reg_82xx) != 1288);
BUILD_BUG_ON(sizeof(struct device_reg_fx00) != 216);
BUILD_BUG_ON(sizeof(struct els_entry_24xx) != 64);
BUILD_BUG_ON(sizeof(struct els_sts_entry_24xx) != 64);
BUILD_BUG_ON(sizeof(struct fxdisc_entry_fx00) != 64);
BUILD_BUG_ON(sizeof(struct imm_ntfy_from_isp) != 64);
BUILD_BUG_ON(sizeof(struct init_cb_24xx) != 128);
BUILD_BUG_ON(sizeof(struct init_cb_81xx) != 128);
BUILD_BUG_ON(sizeof(struct logio_entry_24xx) != 64);
BUILD_BUG_ON(sizeof(struct mbx_entry) != 64);
BUILD_BUG_ON(sizeof(struct mid_init_cb_24xx) != 5252);
BUILD_BUG_ON(sizeof(struct mrk_entry_24xx) != 64);
BUILD_BUG_ON(sizeof(struct nvram_24xx) != 512);
BUILD_BUG_ON(sizeof(struct nvram_81xx) != 512);
BUILD_BUG_ON(sizeof(struct pt_ls4_request) != 64);
BUILD_BUG_ON(sizeof(struct pt_ls4_rx_unsol) != 64);
BUILD_BUG_ON(sizeof(struct purex_entry_24xx) != 64);
BUILD_BUG_ON(sizeof(struct qla2100_fw_dump) != 123634);
BUILD_BUG_ON(sizeof(struct qla2300_fw_dump) != 136100);
BUILD_BUG_ON(sizeof(struct qla24xx_fw_dump) != 37976);
BUILD_BUG_ON(sizeof(struct qla25xx_fw_dump) != 39228);
BUILD_BUG_ON(sizeof(struct qla2xxx_fce_chain) != 52);
BUILD_BUG_ON(sizeof(struct qla2xxx_fw_dump) != 136172);
BUILD_BUG_ON(sizeof(struct qla2xxx_mq_chain) != 524);
BUILD_BUG_ON(sizeof(struct qla2xxx_mqueue_chain) != 8);
BUILD_BUG_ON(sizeof(struct qla2xxx_mqueue_header) != 12);
BUILD_BUG_ON(sizeof(struct qla2xxx_offld_chain) != 24);
BUILD_BUG_ON(sizeof(struct qla81xx_fw_dump) != 39420);
BUILD_BUG_ON(sizeof(struct qla82xx_uri_data_desc) != 28);
BUILD_BUG_ON(sizeof(struct qla82xx_uri_table_desc) != 32);
BUILD_BUG_ON(sizeof(struct qla83xx_fw_dump) != 51196);
BUILD_BUG_ON(sizeof(struct qla_fcp_prio_cfg) != FCP_PRIO_CFG_SIZE);
BUILD_BUG_ON(sizeof(struct qla_fdt_layout) != 128);
BUILD_BUG_ON(sizeof(struct qla_flt_header) != 8);
BUILD_BUG_ON(sizeof(struct qla_flt_region) != 16);
BUILD_BUG_ON(sizeof(struct qla_npiv_entry) != 24);
BUILD_BUG_ON(sizeof(struct qla_npiv_header) != 16);
BUILD_BUG_ON(sizeof(struct rdp_rsp_payload) != 336);
Annotation
- Immediate include surface: `qla_def.h`, `linux/bitfield.h`, `linux/moduleparam.h`, `linux/vmalloc.h`, `linux/delay.h`, `linux/kthread.h`, `linux/mutex.h`, `linux/kobject.h`.
- Detected declarations: `function qla2x00_start_timer`, `function qla2x00_restart_timer`, `function qla2x00_stop_timer`, `function qla_init_base_qpair`, `function qla2x00_alloc_queues`, `function qla2x00_free_req_que`, `function qla2x00_free_rsp_que`, `function qla2x00_free_queues`, `function qla2x00_pci_info_str`, `function qla24xx_pci_info_str`.
- 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.