drivers/scsi/qedf/qedf_hsi.h

Source file repositories/reference/linux-study-clean/drivers/scsi/qedf/qedf_hsi.h

File Facts

System
Linux kernel
Corpus path
drivers/scsi/qedf/qedf_hsi.h
Extension
.h
Size
10665 bytes
Lines
352
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 fcoe_abts_info {
	u8 r_ctl /* R_CTL in the ABTS response frame */;
	u8 reserved0;
	__le16 rx_id;
	__le32 reserved2[2];
	__le32 fc_payload[3] /* ABTS FC payload response frame */;
};


/*
 * FCoE class type
 */
enum fcoe_class_type {
	FCOE_TASK_CLASS_TYPE_3,
	FCOE_TASK_CLASS_TYPE_2,
	MAX_FCOE_CLASS_TYPE
};


/*
 * FCoE CMDQ element control information
 */
struct fcoe_cmdqe_control {
	__le16 conn_id;
	u8 num_additional_cmdqes;
	u8 cmdType;
	/* true for ABTS request cmdqe. used in Target mode */
#define FCOE_CMDQE_CONTROL_ABTSREQCMD_MASK  0x1
#define FCOE_CMDQE_CONTROL_ABTSREQCMD_SHIFT 0
#define FCOE_CMDQE_CONTROL_RESERVED1_MASK   0x7F
#define FCOE_CMDQE_CONTROL_RESERVED1_SHIFT  1
	u8 reserved2[4];
};

/*
 * FCoE control + payload CMDQ element
 */
struct fcoe_cmdqe {
	struct fcoe_cmdqe_control hdr;
	u8 fc_header[24];
	__le32 fcp_cmd_payload[8];
};



/*
 * FCP RSP flags
 */
struct fcoe_fcp_rsp_flags {
	u8 flags;
#define FCOE_FCP_RSP_FLAGS_FCP_RSP_LEN_VALID_MASK  0x1
#define FCOE_FCP_RSP_FLAGS_FCP_RSP_LEN_VALID_SHIFT 0
#define FCOE_FCP_RSP_FLAGS_FCP_SNS_LEN_VALID_MASK  0x1
#define FCOE_FCP_RSP_FLAGS_FCP_SNS_LEN_VALID_SHIFT 1
#define FCOE_FCP_RSP_FLAGS_FCP_RESID_OVER_MASK     0x1
#define FCOE_FCP_RSP_FLAGS_FCP_RESID_OVER_SHIFT    2
#define FCOE_FCP_RSP_FLAGS_FCP_RESID_UNDER_MASK    0x1
#define FCOE_FCP_RSP_FLAGS_FCP_RESID_UNDER_SHIFT   3
#define FCOE_FCP_RSP_FLAGS_FCP_CONF_REQ_MASK       0x1
#define FCOE_FCP_RSP_FLAGS_FCP_CONF_REQ_SHIFT      4
#define FCOE_FCP_RSP_FLAGS_FCP_BIDI_FLAGS_MASK     0x7
#define FCOE_FCP_RSP_FLAGS_FCP_BIDI_FLAGS_SHIFT    5
};

/*
 * FCoE CQ element response information
 */
struct fcoe_cqe_rsp_info {
	struct fcoe_fcp_rsp_flags rsp_flags;
	u8 scsi_status_code;
	__le16 retry_delay_timer;
	__le32 fcp_resid;
	__le32 fcp_sns_len;
	__le32 fcp_rsp_len;
	__le16 rx_id;
	u8 fw_error_flags;
#define FCOE_CQE_RSP_INFO_FW_UNDERRUN_MASK  0x1 /* FW detected underrun */
#define FCOE_CQE_RSP_INFO_FW_UNDERRUN_SHIFT 0
#define FCOE_CQE_RSP_INFO_RESREVED_MASK     0x7F
#define FCOE_CQE_RSP_INFO_RESREVED_SHIFT    1
	u8 reserved;
	__le32 fw_residual /* Residual bytes calculated by FW */;
};

/*
 * FCoE CQ element Target completion information
 */
struct fcoe_cqe_target_info {
	__le16 rx_id;
	__le16 reserved0;

Annotation

Implementation Notes