drivers/scsi/qedf/qedf.h
Source file repositories/reference/linux-study-clean/drivers/scsi/qedf/qedf.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/qedf/qedf.h- Extension
.h- Size
- 17741 bytes
- Lines
- 606
- 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
scsi/libfcoe.hscsi/libfc.hscsi/fc/fc_fip.hscsi/fc/fc_fc2.hscsi/scsi_tcq.hqedf_hsi.hlinux/qed/qed_if.hlinux/qed/qed_fcoe_if.hlinux/qed/qed_ll2_if.hqedf_version.hqedf_dbg.hdrv_fcoe_fw_funcs.h
Detected Declarations
struct qedf_mp_reqstruct qedf_els_cb_argstruct qedf_ioreqstruct qedf_cmd_privstruct qedf_rportstruct qedf_skb_workstruct qedf_fastpathstruct qedf_io_workstruct qedf_glbl_q_paramsstruct global_queuestruct qedf_io_logstruct qedf_bdq_bufstruct qedf_ctxstruct io_bdtstruct qedf_cmd_mgrstruct fip_vlanenum qedf_ioreq_eventfunction qedf_stop_all_io
Annotated Snippet
struct qedf_mp_req {
uint32_t req_len;
void *req_buf;
dma_addr_t req_buf_dma;
struct scsi_sge *mp_req_bd;
dma_addr_t mp_req_bd_dma;
struct fc_frame_header req_fc_hdr;
uint32_t resp_len;
void *resp_buf;
dma_addr_t resp_buf_dma;
struct scsi_sge *mp_resp_bd;
dma_addr_t mp_resp_bd_dma;
struct fc_frame_header resp_fc_hdr;
};
struct qedf_els_cb_arg {
struct qedf_ioreq *aborted_io_req;
struct qedf_ioreq *io_req;
u8 op; /* Used to keep track of ELS op */
uint16_t l2_oxid;
u32 offset; /* Used for sequence cleanup */
u8 r_ctl; /* Used for sequence cleanup */
};
enum qedf_ioreq_event {
QEDF_IOREQ_EV_NONE,
QEDF_IOREQ_EV_ABORT_SUCCESS,
QEDF_IOREQ_EV_ABORT_FAILED,
QEDF_IOREQ_EV_SEND_RRQ,
QEDF_IOREQ_EV_ELS_TMO,
QEDF_IOREQ_EV_ELS_ERR_DETECT,
QEDF_IOREQ_EV_ELS_FLUSH,
QEDF_IOREQ_EV_CLEANUP_SUCCESS,
QEDF_IOREQ_EV_CLEANUP_FAILED,
};
#define FC_GOOD 0
#define FCOE_FCP_RSP_FLAGS_FCP_RESID_OVER (0x1<<2)
#define FCOE_FCP_RSP_FLAGS_FCP_RESID_UNDER (0x1<<3)
#define FCOE_FCP_RSP_FLAGS_FCP_RSP_LEN_VALID (0x1<<0)
#define FCOE_FCP_RSP_FLAGS_FCP_SNS_LEN_VALID (0x1<<1)
struct qedf_ioreq {
struct list_head link;
uint16_t xid;
struct scsi_cmnd *sc_cmd;
#define QEDF_SCSI_CMD 1
#define QEDF_TASK_MGMT_CMD 2
#define QEDF_ABTS 3
#define QEDF_ELS 4
#define QEDF_CLEANUP 5
#define QEDF_SEQ_CLEANUP 6
u8 cmd_type;
#define QEDF_CMD_OUTSTANDING 0x0
#define QEDF_CMD_IN_ABORT 0x1
#define QEDF_CMD_IN_CLEANUP 0x2
#define QEDF_CMD_SRR_SENT 0x3
#define QEDF_CMD_DIRTY 0x4
#define QEDF_CMD_ERR_SCSI_DONE 0x5
u8 io_req_flags;
uint8_t tm_flags;
u64 tm_lun;
struct qedf_rport *fcport;
#define QEDF_CMD_ST_INACTIVE 0
#define QEDFC_CMD_ST_IO_ACTIVE 1
#define QEDFC_CMD_ST_ABORT_ACTIVE 2
#define QEDFC_CMD_ST_ABORT_ACTIVE_EH 3
#define QEDFC_CMD_ST_CLEANUP_ACTIVE 4
#define QEDFC_CMD_ST_CLEANUP_ACTIVE_EH 5
#define QEDFC_CMD_ST_RRQ_ACTIVE 6
#define QEDFC_CMD_ST_RRQ_WAIT 7
#define QEDFC_CMD_ST_OXID_RETIRE_WAIT 8
#define QEDFC_CMD_ST_TMF_ACTIVE 9
#define QEDFC_CMD_ST_DRAIN_ACTIVE 10
#define QEDFC_CMD_ST_CLEANED 11
#define QEDFC_CMD_ST_ELS_ACTIVE 12
atomic_t state;
unsigned long flags;
enum qedf_ioreq_event event;
size_t data_xfer_len;
/* ID: 001: Alloc cmd (qedf_alloc_cmd) */
/* ID: 002: Initiate ABTS (qedf_initiate_abts) */
/* ID: 003: For RRQ (qedf_process_abts_compl) */
struct kref refcount;
struct qedf_cmd_mgr *cmd_mgr;
struct io_bdt *bd_tbl;
struct delayed_work timeout_work;
struct completion tm_done;
struct completion abts_done;
struct completion cleanup_done;
Annotation
- Immediate include surface: `scsi/libfcoe.h`, `scsi/libfc.h`, `scsi/fc/fc_fip.h`, `scsi/fc/fc_fc2.h`, `scsi/scsi_tcq.h`, `qedf_hsi.h`, `linux/qed/qed_if.h`, `linux/qed/qed_fcoe_if.h`.
- Detected declarations: `struct qedf_mp_req`, `struct qedf_els_cb_arg`, `struct qedf_ioreq`, `struct qedf_cmd_priv`, `struct qedf_rport`, `struct qedf_skb_work`, `struct qedf_fastpath`, `struct qedf_io_work`, `struct qedf_glbl_q_params`, `struct global_queue`.
- 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.