ql4_fw.h
来自「linux 内核源代码」· C头文件 代码 · 共 777 行 · 第 1/2 页
H
777 行
uint8_t ipv4_dhcp_vid[11]; /* D5-DF */ uint8_t res11[20]; /* E0-F3 */ uint8_t ipv4_dhcp_alt_cid_len; /* F4 */ uint8_t ipv4_dhcp_alt_cid[11]; /* F5-FF */ uint8_t iscsi_name[224]; /* 100-1DF */ uint8_t res12[32]; /* 1E0-1FF */ uint32_t cookie; /* 200-203 */ uint16_t ipv6_port; /* 204-205 */ uint16_t ipv6_opts; /* 206-207 */ uint16_t ipv6_addtl_opts; /* 208-209 */ uint16_t ipv6_tcp_opts; /* 20A-20B */ uint8_t ipv6_tcp_wsf; /* 20C */ uint16_t ipv6_flow_lbl; /* 20D-20F */ uint8_t ipv6_gw_addr[16]; /* 210-21F */ uint16_t ipv6_vlan_tag; /* 220-221 */ uint8_t ipv6_lnk_lcl_addr_state;/* 222 */ uint8_t ipv6_addr0_state; /* 223 */ uint8_t ipv6_addr1_state; /* 224 */ uint8_t ipv6_gw_state; /* 225 */ uint8_t ipv6_traffic_class; /* 226 */ uint8_t ipv6_hop_limit; /* 227 */ uint8_t ipv6_if_id[8]; /* 228-22F */ uint8_t ipv6_addr0[16]; /* 230-23F */ uint8_t ipv6_addr1[16]; /* 240-24F */ uint32_t ipv6_nd_reach_time; /* 250-253 */ uint32_t ipv6_nd_rexmit_timer; /* 254-257 */ uint32_t ipv6_nd_stale_timeout; /* 258-25B */ uint8_t ipv6_dup_addr_detect_count; /* 25C */ uint8_t ipv6_cache_id; /* 25D */ uint8_t res13[18]; /* 25E-26F */ uint32_t ipv6_gw_advrt_mtu; /* 270-273 */ uint8_t res14[140]; /* 274-2FF */};struct init_fw_ctrl_blk { struct addr_ctrl_blk pri; struct addr_ctrl_blk sec;};/*************************************************************************/struct dev_db_entry { uint16_t options; /* 00-01 */#define DDB_OPT_DISC_SESSION 0x10#define DDB_OPT_TARGET 0x02 /* device is a target */ uint16_t exec_throttle; /* 02-03 */ uint16_t exec_count; /* 04-05 */ uint16_t res0; /* 06-07 */ uint16_t iscsi_options; /* 08-09 */ uint16_t tcp_options; /* 0A-0B */ uint16_t ip_options; /* 0C-0D */ uint16_t iscsi_max_rcv_data_seg_len; /* 0E-0F */ uint32_t res1; /* 10-13 */ uint16_t iscsi_max_snd_data_seg_len; /* 14-15 */ uint16_t iscsi_first_burst_len; /* 16-17 */ uint16_t iscsi_def_time2wait; /* 18-19 */ uint16_t iscsi_def_time2retain; /* 1A-1B */ uint16_t iscsi_max_outsnd_r2t; /* 1C-1D */ uint16_t ka_timeout; /* 1E-1F */ uint8_t isid[6]; /* 20-25 big-endian, must be converted * to little-endian */ uint16_t tsid; /* 26-27 */ uint16_t port; /* 28-29 */ uint16_t iscsi_max_burst_len; /* 2A-2B */ uint16_t def_timeout; /* 2C-2D */ uint16_t res2; /* 2E-2F */ uint8_t ip_addr[0x10]; /* 30-3F */ uint8_t iscsi_alias[0x20]; /* 40-5F */ uint8_t tgt_addr[0x20]; /* 60-7F */ uint16_t mss; /* 80-81 */ uint16_t res3; /* 82-83 */ uint16_t lcl_port; /* 84-85 */ uint8_t ipv4_tos; /* 86 */ uint16_t ipv6_flow_lbl; /* 87-89 */ uint8_t res4[0x36]; /* 8A-BF */ uint8_t iscsi_name[0xE0]; /* C0-19F : xxzzy Make this a * pointer to a string so we * don't have to reserve soooo * much RAM */ uint8_t ipv6_addr[0x10];/* 1A0-1AF */ uint8_t res5[0x10]; /* 1B0-1BF */ uint16_t ddb_link; /* 1C0-1C1 */ uint16_t chap_tbl_idx; /* 1C2-1C3 */ uint16_t tgt_portal_grp; /* 1C4-1C5 */ uint8_t tcp_xmt_wsf; /* 1C6 */ uint8_t tcp_rcv_wsf; /* 1C7 */ uint32_t stat_sn; /* 1C8-1CB */ uint32_t exp_stat_sn; /* 1CC-1CF */ uint8_t res6[0x30]; /* 1D0-1FF */};/*************************************************************************//* Flash definitions */#define FLASH_OFFSET_SYS_INFO 0x02000000#define FLASH_DEFAULTBLOCKSIZE 0x20000#define FLASH_EOF_OFFSET (FLASH_DEFAULTBLOCKSIZE-8) /* 4 bytes * for EOF * signature */struct sys_info_phys_addr { uint8_t address[6]; /* 00-05 */ uint8_t filler[2]; /* 06-07 */};struct flash_sys_info { uint32_t cookie; /* 00-03 */ uint32_t physAddrCount; /* 04-07 */ struct sys_info_phys_addr physAddr[4]; /* 08-27 */ uint8_t vendorId[128]; /* 28-A7 */ uint8_t productId[128]; /* A8-127 */ uint32_t serialNumber; /* 128-12B */ /* PCI Configuration values */ uint32_t pciDeviceVendor; /* 12C-12F */ uint32_t pciDeviceId; /* 130-133 */ uint32_t pciSubsysVendor; /* 134-137 */ uint32_t pciSubsysId; /* 138-13B */ /* This validates version 1. */ uint32_t crumbs; /* 13C-13F */ uint32_t enterpriseNumber; /* 140-143 */ uint32_t mtu; /* 144-147 */ uint32_t reserved0; /* 148-14b */ uint32_t crumbs2; /* 14c-14f */ uint8_t acSerialNumber[16]; /* 150-15f */ uint32_t crumbs3; /* 160-16f */ /* Leave this last in the struct so it is declared invalid if * any new items are added. */ uint32_t reserved1[39]; /* 170-1ff */}; /* 200 */struct crash_record { uint16_t fw_major_version; /* 00 - 01 */ uint16_t fw_minor_version; /* 02 - 03 */ uint16_t fw_patch_version; /* 04 - 05 */ uint16_t fw_build_version; /* 06 - 07 */ uint8_t build_date[16]; /* 08 - 17 */ uint8_t build_time[16]; /* 18 - 27 */ uint8_t build_user[16]; /* 28 - 37 */ uint8_t card_serial_num[16]; /* 38 - 47 */ uint32_t time_of_crash_in_secs; /* 48 - 4B */ uint32_t time_of_crash_in_ms; /* 4C - 4F */ uint16_t out_RISC_sd_num_frames; /* 50 - 51 */ uint16_t OAP_sd_num_words; /* 52 - 53 */ uint16_t IAP_sd_num_frames; /* 54 - 55 */ uint16_t in_RISC_sd_num_words; /* 56 - 57 */ uint8_t reserved1[28]; /* 58 - 7F */ uint8_t out_RISC_reg_dump[256]; /* 80 -17F */ uint8_t in_RISC_reg_dump[256]; /*180 -27F */ uint8_t in_out_RISC_stack_dump[0]; /*280 - ??? */};struct conn_event_log_entry {#define MAX_CONN_EVENT_LOG_ENTRIES 100 uint32_t timestamp_sec; /* 00 - 03 seconds since boot */ uint32_t timestamp_ms; /* 04 - 07 milliseconds since boot */ uint16_t device_index; /* 08 - 09 */ uint16_t fw_conn_state; /* 0A - 0B */ uint8_t event_type; /* 0C - 0C */ uint8_t error_code; /* 0D - 0D */ uint16_t error_code_detail; /* 0E - 0F */ uint8_t num_consecutive_events; /* 10 - 10 */ uint8_t rsvd[3]; /* 11 - 13 */};/************************************************************************* * * IOCB Commands Structures and Definitions * *************************************************************************/#define IOCB_MAX_CDB_LEN 16 /* Bytes in a CBD */#define IOCB_MAX_SENSEDATA_LEN 32 /* Bytes of sense data *//* IOCB header structure */struct qla4_header { uint8_t entryType;#define ET_STATUS 0x03#define ET_MARKER 0x04#define ET_CONT_T1 0x0A#define ET_STATUS_CONTINUATION 0x10#define ET_CMND_T3 0x19#define ET_PASSTHRU0 0x3A#define ET_PASSTHRU_STATUS 0x3C uint8_t entryStatus; uint8_t systemDefined; uint8_t entryCount; /* SyetemDefined definition */};/* Generic queue entry structure*/struct queue_entry { uint8_t data[60]; uint32_t signature;};/* 64 bit addressing segment counts*/#define COMMAND_SEG_A64 1#define CONTINUE_SEG_A64 5/* 64 bit addressing segment definition*/struct data_seg_a64 { struct { uint32_t addrLow; uint32_t addrHigh; } base; uint32_t count;};/* Command Type 3 entry structure*/struct command_t3_entry { struct qla4_header hdr; /* 00-03 */ uint32_t handle; /* 04-07 */ uint16_t target; /* 08-09 */ uint16_t connection_id; /* 0A-0B */ uint8_t control_flags; /* 0C */ /* data direction (bits 5-6) */#define CF_WRITE 0x20#define CF_READ 0x40#define CF_NO_DATA 0x00 /* task attributes (bits 2-0) */#define CF_HEAD_TAG 0x03#define CF_ORDERED_TAG 0x02#define CF_SIMPLE_TAG 0x01 /* STATE FLAGS FIELD IS A PLACE HOLDER. THE FW WILL SET BITS * IN THIS FIELD AS THE COMMAND IS PROCESSED. WHEN THE IOCB IS * CHANGED TO AN IOSB THIS FIELD WILL HAVE THE STATE FLAGS SET * PROPERLY. */ uint8_t state_flags; /* 0D */ uint8_t cmdRefNum; /* 0E */ uint8_t reserved1; /* 0F */ uint8_t cdb[IOCB_MAX_CDB_LEN]; /* 10-1F */ struct scsi_lun lun; /* FCP LUN (BE). */ uint32_t cmdSeqNum; /* 28-2B */ uint16_t timeout; /* 2C-2D */ uint16_t dataSegCnt; /* 2E-2F */ uint32_t ttlByteCnt; /* 30-33 */ struct data_seg_a64 dataseg[COMMAND_SEG_A64]; /* 34-3F */};/* Continuation Type 1 entry structure*/struct continuation_t1_entry { struct qla4_header hdr; struct data_seg_a64 dataseg[CONTINUE_SEG_A64];};/* Parameterize for 64 or 32 bits */#define COMMAND_SEG COMMAND_SEG_A64#define CONTINUE_SEG CONTINUE_SEG_A64#define ET_COMMAND ET_CMND_T3#define ET_CONTINUE ET_CONT_T1/* Marker entry structure*/struct qla4_marker_entry { struct qla4_header hdr; /* 00-03 */ uint32_t system_defined; /* 04-07 */ uint16_t target; /* 08-09 */ uint16_t modifier; /* 0A-0B */#define MM_LUN_RESET 0 uint16_t flags; /* 0C-0D */ uint16_t reserved1; /* 0E-0F */ struct scsi_lun lun; /* FCP LUN (BE). */ uint64_t reserved2; /* 18-1F */ uint64_t reserved3; /* 20-27 */ uint64_t reserved4; /* 28-2F */ uint64_t reserved5; /* 30-37 */ uint64_t reserved6; /* 38-3F */};/* Status entry structure*/struct status_entry { struct qla4_header hdr; /* 00-03 */ uint32_t handle; /* 04-07 */ uint8_t scsiStatus; /* 08 */#define SCSI_CHECK_CONDITION 0x02 uint8_t iscsiFlags; /* 09 */#define ISCSI_FLAG_RESIDUAL_UNDER 0x02#define ISCSI_FLAG_RESIDUAL_OVER 0x04 uint8_t iscsiResponse; /* 0A */ uint8_t completionStatus; /* 0B */#define SCS_COMPLETE 0x00#define SCS_INCOMPLETE 0x01#define SCS_RESET_OCCURRED 0x04#define SCS_ABORTED 0x05#define SCS_TIMEOUT 0x06#define SCS_DATA_OVERRUN 0x07#define SCS_DATA_UNDERRUN 0x15#define SCS_QUEUE_FULL 0x1C#define SCS_DEVICE_UNAVAILABLE 0x28#define SCS_DEVICE_LOGGED_OUT 0x29 uint8_t reserved1; /* 0C */ /* state_flags MUST be at the same location as state_flags in * the Command_T3/4_Entry */ uint8_t state_flags; /* 0D */ uint16_t senseDataByteCnt; /* 0E-0F */ uint32_t residualByteCnt; /* 10-13 */ uint32_t bidiResidualByteCnt; /* 14-17 */ uint32_t expSeqNum; /* 18-1B */ uint32_t maxCmdSeqNum; /* 1C-1F */ uint8_t senseData[IOCB_MAX_SENSEDATA_LEN]; /* 20-3F */};struct passthru0 { struct qla4_header hdr; /* 00-03 */ uint32_t handle; /* 04-07 */ uint16_t target; /* 08-09 */ uint16_t connectionID; /* 0A-0B */#define ISNS_DEFAULT_SERVER_CONN_ID ((uint16_t)0x8000) uint16_t controlFlags; /* 0C-0D */#define PT_FLAG_ETHERNET_FRAME 0x8000#define PT_FLAG_ISNS_PDU 0x8000#define PT_FLAG_SEND_BUFFER 0x0200#define PT_FLAG_WAIT_4_RESPONSE 0x0100 uint16_t timeout; /* 0E-0F */#define PT_DEFAULT_TIMEOUT 30 /* seconds */ struct data_seg_a64 outDataSeg64; /* 10-1B */ uint32_t res1; /* 1C-1F */ struct data_seg_a64 inDataSeg64; /* 20-2B */ uint8_t res2[20]; /* 2C-3F */};struct passthru_status { struct qla4_header hdr; /* 00-03 */ uint32_t handle; /* 04-07 */ uint16_t target; /* 08-09 */ uint16_t connectionID; /* 0A-0B */ uint8_t completionStatus; /* 0C */#define PASSTHRU_STATUS_COMPLETE 0x01 uint8_t residualFlags; /* 0D */ uint16_t timeout; /* 0E-0F */ uint16_t portNumber; /* 10-11 */ uint8_t res1[10]; /* 12-1B */ uint32_t outResidual; /* 1C-1F */ uint8_t res2[12]; /* 20-2B */ uint32_t inResidual; /* 2C-2F */ uint8_t res4[16]; /* 30-3F */};#endif /* _QLA4X_FW_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?