drivers/scsi/elx/efct/efct_hw.h
Source file repositories/reference/linux-study-clean/drivers/scsi/elx/efct/efct_hw.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/elx/efct/efct_hw.h- Extension
.h- Size
- 19822 bytes
- Lines
- 765
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
../libefc_sli/sli4.h
Detected Declarations
struct efct_hwstruct efct_iostruct efct_command_ctxstruct efct_hw_sglstruct efct_hw_wqestruct efct_hw_iostruct efct_hw_iostruct efct_hw_rpi_refstruct efct_hw_link_stat_countsstruct efct_hw_host_stat_countsstruct efct_queue_hashstruct hw_wq_callbackstruct reqtag_poolstruct efct_hw_configstruct efct_hwstruct hw_eqstruct hw_cqstruct hw_qstruct hw_mqstruct hw_wqstruct hw_rqstruct efct_hw_send_frame_contextstruct efct_hw_grp_hdrenum efct_cmd_optsenum efct_hw_resetenum efct_hw_topoenum efct_hw_io_typeenum efct_hw_io_stateenum efct_hw_wq_steeringenum efct_hw_portenum efct_hw_link_statenum efct_hw_host_statenum efct_hw_stateenum efct_hw_io_count_typefunction efct_hw_get_link_speedfunction efct_hw_sequence_copyfunction efct_hw_sequence_free
Annotated Snippet
struct efct_command_ctx {
struct list_head list_entry;
int (*cb)(struct efct_hw *hw, int status, u8 *mqe, void *arg);
void *arg; /* Argument for callback */
/* buffer holding command / results */
u8 buf[SLI4_BMBX_SIZE];
void *ctx; /* upper layer context */
};
struct efct_hw_sgl {
uintptr_t addr;
size_t len;
};
union efct_hw_io_param_u {
struct sli_bls_params bls;
struct sli_els_params els;
struct sli_ct_params fc_ct;
struct sli_fcp_tgt_params fcp_tgt;
};
/* WQ steering mode */
enum efct_hw_wq_steering {
EFCT_HW_WQ_STEERING_CLASS,
EFCT_HW_WQ_STEERING_REQUEST,
EFCT_HW_WQ_STEERING_CPU,
};
/* HW wqe object */
struct efct_hw_wqe {
struct list_head list_entry;
bool abort_wqe_submit_needed;
bool send_abts;
u32 id;
u32 abort_reqtag;
u8 *wqebuf;
};
struct efct_hw_io;
/* Typedef for HW "done" callback */
typedef int (*efct_hw_done_t)(struct efct_hw_io *, u32 len, int status,
u32 ext, void *ul_arg);
/**
* HW IO object.
*
* Stores the per-IO information necessary
* for both SLI and efct.
* @ref: reference counter for hw io object
* @state: state of IO: free, busy, wait_free
* @list_entry used for busy, wait_free, free lists
* @wqe Work queue object, with link for pending
* @hw pointer back to hardware context
* @xfer_rdy transfer ready data
* @type IO type
* @xbusy Exchange is active in FW
* @abort_in_progress if TRUE, abort is in progress
* @status_saved if TRUE, latched status should be returned
* @wq_class WQ class if steering mode is Class
* @reqtag request tag for this HW IO
* @wq WQ assigned to the exchange
* @done Function called on IO completion
* @arg argument passed to IO done callback
* @abort_done Function called on abort completion
* @abort_arg argument passed to abort done callback
* @wq_steering WQ steering mode request
* @saved_status Saved status
* @saved_len Status length
* @saved_ext Saved extended status
* @eq EQ on which this HIO came up
* @sge_offset SGE data offset
* @def_sgl_count Count of SGEs in default SGL
* @abort_reqtag request tag for an abort of this HW IO
* @indicator Exchange indicator
* @def_sgl default SGL
* @sgl pointer to current active SGL
* @sgl_count count of SGEs in io->sgl
* @first_data_sge index of first data SGE
* @n_sge number of active SGEs
*/
struct efct_hw_io {
struct kref ref;
enum efct_hw_io_state state;
void (*release)(struct kref *arg);
struct list_head list_entry;
struct efct_hw_wqe wqe;
struct efct_hw *hw;
struct efc_dma xfer_rdy;
u16 type;
Annotation
- Immediate include surface: `../libefc_sli/sli4.h`.
- Detected declarations: `struct efct_hw`, `struct efct_io`, `struct efct_command_ctx`, `struct efct_hw_sgl`, `struct efct_hw_wqe`, `struct efct_hw_io`, `struct efct_hw_io`, `struct efct_hw_rpi_ref`, `struct efct_hw_link_stat_counts`, `struct efct_hw_host_stat_counts`.
- 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.
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.