qla2x00.h
来自「这个linux源代码是很全面的~基本完整了~使用c编译的~由于时间问题我没有亲自」· C头文件 代码 · 共 1,767 行 · 第 1/5 页
H
1,767 行
#define NOTIFY_ACK_TYPE 0x0E /* Notify acknowledge entry. */ uint8_t entry_count; /* Entry count. */ uint8_t sys_define; /* System defined. */ uint8_t entry_status; /* Entry Status. */ uint32_t sys_define_2; /* System defined. */ uint8_t reserved_8; uint8_t initiator_id; uint8_t reserved_1; uint8_t target_id; uint16_t flags; uint16_t reserved_2; uint16_t status; uint16_t task_flags; uint16_t seq_id; uint16_t reserved_3[21];}nack_entry_t;/* * ISP queue - Accept Target I/O (ATIO) entry structure definition. */typedef struct{ uint8_t entry_type; /* Entry type. */ #define ACCEPT_TGT_IO_TYPE 0x16 /* Accept target I/O entry. */ uint8_t entry_count; /* Entry count. */ uint8_t sys_define; /* System defined. */ uint8_t entry_status; /* Entry Status. */ uint32_t sys_define_2; /* System defined. */ uint8_t reserved_8; uint8_t initiator_id; uint16_t exchange_id; uint16_t flags; uint16_t status; uint8_t reserved_1; uint8_t task_codes; uint8_t task_flags; uint8_t execution_codes; uint8_t cdb[MAX_CMDSZ]; uint32_t data_length; uint16_t lun; uint16_t reserved_2A; uint16_t scsi_status; uint8_t sense_data[18];}atio_entry_t;/* * ISP queue - Continue Target I/O (CTIO) entry for status mode 0 * structure definition. */typedef struct{ uint8_t entry_type; /* Entry type. */ #define CONTINUE_TGT_IO_TYPE 0x17 /* CTIO entry */ uint8_t entry_count; /* Entry count. */ uint8_t sys_define; /* System defined. */ uint8_t entry_status; /* Entry Status. */ uint32_t sys_define_2; /* System defined. */ uint8_t reserved_8; uint8_t initiator_id; uint16_t exchange_id; uint16_t flags; uint16_t status; uint16_t timeout; /* 0 = 30 seconds, 0xFFFF = disable */ uint16_t dseg_count; /* Data segment count. */ uint32_t relative_offset; uint32_t residual; uint16_t reserved_1[3]; uint16_t scsi_status; uint32_t transfer_length; 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. */}ctio_entry_t;/* * ISP queue - CTIO returned entry structure definition. */typedef struct{ uint8_t entry_type; /* Entry type. */ #define CTIO_RET_TYPE 0x17 /* CTIO return entry */ uint8_t entry_count; /* Entry count. */ uint8_t sys_define; /* System defined. */ uint8_t entry_status; /* Entry Status. */ uint32_t sys_define_2; /* System defined. */ uint8_t reserved_8; uint8_t initiator_id; uint16_t exchange_id; uint16_t flags; uint16_t status; uint16_t timeout; /* 0 = 30 seconds, 0xFFFF = disable */ uint16_t dseg_count; /* Data segment count. */ uint32_t relative_offset; uint32_t residual; uint16_t reserved_1[8]; uint16_t scsi_status; uint8_t sense_data[18];}ctio_ret_entry_t;/* * ISP queue - CTIO A64 entry structure definition. */typedef struct{ uint8_t entry_type; /* Entry type. */ #define CTIO_A64_TYPE 0x1F /* CTIO A64 entry */ uint8_t entry_count; /* Entry count. */ uint8_t sys_define; /* System defined. */ uint8_t entry_status; /* Entry Status. */ uint32_t sys_define_2; /* System defined. */ uint8_t reserved_8; uint8_t initiator_id; uint16_t exchange_id; uint16_t flags; uint16_t status; uint16_t timeout; /* 0 = 30 seconds, 0xFFFF = disable */ uint16_t dseg_count; /* Data segment count. */ uint32_t relative_offset; uint32_t residual; uint16_t reserved_1[3]; uint16_t scsi_status; uint32_t transfer_length; 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. */}ctio_a64_entry_t;/* * ISP queue - CTIO returned entry structure definition. */typedef struct{ uint8_t entry_type; /* Entry type. */ #define CTIO_A64_RET_TYPE 0x1F /* CTIO A64 returned entry */ uint8_t entry_count; /* Entry count. */ uint8_t sys_define; /* System defined. */ uint8_t entry_status; /* Entry Status. */ uint32_t sys_define_2; /* System defined. */ uint8_t reserved_8; uint8_t initiator_id; uint16_t exchange_id; uint16_t flags; uint16_t status; uint16_t timeout; /* 0 = 30 seconds, 0xFFFF = disable */ uint16_t dseg_count; /* Data segment count. */ uint32_t relative_offset; uint32_t residual; uint16_t reserved_1[8]; uint16_t scsi_status; uint8_t sense_data[18];}ctio_a64_ret_entry_t;/* * ISP queue - Status Contination entry structure definition. */typedef struct{ uint8_t entry_type; /* Entry type. */ #define STATUS_CONT_TYPE 0x10 /* Status contination entry */ uint8_t entry_count; /* Entry count. */ uint8_t reserved; uint8_t entry_status; /* Entry Status. */ uint8_t sense_data[60];}status_cont_entry_t;/* * ISP queue - Command Set entry structure definition. */typedef struct{ uint8_t entry_type; /* Entry type. */ #define CMD_SET_TYPE 0x18 /* Command set entry */ uint8_t entry_count; /* Entry count. */ uint8_t sys_define; /* System defined. */ uint8_t entry_status; /* Entry Status. */ uint32_t sys_define_2; /* System defined. */ uint16_t reserved; uint16_t status; uint16_t control_flags; /* Control flags. */ uint16_t count; uint32_t iocb_0_address; uint32_t iocb_1_address; uint32_t iocb_2_address; uint32_t iocb_3_address; uint32_t iocb_4_address; uint32_t iocb_5_address; uint32_t iocb_6_address; uint32_t iocb_7_address; uint32_t iocb_8_address; uint32_t iocb_9_address; uint32_t iocb_10_address; uint32_t iocb_11_address;}cmd_set_entry_t;/* * ISP queue - Command Set A64 entry structure definition. */typedef struct{ uint8_t entry_type; /* Entry type. */ #define CMD_SET_TYPE 0x18 /* Command set entry */ uint8_t entry_count; /* Entry count. */ uint8_t sys_define; /* System defined. */ uint8_t entry_status; /* Entry Status. */ uint32_t sys_define_2; /* System defined. */ uint16_t reserved; uint16_t status; uint16_t control_flags; /* Control flags. */ uint16_t count; uint32_t iocb_0_address[2]; uint32_t iocb_1_address[2]; uint32_t iocb_2_address[2]; uint32_t iocb_3_address[2]; uint32_t iocb_4_address[2]; uint32_t iocb_5_address[2];}cmd_set_a64_entry_t;/* 4.11 * ISP queue - Command Set entry structure definition. */typedef struct{ uint8_t entry_type; /* Entry type. */ #define MS_IOCB_TYPE 0x29 /* Management Server IOCB entry */ uint8_t entry_count; /* Entry count. */ uint8_t sys_define; /* System defined. */ uint8_t entry_status; /* Entry Status. */ uint32_t handle; /* System handle. */ uint8_t reserved; uint8_t loop_id; uint16_t status; uint16_t control_flags; /* Control flags. */ uint16_t reserved2; uint16_t timeout; uint16_t DSDcount; uint16_t RespDSDcount; uint8_t reserved3[10]; uint32_t Response_bytecount; uint32_t Request_bytecount; uint32_t dseg_req_address[2]; /* Data segment 0 address. */ uint32_t dseg_req_length; /* Data segment 0 length. */ uint32_t dseg_rsp_address[2]; /* Data segment 1 address. */ uint32_t dseg_rsp_length; /* Data segment 1 length. */} ms_iocb_entry_t;/* * ISP request and response queue entry sizes */#define RESPONSE_ENTRY_SIZE (sizeof(response_t))#define REQUEST_ENTRY_SIZE (sizeof(request_t))/* * ISP status entry - completion status definitions. */#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_ABORT_MSG 0xE /* Target rejected abort msg. */#define CS_DEV_RESET_MSG 0x12 /* Target rejected dev rst msg. */#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_BAD_PAYLOAD 0x80 /* Driver defined */#define CS_UNKNOWN 0x81 /* Driver defined */#define CS_RETRY 0x82 /* Driver defined */#define CS_QUEUE_FULL 0x1c /* Target queue full*//* * ISP status entry - SCSI status byte bit definitions. */#define SS_MASK 0xfff /* Mask off 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#if defined(ISP2100)#define SS_RESIDUAL_LEN_VALID BIT_8#else#define SS_RESPONSE_INFO_LEN_VALID BIT_8#endif#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/* * ISP target entries - Flags bit definitions. */#define OF_RESET BIT_5 /* Reset LIP flag */#define OF_DATA_IN BIT_6 /* Data in to initiator */ /* (data from target to initiator) */#define OF_DATA_OUT BIT_7 /* Data out from initiator */ /* (data from initiator to target) */#define OF_NO_DATA (BIT_7 | BIT_6)#define OF_INC_RC BIT_8 /* Increment command resource count */#define OF_FAST_POST BIT_9 /* Enable mailbox fast posting. */#define OF_SSTS BIT_15 /* Send SCSI status *//* * Target Read/Write buffer structure. */#define TARGET_DATA_OFFSET 4#define TARGET_DATA_SIZE 0x2000 /* 8K */#define TARGET_INQ_OFFSET (TARGET_DATA_OFFSET + TARGET_DATA_SIZE)#define TARGET_SENSE_SIZE 18#define TARGET_BUF_SIZE 36#define TARGET_OFFLINE BIT_0/* * 24 bit port ID type definition. */typedef union { uint32_t b24 : 24; struct { uint8_t d_id[3]; uint8_t rsvd_1; }r; struct { uint8_t al_pa; uint8_t area; uint8_t domain; uint8_t rsvd_1; }b;} port_id_t;typedef struct{ port_id_t d_id; uint8_t name[WWN_SIZE]; uint8_t wwn[WWN_SIZE]; /* port name */ uint16_t loop_id; uint16_t flag; /* flags bits defined as follows */#define DEV_PUBLIC BIT_0#define DEV_LUNMASK_SET BIT_1 /* some LUNs masked for this device */#define DEV_TAPE_DEVICE BIT_2#define DE
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?