33 #if !defined(__ELXU_SLI4_H__)
34 #define __ELXU_SLI4_H__
39 #define SLI4_PCI_SOFT_RESET_CSR 0x005c
40 #define SLI4_PCI_SOFT_RESET_MASK 0x0080
42 #define SLI4_PHYSDEV_CONTROL 0x0414
43 #define SLI4_PHYSDEV_CONTROL_FRST 0x02
44 #define SLI4_PHYSDEV_CONTROL_DD 0x04
45 #define SLI4_PHYSDEV_CONTROL_FRL_MASK 0x00f0
47 #define SLI4_SLIPORT_STATUS 0x0404
48 #define SLI4_SLIPORT_STATUS_RDY (0x1 << 23)
50 #define SLI4_SLIPORT_SEMAPHORE_LAN 0x400
51 #define SLI4_SLIPORT_SEMAPHORE_SH 0xac
52 #define SLI4_SLIPORT_PORT_STATUS_MASK 0xffff
53 #define SLI4_PORT_READY 0xc000
55 #define SLI4_BMBX 0x0160
56 #define SLI4_BMBX_RDY 0x01
58 #define SLI4_SLIPORT_CONTROL 0x408
59 #define SLI4_SLIPORT_CONTROL_IP (0x1 << 27)
62 #define MBOX_SLI_CONFIG 0x9B
63 #define MBOX_READ_STATUS 0x0E
64 #define MBOX_READ_REV 0x11
65 #define MBOX_READ_LNK_STAT 0x12
66 #define MBOX_WRITE_NVPARMS 0x03
67 #define MBOX_READ_NVPARMS 0x02
68 #define MBOX_SET_LINK_DIAG_STATE 0x22
69 #define MBOX_SET_DPORT_MODE 0x27
70 #define MBOX_GET_DPORT_RESULTS 0x28
71 #define MBOX_RUN_BIU_DIAG 0x84
76 #define MBOX_SUBSYSTEM_COMMON 0x1
77 #define MBOX_SUBSYSTEM_FCOE 0xC
80 #define OPCODE_COMMON_READ_FLASHROM 0x06 // Skyhawk only
81 #define OPCODE_COMMON_WRITE_FLASHROM 0x07 // Skyhawk only
82 #define OPCODE_COMMON_GET_CNTL_ATTRIBUTES 0x20
83 #define OPCODE_COMMON_GET_FAT 0x28 // Skyhawk only
84 #define OPCODE_COMMON_ENABLE_DISABLE_PORT 0x3e // iSCSI only
85 #define OPCODE_COMMON_GET_BE_CONFIGURATION_AND_RESOURCES 0x51 // iSCSI only
86 #define OPCODE_COMMON_SET_BE_CONFIGURATION_AND_RESOURCES 0x52 // iSCSI only
87 #define OPCODE_COMMON_MANAGE_FAT 0x44 // Skyhawk only
88 #define OPCODE_COMMON_READ_TRANCEIVER_DATA 0x49 // Skyhawk only
89 #define OPCODE_COMMON_GET_EXT_FAT_CAPABILITIES 0x7D // Skyhawk only
90 #define OPCODE_COMMON_SET_EXT_FAT_CAPABILITIES 0x7E // Skyhawk only
91 #define OPCODE_COMMON_EXT_FAT_CONFIGURE_SNAPSHOT 0x7F // Skyhawk only
92 #define OPCODE_COMMON_EXT_FAT_RETRIEVE_SHAPSHOT 0x80 // Skyhawk only
93 #define OPCODE_COMMON_EXT_FAT_READ_STRING_TABLE 0x82 // Skyhawk only
94 #define OPCODE_COMMON_GET_FUNCTION_CONFIG 0xa0
95 #define OPCODE_COMMON_GET_PROFILE_CONFIG 0xa4
96 #define OPCODE_COMMON_SET_PROFILE_CONFIG 0xa5
97 #define OPCODE_COMMON_GET_PROFILE_LIST 0xa6
98 #define OPCODE_COMMON_GET_ACTIVE_PROFILE 0xa7
99 #define OPCODE_COMMON_SET_ACTIVE_PROFILE 0xa8
100 #define OPCODE_COMMON_READ_OBJECT 0xAB // Lancer only
101 #define OPCODE_COMMON_WRITE_OBJECT 0xAC // Lancer only
102 #define OPCODE_COMMON_READ_OBJECT_LIST 0xAD // Lancer only
103 #define OPCODE_COMMON_DELETE_OBJECT 0xAE // Lancer only
104 #define OPCODE_COMMON_GET_RECONFIG_LINK_INFO 0xC9 // Skyhawk only
105 #define OPCODE_COMMON_SET_RECONFIG_LINK_INFO 0xCA // Skyhawk only
106 #define OPCODE_COMMON_SET_DUMP_LOCATION 0xB8 // Lancer Only
110 #define MBOX_SUBSYSTEM_COMMON_ISCSI 0x02
113 #define OPCODE_COMMON_ISCSI_SET_TCP_PARAMETERS 0x48
114 #define OPCODE_COMMON_ISCSI_CONNECTION_UPDATE 0x49
115 #define OPCODE_COMMON_ISCSI_GET_CONNECTION_INFO 0x4a
118 #define MBOX_SUBSYSTEM_DMTF 0x11
121 #define OPCODE_DMTF_EXEC_CLP_CMD 0x01
123 #define MBOX_ENTRY_LENGTH 256
135 unsigned buffer_length:24;
147 uint32_t payload[63];
153 uint32_t payload[63];
165 unsigned pcmd_count:5;
195 uint32_t first_hw_revision;
199 uint32_t fc_ph_low:8,
202 feature_level_high:8;
205 char first_fw_name[16];
207 char second_fw_name[16];
209 uint32_t available_length:24,
304 typedef struct sli4_req_hdr_s {
314 typedef struct sli4_run_biu_diag_hdr_s {
321 typedef struct sli4_res_hdr_s {
328 uint32_t response_length;
332 typedef struct mbox_req_fcoe_set_link_diag_state_s {
344 typedef struct mbox_res_fcoe_set_link_diag_state_s {
348 typedef struct mbox_req_run_biu_diag_s {
350 uint32_t tx_buf_len:24,
354 uint32_t rx_buf_len:24,
360 typedef struct mbox_req_fcoe_set_dport_mode_s {
366 uint32_t link_number:6,
369 pre_defined_pattern:16;
370 uint32_t frame_size:16,
376 typedef struct mbox_res_fcoe_set_dport_mode_s {
383 typedef struct mbox_req_fcoe_get_dport_results_s {
385 uint32_t link_number:6,
391 typedef struct fcoe_test_result_descriptor_s {
392 uint32_t test_phase_result:8,
400 typedef struct mbox_res_fcoe_get_dport_results_s {
402 uint32_t overall_test_result:8,
422 uint32_t hard_alpa:8,
434 uint32_t subsystem:8;
445 uint32_t additional_status:8;
459 #define MGMT_FLASHROM_OPCODE_FLASH 0x1
460 #define MGMT_FLASHROM_OPCODE_SAVE 0x2
461 #define MGMT_FLASHROM_OPCODE_CLEAR 0x3
462 #define MGMT_FLASHROM_OPCODE_REPORT 0x4
463 #define MGMT_FLASHROM_OPCODE_IMAGE_INFO 0x5
464 #define MGMT_FLASHROM_OPCODE_IMAGE_CRC 0x6
465 #define MGMT_FLASHROM_OPCODE_OFFSET_BASED_FLASH 0x7
466 #define MGMT_FLASHROM_OPCODE_OFFSET_BASED_SAVE 0x8
468 #define MGMT_FLASHROM_OPTYPE_CODE_FIRMWARE 0x0
469 #define MGMT_FLASHROM_OPTYPE_CODE_REDBOOT 0x1
470 #define MGMT_FLASHROM_OPTYPE_CODE_BIOS 0x2
471 #define MGMT_FLASHROM_OPTYPE_CODE_PXE_BIOS 0x3
472 #define MGMT_FLASHROM_OPTYPE_CODE_CTRLS 0x4
473 #define MGMT_FLASHROM_OPTYPE_CFG_IPSEC 0x5
474 #define MGMT_FLASHROM_OPTYPE_CFG_INI 0x6
475 #define MGMT_FLASHROM_OPTYPE_ROM_OFFSET_SPECIFIED 0x7
476 #define MGMT_FLASHROM_OPTYPE_CODE_FCOE_BIOS 0x8
477 #define MGMT_FLASHROM_OPTYPE_CODE_iSCSI_FW_BACKUP 0x9
478 #define MGMT_FLASHROM_OPTYPE_CODE_FCOE_FW_ACTIVE 0xa
479 #define MGMT_FLASHROM_OPTYPE_CODE_FCOE_FW_BACKUP 0xb
480 #define MGMT_FLASHROM_OPTYPE_CODE_CTRLP 0xc
481 #define MGMT_FLASHROM_OPTYPE_CODE_NCSI_FW 0xd
484 uint32_t data_buffer[0];
494 uint32_t clear_log:8;
495 uint32_t num_pages:8;
496 uint32_t page_offset:16;
497 uint64_t buffer_addr[27];
513 #define FAT_OPERATION_RETRIEVE 0x0
514 #define FAT_OPERATION_QUERY 0x1
515 #define FAT_OPERATION_CLEAR 0x2
516 #define FAT_OPERATION_TRIGGER 0x3
520 uint32_t data_buffer[0];
524 uint32_t read_log_length;
527 uint32_t data_buffer[0];
535 uint32_t sybsystem:8;
543 uint32_t reserved:24;
545 uint32_t desired_read_length:24;
550 #define OBJECT_NAME_LENGTH 26
560 uint32_t sybsystem:8;
564 uint32_t additional_status:8;
579 uint32_t subsystem:8;
587 uint32_t reserved:24;
589 uint32_t desired_write_length:24;
606 uint32_t sybsystem:8;
610 uint32_t additional_status:8;
616 uint32_t change_status:8,
623 uint32_t subsystem:8;
631 uint32_t reserved:24;
632 uint32_t buffer_length:24,
644 uint32_t subsystem:8;
652 uint32_t reserved:24;
653 uint32_t buffer_length:24,
660 uint32_t sybsystem:8;
668 uint32_t reserved:24;
670 uint32_t descriptor_count:16;
671 uint32_t descriptor_offset:16;
685 uint32_t sybsystem:8;
689 uint32_t additional_status:8;
694 uint32_t actual_descriptor_count:16;
700 uint32_t object_handle:24;
703 #define OFT_NORMAL_OBJECT 0
704 #define OFT_DIRECTORY_OBJECT 1
705 #define OFT_LINKED_OBJECT 2
708 #define OBJECT_BASE_NAME_LENGTH 6
709 #define REV_NAME_LENGTH 32
717 uint32_t sybsystem:8;
725 uint32_t reserved:24;
737 uint32_t sybsystem:8;
741 uint32_t additional_status:8;
749 #define MBOX_MAX_BUFFER (1024)
754 uint32_t port_mask:16;
760 uint8_t module_str[32];
763 ext_fat_mode_t mode_trace_level[1];
769 uint32_t logging_type:8;
770 uint32_t max_logging_functions:8;
771 uint32_t max_logging_ports:8;
774 #define LOG_MODE_UART_MASK (1U << 0)
775 #define LOG_MODE_RAM_MASK (1U << 1)
776 #define LOG_MODE_NVRAM_MASK (1U << 2)
777 #define LOG_MODE_NWTK_MASK (1U << 3)
788 #define EXT_FAT_PARAM_TYPE_DEFAULT 0x0
789 #define EXT_FAT_PARAM_TYPE_CURRENT 0x1
815 uint8_t str_data[16];
834 #define EXT_FAT_RETRIEVE_MODE_VRAM 0x0
835 #define EXT_FAT_RETRIEVE_MODE_NVRAM 0x1
841 uint32_t num_log_entries;
850 uint8_t table_data[0];
873 #define ISCSI_UPDATE_DELAYED_ACK_TIMER 0x01
874 #define ISCSI_UPDATE_ACK_FREQUENCY 0x04
887 uint32_t connection_id:16;
890 #define ISCSI_UPDATE_TCP_WINDOW 0x01
904 uint32_t source_ip_address[6];
905 uint32_t dest_ip_address[6];
906 uint32_t source_port : 16,
910 uint32_t window_scale_shift_count : 8,
938 uint32_t response_length;
952 typedef struct sli4_sge_s {
955 uint32_t data_offset:27,
971 uint32_t valid_fields;
973 uint32_t session_count:16,
977 uint8_t iscsi_mac_address[6];
987 uint32_t resource_type:8,
1007 typedef struct sli4_res_common_get_cntl_attributes_s {
1009 uint8_t version_str[32];
1010 uint8_t manufacturer_name[32];
1017 uint8_t ncsi_version_string[12];
1019 uint8_t controller_model_number[32];
1020 uint8_t controller_description[64];
1021 uint8_t controller_serial_number[32];
1022 uint8_t ip_version_string[32];
1023 uint8_t firmware_version_string[32];
1024 uint8_t bios_version_string[32];
1025 uint8_t redboot_version_string[32];
1026 uint8_t driver_version_string[32];
1027 uint8_t fw_on_flash_version_string[32];
1031 uint8_t generational_guid[16];
1041 uint32_t hba_mtu[8];
1044 uint8_t future_u8[2];
1045 uint32_t future_u32[3];
1057 uint32_t future2_u32[4];
1060 typedef struct sli4_req_common_get_iface_mac_list_s {
1062 uint32_t mac_type:8,
1063 permanent_override:8,
1068 typedef struct sli4_res_common_get_iface_mac_list_s {
1074 uint32_t num_tpo_mac:8,
1078 uint32_t po_mac_address[64];
1081 typedef struct sli4_req_common_get_function_config_s {
1085 typedef struct sli4_res_common_get_function_config_s {
1091 typedef struct sli4_req_common_get_profile_config_s {
1093 uint32_t profile_id:8,
1099 typedef struct sli4_res_common_get_profile_config_s {
1105 typedef struct sli4_req_common_set_profile_config_s {
1107 uint32_t profile_id:8,
1114 typedef struct sli4_res_common_set_profile_config_s {
1118 #define MAX_DESCRIPTION 128*4
1119 typedef struct sli4_profile_descriptor_s {
1120 uint32_t profile_id:8,
1127 typedef struct sli4_req_common_get_profile_list_s {
1129 uint32_t start_profile_index:8,
1133 typedef struct sli4_res_common_get_profile_list_s {
1139 typedef struct sli4_req_common_get_active_profile_s {
1143 typedef struct sli4_res_common_get_active_profile_s {
1145 uint32_t active_profile_id:8,
1151 typedef struct sli4_req_common_set_active_profile_s {
1153 uint32_t active_profile_id:8,
1158 typedef struct sli4_res_common_set_active_profile_s {
1179 uint32_t session_count:16,
1182 uint8_t mac_address[6];
1200 uint32_t vf_number:8,
1204 uint16_t unicast_count;
1205 uint8_t mac_address[6];
1221 uint32_t vf_number:8,
1225 uint16_t unicast_count;
1226 uint8_t mac_address[6];
1239 uint32_t vf_number:8,
1246 uint8_t mac_addr[6];
1272 uint32_t link_config_id:8,
1274 uint32_t config_description[8];
1277 #define MAX_LINK_CONFIG_DESCRIPTORS 10
1284 uint32_t active_link_config_id:8,
1286 next_link_config_id:8,
1288 uint32_t link_config_desc_count;
1294 uint32_t next_link_config_id:8,
1302 #endif // __ELXU_SLI4_H__
uint16_t pci_sub_system_id
uint32_t connection_handle
uint32_t total_exchanges_responder
uint32_t buffer_address_low
uint32_t macid_mac_address0
uint32_t advertised_transmit_buffer_to_buffer_credit
uint32_t uint32_t timeout
uint32_t default_extended_timeout
#define MAX_LINK_CONFIG_DESCRIPTORS
uint32_t total_exchanges_originator
uint16_t pci_sub_vendor_id
uint32_t actual_vpd_length
uint32_t clp_detailed_status
uint32_t round_trip_latency
uint32_t fec_uncorrectable_blocks_count
uint32_t buffer_address_high
uint8_t iscsi_ver_min_max
uint32_t actual_response_length
uint32_t firmware_post_status
mbox_ext_fat_read_string_params_t stringtbl
uint32_t arbitration_timeout_count
uint16_t buffers_required
uint32_t invalid_transmission_word_error_count
ext_fat_config_params_t config
uint32_t second_hw_revision
uint32_t link_failure_error_count
uint32_t actual_response_length
uint32_t loss_of_signal_error_count
uint32_t cmd_buf_addr_low
uint32_t device_buffer_descriptor_count
uint32_t received_soff_count
uint32_t receive_frame_count
uint32_t advertised_receive_buffer_to_buffer_credit
uint8_t multifunction_device
uint32_t functionalities_supported
uint32_t actual_write_length
uint32_t received_eofdti_count
uint32_t user_defined_payload
uint32_t uint32_t physical_address_low
uint32_t num_returned_bytes
ext_fat_config_params_t config
uint32_t dropped_frames_due_to_no_xri_count
uint32_t empty_rq_timeout_count
uint32_t receive_p_bsy_count
uint32_t third_hw_revision
#define OBJECT_NAME_LENGTH
uint32_t receive_sequence_count
uint32_t actual_read_length
uint32_t receive_kbyte_count
uint32_t num_remaining_bytes
uint32_t empty_xri_pool_count
uint32_t dropped_frames_due_to_no_rq_buffer_count
uint32_t transmit_frame_count
uint32_t cmd_buf_addr_high
uint8_t pci_function_number
uint32_t actual_response_length
uint32_t received_dropped_no_available_xri_resources_count
#define OBJECT_BASE_NAME_LENGTH
uint32_t actual_response_length
uint32_t resp_buf_addr_low
uint32_t resp_buf_addr_high
uint32_t interface_handle
uint32_t primitive_sequence_error_count
uint32_t window_reduction
mbox_common_read_flashrom_t mbox_common_write_flashrom_t
uint32_t primitive_sequence_event_timeout_count
uint32_t resource_descriptor_count
uint32_t resource_descriptor_count
uint32_t trace_table_index
uint32_t device_buffer_descriptor_count
uint32_t received_eofa_count
uint32_t flashrom_access_op_type
uint32_t elastic_buffer_overrun_error_count
uint8_t max_domains_supported
uint32_t fec_corrected_blocks_count
uint64_t unique_identifier
uint32_t buffer_address_low
uint32_t device_buffer_descriptor_count
sli4_run_biu_diag_hdr_t hdr
uint8_t seeprom_version_lo
uint32_t flashrom_access_op_code
uint32_t actual_response_length
uint32_t transmit_sequence_count
uint32_t buffer_address_high
uint32_t transmit_kbyte_count
uint32_t bytes_transferred
uint32_t current_transmit_buffer_to_buffer_credit
uint32_t returned_vpd_length
uint32_t ep_fw_data_struct_version
uint32_t ioctl_data_struct_version
uint32_t received_eofni_count
uint32_t data_buffer_size
uint32_t loss_of_sync_error_count
uint32_t physical_address_high
uint32_t current_receive_buffer_to_buffer_credit
uint32_t data_buffer_size
uint32_t actual_response_length
uint8_t pci_device_number
uint8_t seeprom_version_hi
uint32_t received_dropped_no_aer_count
uint32_t macid_mac_address1
uint32_t received_dropped_no_available_rpi_resources_count
uint32_t delayed_ack_timer
uint16_t default_link_down_timeout
uint32_t receive_f_bsy_count