⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qla_def.h

📁 linux-2.6.15.6
💻 H
📖 第 1 页 / 共 5 页
字号:
#define GLSO_USE_DID	BIT_3typedef struct {	uint32_t	link_fail_cnt;	uint32_t	loss_sync_cnt;	uint32_t	loss_sig_cnt;	uint32_t	prim_seq_err_cnt;	uint32_t	inval_xmit_word_cnt;	uint32_t	inval_crc_cnt;} link_stat_t;/* * NVRAM Command values. */#define NV_START_BIT            BIT_2#define NV_WRITE_OP             (BIT_26+BIT_24)#define NV_READ_OP              (BIT_26+BIT_25)#define NV_ERASE_OP             (BIT_26+BIT_25+BIT_24)#define NV_MASK_OP              (BIT_26+BIT_25+BIT_24)#define NV_DELAY_COUNT          10/* * QLogic ISP2100, ISP2200 and ISP2300 NVRAM structure definition. */typedef struct {	/*	 * NVRAM header	 */	uint8_t	id[4];	uint8_t	nvram_version;	uint8_t	reserved_0;	/*	 * NVRAM RISC parameter block	 */	uint8_t	parameter_block_version;	uint8_t	reserved_1;	/*	 * LSB BIT 0  = Enable Hard Loop Id	 * LSB BIT 1  = Enable Fairness	 * LSB BIT 2  = Enable Full-Duplex	 * LSB BIT 3  = Enable Fast Posting	 * LSB BIT 4  = Enable Target Mode	 * LSB BIT 5  = Disable Initiator Mode	 * LSB BIT 6  = Enable ADISC	 * LSB BIT 7  = Enable Target Inquiry Data	 *	 * MSB BIT 0  = Enable PDBC Notify	 * MSB BIT 1  = Non Participating LIP	 * MSB BIT 2  = Descending Loop ID Search	 * MSB BIT 3  = Acquire Loop ID in LIPA	 * MSB BIT 4  = Stop PortQ on Full Status	 * MSB BIT 5  = Full Login after LIP	 * MSB BIT 6  = Node Name Option	 * MSB BIT 7  = Ext IFWCB enable bit	 */	uint8_t	 firmware_options[2];	uint16_t frame_payload_size;	uint16_t max_iocb_allocation;	uint16_t execution_throttle;	uint8_t	 retry_count;	uint8_t	 retry_delay;			/* unused */	uint8_t	 port_name[WWN_SIZE];		/* Big endian. */	uint16_t hard_address;	uint8_t	 inquiry_data;	uint8_t	 login_timeout;	uint8_t	 node_name[WWN_SIZE];		/* Big endian. */	/*	 * LSB BIT 0 = Timer Operation mode bit 0	 * LSB BIT 1 = Timer Operation mode bit 1	 * LSB BIT 2 = Timer Operation mode bit 2	 * LSB BIT 3 = Timer Operation mode bit 3	 * LSB BIT 4 = Init Config Mode bit 0	 * LSB BIT 5 = Init Config Mode bit 1	 * LSB BIT 6 = Init Config Mode bit 2	 * LSB BIT 7 = Enable Non part on LIHA failure	 *	 * MSB BIT 0 = Enable class 2	 * MSB BIT 1 = Enable ACK0	 * MSB BIT 2 =	 * MSB BIT 3 =	 * MSB BIT 4 = FC Tape Enable	 * MSB BIT 5 = Enable FC Confirm	 * MSB BIT 6 = Enable command queuing in target mode	 * MSB BIT 7 = No Logo On Link Down	 */	uint8_t	 add_firmware_options[2];	uint8_t	 response_accumulation_timer;	uint8_t	 interrupt_delay_timer;	/*	 * LSB BIT 0 = Enable Read xfr_rdy	 * LSB BIT 1 = Soft ID only	 * LSB BIT 2 =	 * LSB BIT 3 =	 * LSB BIT 4 = FCP RSP Payload [0]	 * LSB BIT 5 = FCP RSP Payload [1] / Sbus enable - 2200	 * LSB BIT 6 = Enable Out-of-Order frame handling	 * LSB BIT 7 = Disable Automatic PLOGI on Local Loop	 *	 * MSB BIT 0 = Sbus enable - 2300	 * MSB BIT 1 =	 * MSB BIT 2 =	 * MSB BIT 3 =	 * MSB BIT 4 = LED mode	 * MSB BIT 5 = enable 50 ohm termination	 * MSB BIT 6 = Data Rate (2300 only)	 * MSB BIT 7 = Data Rate (2300 only)	 */	uint8_t	 special_options[2];	/* Reserved for expanded RISC parameter block */	uint8_t reserved_2[22];	/*	 * LSB BIT 0 = Tx Sensitivity 1G bit 0	 * LSB BIT 1 = Tx Sensitivity 1G bit 1	 * LSB BIT 2 = Tx Sensitivity 1G bit 2	 * LSB BIT 3 = Tx Sensitivity 1G bit 3	 * LSB BIT 4 = Rx Sensitivity 1G bit 0	 * LSB BIT 5 = Rx Sensitivity 1G bit 1	 * LSB BIT 6 = Rx Sensitivity 1G bit 2	 * LSB BIT 7 = Rx Sensitivity 1G bit 3	 *	 * MSB BIT 0 = Tx Sensitivity 2G bit 0	 * MSB BIT 1 = Tx Sensitivity 2G bit 1	 * MSB BIT 2 = Tx Sensitivity 2G bit 2	 * MSB BIT 3 = Tx Sensitivity 2G bit 3	 * MSB BIT 4 = Rx Sensitivity 2G bit 0	 * MSB BIT 5 = Rx Sensitivity 2G bit 1	 * MSB BIT 6 = Rx Sensitivity 2G bit 2	 * MSB BIT 7 = Rx Sensitivity 2G bit 3	 *	 * LSB BIT 0 = Output Swing 1G bit 0	 * LSB BIT 1 = Output Swing 1G bit 1	 * LSB BIT 2 = Output Swing 1G bit 2	 * LSB BIT 3 = Output Emphasis 1G bit 0	 * LSB BIT 4 = Output Emphasis 1G bit 1	 * LSB BIT 5 = Output Swing 2G bit 0	 * LSB BIT 6 = Output Swing 2G bit 1	 * LSB BIT 7 = Output Swing 2G bit 2	 *	 * MSB BIT 0 = Output Emphasis 2G bit 0	 * MSB BIT 1 = Output Emphasis 2G bit 1	 * MSB BIT 2 = Output Enable	 * MSB BIT 3 =	 * MSB BIT 4 =	 * MSB BIT 5 =	 * MSB BIT 6 =	 * MSB BIT 7 =	 */	uint8_t seriallink_options[4];	/*	 * NVRAM host parameter block	 *	 * LSB BIT 0 = Enable spinup delay	 * LSB BIT 1 = Disable BIOS	 * LSB BIT 2 = Enable Memory Map BIOS	 * LSB BIT 3 = Enable Selectable Boot	 * LSB BIT 4 = Disable RISC code load	 * LSB BIT 5 = Set cache line size 1	 * LSB BIT 6 = PCI Parity Disable	 * LSB BIT 7 = Enable extended logging	 *	 * MSB BIT 0 = Enable 64bit addressing	 * MSB BIT 1 = Enable lip reset	 * MSB BIT 2 = Enable lip full login	 * MSB BIT 3 = Enable target reset	 * MSB BIT 4 = Enable database storage	 * MSB BIT 5 = Enable cache flush read	 * MSB BIT 6 = Enable database load	 * MSB BIT 7 = Enable alternate WWN	 */	uint8_t host_p[2];	uint8_t boot_node_name[WWN_SIZE];	uint8_t boot_lun_number;	uint8_t reset_delay;	uint8_t port_down_retry_count;	uint8_t boot_id_number;	uint16_t max_luns_per_target;	uint8_t fcode_boot_port_name[WWN_SIZE];	uint8_t alternate_port_name[WWN_SIZE];	uint8_t alternate_node_name[WWN_SIZE];	/*	 * BIT 0 = Selective Login	 * BIT 1 = Alt-Boot Enable	 * BIT 2 =	 * BIT 3 = Boot Order List	 * BIT 4 =	 * BIT 5 = Selective LUN	 * BIT 6 =	 * BIT 7 = unused	 */	uint8_t efi_parameters;	uint8_t link_down_timeout;	uint8_t adapter_id[16];	uint8_t alt1_boot_node_name[WWN_SIZE];	uint16_t alt1_boot_lun_number;	uint8_t alt2_boot_node_name[WWN_SIZE];	uint16_t alt2_boot_lun_number;	uint8_t alt3_boot_node_name[WWN_SIZE];	uint16_t alt3_boot_lun_number;	uint8_t alt4_boot_node_name[WWN_SIZE];	uint16_t alt4_boot_lun_number;	uint8_t alt5_boot_node_name[WWN_SIZE];	uint16_t alt5_boot_lun_number;	uint8_t alt6_boot_node_name[WWN_SIZE];	uint16_t alt6_boot_lun_number;	uint8_t alt7_boot_node_name[WWN_SIZE];	uint16_t alt7_boot_lun_number;	uint8_t reserved_3[2];	/* Offset 200-215 : Model Number */	uint8_t model_number[16];	/* OEM related items */	uint8_t oem_specific[16];	/*	 * NVRAM Adapter Features offset 232-239	 *	 * LSB BIT 0 = External GBIC	 * LSB BIT 1 = Risc RAM parity	 * LSB BIT 2 = Buffer Plus Module	 * LSB BIT 3 = Multi Chip Adapter	 * LSB BIT 4 = Internal connector	 * LSB BIT 5 =	 * LSB BIT 6 =	 * LSB BIT 7 =	 *	 * MSB BIT 0 =	 * MSB BIT 1 =	 * MSB BIT 2 =	 * MSB BIT 3 =	 * MSB BIT 4 =	 * MSB BIT 5 =	 * MSB BIT 6 =	 * MSB BIT 7 =	 */	uint8_t	adapter_features[2];	uint8_t reserved_4[16];	/* Subsystem vendor ID for ISP2200 */	uint16_t subsystem_vendor_id_2200;	/* Subsystem device ID for ISP2200 */	uint16_t subsystem_device_id_2200;	uint8_t	 reserved_5;	uint8_t	 checksum;} nvram_t;/* * ISP queue - response queue entry definition. */typedef struct {	uint8_t		data[60];	uint32_t	signature;#define RESPONSE_PROCESSED	0xDEADDEAD	/* Signature */} response_t;typedef union {	uint16_t extended;	struct {		uint8_t reserved;		uint8_t standard;	} id;} target_id_t;#define SET_TARGET_ID(ha, to, from)			\do {							\	if (HAS_EXTENDED_IDS(ha))			\		to.extended = cpu_to_le16(from);	\	else						\		to.id.standard = (uint8_t)from;		\} while (0)/* * ISP queue - command entry structure definition. */#define COMMAND_TYPE	0x11		/* Command entry */typedef struct {	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. */	target_id_t target;		/* SCSI ID */	uint16_t lun;			/* SCSI LUN */	uint16_t control_flags;		/* Control flags. */#define CF_WRITE	BIT_6#define CF_READ		BIT_5#define CF_SIMPLE_TAG	BIT_3#define CF_ORDERED_TAG	BIT_2#define CF_HEAD_TAG	BIT_1	uint16_t reserved_1;	uint16_t timeout;		/* Command timeout. */	uint16_t dseg_count;		/* Data segment count. */	uint8_t scsi_cdb[MAX_CMDSZ]; 	/* SCSI command words. */	uint32_t byte_count;		/* Total byte count. */	uint32_t dseg_0_address;	/* Data segment 0 address. */	uint32_t dseg_0_length;		/* Data segment 0 length. */	uint32_t dseg_1_address;	/* Data segment 1 address. */	uint32_t dseg_1_length;		/* Data segment 1 length. */	uint32_t dseg_2_address;	/* Data segment 2 address. */	uint32_t dseg_2_length;		/* Data segment 2 length. */} cmd_entry_t;/* * ISP queue - 64-Bit addressing, command entry structure definition. */#define COMMAND_A64_TYPE	0x19	/* Command A64 entry */typedef struct {	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. */	target_id_t target;		/* SCSI ID */	uint16_t lun;			/* SCSI LUN */	uint16_t control_flags;		/* Control flags. */	uint16_t reserved_1;	uint16_t timeout;		/* Command timeout. */	uint16_t dseg_count;		/* Data segment count. */	uint8_t scsi_cdb[MAX_CMDSZ];	/* SCSI command words. */	uint32_t byte_count;		/* Total byte count. */	uint32_t dseg_0_address[2];	/* Data segment 0 address. */	uint32_t dseg_0_length;		/* Data segment 0 length. */	uint32_t dseg_1_address[2];	/* Data segment 1 address. */	uint32_t dseg_1_length;		/* Data segment 1 length. */} cmd_a64_entry_t, request_t;/* * ISP queue - continuation entry structure definition. */#define CONTINUE_TYPE		0x02	/* Continuation entry. */typedef struct {	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 reserved;	uint32_t dseg_0_address;	/* Data segment 0 address. */	uint32_t dseg_0_length;		/* Data segment 0 length. */	uint32_t dseg_1_address;	/* Data segment 1 address. */	uint32_t dseg_1_length;		/* Data segment 1 length. */	uint32_t dseg_2_address;	/* Data segment 2 address. */	uint32_t dseg_2_length;		/* Data segment 2 length. */	uint32_t dseg_3_address;	/* Data segment 3 address. */	uint32_t dseg_3_length;		/* Data segment 3 length. */	uint32_t dseg_4_address;	/* Data segment 4 address. */	uint32_t dseg_4_length;		/* Data segment 4 length. */	uint32_t dseg_5_address;	/* Data segment 5 address. */	uint32_t dseg_5_length;		/* Data segment 5 length. */	uint32_t dseg_6_address;	/* Data segment 6 address. */	uint32_t dseg_6_length;		/* Data segment 6 length. */} cont_entry_t;/* * ISP queue - 64-Bit addressing, continuation entry structure definition. */#define CONTINUE_A64_TYPE	0x0A	/* Continuation A64 entry. */typedef struct {	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 dseg_0_address[2];	/* Data segment 0 address. */	uint32_t dseg_0_length;		/* Data segment 0 length. */	uint32_t dseg_1_address[2];	/* Data segment 1 address. */	uint32_t dseg_1_length;		/* Data segment 1 length. */	uint32_t dseg_2_address	[2];	/* Data segment 2 address. */	uint32_t dseg_2_length;		/* Data segment 2 length. */	uint32_t dseg_3_address[2];	/* Data segment 3 address. */	uint32_t dseg_3_length;		/* Data segment 3 length. */	uint32_t dseg_4_address[2];	/* Data segment 4 address. */	uint32_t dseg_4_length;		/* Data segment 4 length. */} cont_a64_entry_t;/* * ISP queue - status entry structure definition. */#define	STATUS_TYPE	0x03		/* Status entry. */typedef struct {	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. */	uint16_t scsi_status;		/* SCSI status. */	uint16_t comp_status;		/* Completion status. */	uint16_t state_flags;		/* State flags. */	uint16_t status_flags;		/* Status flags. */	uint16_t rsp_info_len;		/* Response Info Length. */	uint16_t req_sense_length;	/* Request sense data length. */	uint32_t residual_length;	/* Residual transfer length. */	uint8_t rsp_info[8];		/* FCP response information. */	uint8_t req_sense_data[32];	/* Request sense data. */} sts_entry_t;/* * Status entry entry status */#define RF_RQ_DMA_ERROR	BIT_6		/* Request Queue DMA error. */#define RF_INV_E_ORDER	BIT_5		/* Invalid entry order. */#define RF_INV_E_COUNT	BIT_4		/* Invalid entry count. */#define RF_INV_E_PARAM	BIT_3		/* Invalid entry parameter. */#define RF_INV_E_TYPE	BIT_2		/* Invalid entry type. */#define RF_BUSY		BIT_1		/* Busy */#define RF_MASK		(RF_RQ_DMA_ERROR | RF_INV_E_ORDER | RF_INV_E_COUNT | \			 RF_INV_E_PARAM | RF_INV_E_TYPE | RF_BUSY)#define RF_MASK_24XX	(RF_INV_E_ORDER | RF_INV_E_COUNT | RF_INV_E_PARAM | \			 RF_INV_E_TYPE)/* * Status entry SCSI status bit definitions. */#define SS_MASK				0xfff	/* Reserved bits BIT_12-BIT_15*/#define SS_RESIDUAL_UNDER		BIT_11#define SS_RESIDUAL_OVER		BIT_10#define SS_SENSE_LEN_VALID		BIT_9#define SS_RESPONSE_INFO_LEN_VALID	BIT_8#define SS_RESERVE_CONFLICT		(BIT_4 | BIT_3)#define SS_BUSY_CONDITION		BIT_3#define SS_CONDITION_MET		BIT_2#define SS_CHECK_CONDITION		BIT_1/* * Status entry completion status */#define CS_COMPLETE		0x0	/* No errors */#define CS_INCOMPLETE		0x1	/* Incomplete transfer of cmd. */#define CS_DMA			0x2	/* A DMA direction error. */#define CS_TRANSPORT		0x3	/* Transport error. */#define CS_RESET		0x4	/* SCSI bus reset occurred */#define CS_ABORTED		0x5	/* System aborted command. */#define CS_TIMEOUT		0x6	/* Timeout error. */#define CS_DATA_OVERRUN		0x7	/* Data overrun. */#define CS_DATA_UNDERRUN	0x15	/* Data Underrun. */#define CS_QUEUE_FULL		0x1C	/* Queue Full. */#define CS_PORT_UNAVAILABLE	0x28	/* Port unavailable */					/* (selection timeout) */#define CS_PORT_LOGGED_OUT	0x29	/* Port Logged Out */#define CS_PORT_CONFIG_CHG	0x2A	/* Port Configuration Changed */#define CS_PORT_BUSY		0x2B	/* Port Busy */#define CS_COMPLETE_CHKCOND	0x30	/* Error? */#define CS_BAD_PAYLOAD		0x80	/* Driver defined */#define CS_UNKNOWN		0x81	/* Driver defined */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -