drivers/scsi/elx/libefc/efclib.h
Source file repositories/reference/linux-study-clean/drivers/scsi/elx/libefc/efclib.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/elx/libefc/efclib.h- Extension
.h- Size
- 16892 bytes
- Lines
- 624
- 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
scsi/fc/fc_els.hscsi/fc/fc_fs.hscsi/fc/fc_ns.hscsi/fc/fc_gs.hscsi/fc_frame.h../include/efc_common.h../libefc_sli/sli4.h
Detected Declarations
struct efc_sm_ctxstruct efc_domain_recordstruct efc_nportstruct efc_domainstruct efc_remote_nodestruct efc_nodestruct efc_vportstruct efc_node_cbstruct efc_hw_rq_bufferstruct efc_hw_sequencestruct efc_io_els_paramsstruct efc_io_ct_paramsstruct efc_disc_iostruct libefc_function_templatestruct efcenum efc_nport_topologyenum efc_node_shutd_rsnenum efc_node_send_ls_accenum efc_sm_eventenum efc_hw_domain_eventenum efc_disc_io_type
Annotated Snippet
struct efc_sm_ctx {
void (*current_state)(struct efc_sm_ctx *ctx,
enum efc_sm_event evt, void *arg);
const char *description;
void *app;
};
/* Description of discovered Fabric Domain */
struct efc_domain_record {
u32 index;
u32 priority;
u8 address[6];
u8 wwn[8];
union {
u8 vlan[512];
u8 loop[128];
} map;
u32 speed;
u32 fc_id;
bool is_loop;
bool is_nport;
};
/* Domain events */
enum efc_hw_domain_event {
EFC_HW_DOMAIN_ALLOC_OK,
EFC_HW_DOMAIN_ALLOC_FAIL,
EFC_HW_DOMAIN_ATTACH_OK,
EFC_HW_DOMAIN_ATTACH_FAIL,
EFC_HW_DOMAIN_FREE_OK,
EFC_HW_DOMAIN_FREE_FAIL,
EFC_HW_DOMAIN_LOST,
EFC_HW_DOMAIN_FOUND,
EFC_HW_DOMAIN_CHANGED,
};
/**
* Fibre Channel port object
*
* @list_entry: nport list entry
* @ref: reference count, each node takes a reference
* @release: function to free nport object
* @efc: pointer back to efc
* @instance_index: unique instance index value
* @display_name: port display name
* @is_vport: Is NPIV port
* @free_req_pending: pending request to free resources
* @attached: mark attached if reg VPI succeeds
* @p2p_winner: TRUE if we're the point-to-point winner
* @domain: pointer back to domain
* @wwpn: port wwpn
* @wwnn: port wwnn
* @tgt_data: target backend private port data
* @ini_data: initiator backend private port data
* @indicator: VPI
* @fc_id: port FC address
* @dma: memory for Service Parameters
* @wwnn_str: wwpn string
* @sli_wwpn: SLI provided wwpn
* @sli_wwnn: SLI provided wwnn
* @sm: nport state machine context
* @lookup: fc_id to node lookup object
* @enable_ini: SCSI initiator enabled for this port
* @enable_tgt: SCSI target enabled for this port
* @enable_rscn: port will be expecting RSCN
* @shutting_down: nport in process of shutting down
* @p2p_port_id: our port id for point-to-point
* @topology: topology: fabric/p2p/unknown
* @service_params: login parameters
* @p2p_remote_port_id: remote node's port id for point-to-point
*/
struct efc_nport {
struct list_head list_entry;
struct kref ref;
void (*release)(struct kref *arg);
struct efc *efc;
u32 instance_index;
char display_name[EFC_NAME_LENGTH];
bool is_vport;
bool free_req_pending;
bool attached;
bool attaching;
bool p2p_winner;
struct efc_domain *domain;
u64 wwpn;
u64 wwnn;
void *tgt_data;
void *ini_data;
Annotation
- Immediate include surface: `scsi/fc/fc_els.h`, `scsi/fc/fc_fs.h`, `scsi/fc/fc_ns.h`, `scsi/fc/fc_gs.h`, `scsi/fc_frame.h`, `../include/efc_common.h`, `../libefc_sli/sli4.h`.
- Detected declarations: `struct efc_sm_ctx`, `struct efc_domain_record`, `struct efc_nport`, `struct efc_domain`, `struct efc_remote_node`, `struct efc_node`, `struct efc_vport`, `struct efc_node_cb`, `struct efc_hw_rq_buffer`, `struct efc_hw_sequence`.
- 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.