drivers/scsi/qla2xxx/qla_def.h
Source file repositories/reference/linux-study-clean/drivers/scsi/qla2xxx/qla_def.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/qla2xxx/qla_def.h- Extension
.h- Size
- 148143 bytes
- Lines
- 5601
- Domain
- Driver Families
- Bucket
- drivers/scsi
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- 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/kernel.hlinux/init.hlinux/types.hlinux/module.hlinux/list.hlinux/pci.hlinux/dma-mapping.hlinux/sched.hlinux/slab.hlinux/dmapool.hlinux/mempool.hlinux/spinlock.hlinux/completion.hlinux/interrupt.hlinux/workqueue.hlinux/firmware.hlinux/mutex.hlinux/btree.hscsi/scsi.hscsi/scsi_host.hscsi/scsi_device.hscsi/scsi_cmnd.hscsi/scsi_transport_fc.hscsi/scsi_bsg_fc.huapi/scsi/fc/fc_els.hqla_bsg.hqla_dsd.hqla_nx.hqla_nx2.hqla_nvme.hqla_settings.hqla_fw.h
Detected Declarations
struct name_list_extendedstruct qla_nvme_fc_rjtstruct els_rejectstruct req_questruct qla_tgt_sessstruct qla_buf_dscstruct srb_cmdstruct tmf_argstruct els_logo_payloadstruct els_plogi_payloadstruct ct_argstruct qla_nvme_lsrjt_pt_argstruct srb_iocbstruct els_plogistruct qla_els_pt_argstruct iocb_resourcestruct bsg_cmdstruct msg_echo_lbstruct device_reg_2xxxstruct device_reg_25xxmqstruct device_reg_fx00struct mbx_cmd_32struct init_sf_cbstruct link_statisticsstruct atiostruct crc_contextstruct mbx_entrystruct imm_ntfy_from_ispstruct mbx_24xx_entrystruct qlt_plogi_ack_tstruct ct_sns_descstruct event_argstruct ct_fdmi_hba_attrstruct ct_fdmi1_hba_attributesstruct ct_fdmi2_hba_attributesstruct ct_fdmi_port_attrstruct ct_fdmi1_port_attributesstruct ct_fdmi2_port_attributesstruct ct_cmd_hdrstruct ct_sns_reqstruct ct_rsp_hdrstruct ct_sns_gid_pt_datastruct ct_sns_gpnft_rspstruct ct_sns_rspstruct ct_sns_pktstruct ct_sns_gpnft_pktstruct fab_scan_rpstruct fab_scan
Annotated Snippet
struct name_list_extended {
struct get_name_list_extended *l;
dma_addr_t ldma;
struct list_head fcports;
u32 size;
u8 sent;
};
struct qla_nvme_fc_rjt {
struct fcnvme_ls_rjt *c;
dma_addr_t cdma;
u16 size;
};
struct els_reject {
struct fc_els_ls_rjt *c;
dma_addr_t cdma;
u16 size;
};
/*
* Timeout timer counts in seconds
*/
#define PORT_RETRY_TIME 1
#define LOOP_DOWN_TIMEOUT 60
#define LOOP_DOWN_TIME 255 /* 240 */
#define LOOP_DOWN_RESET (LOOP_DOWN_TIME - 30)
#define DEFAULT_OUTSTANDING_COMMANDS 4096
#define MIN_OUTSTANDING_COMMANDS 128
/* ISP request and response entry counts (37-65535) */
#define REQUEST_ENTRY_CNT_2100 128 /* Number of request entries. */
#define REQUEST_ENTRY_CNT_2200 2048 /* Number of request entries. */
#define REQUEST_ENTRY_CNT_24XX 2048 /* Number of request entries. */
#define REQUEST_ENTRY_CNT_83XX 8192 /* Number of request entries. */
#define RESPONSE_ENTRY_CNT_83XX 4096 /* Number of response entries.*/
#define RESPONSE_ENTRY_CNT_2100 64 /* Number of response entries.*/
#define RESPONSE_ENTRY_CNT_2300 512 /* Number of response entries.*/
#define RESPONSE_ENTRY_CNT_MQ 128 /* Number of response entries.*/
#define ATIO_ENTRY_CNT_24XX 4096 /* Number of ATIO entries. */
#define RESPONSE_ENTRY_CNT_FX00 256 /* Number of response entries.*/
#define FW_DEF_EXCHANGES_CNT 2048
#define FW_MAX_EXCHANGES_CNT (32 * 1024)
#define REDUCE_EXCHANGES_CNT (8 * 1024)
#define SET_DID_STATUS(stat_var, status) (stat_var = status << 16)
struct req_que;
struct qla_tgt_sess;
struct qla_buf_dsc {
u16 tag;
#define TAG_FREED 0xffff
void *buf;
dma_addr_t buf_dma;
};
/*
* SCSI Request Block
*/
struct srb_cmd {
struct scsi_cmnd *cmd; /* Linux SCSI command pkt */
uint32_t request_sense_length;
uint32_t fw_sense_length;
uint8_t *request_sense_ptr;
struct crc_context *crc_ctx;
struct ct6_dsd ct6_ctx;
struct qla_buf_dsc buf_dsc;
};
/*
* SRB flag definitions
*/
#define SRB_DMA_VALID BIT_0 /* Command sent to ISP */
#define SRB_GOT_BUF BIT_1
#define SRB_FCP_CMND_DMA_VALID BIT_12 /* DIF: DSD List valid */
#define SRB_CRC_CTX_DMA_VALID BIT_2 /* DIF: context DMA valid */
#define SRB_CRC_PROT_DMA_VALID BIT_4 /* DIF: prot DMA valid */
#define SRB_CRC_CTX_DSD_VALID BIT_5 /* DIF: dsd_list valid */
#define SRB_WAKEUP_ON_COMP BIT_6
#define SRB_DIF_BUNDL_DMA_VALID BIT_7 /* DIF: DMA list valid */
#define SRB_EDIF_CLEANUP_DELETE BIT_9
/* To identify if a srb is of T10-CRC type. @sp => srb_t pointer */
#define IS_PROT_IO(sp) (sp->flags & SRB_CRC_CTX_DSD_VALID)
#define ISP_REG16_DISCONNECT 0xFFFF
static inline le_id_t be_id_to_le(be_id_t id)
{
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/init.h`, `linux/types.h`, `linux/module.h`, `linux/list.h`, `linux/pci.h`, `linux/dma-mapping.h`, `linux/sched.h`.
- Detected declarations: `struct name_list_extended`, `struct qla_nvme_fc_rjt`, `struct els_reject`, `struct req_que`, `struct qla_tgt_sess`, `struct qla_buf_dsc`, `struct srb_cmd`, `struct tmf_arg`, `struct els_logo_payload`, `struct els_plogi_payload`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: source 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.