drivers/scsi/elx/libefc/efc_node.h
Source file repositories/reference/linux-study-clean/drivers/scsi/elx/libefc/efc_node.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/elx/libefc/efc_node.h- Extension
.h- Size
- 5318 bytes
- Lines
- 192
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
scsi/fc/fc_ns.h
Detected Declarations
enum efc_node_enablefunction Copyrightfunction efc_node_hold_framesfunction efc_node_accept_framesfunction efc_node_get_enable
Annotated Snippet
#if !defined(__EFC_NODE_H__)
#define __EFC_NODE_H__
#include "scsi/fc/fc_ns.h"
#define EFC_NODEDB_PAUSE_FABRIC_LOGIN (1 << 0)
#define EFC_NODEDB_PAUSE_NAMESERVER (1 << 1)
#define EFC_NODEDB_PAUSE_NEW_NODES (1 << 2)
#define MAX_ACC_REJECT_PAYLOAD sizeof(struct fc_els_ls_rjt)
#define scsi_io_printf(io, fmt, ...) \
efc_log_debug(io->efc, "[%s] [%04x][i:%04x t:%04x h:%04x]" fmt, \
io->node->display_name, io->instance_index, io->init_task_tag, \
io->tgt_task_tag, io->hw_tag, ##__VA_ARGS__)
static inline void
efc_node_evt_set(struct efc_sm_ctx *ctx, enum efc_sm_event evt,
const char *handler)
{
struct efc_node *node = ctx->app;
if (evt == EFC_EVT_ENTER) {
strscpy_pad(node->current_state_name, handler,
sizeof(node->current_state_name));
} else if (evt == EFC_EVT_EXIT) {
memcpy(node->prev_state_name, node->current_state_name,
sizeof(node->prev_state_name));
strscpy_pad(node->current_state_name, "invalid",
sizeof(node->current_state_name));
}
node->prev_evt = node->current_evt;
node->current_evt = evt;
}
/**
* hold frames in pending frame list
*
* Unsolicited receive frames are held on the node pending frame list,
* rather than being processed.
*/
static inline void
efc_node_hold_frames(struct efc_node *node)
{
node->hold_frames = true;
}
/**
* accept frames
*
* Unsolicited receive frames processed rather than being held on the node
* pending frame list.
*/
static inline void
efc_node_accept_frames(struct efc_node *node)
{
node->hold_frames = false;
}
/*
* Node initiator/target enable defines
* All combinations of the SLI port (nport) initiator/target enable,
* and remote node initiator/target enable are enumerated.
* ex: EFC_NODE_ENABLE_T_TO_IT decodes to target mode is enabled on SLI port
* and I+T is enabled on remote node.
*/
enum efc_node_enable {
EFC_NODE_ENABLE_x_TO_x,
EFC_NODE_ENABLE_x_TO_T,
EFC_NODE_ENABLE_x_TO_I,
EFC_NODE_ENABLE_x_TO_IT,
EFC_NODE_ENABLE_T_TO_x,
EFC_NODE_ENABLE_T_TO_T,
EFC_NODE_ENABLE_T_TO_I,
EFC_NODE_ENABLE_T_TO_IT,
EFC_NODE_ENABLE_I_TO_x,
EFC_NODE_ENABLE_I_TO_T,
EFC_NODE_ENABLE_I_TO_I,
EFC_NODE_ENABLE_I_TO_IT,
EFC_NODE_ENABLE_IT_TO_x,
EFC_NODE_ENABLE_IT_TO_T,
EFC_NODE_ENABLE_IT_TO_I,
EFC_NODE_ENABLE_IT_TO_IT,
};
static inline enum efc_node_enable
efc_node_get_enable(struct efc_node *node)
{
u32 retval = 0;
Annotation
- Immediate include surface: `scsi/fc/fc_ns.h`.
- Detected declarations: `enum efc_node_enable`, `function Copyright`, `function efc_node_hold_frames`, `function efc_node_accept_frames`, `function efc_node_get_enable`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: source implementation candidate.
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.