drivers/scsi/csiostor/csio_lnode.h

Source file repositories/reference/linux-study-clean/drivers/scsi/csiostor/csio_lnode.h

File Facts

System
Linux kernel
Corpus path
drivers/scsi/csiostor/csio_lnode.h
Extension
.h
Size
7952 bytes
Lines
243
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 csio_fcf_info {
	struct list_head	list;
	uint8_t			priority;
	uint8_t			mac[6];
	uint8_t			name_id[8];
	uint8_t			fabric[8];
	uint16_t		vf_id;
	uint8_t			vlan_id;
	uint16_t		max_fcoe_size;
	uint8_t			fc_map[3];
	uint32_t		fka_adv;
	uint32_t		fcfi;
	uint8_t			get_next:1;
	uint8_t			link_aff:1;
	uint8_t			fpma:1;
	uint8_t			spma:1;
	uint8_t			login:1;
	uint8_t			portid;
	uint8_t			spma_mac[6];
	struct kref		kref;
};

/* Defines for flags */
#define	CSIO_LNF_FIPSUPP		0x00000001	/* Fip Supported */
#define	CSIO_LNF_NPIVSUPP		0x00000002	/* NPIV supported */
#define CSIO_LNF_LINK_ENABLE		0x00000004	/* Link enabled */
#define	CSIO_LNF_FDMI_ENABLE		0x00000008	/* FDMI support */

/* Transport events */
enum csio_ln_fc_evt {
	CSIO_LN_FC_LINKUP = 1,
	CSIO_LN_FC_LINKDOWN,
	CSIO_LN_FC_RSCN,
	CSIO_LN_FC_ATTRIB_UPDATE,
};

/* Lnode stats */
struct csio_lnode_stats {
	uint32_t	n_link_up;	/* Link down */
	uint32_t	n_link_down;	/* Link up */
	uint32_t	n_err;		/* error */
	uint32_t	n_err_nomem;	/* memory not available */
	uint32_t	n_inval_parm;   /* Invalid parameters */
	uint32_t	n_evt_unexp;	/* unexpected event */
	uint32_t	n_evt_drop;	/* dropped event */
	uint32_t	n_rnode_match;  /* matched rnode */
	uint32_t	n_dev_loss_tmo; /* Device loss timeout */
	uint32_t	n_fdmi_err;	/* fdmi err */
	uint32_t	n_evt_fw[PROTO_ERR_IMPL_LOGO + 1];	/* fw events */
	enum csio_ln_ev	n_evt_sm[CSIO_LNE_MAX_EVENT];	/* State m/c events */
	uint32_t	n_rnode_alloc;	/* rnode allocated */
	uint32_t	n_rnode_free;	/* rnode freed */
	uint32_t	n_rnode_nomem;	/* rnode alloc failure */
	uint32_t        n_input_requests; /* Input Requests */
	uint32_t        n_output_requests; /* Output Requests */
	uint32_t        n_control_requests; /* Control Requests */
	uint32_t        n_input_bytes; /* Input Bytes */
	uint32_t        n_output_bytes; /* Output Bytes */
	uint32_t	rsvd1;
};

/* Common Lnode params */
struct csio_lnode_params {
	uint32_t	ra_tov;
	uint32_t	fcfi;
	uint32_t	log_level;	/* Module level for debugging */
};

struct csio_service_parms {
	struct fc_els_csp	csp;		/* Common service parms */
	uint8_t			wwpn[8];	/* WWPN */
	uint8_t			wwnn[8];	/* WWNN */
	struct fc_els_cssp	clsp[4];	/* Class service params */
	uint8_t			vvl[16];	/* Vendor version level */
};

/* Lnode */
struct csio_lnode {
	struct csio_sm		sm;		/* State machine + sibling
						 * lnode list.
						 */
	struct csio_hw		*hwp;		/* Pointer to the HW module */
	uint8_t			portid;		/* Port ID */
	uint8_t			rsvd1;
	uint16_t		rsvd2;
	uint32_t		dev_num;	/* Device number */
	uint32_t		flags;		/* Flags */
	struct list_head	fcf_lsthead;	/* FCF entries */
	struct csio_fcf_info	*fcfinfo;	/* FCF in use */
	struct csio_ioreq	*mgmt_req;	/* MGMT request */

Annotation

Implementation Notes