📄 qla2x00.h
字号:
uint16_t unused_3[0x6]; /* Gap */ uint16_t pcr; /* Processor Control Register. */ uint16_t unused_4[0x5]; /* Gap */ uint16_t mctr; /* Memory Configuration and Timing. */ uint16_t unused_5[0x3]; /* Gap */ uint16_t fb_cmd; uint16_t unused_6[0x3]; /* Gap */#endif uint16_t host_cmd; /* Host command and control */ #define HOST_INT BIT_7 /* host interrupt bit */#ifdef FC_IP_SUPPORT uint16_t unused_3[0x0F]; /* Gap */ uint16_t mailbox8; /* Mailbox 8 */ uint16_t mailbox9; /* Mailbox 9 */ uint16_t mailbox10; /* Mailbox 10 */ uint16_t mailbox11; /* Mailbox 11 */ uint16_t mailbox12; /* Mailbox 12 */ uint16_t mailbox13; /* Mailbox 13 */ uint16_t mailbox14; /* Mailbox 14 */ uint16_t mailbox15; /* Mailbox 15 */ uint16_t mailbox16; /* Mailbox 16 */ uint16_t mailbox17; /* Mailbox 17 */ uint16_t mailbox18; /* Mailbox 18 */ uint16_t mailbox19; /* Mailbox 19 */ uint16_t mailbox20; /* Mailbox 20 */ uint16_t mailbox21; /* Mailbox 21 */ uint16_t mailbox22; /* Mailbox 22 */ uint16_t mailbox23; /* Mailbox 23 */#endif}device_reg_t;#define MAILBOX_REGISTER_COUNT 8/* * ISP product identification definitions in mailboxes after reset. */#define PROD_ID_1 0x4953#define PROD_ID_2 0x0000#define PROD_ID_2a 0x5020#define PROD_ID_3 0x2020#define PROD_ID_4 0x1/* * ISP host command and control register command definitions */#define HC_RESET_RISC 0x1000 /* Reset RISC */#define HC_PAUSE_RISC 0x2000 /* Pause RISC */#define HC_RELEASE_RISC 0x3000 /* Release RISC from reset. */#define HC_SET_HOST_INT 0x5000 /* Set host interrupt */#define HC_CLR_HOST_INT 0x6000 /* Clear HOST interrupt */#define HC_CLR_RISC_INT 0x7000 /* Clear RISC interrupt */#define HC_RISC_PAUSE BIT_5#define HC_DISABLE_PARITY_PAUSE 0x4001 /* Disable parity error RISC pause. *//* * ISP mailbox Self-Test status codes */#define MBS_FRM_ALIVE 0 /* Firmware Alive. */#define MBS_CHKSUM_ERR 1 /* Checksum Error. */#define MBS_BUSY 4 /* Busy. *//* * ISP mailbox command complete status codes */#define MBS_CMD_CMP 0x4000 /* Command Complete. */#define MBS_INV_CMD 0x4001 /* Invalid Command. */#define MBS_HOST_INF_ERR 0x4002 /* Host Interface Error. */#define MBS_TEST_FAILED 0x4003 /* Test Failed. */#define MBS_CMD_ERR 0x4005 /* Command Error. */#define MBS_CMD_PARAM_ERR 0x4006 /* Command Parameter Error. */#define MBS_FATAL_ERROR 0xF000 /* Command Fatal Error. */#define MBS_FIRMWARE_ALIVE 0x0000 #define MBS_COMMAND_COMPLETE 0x4000 #define MBS_INVALID_COMMAND 0x4001 /* * ISP mailbox asynchronous event status codes */#define MBA_ASYNC_EVENT 0x8000 /* Asynchronous event. */#define MBA_RESET 0x8001 /* Reset Detected. */#define MBA_SYSTEM_ERR 0x8002 /* System Error. */#define MBA_REQ_TRANSFER_ERR 0x8003 /* Request Transfer Error. */#define MBA_RSP_TRANSFER_ERR 0x8004 /* Response Transfer Error. */#define MBA_WAKEUP_THRES 0x8005 /* Request Queue Wake-up. */#define MBA_LIP_OCCURRED 0x8010 /* Loop Initialization Procedure */ /* occurred. */#define MBA_LOOP_UP 0x8011 /* FC Loop UP. */#define MBA_LOOP_DOWN 0x8012 /* FC Loop Down. */#define MBA_LIP_RESET 0x8013 /* LIP reset occurred. */#define MBA_PORT_UPDATE 0x8014 /* Port Database update. */#define MBA_SCR_UPDATE 0x8015 /* State Change Registration. */#define MBA_SCSI_COMPLETION 0x8020 /* SCSI Command Complete. */#define MBA_CTIO_COMPLETION 0x8021 /* CTIO Complete. */#ifdef ISP2200#define MBA_LINK_MODE_UP 0x8030 /* FC Link Mode UP. */#define MBA_UPDATE_CONFIG 0x8036 /* FC Update Configuration. */#endif/* * ISP mailbox commands */#define MBC_LOAD_RAM 1 /* Load RAM. */#define MBC_EXECUTE_FIRMWARE 2 /* Execute firmware. */#define MBC_WRITE_RAM_WORD 4 /* Write RAM word. */#define MBC_MAILBOX_REGISTER_TEST 6 /* Wrap incoming mailboxes */#define MBC_VERIFY_CHECKSUM 7 /* Verify checksum. */#define MBC_ABOUT_FIRMWARE 8 /* Get firmware revision. */#define MBC_ABORT_COMMAND 0x15 /* Abort IOCB command. */#define MBC_ABORT_DEVICE 0x16 /* Abort device (ID/LUN). */#define MBC_ABORT_TARGET 0x17 /* Abort target (ID). */#define MBC_TARGET_RESET 0x18 /* Target reset. */#define MBC_GET_ADAPTER_LOOP_ID 0x20 /* Get loop id of ISP2100. */#define MBC_SET_TARGET_PARAMATERS 0x38 /* Set target parameters. */#define MBC_INITIALIZE_FIRMWARE 0x60 /* Initialize firmware */#define MBC_INITIATE_LIP 0x62 /* Initiate Loop Initialization */ /* Procedure */#define MBC_GET_PORT_DATABASE 0x64 /* Get port database. */#define MBC_GET_FIRMWARE_STATE 0x69 /* Get firmware state. */#define MBC_GET_PORT_NAME 0x6a /* Get port name. */#define MBC_LIP_RESET 0x6c /* LIP reset. */#define MBC_SEND_SNS_COMMAND 0x6e /* Send Simple Name Server command. */#define MBC_LOGIN_FABRIC_PORT 0x6f /* Login fabric port. */#define MBC_LOGOUT_FABRIC_PORT 0x71 /* Logout fabric port. */#define MBC_LIP_FULL_LOGIN 0x72 /* Full login LIP. */#define MBC_GET_PORT_LIST 0x75 /* Get port list. *//* * Firmware state codes from get firmware state mailbox command */#define FSTATE_CONFIG_WAIT 0#define FSTATE_WAIT_AL_PA 1#define FSTATE_WAIT_LOGIN 2#define FSTATE_READY 3#define FSTATE_LOSS_OF_SYNC 4#define FSTATE_ERROR 5#define FSTATE_REINIT 6#define FSTATE_NON_PART 7#define FSTATE_CONFIG_CORRECT 0#define FSTATE_P2P_RCV_LIP 1#define FSTATE_P2P_CHOOSE_LOOP 2#define FSTATE_P2P_RCV_UNIDEN_LIP 3#define FSTATE_FATAL_ERROR 4#define FSTATE_LOOP_BACK_CONN 5/* * ISP Initialization Control Block. */typedef struct{ uint8_t version; #define ICB_VERSION 1 uint8_t reserved_1; struct { uint8_t enable_hard_loop_id :1; uint8_t enable_fairness :1; uint8_t enable_full_duplex :1; uint8_t enable_fast_posting :1; uint8_t enable_target_mode :1; uint8_t disable_initiator_mode :1; uint8_t enable_adisc :1; uint8_t enable_lun_response :1; uint8_t enable_port_update_event :1; uint8_t disable_initial_lip :1; uint8_t enable_decending_soft_assign :1; uint8_t previous_assigned_addressing :1; uint8_t enable_stop_q_on_full :1; uint8_t enable_full_login_on_lip :1; uint8_t enable_name_change :1; uint8_t expanded_ifwcb :1; }firmware_options; uint16_t frame_length; uint16_t iocb_allocation; uint16_t execution_throttle; uint8_t retry_count; uint8_t retry_delay;#ifdef ISP2200 uint8_t port_name[8];#else uint8_t node_name[8];#endif uint16_t adapter_hard_loop_id; uint8_t inquiry_data; uint8_t login_timeout;#ifdef ISP2200 uint8_t node_name[8];#else uint8_t reserved_1[8];#endif uint16_t request_q_outpointer; uint16_t response_q_inpointer; uint16_t request_q_length; uint16_t response_q_length; uint32_t request_q_address[2]; uint32_t response_q_address[2]; uint16_t lun_enables; uint8_t command_resource_count; uint8_t immediate_notify_resource_count; uint16_t timeout; uint16_t reserved_2; struct { uint8_t operation_mode :4; uint8_t connection_options :3; #define LOOP 0 #define P2P 1 #define LOOP_P2P 2 #define P2P_LOOP 3 uint8_t enable_fc_tape :1; uint8_t enable_class2 :1; uint8_t enable_fc_confirm :1; uint8_t enable_ack0 :1; uint8_t enable_command_reference_num :1; uint8_t nonpart_if_hard_addr_failed :1; uint8_t enable_read_xfr_rdy :1; uint8_t unused_14 :1; uint8_t unused_15 :1; }additional_firmware_options; uint8_t response_accum_timer; uint8_t interrupt_delay_timer; uint16_t reserved_3[14];}init_cb_t;/* * ISP Get/Set Target Parameters mailbox command control flags. *//* * 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/* * ISP2100 NVRAM structure definitions. */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; struct { uint8_t enable_hard_loop_id :1; uint8_t enable_fairness :1; uint8_t enable_full_duplex :1; uint8_t enable_fast_posting :1; uint8_t enable_target_mode :1; uint8_t disable_initiator_mode :1; uint8_t enable_adisc :1; uint8_t enable_lun_response :1; uint8_t enable_port_update_event :1; uint8_t disable_initial_lip :1; uint8_t enable_decending_soft_assign :1; uint8_t previous_assigned_addressing :1; uint8_t enable_stop_q_on_full :1; uint8_t enable_full_login_on_lip :1; uint8_t enable_name_change :1; uint8_t expanded_ifwcb :1; }firmware_options; uint16_t frame_payload_size; uint16_t max_iocb_allocation; uint16_t execution_throttle; uint8_t retry_count; uint8_t retry_delay; uint8_t port_name[8]; uint16_t adapter_hard_loop_id; uint8_t inquiry_data; uint8_t login_timeout; uint8_t node_name[8]; /* Expanded RISC parameter block */ struct { uint8_t operation_mode :4; uint8_t connection_options :3; uint8_t enable_fc_tape :1; uint8_t enable_class2 :1; uint8_t enable_fc_confirm :1; uint8_t enable_ack0 :1; uint8_t enable_command_reference_num :1; uint8_t nonpart_if_hard_addr_failed :1; uint8_t enable_read_xfr_rdy :1; uint8_t unused_14 :1; uint8_t unused_15 :1; }additional_firmware_options; uint8_t response_accum_timer; uint8_t interrupt_delay_timer; uint16_t reserved_2[14]; /* * NVRAM host parameter block */ struct { uint8_t unused_0 :1; uint8_t disable_bios :1; uint8_t disable_luns :1; uint8_t enable_selectable_boot :1; uint8_t disable_risc_code_load :1; uint8_t set_cache_line_size_1 :1; uint8_t pci_parity_disable :1; uint8_t enable_extended_logging :1; uint8_t enable_64bit_addressing :1; uint8_t enable_lip_reset :1; uint8_t enable_lip_full_login :1; uint8_t enable_target_reset :1; uint8_t enable_database_storage :1; uint8_t unused_13 :1; uint8_t unused_14 :1; uint8_t unused_15 :1; }host_p; uint8_t boot_node_name[8]; uint8_t boot_lun_number; uint8_t reset_delay; uint8_t port_down_retry_count; uint8_t reserved_3; uint16_t maximum_luns_per_target; uint16_t reserved_6[7]; /* Offset 100 */ uint16_t reserved_7[25]; /* Offset 150 */ uint16_t reserved_8[25]; /* Offset 200 */ uint16_t reserved_9[22]; /* Subsystem ID must be at offset 244 */ uint16_t subsystem_vendor_id; uint16_t reserved_10; /* Subsystem device ID must be at offset 248 */ uint16_t subsystem_device_id; uint16_t reserved_11[2]; uint8_t reserved_12; uint8_t checksum;}nvram22_t;typedef struct{ /* * NVRAM header for 2100 board. */ 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;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -