qla_def.h
来自「linux 内核源代码」· C头文件 代码 · 共 2,284 行 · 第 1/5 页
H
2,284 行
/* * ISP queue - marker entry structure definition. */#define MARKER_TYPE 0x04 /* Marker entry. */typedef struct { uint8_t entry_type; /* Entry type. */ uint8_t entry_count; /* Entry count. */ uint8_t handle_count; /* Handle count. */ uint8_t entry_status; /* Entry Status. */ uint32_t sys_define_2; /* System defined. */ target_id_t target; /* SCSI ID */ uint8_t modifier; /* Modifier (7-0). */#define MK_SYNC_ID_LUN 0 /* Synchronize ID/LUN */#define MK_SYNC_ID 1 /* Synchronize ID */#define MK_SYNC_ALL 2 /* Synchronize all ID/LUN */#define MK_SYNC_LIP 3 /* Synchronize all ID/LUN, */ /* clear port changed, */ /* use sequence number. */ uint8_t reserved_1; uint16_t sequence_number; /* Sequence number of event */ uint16_t lun; /* SCSI LUN */ uint8_t reserved_2[48];} mrk_entry_t;/* * ISP queue - Management Server entry structure definition. */#define MS_IOCB_TYPE 0x29 /* Management Server IOCB entry */typedef struct { uint8_t entry_type; /* Entry type. */ uint8_t entry_count; /* Entry count. */ uint8_t handle_count; /* Handle count. */ uint8_t entry_status; /* Entry Status. */ uint32_t handle1; /* System handle. */ target_id_t loop_id; uint16_t status; uint16_t control_flags; /* Control flags. */ uint16_t reserved2; uint16_t timeout; uint16_t cmd_dsd_count; uint16_t total_dsd_count; uint8_t type; uint8_t r_ctl; uint16_t rx_id; uint16_t reserved3; uint32_t handle2; uint32_t rsp_bytecount; uint32_t req_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 queue - Mailbox Command entry structure definition. */#define MBX_IOCB_TYPE 0x39struct mbx_entry { uint8_t entry_type; uint8_t entry_count; uint8_t sys_define1; /* Use sys_define1 for source type */#define SOURCE_SCSI 0x00#define SOURCE_IP 0x01#define SOURCE_VI 0x02#define SOURCE_SCTP 0x03#define SOURCE_MP 0x04#define SOURCE_MPIOCTL 0x05#define SOURCE_ASYNC_IOCB 0x07 uint8_t entry_status; uint32_t handle; target_id_t loop_id; uint16_t status; uint16_t state_flags; uint16_t status_flags; uint32_t sys_define2[2]; uint16_t mb0; uint16_t mb1; uint16_t mb2; uint16_t mb3; uint16_t mb6; uint16_t mb7; uint16_t mb9; uint16_t mb10; uint32_t reserved_2[2]; uint8_t node_name[WWN_SIZE]; uint8_t port_name[WWN_SIZE];};/* * ISP request and response queue entry sizes */#define RESPONSE_ENTRY_SIZE (sizeof(response_t))#define REQUEST_ENTRY_SIZE (sizeof(request_t))/* * 24 bit port ID type definition. */typedef union { uint32_t b24 : 24; struct {#ifdef __BIG_ENDIAN uint8_t domain; uint8_t area; uint8_t al_pa;#elif __LITTLE_ENDIAN uint8_t al_pa; uint8_t area; uint8_t domain;#else#error "__BIG_ENDIAN or __LITTLE_ENDIAN must be defined!"#endif uint8_t rsvd_1; } b;} port_id_t;#define INVALID_PORT_ID 0xFFFFFF/* * Switch info gathering structure. */typedef struct { port_id_t d_id; uint8_t node_name[WWN_SIZE]; uint8_t port_name[WWN_SIZE]; uint8_t fabric_port_name[WWN_SIZE]; uint16_t fp_speed;} sw_info_t;/* * Fibre channel port type. */ typedef enum { FCT_UNKNOWN, FCT_RSCN, FCT_SWITCH, FCT_BROADCAST, FCT_INITIATOR, FCT_TARGET} fc_port_type_t;/* * Fibre channel port structure. */typedef struct fc_port { struct list_head list; struct scsi_qla_host *ha; uint8_t node_name[WWN_SIZE]; uint8_t port_name[WWN_SIZE]; port_id_t d_id; uint16_t loop_id; uint16_t old_loop_id; uint8_t fabric_port_name[WWN_SIZE]; uint16_t fp_speed; fc_port_type_t port_type; atomic_t state; uint32_t flags; unsigned int os_target_id; int port_login_retry_count; int login_retry; atomic_t port_down_timer; spinlock_t rport_lock; struct fc_rport *rport, *drport; u32 supported_classes; unsigned long last_queue_full; unsigned long last_ramp_up; struct list_head vp_fcport; uint16_t vp_idx;} fc_port_t;/* * Fibre channel port/lun states. */#define FCS_UNCONFIGURED 1#define FCS_DEVICE_DEAD 2#define FCS_DEVICE_LOST 3#define FCS_ONLINE 4#define FCS_NOT_SUPPORTED 5#define FCS_FAILOVER 6#define FCS_FAILOVER_FAILED 7/* * FC port flags. */#define FCF_FABRIC_DEVICE BIT_0#define FCF_LOGIN_NEEDED BIT_1#define FCF_FO_MASKED BIT_2#define FCF_FAILOVER_NEEDED BIT_3#define FCF_RESET_NEEDED BIT_4#define FCF_PERSISTENT_BOUND BIT_5#define FCF_TAPE_PRESENT BIT_6#define FCF_FARP_DONE BIT_7#define FCF_FARP_FAILED BIT_8#define FCF_FARP_REPLY_NEEDED BIT_9#define FCF_AUTH_REQ BIT_10#define FCF_SEND_AUTH_REQ BIT_11#define FCF_RECEIVE_AUTH_REQ BIT_12#define FCF_AUTH_SUCCESS BIT_13#define FCF_RLC_SUPPORT BIT_14#define FCF_CONFIG BIT_15 /* Needed? */#define FCF_RESCAN_NEEDED BIT_16#define FCF_XP_DEVICE BIT_17#define FCF_MSA_DEVICE BIT_18#define FCF_EVA_DEVICE BIT_19#define FCF_MSA_PORT_ACTIVE BIT_20#define FCF_FAILBACK_DISABLE BIT_21#define FCF_FAILOVER_DISABLE BIT_22#define FCF_DSXXX_DEVICE BIT_23#define FCF_AA_EVA_DEVICE BIT_24#define FCF_AA_MSA_DEVICE BIT_25/* No loop ID flag. */#define FC_NO_LOOP_ID 0x1000/* * FC-CT interface * * NOTE: All structures are big-endian in form. */#define CT_REJECT_RESPONSE 0x8001#define CT_ACCEPT_RESPONSE 0x8002#define CT_REASON_INVALID_COMMAND_CODE 0x01#define CT_REASON_CANNOT_PERFORM 0x09#define CT_EXPL_ALREADY_REGISTERED 0x10#define NS_N_PORT_TYPE 0x01#define NS_NL_PORT_TYPE 0x02#define NS_NX_PORT_TYPE 0x7F#define GA_NXT_CMD 0x100#define GA_NXT_REQ_SIZE (16 + 4)#define GA_NXT_RSP_SIZE (16 + 620)#define GID_PT_CMD 0x1A1#define GID_PT_REQ_SIZE (16 + 4)#define GID_PT_RSP_SIZE (16 + (MAX_FIBRE_DEVICES * 4))#define GPN_ID_CMD 0x112#define GPN_ID_REQ_SIZE (16 + 4)#define GPN_ID_RSP_SIZE (16 + 8)#define GNN_ID_CMD 0x113#define GNN_ID_REQ_SIZE (16 + 4)#define GNN_ID_RSP_SIZE (16 + 8)#define GFT_ID_CMD 0x117#define GFT_ID_REQ_SIZE (16 + 4)#define GFT_ID_RSP_SIZE (16 + 32)#define RFT_ID_CMD 0x217#define RFT_ID_REQ_SIZE (16 + 4 + 32)#define RFT_ID_RSP_SIZE 16#define RFF_ID_CMD 0x21F#define RFF_ID_REQ_SIZE (16 + 4 + 2 + 1 + 1)#define RFF_ID_RSP_SIZE 16#define RNN_ID_CMD 0x213#define RNN_ID_REQ_SIZE (16 + 4 + 8)#define RNN_ID_RSP_SIZE 16#define RSNN_NN_CMD 0x239#define RSNN_NN_REQ_SIZE (16 + 8 + 1 + 255)#define RSNN_NN_RSP_SIZE 16#define GFPN_ID_CMD 0x11C#define GFPN_ID_REQ_SIZE (16 + 4)#define GFPN_ID_RSP_SIZE (16 + 8)#define GPSC_CMD 0x127#define GPSC_REQ_SIZE (16 + 8)#define GPSC_RSP_SIZE (16 + 2 + 2)/* * HBA attribute types. */#define FDMI_HBA_ATTR_COUNT 9#define FDMI_HBA_NODE_NAME 1#define FDMI_HBA_MANUFACTURER 2#define FDMI_HBA_SERIAL_NUMBER 3#define FDMI_HBA_MODEL 4#define FDMI_HBA_MODEL_DESCRIPTION 5#define FDMI_HBA_HARDWARE_VERSION 6#define FDMI_HBA_DRIVER_VERSION 7#define FDMI_HBA_OPTION_ROM_VERSION 8#define FDMI_HBA_FIRMWARE_VERSION 9#define FDMI_HBA_OS_NAME_AND_VERSION 0xa#define FDMI_HBA_MAXIMUM_CT_PAYLOAD_LENGTH 0xbstruct ct_fdmi_hba_attr { uint16_t type; uint16_t len; union { uint8_t node_name[WWN_SIZE]; uint8_t manufacturer[32]; uint8_t serial_num[8]; uint8_t model[16]; uint8_t model_desc[80]; uint8_t hw_version[16]; uint8_t driver_version[32]; uint8_t orom_version[16]; uint8_t fw_version[16]; uint8_t os_version[128]; uint8_t max_ct_len[4]; } a;};struct ct_fdmi_hba_attributes { uint32_t count; struct ct_fdmi_hba_attr entry[FDMI_HBA_ATTR_COUNT];};/* * Port attribute types. */#define FDMI_PORT_ATTR_COUNT 6#define FDMI_PORT_FC4_TYPES 1#define FDMI_PORT_SUPPORT_SPEED 2#define FDMI_PORT_CURRENT_SPEED 3#define FDMI_PORT_MAX_FRAME_SIZE 4#define FDMI_PORT_OS_DEVICE_NAME 5#define FDMI_PORT_HOST_NAME 6#define FDMI_PORT_SPEED_1GB 0x1#define FDMI_PORT_SPEED_2GB 0x2#define FDMI_PORT_SPEED_10GB 0x4#define FDMI_PORT_SPEED_4GB 0x8#define FDMI_PORT_SPEED_8GB 0x10#define FDMI_PORT_SPEED_16GB 0x20#define FDMI_PORT_SPEED_UNKNOWN 0x8000struct ct_fdmi_port_attr { uint16_t type; uint16_t len; union { uint8_t fc4_types[32]; uint32_t sup_speed; uint32_t cur_speed; uint32_t max_frame_size; uint8_t os_dev_name[32]; uint8_t host_name[32]; } a;};/* * Port Attribute Block. */struct ct_fdmi_port_attributes { uint32_t count; struct ct_fdmi_port_attr entry[FDMI_PORT_ATTR_COUNT];};/* FDMI definitions. */#define GRHL_CMD 0x100#define GHAT_CMD 0x101#define GRPL_CMD 0x102#define GPAT_CMD 0x110#define RHBA_CMD 0x200#define RHBA_RSP_SIZE 16#define RHAT_CMD 0x201#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, GFPN_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 {
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?