drivers/scsi/qla2xxx/qla_nvme.h

Source file repositories/reference/linux-study-clean/drivers/scsi/qla2xxx/qla_nvme.h

File Facts

System
Linux kernel
Corpus path
drivers/scsi/qla2xxx/qla_nvme.h
Extension
.h
Size
3773 bytes
Lines
151
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 nvme_private {
	struct srb	*sp;
	struct nvmefc_ls_req *fd;
	struct work_struct ls_work;
	struct work_struct abort_work;
	int comp_status;
	spinlock_t cmd_lock;
};

struct qla_nvme_rport {
	struct fc_port *fcport;
	struct qla_nvme_unsol_ctx *uctx;
};

#define COMMAND_NVME    0x88            /* Command Type FC-NVMe IOCB */
struct cmd_nvme {
	uint8_t entry_type;             /* Entry type. */
	uint8_t entry_count;            /* Entry count. */
	uint8_t sys_define;             /* System defined. */
	uint8_t entry_status;           /* Entry Status. */

	uint32_t handle;                /* System handle. */
	__le16	nport_handle;		/* N_PORT handle. */
	__le16	timeout;		/* Command timeout. */

	__le16	dseg_count;		/* Data segment count. */
	__le16	nvme_rsp_dsd_len;	/* NVMe RSP DSD length */

	uint64_t rsvd;

	__le16	control_flags;		/* Control Flags */
#define CF_ADMIN_ASYNC_EVENT		BIT_13
#define CF_NVME_FIRST_BURST_ENABLE	BIT_11
#define CF_DIF_SEG_DESCR_ENABLE         BIT_3
#define CF_DATA_SEG_DESCR_ENABLE        BIT_2
#define CF_READ_DATA                    BIT_1
#define CF_WRITE_DATA                   BIT_0

	__le16	nvme_cmnd_dseg_len;             /* Data segment length. */
	__le64	 nvme_cmnd_dseg_address __packed;/* Data segment address. */
	__le64	 nvme_rsp_dseg_address __packed; /* Data segment address. */

	__le32	byte_count;		/* Total byte count. */

	uint8_t port_id[3];             /* PortID of destination port. */
	uint8_t vp_index;

	struct dsd64 nvme_dsd;
};

#define PURLS_MSLEEP_INTERVAL	1
#define PURLS_RETRY_COUNT	5

#define PT_LS4_REQUEST 0x89	/* Link Service pass-through IOCB (request) */
struct pt_ls4_request {
	uint8_t entry_type;
	uint8_t entry_count;
	uint8_t sys_define;
	uint8_t entry_status;
	uint32_t handle;
	__le16	status;
	__le16	nport_handle;
	__le16	tx_dseg_count;
	uint8_t  vp_index;
	uint8_t  rsvd;
	__le16	timeout;
	__le16	control_flags;
#define CF_LS4_SHIFT		13
#define CF_LS4_ORIGINATOR	0
#define CF_LS4_RESPONDER	1
#define CF_LS4_RESPONDER_TERM	2

	__le16	rx_dseg_count;
	__le16	rsvd2;
	__le32	exchange_address;
	__le32	rsvd3;
	__le32	rx_byte_count;
	__le32	tx_byte_count;
	struct dsd64 dsd[2];
};

#define PT_LS4_UNSOL 0x56	/* pass-up unsolicited rec FC-NVMe request */
struct pt_ls4_rx_unsol {
	uint8_t entry_type;
	uint8_t entry_count;
	__le16	rsvd0;
	__le16	rsvd1;
	uint8_t vp_index;
	uint8_t rsvd2;
	__le16	rsvd3;

Annotation

Implementation Notes