drivers/scsi/csiostor/t4fw_api_stor.h

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

File Facts

System
Linux kernel
Corpus path
drivers/scsi/csiostor/t4fw_api_stor.h
Extension
.h
Size
12958 bytes
Lines
540
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 fw_rdev_wr {
	__be32 op_to_immdlen;
	__be32 alloc_to_len16;
	__be64 cookie;
	u8     protocol;
	u8     event_cause;
	u8     cur_state;
	u8     prev_state;
	__be32 flags_to_assoc_flowid;
	union rdev_entry {
		struct fcoe_rdev_entry {
			__be32 flowid;
			u8     protocol;
			u8     event_cause;
			u8     flags;
			u8     rjt_reason;
			u8     cur_login_st;
			u8     prev_login_st;
			__be16 rcv_fr_sz;
			u8     rd_xfer_rdy_to_rport_type;
			u8     vft_to_qos;
			u8     org_proc_assoc_to_acc_rsp_code;
			u8     enh_disc_to_tgt;
			u8     wwnn[8];
			u8     wwpn[8];
			__be16 iqid;
			u8     fc_oui[3];
			u8     r_id[3];
		} fcoe_rdev;
		struct iscsi_rdev_entry {
			__be32 flowid;
			u8     protocol;
			u8     event_cause;
			u8     flags;
			u8     r3;
			__be16 iscsi_opts;
			__be16 tcp_opts;
			__be16 ip_opts;
			__be16 max_rcv_len;
			__be16 max_snd_len;
			__be16 first_brst_len;
			__be16 max_brst_len;
			__be16 r4;
			__be16 def_time2wait;
			__be16 def_time2ret;
			__be16 nop_out_intrvl;
			__be16 non_scsi_to;
			__be16 isid;
			__be16 tsid;
			__be16 port;
			__be16 tpgt;
			u8     r5[6];
			__be16 iqid;
		} iscsi_rdev;
	} u;
};

#define FW_RDEV_WR_FLOWID_GET(x)	(((x) >> 8) & 0xfffff)
#define FW_RDEV_WR_ASSOC_FLOWID_GET(x)	(((x) >> 0) & 0xfffff)
#define FW_RDEV_WR_RPORT_TYPE_GET(x)	(((x) >> 0) & 0x1f)
#define FW_RDEV_WR_NPIV_GET(x)		(((x) >> 6) & 0x1)
#define FW_RDEV_WR_CLASS_GET(x)		(((x) >> 4) & 0x3)
#define FW_RDEV_WR_TASK_RETRY_ID_GET(x)	(((x) >> 5) & 0x1)
#define FW_RDEV_WR_RETRY_GET(x)		(((x) >> 4) & 0x1)
#define FW_RDEV_WR_CONF_CMPL_GET(x)	(((x) >> 3) & 0x1)
#define FW_RDEV_WR_INI_GET(x)		(((x) >> 1) & 0x1)
#define FW_RDEV_WR_TGT_GET(x)		(((x) >> 0) & 0x1)

struct fw_fcoe_els_ct_wr {
	__be32 op_immdlen;
	__be32 flowid_len16;
	u64    cookie;
	__be16 iqid;
	u8     tmo_val;
	u8     els_ct_type;
	u8     ctl_pri;
	u8     cp_en_class;
	__be16 xfer_cnt;
	u8     fl_to_sp;
	u8     l_id[3];
	u8     r5;
	u8     r_id[3];
	__be64 rsp_dmaaddr;
	__be32 rsp_dmalen;
	__be32 r6;
};

#define FW_FCOE_ELS_CT_WR_OPCODE(x)		((x) << 24)
#define FW_FCOE_ELS_CT_WR_OPCODE_GET(x)		(((x) >> 24) & 0xff)
#define FW_FCOE_ELS_CT_WR_IMMDLEN(x)		((x) << 0)

Annotation

Implementation Notes