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

📄 qla_def.h

📁 linux-2.6.15.6
💻 H
📖 第 1 页 / 共 5 页
字号:
#define RPRT_CMD	0x210#define RPA_CMD		0x211#define RPA_RSP_SIZE	16#define DHBA_CMD	0x300#define DHBA_REQ_SIZE	(16 + 8)#define DHBA_RSP_SIZE	16#define DHAT_CMD	0x301#define DPRT_CMD	0x310#define DPA_CMD		0x311/* CT command header -- request/response common fields */struct ct_cmd_hdr {	uint8_t revision;	uint8_t in_id[3];	uint8_t gs_type;	uint8_t gs_subtype;	uint8_t options;	uint8_t reserved;};/* CT command request */struct ct_sns_req {	struct ct_cmd_hdr header;	uint16_t command;	uint16_t max_rsp_size;	uint8_t fragment_id;	uint8_t reserved[3];	union {		/* GA_NXT, GPN_ID, GNN_ID, GFT_ID */		struct {			uint8_t reserved;			uint8_t port_id[3];		} port_id;		struct {			uint8_t port_type;			uint8_t domain;			uint8_t area;			uint8_t reserved;		} gid_pt;		struct {			uint8_t reserved;			uint8_t port_id[3];			uint8_t fc4_types[32];		} rft_id;		struct {			uint8_t reserved;			uint8_t port_id[3];			uint16_t reserved2;			uint8_t fc4_feature;			uint8_t fc4_type;		} rff_id;		struct {			uint8_t reserved;			uint8_t port_id[3];			uint8_t node_name[8];		} rnn_id;		struct {			uint8_t node_name[8];			uint8_t name_len;			uint8_t sym_node_name[255];		} rsnn_nn;		struct {			uint8_t hba_indentifier[8];		} ghat;		struct {			uint8_t hba_identifier[8];			uint32_t entry_count;			uint8_t port_name[8];			struct ct_fdmi_hba_attributes attrs;		} rhba;		struct {			uint8_t hba_identifier[8];			struct ct_fdmi_hba_attributes attrs;		} rhat;		struct {			uint8_t port_name[8];			struct ct_fdmi_port_attributes attrs;		} rpa;		struct {			uint8_t port_name[8];		} dhba;		struct {			uint8_t port_name[8];		} dhat;		struct {			uint8_t port_name[8];		} dprt;		struct {			uint8_t port_name[8];		} dpa;	} req;};/* CT command response header */struct ct_rsp_hdr {	struct ct_cmd_hdr header;	uint16_t response;	uint16_t residual;	uint8_t fragment_id;	uint8_t reason_code;	uint8_t explanation_code;	uint8_t vendor_unique;};struct ct_sns_gid_pt_data {	uint8_t control_byte;	uint8_t port_id[3];};struct ct_sns_rsp {	struct ct_rsp_hdr header;	union {		struct {			uint8_t port_type;			uint8_t port_id[3];			uint8_t port_name[8];			uint8_t sym_port_name_len;			uint8_t sym_port_name[255];			uint8_t node_name[8];			uint8_t sym_node_name_len;			uint8_t sym_node_name[255];			uint8_t init_proc_assoc[8];			uint8_t node_ip_addr[16];			uint8_t class_of_service[4];			uint8_t fc4_types[32];			uint8_t ip_address[16];			uint8_t fabric_port_name[8];			uint8_t reserved;			uint8_t hard_address[3];		} ga_nxt;		struct {			struct ct_sns_gid_pt_data entries[MAX_FIBRE_DEVICES];		} gid_pt;		struct {			uint8_t port_name[8];		} gpn_id;		struct {			uint8_t node_name[8];		} gnn_id;		struct {			uint8_t fc4_types[32];		} gft_id;		struct {			uint32_t entry_count;			uint8_t port_name[8];			struct ct_fdmi_hba_attributes attrs;		} ghat;	} rsp;};struct ct_sns_pkt {	union {		struct ct_sns_req req;		struct ct_sns_rsp rsp;	} p;};/* * SNS command structures -- for 2200 compatability. */#define	RFT_ID_SNS_SCMD_LEN	22#define	RFT_ID_SNS_CMD_SIZE	60#define	RFT_ID_SNS_DATA_SIZE	16#define	RNN_ID_SNS_SCMD_LEN	10#define	RNN_ID_SNS_CMD_SIZE	36#define	RNN_ID_SNS_DATA_SIZE	16#define	GA_NXT_SNS_SCMD_LEN	6#define	GA_NXT_SNS_CMD_SIZE	28#define	GA_NXT_SNS_DATA_SIZE	(620 + 16)#define	GID_PT_SNS_SCMD_LEN	6#define	GID_PT_SNS_CMD_SIZE	28#define	GID_PT_SNS_DATA_SIZE	(MAX_FIBRE_DEVICES * 4 + 16)#define	GPN_ID_SNS_SCMD_LEN	6#define	GPN_ID_SNS_CMD_SIZE	28#define	GPN_ID_SNS_DATA_SIZE	(8 + 16)#define	GNN_ID_SNS_SCMD_LEN	6#define	GNN_ID_SNS_CMD_SIZE	28#define	GNN_ID_SNS_DATA_SIZE	(8 + 16)struct sns_cmd_pkt {	union {		struct {			uint16_t buffer_length;			uint16_t reserved_1;			uint32_t buffer_address[2];			uint16_t subcommand_length;			uint16_t reserved_2;			uint16_t subcommand;			uint16_t size;			uint32_t reserved_3;			uint8_t param[36];		} cmd;		uint8_t rft_data[RFT_ID_SNS_DATA_SIZE];		uint8_t rnn_data[RNN_ID_SNS_DATA_SIZE];		uint8_t gan_data[GA_NXT_SNS_DATA_SIZE];		uint8_t gid_data[GID_PT_SNS_DATA_SIZE];		uint8_t gpn_data[GPN_ID_SNS_DATA_SIZE];		uint8_t gnn_data[GNN_ID_SNS_DATA_SIZE];	} p;};/* IO descriptors */#define MAX_IO_DESCRIPTORS	32#define ABORT_IOCB_CB		0#define ADISC_PORT_IOCB_CB	1#define LOGOUT_PORT_IOCB_CB	2#define LOGIN_PORT_IOCB_CB	3#define LAST_IOCB_CB		4#define IODESC_INVALID_INDEX	0xFFFF#define IODESC_ADISC_NEEDED	0xFFFE#define IODESC_LOGIN_NEEDED	0xFFFDstruct io_descriptor {	uint16_t used:1;	uint16_t idx:11;	uint16_t cb_idx:4;	struct timer_list timer;	struct scsi_qla_host *ha;	port_id_t d_id;	fc_port_t *remote_fcport;	uint32_t signature;};struct qla_fw_info {	unsigned short addressing;	/* addressing method used to load fw */#define FW_INFO_ADDR_NORMAL	0#define FW_INFO_ADDR_EXTENDED	1#define FW_INFO_ADDR_NOMORE	0xffff	unsigned short *fwcode;		/* pointer to FW array */	unsigned short *fwlen;		/* number of words in array */	unsigned short *fwstart;	/* start address for F/W */	unsigned long *lfwstart;	/* start address (long) for F/W */};struct qla_board_info {	char *drv_name;	char isp_name[8];	struct qla_fw_info *fw_info;	char *fw_fname;	struct scsi_host_template *sht;};/* Return data from MBC_GET_ID_LIST call. */struct gid_list_info {	uint8_t	al_pa;	uint8_t	area;	uint8_t	domain;	uint8_t	loop_id_2100;	/* ISP2100/ISP2200 -- 4 bytes. */	uint16_t loop_id;	/* ISP23XX         -- 6 bytes. */	uint16_t reserved_1;	/* ISP24XX         -- 8 bytes. */};#define GID_LIST_SIZE (sizeof(struct gid_list_info) * MAX_FIBRE_DEVICES)/* * ISP operations */struct isp_operations {	int (*pci_config) (struct scsi_qla_host *);	void (*reset_chip) (struct scsi_qla_host *);	int (*chip_diag) (struct scsi_qla_host *);	void (*config_rings) (struct scsi_qla_host *);	void (*reset_adapter) (struct scsi_qla_host *);	int (*nvram_config) (struct scsi_qla_host *);	void (*update_fw_options) (struct scsi_qla_host *);	int (*load_risc) (struct scsi_qla_host *, uint32_t *);	char * (*pci_info_str) (struct scsi_qla_host *, char *);	char * (*fw_version_str) (struct scsi_qla_host *, char *);	irqreturn_t (*intr_handler) (int, void *, struct pt_regs *);	void (*enable_intrs) (struct scsi_qla_host *);	void (*disable_intrs) (struct scsi_qla_host *);	int (*abort_command) (struct scsi_qla_host *, srb_t *);	int (*abort_target) (struct fc_port *);	int (*fabric_login) (struct scsi_qla_host *, uint16_t, uint8_t,		uint8_t, uint8_t, uint16_t *, uint8_t);	int (*fabric_logout) (struct scsi_qla_host *, uint16_t, uint8_t,	    uint8_t, uint8_t);	uint16_t (*calc_req_entries) (uint16_t);	void (*build_iocbs) (srb_t *, cmd_entry_t *, uint16_t);	void * (*prep_ms_iocb) (struct scsi_qla_host *, uint32_t, uint32_t);	void * (*prep_ms_fdmi_iocb) (struct scsi_qla_host *, uint32_t,	    uint32_t);	uint8_t * (*read_nvram) (struct scsi_qla_host *, uint8_t *,		uint32_t, uint32_t);	int (*write_nvram) (struct scsi_qla_host *, uint8_t *, uint32_t,		uint32_t);	void (*fw_dump) (struct scsi_qla_host *, int);	void (*ascii_fw_dump) (struct scsi_qla_host *);};/* * Linux Host Adapter structure */typedef struct scsi_qla_host {	struct list_head list;	/* Commonly used flags and state information. */	struct Scsi_Host *host;	struct pci_dev	*pdev;	unsigned long	host_no;	unsigned long	instance;	volatile struct {		uint32_t	init_done		:1;		uint32_t	online			:1;		uint32_t	mbox_int		:1;		uint32_t	mbox_busy		:1;		uint32_t	rscn_queue_overflow	:1;		uint32_t	reset_active		:1;		uint32_t	management_server_logged_in :1;                uint32_t	process_response_queue	:1;		uint32_t	disable_risc_code_load	:1;		uint32_t	enable_64bit_addressing	:1;		uint32_t	enable_lip_reset	:1;		uint32_t	enable_lip_full_login	:1;		uint32_t	enable_target_reset	:1;		uint32_t	enable_led_scheme	:1;		uint32_t	msi_enabled		:1;		uint32_t	msix_enabled		:1;	} flags;	atomic_t	loop_state;#define LOOP_TIMEOUT	1#define LOOP_DOWN	2#define LOOP_UP		3#define LOOP_UPDATE	4#define LOOP_READY	5#define LOOP_DEAD	6	unsigned long   dpc_flags;#define	RESET_MARKER_NEEDED	0	/* Send marker to ISP. */#define	RESET_ACTIVE		1#define	ISP_ABORT_NEEDED	2	/* Initiate ISP abort. */#define	ABORT_ISP_ACTIVE	3	/* ISP abort in progress. */#define	LOOP_RESYNC_NEEDED	4	/* Device Resync needed. */#define	LOOP_RESYNC_ACTIVE	5#define LOCAL_LOOP_UPDATE       6	/* Perform a local loop update. */#define RSCN_UPDATE             7	/* Perform an RSCN update. */#define MAILBOX_RETRY           8#define ISP_RESET_NEEDED        9	/* Initiate a ISP reset. */#define FAILOVER_EVENT_NEEDED   10#define FAILOVER_EVENT		11#define FAILOVER_NEEDED   	12#define SCSI_RESTART_NEEDED	13	/* Processes SCSI retry queue. */#define PORT_RESTART_NEEDED	14	/* Processes Retry queue. */#define RESTART_QUEUES_NEEDED	15	/* Restarts the Lun queue. */#define ABORT_QUEUES_NEEDED	16#define RELOGIN_NEEDED	        17#define LOGIN_RETRY_NEEDED	18	/* Initiate required fabric logins. */#define REGISTER_FC4_NEEDED	19	/* SNS FC4 registration required. */#define ISP_ABORT_RETRY         20      /* ISP aborted. */#define FCPORT_RESCAN_NEEDED	21      /* IO descriptor processing needed */#define IODESC_PROCESS_NEEDED	22      /* IO descriptor processing needed */#define IOCTL_ERROR_RECOVERY	23#define LOOP_RESET_NEEDED	24#define BEACON_BLINK_NEEDED	25#define REGISTER_FDMI_NEEDED	26	uint32_t	device_flags;#define DFLG_LOCAL_DEVICES		BIT_0#define DFLG_RETRY_LOCAL_DEVICES	BIT_1#define DFLG_FABRIC_DEVICES		BIT_2#define	SWITCH_FOUND			BIT_3#define	DFLG_NO_CABLE			BIT_4	/* SRB cache. */#define SRB_MIN_REQ	128	mempool_t	*srb_mempool;	/* This spinlock is used to protect "io transactions", you must	 * aquire it before doing any IO to the card, eg with RD_REG*() and	 * WRT_REG*() for the duration of your entire commandtransaction.	 *	 * This spinlock is of lower priority than the io request lock.	 */	spinlock_t		hardware_lock ____cacheline_aligned;	device_reg_t __iomem *iobase;		/* Base I/O address */	unsigned long	pio_address;	unsigned long	pio_length;#define MIN_IOBASE_LEN		0x100	/* ISP ring lock, rings, and indexes */	dma_addr_t	request_dma;        /* Physical address. */	request_t       *request_ring;      /* Base virtual address */	request_t       *request_ring_ptr;  /* Current address. */	uint16_t        req_ring_index;     /* Current index. */	uint16_t        req_q_cnt;          /* Number of available entries. */	uint16_t	request_q_length;	dma_addr_t	response_dma;       /* Physical address. */	response_t      *response_ring;     /* Base virtual address */	response_t      *response_ring_ptr; /* Current address. */	uint16_t        rsp_ring_index;     /* Current index. */	uint16_t	response_q_length;	struct isp_operations isp_ops;	/* Outstandings ISP commands. */	srb_t		*outstanding_cmds[MAX_OUTSTANDING_COMMANDS];	uint32_t	current_outstanding_cmd;	srb_t		*status_srb;	/* Status continuation entry. */	uint16_t           revision;	uint8_t           ports;	/* ISP configuration data. */	uint16_t	loop_id;		/* Host adapter loop id */	uint16_t	fb_rev;	port_id_t	d_id;			/* Host adapter port id */	uint16_t	max_public_loop_ids;	uint16_t	mi

⌨️ 快捷键说明

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