drivers/scsi/bfa/bfa_defs_fcs.h

Source file repositories/reference/linux-study-clean/drivers/scsi/bfa/bfa_defs_fcs.h

File Facts

System
Linux kernel
Corpus path
drivers/scsi/bfa/bfa_defs_fcs.h
Extension
.h
Size
13730 bytes
Lines
450
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct bfa_vf_stats_s {
	u32	flogi_sent;	/*  Num FLOGIs sent */
	u32	flogi_rsp_err;	/*  FLOGI response errors */
	u32	flogi_acc_err;	/*  FLOGI accept errors */
	u32	flogi_accepts;	/*  FLOGI accepts received */
	u32	flogi_rejects;	/*  FLOGI rejects received */
	u32	flogi_unknown_rsp; /*  Unknown responses for FLOGI */
	u32	flogi_alloc_wait; /*  Allocation waits prior to sending FLOGI */
	u32	flogi_rcvd;	/*  FLOGIs received */
	u32	flogi_rejected;	/*  Incoming FLOGIs rejected */
	u32	fabric_onlines;	/*  Internal fabric online notification sent
				 *  to other modules */
	u32	fabric_offlines; /* Internal fabric offline notification sent
				  * to other modules */
	u32	resvd; /*  padding for 64 bit alignment */
};

/*
 * VF attributes returned in queries
 */
struct bfa_vf_attr_s {
	enum bfa_vf_state  state;		/*  VF state */
	u32        rsvd;
	wwn_t           fabric_name;	/*  fabric name */
};

#define BFA_FCS_MAX_LPORTS 256
#define BFA_FCS_FABRIC_IPADDR_SZ  16

/*
 * symbolic names for base port/virtual port
 */
#define BFA_SYMNAME_MAXLEN	128	/* 128 bytes */
struct bfa_lport_symname_s {
	char	    symname[BFA_SYMNAME_MAXLEN];
};

/*
* Roles of FCS port:
 *     - FCP IM and FCP TM roles cannot be enabled together for a FCS port
 *     - Create multiple ports if both IM and TM functions required.
 *     - Atleast one role must be specified.
 */
enum bfa_lport_role {
	BFA_LPORT_ROLE_FCP_IM	= 0x01,	/*  FCP initiator role */
	BFA_LPORT_ROLE_FCP_MAX	= BFA_LPORT_ROLE_FCP_IM,
};

/*
 * FCS port configuration.
 */
struct bfa_lport_cfg_s {
	wwn_t	       pwwn;       /*  port wwn */
	wwn_t	       nwwn;       /*  node wwn */
	struct bfa_lport_symname_s  sym_name;   /*  vm port symbolic name */
	struct bfa_lport_symname_s node_sym_name; /* Node symbolic name */
	enum bfa_lport_role roles;      /* FCS port roles */
	u32     rsvd;
	bfa_boolean_t   preboot_vp;  /*  vport created from PBC */
	u8	tag[16];        /* opaque tag from application */
	u8	padding[4];
};

/*
 * FCS port states
 */
enum bfa_lport_state {
	BFA_LPORT_UNINIT  = 0,	/*  PORT is not yet initialized */
	BFA_LPORT_FDISC   = 1,	/*  FDISC is in progress */
	BFA_LPORT_ONLINE  = 2,	/*  login to fabric is complete */
	BFA_LPORT_OFFLINE = 3,	/*  No login to fabric */
};

/*
 * FCS port type.
 */
enum bfa_lport_type {
	BFA_LPORT_TYPE_PHYSICAL = 0,
	BFA_LPORT_TYPE_VIRTUAL,
};

/*
 * FCS port offline reason.
 */
enum bfa_lport_offline_reason {
	BFA_LPORT_OFFLINE_UNKNOWN = 0,
	BFA_LPORT_OFFLINE_LINKDOWN,
	BFA_LPORT_OFFLINE_FAB_UNSUPPORTED,	/*  NPIV not supported by the
	 *    fabric */
	BFA_LPORT_OFFLINE_FAB_NORESOURCES,

Annotation

Implementation Notes