drivers/scsi/qla2xxx/qla_target.h
Source file repositories/reference/linux-study-clean/drivers/scsi/qla2xxx/qla_target.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/qla2xxx/qla_target.h- Extension
.h- Size
- 34271 bytes
- Lines
- 1185
- 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
qla_def.hqla_dsd.htarget/target_core_base.h
Detected Declarations
struct nack_to_ispstruct ctio_to_2xxxstruct fcp_hdrstruct fcp_hdr_lestruct atio7_fcp_cmndstruct atio_from_ispstruct ctio7_to_24xxstruct ctio7_from_24xxstruct ctio_crc2_to_fwstruct ctio_crc_from_fwstruct abts_recv_from_24xxstruct ba_acc_lestruct ba_rjt_lestruct abts_resp_to_24xxstruct abts_resp_from_24xx_fwstruct qla_tgt_mgmt_cmdstruct fc_portstruct qla_tgt_cmdstruct qla_tgt_func_tmplstruct qla_port_24xx_datastruct qla_qpair_hintstruct qla_tgtstruct qla_tgt_sess_opstruct qla_tgt_cmdstruct qla_tgt_sess_work_paramstruct qla_tgt_mgmt_cmdstruct qla_tgt_prmstruct qla_tgt_srrenum trace_flagsfunction fcpcmd_is_corruptedfunction adjust_corrupted_atiofunction get_datalen_for_atiofunction qla_tgt_mode_enabledfunction qla_ini_mode_enabledfunction qla_dual_mode_enabledfunction sid_to_keyfunction qlt_set_data_offset
Annotated Snippet
struct nack_to_isp {
uint8_t entry_type; /* Entry type. */
uint8_t entry_count; /* Entry count. */
uint8_t sys_define; /* System defined. */
uint8_t entry_status; /* Entry Status. */
union {
struct {
__le32 sys_define_2; /* System defined. */
target_id_t target;
uint8_t target_id;
uint8_t reserved_1;
__le16 flags;
__le16 resp_code;
__le16 status;
__le16 task_flags;
__le16 seq_id;
__le16 srr_rx_id;
__le32 srr_rel_offs;
__le16 srr_ui;
__le16 srr_flags;
__le16 srr_reject_code;
uint8_t srr_reject_vendor_uniq;
uint8_t srr_reject_code_expl;
uint8_t reserved_2[24];
} isp2x;
struct {
uint32_t handle;
__le16 nport_handle;
uint16_t reserved_1;
__le16 flags;
__le16 srr_rx_id;
__le16 status;
uint8_t status_subcode;
uint8_t fw_handle;
__le32 exchange_address;
__le32 srr_rel_offs;
__le16 srr_ui;
__le16 srr_flags;
uint8_t reserved_4[19];
uint8_t vp_index;
uint8_t srr_reject_vendor_uniq;
uint8_t srr_reject_code_expl;
uint8_t srr_reject_code;
uint8_t reserved_5[5];
} isp24;
} u;
uint8_t reserved[2];
__le16 ox_id;
} __packed;
#define NOTIFY_ACK_FLAGS_FCSP BIT_5
#define NOTIFY_ACK_FLAGS_TERMINATE BIT_3
#define NOTIFY_ACK_SRR_FLAGS_ACCEPT 0
#define NOTIFY_ACK_SRR_FLAGS_REJECT 1
#define NOTIFY_ACK_SRR_REJECT_REASON_UNABLE_TO_PERFORM 0x9
#define NOTIFY_ACK_SRR_FLAGS_REJECT_EXPL_NO_EXPL 0
#define NOTIFY_ACK_SRR_FLAGS_REJECT_EXPL_INVALID_OX_ID_RX_ID 0x17
#define NOTIFY_ACK_SRR_FLAGS_REJECT_EXPL_UNABLE_TO_SUPPLY_DATA 0x2a
#define NOTIFY_ACK_SUCCESS 0x01
#endif
#ifndef ACCEPT_TGT_IO_TYPE
#define ACCEPT_TGT_IO_TYPE 0x16 /* Accept target I/O entry. */
#endif
#ifndef CONTINUE_TGT_IO_TYPE
#define CONTINUE_TGT_IO_TYPE 0x17
/*
* ISP queue - Continue Target I/O (CTIO) entry for status mode 0 structure.
* This structure is sent to the ISP 2xxx from target driver.
*/
struct ctio_to_2xxx {
uint8_t entry_type; /* Entry type. */
uint8_t entry_count; /* Entry count. */
uint8_t sys_define; /* System defined. */
uint8_t entry_status; /* Entry Status. */
uint32_t handle; /* System defined handle */
target_id_t target;
__le16 rx_id;
__le16 flags;
__le16 status;
__le16 timeout; /* 0 = 30 seconds, 0xFFFF = disable */
__le16 dseg_count; /* Data segment count. */
__le32 relative_offset;
__le32 residual;
__le16 reserved_1[3];
__le16 scsi_status;
__le32 transfer_length;
Annotation
- Immediate include surface: `qla_def.h`, `qla_dsd.h`, `target/target_core_base.h`.
- Detected declarations: `struct nack_to_isp`, `struct ctio_to_2xxx`, `struct fcp_hdr`, `struct fcp_hdr_le`, `struct atio7_fcp_cmnd`, `struct atio_from_isp`, `struct ctio7_to_24xx`, `struct ctio7_from_24xx`, `struct ctio_crc2_to_fw`, `struct ctio_crc_from_fw`.
- 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.