include/scsi/libfc.h
Source file repositories/reference/linux-study-clean/include/scsi/libfc.h
File Facts
- System
- Linux kernel
- Corpus path
include/scsi/libfc.h- Extension
.h- Size
- 32361 bytes
- Lines
- 1032
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- 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
linux/timer.hlinux/if.hlinux/percpu.hlinux/refcount.hscsi/scsi_transport.hscsi/scsi_transport_fc.hscsi/scsi_bsg_fc.hscsi/fc/fc_fcp.hscsi/fc/fc_ns.hscsi/fc/fc_ms.hscsi/fc/fc_els.hscsi/fc/fc_gs.hscsi/fc_frame.h
Detected Declarations
struct fc_disc_portstruct fc_rport_privstruct fc_rport_operationsstruct fc_rport_libfc_privstruct fc_rport_privstruct fc_statsstruct fc_seq_els_datastruct fc_fcp_pktstruct libfc_cmd_privstruct fc_exch_mgrstruct fc_exch_mgr_anchorstruct fc_seqstruct fc_exchstruct libfc_function_templatestruct fc_discstruct fc_lportstruct fc4_provenum fc_lport_stateenum fc_disc_eventenum fc_rport_stateenum fc_rport_eventenum fc_lport_eventfunction fc_lport_test_readyfunction fc_set_wwnnfunction fc_set_wwpnfunction fc_lport_state_enterfunction fc_lport_init_statsfunction fc_lport_free_statsfunction lport_privfunction libfc_host_allocfunction fc_fcp_is_read
Annotated Snippet
struct fc_disc_port {
struct fc_lport *lp;
struct list_head peers;
struct work_struct rport_work;
u32 port_id;
};
/**
* enum fc_rport_event - Remote port events
* @RPORT_EV_NONE: No event
* @RPORT_EV_READY: Remote port is ready for use
* @RPORT_EV_FAILED: State machine failed, remote port is not ready
* @RPORT_EV_STOP: Remote port has been stopped
* @RPORT_EV_LOGO: Remote port logout (LOGO) sent
*/
enum fc_rport_event {
RPORT_EV_NONE = 0,
RPORT_EV_READY,
RPORT_EV_FAILED,
RPORT_EV_STOP,
RPORT_EV_LOGO
};
struct fc_rport_priv;
/**
* struct fc_rport_operations - Operations for a remote port
* @event_callback: Function to be called for remote port events
*/
struct fc_rport_operations {
void (*event_callback)(struct fc_lport *, struct fc_rport_priv *,
enum fc_rport_event);
};
/**
* struct fc_rport_libfc_priv - libfc internal information about a remote port
* @local_port: The associated local port
* @rp_state: Indicates READY for I/O or DELETE when blocked
* @flags: REC and RETRY supported flags
* @e_d_tov: Error detect timeout value (in msec)
* @r_a_tov: Resource allocation timeout value (in msec)
*/
struct fc_rport_libfc_priv {
struct fc_lport *local_port;
enum fc_rport_state rp_state;
u16 flags;
#define FC_RP_FLAGS_REC_SUPPORTED (1 << 0)
#define FC_RP_FLAGS_RETRY (1 << 1)
#define FC_RP_STARTED (1 << 2)
#define FC_RP_FLAGS_CONF_REQ (1 << 3)
unsigned int e_d_tov;
unsigned int r_a_tov;
};
/**
* struct fc_rport_priv - libfc remote port and discovery info
* @local_port: The associated local port
* @rport: The FC transport remote port
* @kref: Reference counter
* @rp_state: Enumeration that tracks progress of PLOGI, PRLI,
* and RTV exchanges
* @ids: The remote port identifiers and roles
* @flags: STARTED, REC and RETRY_SUPPORTED flags
* @max_seq: Maximum number of concurrent sequences
* @disc_id: The discovery identifier
* @maxframe_size: The maximum frame size
* @retries: The retry count for the current state
* @major_retries: The retry count for the entire PLOGI/PRLI state machine
* @e_d_tov: Error detect timeout value (in msec)
* @r_a_tov: Resource allocation timeout value (in msec)
* @rp_mutex: The mutex that protects the remote port
* @retry_work: Handle for retries
* @lld_event_callback: Callback when READY, FAILED or LOGO states complete
* @prli_count: Count of open PRLI sessions in providers
* @rcu: Structure used for freeing in an RCU-safe manner
*/
struct fc_rport_priv {
struct fc_lport *local_port;
struct fc_rport *rport;
struct kref kref;
enum fc_rport_state rp_state;
struct fc_rport_identifiers ids;
u16 flags;
u16 max_seq;
u16 disc_id;
u16 maxframe_size;
unsigned int retries;
unsigned int major_retries;
unsigned int e_d_tov;
unsigned int r_a_tov;
Annotation
- Immediate include surface: `linux/timer.h`, `linux/if.h`, `linux/percpu.h`, `linux/refcount.h`, `scsi/scsi_transport.h`, `scsi/scsi_transport_fc.h`, `scsi/scsi_bsg_fc.h`, `scsi/fc/fc_fcp.h`.
- Detected declarations: `struct fc_disc_port`, `struct fc_rport_priv`, `struct fc_rport_operations`, `struct fc_rport_libfc_priv`, `struct fc_rport_priv`, `struct fc_stats`, `struct fc_seq_els_data`, `struct fc_fcp_pkt`, `struct libfc_cmd_priv`, `struct fc_exch_mgr`.
- Atlas domain: Repository Root And Misc / include.
- 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.