drivers/scsi/qla1280.c
Source file repositories/reference/linux-study-clean/drivers/scsi/qla1280.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/qla1280.c- Extension
.c- Size
- 124165 bytes
- Lines
- 4369
- 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/types.hlinux/string.hlinux/errno.hlinux/kernel.hlinux/ioport.hlinux/delay.hlinux/timer.hlinux/pci.hlinux/proc_fs.hlinux/stat.hlinux/pci_ids.hlinux/interrupt.hlinux/init.hlinux/dma-mapping.hlinux/firmware.hasm/io.hasm/irq.hasm/byteorder.hasm/processor.hasm/types.hscsi/scsi.hscsi/scsi_cmnd.hscsi/scsi_device.hscsi/scsi_host.hscsi/scsi_tcq.hqla1280.h
Detected Declarations
struct qla_boardsstruct qla_fwstruct setup_tokensenum actionenum tokensfunction qla1280_data_directionfunction qla1280_read_nvramfunction qla1280_infofunction handlerfunction qla1280_mailbox_timeoutfunction _qla1280_wait_for_single_commandfunction qla1280_wait_for_single_commandfunction qla1280_wait_for_pending_commandsfunction resultsfunction qla1280_abort_ispfunction commandfunction qla1280_eh_device_resetfunction qla1280_eh_bus_resetfunction adapterfunction qla1280_biosparamfunction qla1280_disable_intrsfunction qla1280_enable_intrsfunction qla1280_intr_handlerfunction qla1280_set_target_parametersfunction depthfunction qla1280_donefunction qla1280_return_statusfunction qla1280_initialize_adapterfunction ERR_PTRfunction qla1280_chip_diagfunction qla1280_load_firmware_piofunction qla1280_load_firmware_dmafunction qla1280_start_firmwarefunction qla1280_load_firmwarefunction qla1280_init_ringsfunction qla1280_print_settingsfunction qla1280_set_target_defaultsfunction qla1280_set_defaultsfunction qla1280_config_targetfunction qla1280_config_busfunction qla1280_nvram_configfunction qla1280_get_nvram_wordfunction qla1280_nvram_requestfunction qla1280_nv_writefunction qla1280_mailbox_commandfunction qla1280_pollfunction qla1280_bus_resetfunction qla1280_device_reset
Annotated Snippet
static struct pci_driver qla1280_pci_driver = {
.name = "qla1280",
.id_table = qla1280_pci_tbl,
.probe = qla1280_probe_one,
.remove = qla1280_remove_one,
};
static int __init
qla1280_init(void)
{
#ifdef MODULE
/*
* If we are called as a module, the qla1280 pointer may not be null
* and it would point to our bootup string, just like on the lilo
* command line. IF not NULL, then process this config string with
* qla1280_setup
*
* Boot time Options
* To add options at boot time add a line to your lilo.conf file like:
* append="qla1280=verbose,max_tags:{{255,255,255,255},{255,255,255,255}}"
* which will result in the first four devices on the first two
* controllers being set to a tagged queue depth of 32.
*/
if (qla1280)
qla1280_setup(qla1280);
#endif
return pci_register_driver(&qla1280_pci_driver);
}
static void __exit
qla1280_exit(void)
{
int i;
pci_unregister_driver(&qla1280_pci_driver);
/* release any allocated firmware images */
for (i = 0; i < QL_NUM_FW_IMAGES; i++) {
release_firmware(qla1280_fw_tbl[i].fw);
qla1280_fw_tbl[i].fw = NULL;
}
}
module_init(qla1280_init);
module_exit(qla1280_exit);
MODULE_AUTHOR("Qlogic & Jes Sorensen");
MODULE_DESCRIPTION("Qlogic ISP SCSI (qla1x80/qla1x160) driver");
MODULE_LICENSE("GPL");
MODULE_FIRMWARE("qlogic/1040.bin");
MODULE_FIRMWARE("qlogic/1280.bin");
MODULE_FIRMWARE("qlogic/12160.bin");
MODULE_VERSION(QLA1280_VERSION);
Annotation
- Immediate include surface: `linux/module.h`, `linux/types.h`, `linux/string.h`, `linux/errno.h`, `linux/kernel.h`, `linux/ioport.h`, `linux/delay.h`, `linux/timer.h`.
- Detected declarations: `struct qla_boards`, `struct qla_fw`, `struct setup_tokens`, `enum action`, `enum tokens`, `function qla1280_data_direction`, `function qla1280_read_nvram`, `function qla1280_info`, `function handler`, `function qla1280_mailbox_timeout`.
- 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.