drivers/scsi/qla2xxx/qla_fw.h

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

File Facts

System
Linux kernel
Corpus path
drivers/scsi/qla2xxx/qla_fw.h
Extension
.h
Size
57490 bytes
Lines
2288
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 buffer_credit_24xx {
	u32 parameter[28];
};

#define	PORT_DATABASE_24XX_SIZE		64
struct port_database_24xx {
	uint16_t flags;
#define PDF_TASK_RETRY_ID	BIT_14
#define PDF_FC_TAPE		BIT_7
#define PDF_ACK0_CAPABLE	BIT_6
#define PDF_FCP2_CONF		BIT_5
#define PDF_CLASS_2		BIT_4
#define PDF_HARD_ADDR		BIT_1

	/*
	 * for NVMe, the login_state field has been
	 * split into nibbles.
	 * The lower nibble is for FCP.
	 * The upper nibble is for NVMe.
	 */
	uint8_t current_login_state;
	uint8_t last_login_state;
#define PDS_PLOGI_PENDING	0x03
#define PDS_PLOGI_COMPLETE	0x04
#define PDS_PRLI_PENDING	0x05
#define PDS_PRLI_COMPLETE	0x06
#define PDS_PORT_UNAVAILABLE	0x07
#define PDS_PRLO_PENDING	0x09
#define PDS_LOGO_PENDING	0x11
#define PDS_PRLI2_PENDING	0x12

	uint8_t hard_address[3];
	uint8_t reserved_1;

	uint8_t port_id[3];
	uint8_t sequence_id;

	uint16_t port_timer;

	uint16_t nport_handle;			/* N_PORT handle. */

	uint16_t receive_data_size;
	uint16_t reserved_2;

	uint8_t prli_svc_param_word_0[2];	/* Big endian */
						/* Bits 15-0 of word 0 */
	uint8_t prli_svc_param_word_3[2];	/* Big endian */
						/* Bits 15-0 of word 3 */

	uint8_t port_name[WWN_SIZE];
	uint8_t node_name[WWN_SIZE];

	uint8_t reserved_3[2];
	uint16_t nvme_first_burst_size;
	uint16_t prli_nvme_svc_param_word_0;	/* Bits 15-0 of word 0 */
	uint16_t prli_nvme_svc_param_word_3;	/* Bits 15-0 of word 3 */
	uint8_t secure_login;
	uint8_t reserved_4[14];
};

/*
 * MB 75h returns a list of DB entries similar to port_database_24xx(64B).
 * However, in this case it returns 1st 40 bytes.
 */
struct get_name_list_extended {
	__le16 flags;
	u8 current_login_state;
	u8 last_login_state;
	u8 hard_address[3];
	u8 reserved_1;
	u8 port_id[3];
	u8 sequence_id;
	__le16 port_timer;
	__le16 nport_handle;			/* N_PORT handle. */
	__le16 receive_data_size;
	__le16 reserved_2;

	/* PRLI SVC Param are Big endian */
	u8 prli_svc_param_word_0[2]; /* Bits 15-0 of word 0 */
	u8 prli_svc_param_word_3[2]; /* Bits 15-0 of word 3 */
	u8 port_name[WWN_SIZE];
	u8 node_name[WWN_SIZE];
};

/* MB 75h: This is the short version of the database */
struct get_name_list {
	u8 port_node_name[WWN_SIZE]; /* B7 most sig, B0 least sig */
	__le16 nport_handle;
	u8 reserved;
};

Annotation

Implementation Notes