43 #define SLI_PAGE_SIZE (4096)
44 #define SLI_SUB_PAGE_MASK (SLI_PAGE_SIZE - 1)
45 #define SLI_PAGE_SHIFT 12
46 #define SLI_ROUND_PAGE(b) (((b) + SLI_SUB_PAGE_MASK) & ~SLI_SUB_PAGE_MASK)
47 #define SLI_PAGE_COUNT(b) (((b) + SLI_SUB_PAGE_MASK) >> SLI_PAGE_SHIFT)
54 #define PCICFG_MEMBAR_CTRL_INT_CTRL_OFFSET 0xfc
62 #define MEMBAR_CTRL_INT_CTRL_HOSTINTR_MASK (1 << 29)
68 #define SLI4_PCI_CLASS_REVISION 0x0008
69 #define SLI4_PCI_REV_ID_SHIFT 0
70 #define SLI4_PCI_REV_ID_MASK 0xff
71 #define SLI4_PCI_CLASS_SHIFT 8
72 #define SLI4_PCI_CLASS_MASK 0xfff
74 #define SLI4_PCI_SOFT_RESET_CSR 0x005c
75 #define SLI4_PCI_SOFT_RESET_MASK 0x0080
81 #define SLI4_INTF_REG 0x0058
82 #define SLI4_INTF_VALID_SHIFT 29
83 #define SLI4_INTF_VALID_MASK 0x7
84 #define SLI4_INTF_VALID 0x6
85 #define SLI4_INTF_IF_TYPE_SHIFT 12
86 #define SLI4_INTF_IF_TYPE_MASK 0xf
87 #define SLI4_INTF_SLI_FAMILY_SHIFT 8
88 #define SLI4_INTF_SLI_FAMILY_MASK 0xf
89 #define SLI4_INTF_SLI_REVISION_SHIFT 4
90 #define SLI4_INTF_SLI_REVISION_MASK 0xf
92 #define SLI4_IF_TYPE_BE3_SKH_PF 0
93 #define SLI4_IF_TYPE_BE3_SKH_VF 1
94 #define SLI4_IF_TYPE_LANCER_FC_ETH 2
95 #define SLI4_IF_TYPE_LANCER_RDMA 3
96 #define SLI4_MAX_IF_TYPES 4
101 #define SLI4_ASIC_ID_REG 0x009c
102 #define SLI4_ASIC_REV_SHIFT 0
103 #define SLI4_ASIC_REV_MASK 0xf
104 #define SLI4_ASIC_VER_SHIFT 4
105 #define SLI4_ASIC_VER_MASK 0xf
106 #define SLI4_ASIC_GEN_SHIFT 8
107 #define SLI4_ASIC_GEN_MASK 0xff
108 #define SLI4_ASIC_GEN_BE2 0x00
109 #define SLI4_ASIC_GEN_BE3 0x03
110 #define SLI4_ASIC_GEN_SKYHAWK 0x04
115 #define SLI4_BMBX_REG 0x0160
116 #define SLI4_BMBX_MASK_HI 0x3
117 #define SLI4_BMBX_MASK_LO 0xf
118 #define SLI4_BMBX_RDY BIT(0)
119 #define SLI4_BMBX_HI BIT(1)
121 #define SLI4_BMBX_WRITE_HI(r) \
122 ((ocs_addr32_hi(r) & ~SLI4_BMBX_MASK_HI) | SLI4_BMBX_HI)
124 #define SLI4_BMBX_WRITE_LO(r) \
125 (((ocs_addr32_hi(r) & SLI4_BMBX_MASK_HI) << 30) | \
126 (((r) & ~SLI4_BMBX_MASK_LO) >> 2))
128 #define SLI4_BMBX_SIZE 256
133 #define SLI4_EQCQ_DOORBELL_REG 0x120
134 #define SLI4_EQCQ_DOORBELL_CI BIT(9)
135 #define SLI4_EQCQ_DOORBELL_QT BIT(10)
136 #define SLI4_EQCQ_DOORBELL_ARM BIT(29)
137 #define SLI4_EQCQ_DOORBELL_SE BIT(31)
138 #define SLI4_EQCQ_NUM_SHIFT 16
139 #define SLI4_EQCQ_NUM_MASK 0x01ff
140 #define SLI4_EQCQ_EQ_ID_MASK 0x3fff
141 #define SLI4_EQCQ_CQ_ID_MASK 0x7fff
142 #define SLI4_EQCQ_EQ_ID_MASK_LO 0x01ff
143 #define SLI4_EQCQ_CQ_ID_MASK_LO 0x03ff
144 #define SLI4_EQCQ_EQCQ_ID_MASK_HI 0xf800
149 #define SLI4_SLIPORT_CONTROL_REG 0x0408
150 #define SLI4_SLIPORT_CONTROL_END BIT(30)
151 #define SLI4_SLIPORT_CONTROL_LITTLE_ENDIAN (0)
152 #define SLI4_SLIPORT_CONTROL_BIG_ENDIAN BIT(30)
153 #define SLI4_SLIPORT_CONTROL_IP BIT(27)
154 #define SLI4_SLIPORT_CONTROL_IDIS BIT(22)
159 #define SLI4_SLIPORT_ERROR1 0x040c
164 #define SLI4_SLIPORT_ERROR2 0x0410
167 #define SLI4_IF6_DPP_DOORBELL_REG_SET 2
175 #if BYTE_ORDER == LITTLE_ENDIAN
185 } * eq_doorbell = (
void *)®
187 #error big endian version not defined
192 eq_doorbell->eq_id_hi = (
id >> 9) & 0x1f;
193 eq_doorbell->number_popped = n_popped;
194 eq_doorbell->arm = arm;
195 eq_doorbell->ci = TRUE;
205 #if BYTE_ORDER == LITTLE_ENDIAN
207 uint32_t cq_id_lo:10,
214 } * cq_doorbell = (
void *)®
216 #error big endian version not defined
221 cq_doorbell->cq_id_hi = (
id >> 10) & 0x1f;
222 cq_doorbell->number_popped = n_popped;
223 cq_doorbell->arm = arm;
230 #define SLI4_ONLINE0_REG 0xB0
231 #define SLI4_ONLINE1_REG 0xB4
235 #define SLI4_UERR_STATUS_LOW_REG 0xA0
236 #define SLI4_UERR_STATUS_HIGH_REG 0xA4
237 #define SLI4_UERR_MASK_LOW_REG 0xA8
238 #define SLI4_UERR_MASK_HIGH_REG 0xAC
243 #define SLI4_MQ_DOORBELL_REG 0x0140
244 #define SLI4_MQ_DOORBELL_NUM_SHIFT 16
245 #define SLI4_MQ_DOORBELL_NUM_MASK 0x3fff
246 #define SLI4_MQ_DOORBELL_ID_MASK 0xffff
247 #define SLI4_MQ_DOORBELL(n, i) \
248 ((((n) & SLI4_MQ_DOORBELL_NUM_MASK) << SLI4_MQ_DOORBELL_NUM_SHIFT) | \
249 ((i) & SLI4_MQ_DOORBELL_ID_MASK))
254 #define SLI4_RQ_DOORBELL_REG 0x0a0
255 #define SLI4_RQ_DOORBELL_NUM_SHIFT 16
256 #define SLI4_RQ_DOORBELL_NUM_MASK 0x3fff
257 #define SLI4_RQ_DOORBELL_ID_MASK 0xffff
258 #define SLI4_RQ_DOORBELL(n, i) \
259 ((((n) & SLI4_RQ_DOORBELL_NUM_MASK) << SLI4_RQ_DOORBELL_NUM_SHIFT) | \
260 ((i) & SLI4_RQ_DOORBELL_ID_MASK))
265 #define SLI4_IO_WQ_DOORBELL_REG 0x040
266 #define SLI4_WQ_DOORBELL_IDX_SHIFT 16
267 #define SLI4_WQ_DOORBELL_IDX_MASK 0x00ff
268 #define SLI4_WQ_DOORBELL_NUM_SHIFT 24
269 #define SLI4_WQ_DOORBELL_NUM_MASK 0x00ff
270 #define SLI4_WQ_DOORBELL_ID_MASK 0xffff
271 #define SLI4_WQ_DOORBELL(n, x, i) \
272 ((((n) & SLI4_WQ_DOORBELL_NUM_MASK) << SLI4_WQ_DOORBELL_NUM_SHIFT) | \
273 (((x) & SLI4_WQ_DOORBELL_IDX_MASK) << SLI4_WQ_DOORBELL_IDX_SHIFT) | \
274 ((i) & SLI4_WQ_DOORBELL_ID_MASK))
286 #define SLI4_PORT_SEMAPHORE_REG_01 0xAC
288 #define SLI4_PORT_SEMAPHORE_REG_23 0x0400
290 #define SLI4_PORT_SEMAPHORE_PORT_MASK 0x0000ffff
291 #define SLI4_PORT_SEMAPHORE_PORT(r) \
292 ((r) & SLI4_PORT_SEMAPHORE_PORT_MASK)
294 #define SLI4_PORT_SEMAPHORE_HOST_MASK 0x00ff0000
295 #define SLI4_PORT_SEMAPHORE_HOST_SHIFT 16
296 #define SLI4_PORT_SEMAPHORE_HOST(r) \
297 (((r) & SLI4_PORT_SEMAPHORE_HOST_MASK) >> \
298 SLI4_PORT_SEMAPHORE_HOST_SHIFT)
301 #define SLI4_PORT_SEMAPHORE_SCR2 BIT(26)
302 #define SLI4_PORT_SEMAPHORE_SCR1 BIT(27)
305 #define SLI4_PORT_SEMAPHORE_IPC BIT(28)
308 #define SLI4_PORT_SEMAPHORE_NIP BIT(29)
311 #define SLI4_PORT_SEMAPHORE_SFI BIT(30)
314 #define SLI4_PORT_SEMAPHORE_PERR BIT(31)
316 #define SLI4_PORT_SEMAPHORE_STATUS_POST_READY 0xc000
317 #define SLI4_PORT_SEMAPHORE_STATUS_UNRECOV_ERR 0xf000
318 #define SLI4_PORT_SEMAPHORE_STATUS_ERR_MASK 0xf000
320 #define SLI4_PORT_SEMAPHORE_IN_ERR(r) \
321 (SLI4_PORT_SEMAPHORE_STATUS_UNRECOV_ERR == ((r) & \
322 SLI4_PORT_SEMAPHORE_STATUS_ERR_MASK))
329 #define SLI4_PORT_STATUS_REG_23 0x0404
330 #define SLI4_PORT_STATUS_RDY BIT(23)
331 #define SLI4_PORT_STATUS_RN BIT(24)
332 #define SLI4_PORT_STATUS_OTI BIT(29)
333 #define SLI4_PORT_STATUS_END BIT(30)
334 #define SLI4_PORT_STATUS_ERR BIT(31)
335 #define SLI4_PORT_STATUS_READY(r) ((r) & SLI4_PORT_STATUS_RDY)
336 #define SLI4_PORT_STATUS_ERROR(r) ((r) & SLI4_PORT_STATUS_ERR)
343 #define SLI4_MBOX_STATUS_SUCCESS 0x0000
344 #define SLI4_MBOX_STATUS_FAILURE 0x0001
349 typedef struct sli4_bde_s {
350 #if BYTE_ORDER == LITTLE_ENDIAN
351 uint32_t buffer_length:24,
368 #error big endian version not defined
372 #define SLI4_BDE_TYPE_BDE_64 0x00
373 #define SLI4_BDE_TYPE_BDE_IMM 0x01
374 #define SLI4_BDE_TYPE_BLP 0x40
379 typedef struct sli4_sge_s {
380 #if BYTE_ORDER == LITTLE_ENDIAN
383 uint32_t data_offset:27,
388 #error big endian version not defined
392 typedef struct sli4_chain_sge_s {
393 #if BYTE_ORDER == LITTLE_ENDIAN
402 #error big endian version not defined
406 #define SLI4_ISCSI_SGL_CRA_32(__idx__, __frag__, __off__) \
407 (0x20000000 | ((__idx__) << 9) | ((__frag__) << 4) | (__off__))
409 #define SLI4_ISCSI_SGL_CRA_256(__idx__, __frag__, __off__) \
410 (0x20000000 | ((__idx__) << 12) | ((__frag__) << 4) | (__off__))
415 typedef struct sli4_diseed_sge_s {
416 #if BYTE_ORDER == LITTLE_ENDIAN
426 uint32_t app_tag_cmp:16,
436 #error big endian version not defined
443 typedef struct sli4_dif_sge_s {
444 #if BYTE_ORDER == LITTLE_ENDIAN
452 #error big endian version not defined
456 #define SLI4_SGE_MAX_RESERVED 3
458 #define SLI4_SGE_DIF_OP_IN_NODIF_OUT_CRC 0x00
459 #define SLI4_SGE_DIF_OP_IN_CRC_OUT_NODIF 0x01
460 #define SLI4_SGE_DIF_OP_IN_NODIF_OUT_CHKSUM 0x02
461 #define SLI4_SGE_DIF_OP_IN_CHKSUM_OUT_NODIF 0x03
462 #define SLI4_SGE_DIF_OP_IN_CRC_OUT_CRC 0x04
463 #define SLI4_SGE_DIF_OP_IN_CHKSUM_OUT_CHKSUM 0x05
464 #define SLI4_SGE_DIF_OP_IN_CRC_OUT_CHKSUM 0x06
465 #define SLI4_SGE_DIF_OP_IN_CHKSUM_OUT_CRC 0x07
467 #define SLI4_SGE_TYPE_DATA 0x00
468 #define SLI4_SGE_TYPE_CHAIN 0x03
469 #define SLI4_SGE_TYPE_DIF 0x04
470 #define SLI4_SGE_TYPE_DISEED 0x08
471 #define SLI4_SGE_TYPE_SKIP 0x0c
494 #define SLI4_CFG_STATUS_SUCCESS 0x00
495 #define SLI4_CFG_STATUS_FAILED 0x01
496 #define SLI4_CFG_STATUS_ILLEGAL_REQUEST 0x02
497 #define SLI4_CFG_STATUS_ILLEGAL_FIELD 0x03
499 #define SLI4_MGMT_STATUS_FLASHROM_READ_FAILED 0xcb
501 #define SLI4_CFG_ADD_STATUS_NO_STATUS 0x00
502 #define SLI4_CFG_ADD_STATUS_INVALID_OPCODE 0x1e
507 #define SLI4_SUBSYSTEM_COMMON 0x01
508 #define SLI4_SUBSYSTEM_COMMON_ISCSI 0x02
509 #define SLI4_SUBSYSTEM_ISCSI_INI 0x06
510 #define SLI4_SUBSYSTEM_ISCSI_TGT 0x07
515 #define SLI4_OPC_COMMON_GET_CNTL_ATTRIBUTES 0x20
516 #define SLI4_OPC_COMMON_GET_FW_VERSION 0x23
517 #define SLI4_OPC_COMMON_QUERY_FW_CONFIG 0x3a
518 #define SLI4_OPC_COMMON_FUNCTION_RESET 0x3d
519 #define SLI4_OPC_COMMON_SET_PHYSICAL_LINK_CONFIG 0x3e
520 #define SLI4_OPC_COMMON_CREATE_CQ 0x0c
521 #define SLI4_OPC_COMMON_DESTROY_CQ 0x36
522 #define SLI4_OPC_COMMON_CREATE_EQ 0x0d
523 #define SLI4_OPC_COMMON_DESTROY_EQ 0x37
524 #define SLI4_OPC_COMMON_MODIFY_EQ_DELAY 0x29
525 #define SLI4_OPC_COMMON_CREATE_MQ_EXT 0x5a
526 #define SLI4_OPC_COMMON_DESTROY_MQ 0x35
527 #define SLI4_OPC_COMMON_TCP_UPLOAD 0x38
528 #define SLI4_OPC_COMMON_NOP 0x21
529 #define SLI4_OPC_COMMON_WRITE_FLASHROM 0x07
530 #define SLI4_OPC_COMMON_MANAGE_FAT 0x44
531 #define SLI4_OPC_COMMON_READ_TRANSCEIVER_DATA 0x49
532 #define SLI4_OPC_COMMON_GET_BE_CONFIGURATION_AND_RESOURCES 0x51
533 #define SLI4_OPC_COMMON_SET_BE_CONFIGURATION_AND_RESOURCES 0x52
534 #define SLI4_OPC_COMMON_GET_VPD_DATA 0x5b
535 #define SLI4_OPC_COMMON_GET_CNTL_ADDL_ATTRIBUTES 0x79
536 #define SLI4_OPC_COMMON_GET_EXT_FAT_CAPABILITIES 0x7d
537 #define SLI4_OPC_COMMON_SET_EXT_FAT_CAPABILITIES 0x7e
538 #define SLI4_OPC_COMMON_EXT_FAT_CONFIGURE_SNAPSHOT 0x7f
539 #define SLI4_OPC_COMMON_EXT_FAT_RETRIEVE_SNAPSHOT 0x80
540 #define SLI4_OPC_COMMON_EXT_FAT_READ_STRING_TABLE 0x82
541 #define SLI4_OPC_COMMON_GET_FUNCTION_CONFIG 0xa0
542 #define SLI4_OPC_COMMON_GET_PROFILE_CONFIG 0xa4
543 #define SLI4_OPC_COMMON_SET_PROFILE_CONFIG 0xa5
544 #define SLI4_OPC_COMMON_GET_PROFILE_LIST 0xa6
545 #define SLI4_OPC_COMMON_GET_ACTIVE_PROFILE 0xa7
546 #define SLI4_OPC_COMMON_SET_ACTIVE_PROFILE 0xa8
547 #define SLI4_OPC_COMMON_READ_OBJECT 0xab
548 #define SLI4_OPC_COMMON_WRITE_OBJECT 0xac
549 #define SLI4_OPC_COMMON_DELETE_OBJECT 0xae
550 #define SLI4_OPC_COMMON_READ_OBJECT_LIST 0xad
551 #define SLI4_OPC_COMMON_GET_SLI4_PARAMETERS 0xb5
552 #define SLI4_OPC_COMMON_SET_FEATURES 0xbf
553 #define SLI4_OPC_COMMON_GET_RECONFIG_LINK_INFO 0xc9
554 #define SLI4_OPC_COMMON_SET_RECONFIG_LINK_ID 0xca
558 #define SLI4_OPC_COMMON_ISCSI_SET_TCP_PARAMETERS 0x48
559 #define SLI4_OPC_COMMON_ISCSI_GET_CONNECTION_INFO 0x4a
564 typedef struct sli4_mqe_hdr_s {
565 #if BYTE_ORDER == LITTLE_ENDIAN
575 #error big endian version not defined
582 typedef struct sli4_req_hdr_s {
583 #if BYTE_ORDER == LITTLE_ENDIAN
593 #error big endian version not defined
600 typedef struct sli4_res_hdr_s {
601 #if BYTE_ORDER == LITTLE_ENDIAN
609 uint32_t response_length;
612 #error big endian version not defined
623 typedef struct sli4_req_common_function_reset_s {
628 typedef struct sli4_res_common_function_reset_s {
637 typedef struct sli4_req_common_get_cntl_attributes_s {
642 typedef struct sli4_res_common_get_cntl_attributes_s {
644 uint8_t version_str[32];
645 uint8_t manufacturer_name[32];
652 uint8_t ncsi_version_string[12];
654 uint8_t controller_model_number[32];
655 uint8_t controller_description[64];
656 uint8_t controller_serial_number[32];
657 uint8_t ip_version_string[32];
658 uint8_t firmware_version_string[32];
659 uint8_t bios_version_string[32];
660 uint8_t redboot_version_string[32];
661 uint8_t driver_version_string[32];
662 uint8_t fw_on_flash_version_string[32];
666 uint8_t generational_guid[16];
679 uint8_t future_u8[2];
680 uint32_t future_u32[3];
692 uint32_t future2_u32[4];
700 typedef struct sli4_req_common_get_cntl_addl_attributes_s {
705 typedef struct sli4_res_common_get_cntl_addl_attributes_s {
714 char fcoe_universal_bios_version[32];
715 char fcoe_x86_bios_version[32];
716 char fcoe_efi_bios_version[32];
717 char fcoe_fcode_version[32];
718 char uefi_bios_version[32];
719 char uefi_nic_version[32];
720 char uefi_fcode_version[32];
721 char uefi_iscsi_version[32];
722 char iscsi_x86_bios_version[32];
723 char pxe_x86_bios_version[32];
724 uint8_t fcoe_default_wwpn[8];
725 uint8_t ext_phy_version[32];
726 uint8_t fc_universal_bios_version[32];
727 uint8_t fc_x86_bios_version[32];
728 uint8_t fc_efi_bios_version[32];
729 uint8_t fc_fcode_version[32];
730 uint8_t ext_phy_crc_label[8];
731 uint8_t ipl_file_name[16];
740 typedef struct sli4_req_common_get_fw_version_s {
744 typedef struct sli4_res_common_get_fw_version_s {
747 uint8_t flash_fw_ver[32];
756 typedef struct sli4_req_common_query_fw_config_s {
761 #define SLI4_FUNCTION_MODE_ISCSI_INI_MODE 0x10
762 #define SLI4_FUNCTION_MODE_ISCSI_TGT_MODE 0x20
763 #define SLI4_FUNCTION_MODE_DUA_MODE 0x800
765 #define SLI4_ULP_MODE_ISCSI_INI 0x10
766 #define SLI4_ULP_MODE_ISCSI_TGT 0x20
768 typedef struct sli4_res_common_query_fw_config_s {
816 typedef struct sli4_req_common_modify_eq_delay_s {
818 #if BYTE_ORDER == LITTLE_ENDIAN
824 } eq_delay_record[8];
826 #error big endian version not defined
835 typedef struct sli4_req_common_create_cq_v0_s {
837 #if BYTE_ORDER == LITTLE_ENDIAN
838 uint32_t num_pages:16,
859 } page_physical_address[4];
861 #error big endian version not defined
870 typedef struct sli4_req_common_create_cq_v2_s {
872 #if BYTE_ORDER == LITTLE_ENDIAN
873 uint32_t num_pages:16,
891 uint32_t cqe_count:16,
898 } page_physical_address[4];
900 #error big endian version not defined
907 #define SLI4_CQ_CNT_256 0
908 #define SLI4_CQ_CNT_512 1
909 #define SLI4_CQ_CNT_1024 2
914 typedef struct sli4_res_common_create_queue_s {
916 #if BYTE_ORDER == LITTLE_ENDIAN
923 #error big endian version not defined
930 typedef struct sli4_req_common_destroy_cq_s {
932 #if BYTE_ORDER == LITTLE_ENDIAN
936 #error big endian version not defined
945 typedef struct sli4_req_common_create_eq_s {
947 #if BYTE_ORDER == LITTLE_ENDIAN
948 uint32_t num_pages:16,
972 #error big endian version not defined
976 #define SLI4_EQ_CNT_256 0
977 #define SLI4_EQ_CNT_512 1
978 #define SLI4_EQ_CNT_1024 2
979 #define SLI4_EQ_CNT_2048 3
980 #define SLI4_EQ_CNT_4096 4
982 #define SLI4_EQE_SIZE_4 0
983 #define SLI4_EQE_SIZE_16 1
988 typedef struct sli4_req_common_destroy_eq_s {
990 #if BYTE_ORDER == LITTLE_ENDIAN
994 #error big endian version not defined
1003 typedef struct sli4_req_common_create_mq_ext_s {
1005 #if BYTE_ORDER == LITTLE_ENDIAN
1006 uint32_t num_pages:16,
1011 uint32_t async_cq_id_v1:16,
1027 } page_physical_address[8];
1029 #error big endian version not defined
1033 #define SLI4_MQE_SIZE_16 0x05
1034 #define SLI4_MQE_SIZE_32 0x06
1035 #define SLI4_MQE_SIZE_64 0x07
1036 #define SLI4_MQE_SIZE_128 0x08
1038 #define SLI4_ASYNC_EVT_LINK_STATE BIT(1)
1039 #define SLI4_ASYNC_EVT_FCOE_FIP BIT(2)
1040 #define SLI4_ASYNC_EVT_DCBX BIT(3)
1041 #define SLI4_ASYNC_EVT_ISCSI BIT(4)
1042 #define SLI4_ASYNC_EVT_GRP5 BIT(5)
1043 #define SLI4_ASYNC_EVT_FC BIT(16)
1044 #define SLI4_ASYNC_EVT_SLI_PORT BIT(17)
1045 #define SLI4_ASYNC_EVT_VF BIT(18)
1046 #define SLI4_ASYNC_EVT_MR BIT(19)
1048 #define SLI4_ASYNC_EVT_ALL \
1049 SLI4_ASYNC_EVT_LINK_STATE | \
1050 SLI4_ASYNC_EVT_FCOE_FIP | \
1051 SLI4_ASYNC_EVT_DCBX | \
1052 SLI4_ASYNC_EVT_ISCSI | \
1053 SLI4_ASYNC_EVT_GRP5 | \
1054 SLI4_ASYNC_EVT_FC | \
1055 SLI4_ASYNC_EVT_SLI_PORT | \
1056 SLI4_ASYNC_EVT_VF | \
1059 #define SLI4_ASYNC_EVT_ISCSI_EVENTS \
1060 SLI4_ASYNC_EVT_LINK_STATE | \
1061 SLI4_ASYNC_EVT_FCOE_FIP | \
1062 SLI4_ASYNC_EVT_GRP5 | \
1063 SLI4_ASYNC_EVT_ISCSI
1068 typedef struct sli4_req_common_destroy_mq_s {
1070 #if BYTE_ORDER == LITTLE_ENDIAN
1074 #error big endian version not defined
1081 typedef struct sli4_req_common_tcp_upload_s {
1083 #if BYTE_ORDER == LITTLE_ENDIAN
1089 #error big endian version not defined
1098 typedef struct sli4_req_common_nop_s {
1100 #if BYTE_ORDER == LITTLE_ENDIAN
1101 uint32_t context[2];
1103 #error big endian version not defined
1107 typedef struct sli4_res_common_nop_s {
1109 #if BYTE_ORDER == LITTLE_ENDIAN
1110 uint32_t context[2];
1112 #error big endian version not defined
1120 #define SFP_PAGE_DATA_BYTES 256
1122 typedef struct sli4_req_common_read_transceiver_data_s {
1124 #if BYTE_ORDER == LITTLE_ENDIAN
1128 #error big endian version not defined
1132 typedef struct sli4_res_common_read_transceiver_data_s {
1134 #if BYTE_ORDER == LITTLE_ENDIAN
1139 #error big endian version not defined
1148 typedef struct sli4_req_common_get_be_configuration_and_resources_s {
1150 #if BYTE_ORDER == LITTLE_ENDIAN
1153 #error big endian version not defined
1162 typedef struct sli4_req_common_set_be_configuration_and_resources_s {
1164 #if BYTE_ORDER == LITTLE_ENDIAN
1167 uint32_t resource_type:8,
1174 uint32_t valid_fields;
1176 uint32_t session_count:16,
1179 uint32_t cq_count:16,
1180 iscsi_mac_address_0:8,
1181 iscsi_mac_address_1:8;
1183 uint32_t iscsi_mac_address_2:8,
1184 iscsi_mac_address_3:8,
1185 iscsi_mac_address_4:8,
1186 iscsi_mac_address_5:8;
1188 uint32_t mcc_queue_count:8,
1192 #error big endian version not defined
1199 typedef struct sli4_req_common_write_flashrom_s {
1201 #if BYTE_ORDER == LITTLE_ENDIAN
1206 uint8_t data_buffer[4];
1208 #error big endian version not defined
1212 #define SLI4_MGMT_FLASHROM_OPCODE_FLASH 0x01
1213 #define SLI4_MGMT_FLASHROM_OPCODE_SAVE 0x02
1214 #define SLI4_MGMT_FLASHROM_OPCODE_CLEAR 0x03
1215 #define SLI4_MGMT_FLASHROM_OPCODE_REPORT 0x04
1216 #define SLI4_MGMT_FLASHROM_OPCODE_IMAGE_INFO 0x05
1217 #define SLI4_MGMT_FLASHROM_OPCODE_IMAGE_CRC 0x06
1218 #define SLI4_MGMT_FLASHROM_OPCODE_OFFSET_BASED_FLASH 0x07
1219 #define SLI4_MGMT_FLASHROM_OPCODE_OFFSET_BASED_SAVE 0x08
1220 #define SLI4_MGMT_PHY_FLASHROM_OPCODE_FLASH 0x09
1221 #define SLI4_MGMT_PHY_FLASHROM_OPCODE_SAVE 0x0a
1223 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_ISCSI 0x00
1224 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_REDBOOT 0x01
1225 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_BIOS 0x02
1226 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_PXE_BIOS 0x03
1227 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_CODE_CONTROL 0x04
1228 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_IPSEC_CFG 0x05
1229 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_INIT_DATA 0x06
1230 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_ROM_OFFSET 0x07
1231 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_FCOE_BIOS 0x08
1232 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_ISCSI_BAK 0x09
1233 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_FCOE_ACT 0x0a
1234 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_FCOE_BAK 0x0b
1235 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_CODE_CTRL_P 0x0c
1236 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_NCSI 0x0d
1237 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_NIC 0x0e
1238 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_DCBX 0x0f
1239 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_PXE_BIOS_CFG 0x10
1240 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_ALL_CFG_DATA 0x11
1245 typedef struct sli4_req_common_manage_fat_s {
1247 #if BYTE_ORDER == LITTLE_ENDIAN
1254 #error big endian version not defined
1261 typedef struct sli4_req_common_get_ext_fat_capabilities_s {
1263 #if BYTE_ORDER == LITTLE_ENDIAN
1266 #error big endian version not defined
1273 typedef struct sli4_req_common_set_ext_fat_capabilities_s {
1275 #if BYTE_ORDER == LITTLE_ENDIAN
1279 uint32_t logging_type:8,
1280 maximum_logging_functions:8,
1281 maximum_logging_ports:8,
1286 uint32_t debug_module[14];
1288 #error big endian version not defined
1295 typedef struct sli4_req_common_ext_fat_configure_snapshot_s {
1297 #if BYTE_ORDER == LITTLE_ENDIAN
1300 #error big endian version not defined
1307 typedef struct sli4_req_common_ext_fat_retrieve_snapshot_s {
1309 #if BYTE_ORDER == LITTLE_ENDIAN
1314 #error big endian version not defined
1318 typedef struct sli4_res_common_ext_fat_retrieve_snapshot_s {
1320 #if BYTE_ORDER == LITTLE_ENDIAN
1328 uint32_t module_mask[2];
1331 uint8_t string_data[16];
1334 #error big endian version not defined
1341 typedef struct sli4_req_common_ext_fat_read_string_table_s {
1343 #if BYTE_ORDER == LITTLE_ENDIAN
1347 #error big endian version not defined
1351 typedef struct sli4_res_common_ext_fat_read_string_table_s {
1353 #if BYTE_ORDER == LITTLE_ENDIAN
1358 uint32_t table_data0:8,
1361 uint8_t table_data[0];
1363 #error big endian version not defined
1370 typedef struct sli4_req_common_get_vpd_data_s {
1372 #if BYTE_ORDER == LITTLE_ENDIAN
1378 #error big endian version not defined
1386 #define SLI4_RESOURCE_DESCRIPTOR_TYPE_PCIE 0x50
1387 #define SLI4_RESOURCE_DESCRIPTOR_TYPE_NIC 0x51
1388 #define SLI4_RESOURCE_DESCRIPTOR_TYPE_ISCSI 0x52
1389 #define SLI4_RESOURCE_DESCRIPTOR_TYPE_FCFCOE 0x53
1390 #define SLI4_RESOURCE_DESCRIPTOR_TYPE_RDMA 0x54
1391 #define SLI4_RESOURCE_DESCRIPTOR_TYPE_PORT 0x55
1392 #define SLI4_RESOURCE_DESCRIPTOR_TYPE_ISAP 0x56
1394 #define SLI4_PORT_TYPE_NIC_TOE 0x01
1395 #define SLI4_PORT_TYPE_ISCSI 0x02
1396 #define SLI4_PORT_TYPE_FCOE 0x04
1397 #define SLI4_PORT_TYPE_NIC_TOE_RDMA 0x08
1398 #define SLI4_PORT_TYPE_FC 0x10
1399 #define SLI4_PORT_TYPE_DEFAULT 0xff
1401 typedef struct sli4_resource_descriptor_v1_s {
1402 uint32_t descriptor_type:8,
1403 descriptor_length:8,
1405 uint32_t type_specific[0];
1408 typedef struct sli4_pcie_resource_descriptor_v1_s {
1409 uint32_t descriptor_type:8,
1410 descriptor_length:8,
1418 uint32_t sriov_state:8,
1422 uint32_t number_of_vfs:16,
1424 uint32_t mission_roles:8,
1433 typedef struct sli4_isap_resource_descriptor_v1_s {
1434 uint32_t descriptor_type:8,
1435 descriptor_length:8,
1437 uint32_t iscsi_tgt:1,
1442 uint32_t fcoe_tgt:1,
1447 uint32_t mc_type0:8,
1457 typedef struct sli4_req_common_get_function_config_s {
1461 typedef struct sli4_res_common_get_function_config_s {
1463 #if BYTE_ORDER == LITTLE_ENDIAN
1467 #error big endian version not defined
1474 typedef struct sli4_req_common_get_profile_config_s {
1476 uint32_t profile_id:8,
1481 typedef struct sli4_res_common_get_profile_config_s {
1483 #if BYTE_ORDER == LITTLE_ENDIAN
1487 #error big endian version not defined
1494 typedef struct sli4_req_common_set_profile_config_s {
1496 uint32_t profile_id:8,
1503 typedef struct sli4_res_common_set_profile_config_s {
1505 #if BYTE_ORDER == LITTLE_ENDIAN
1507 #error big endian version not defined
1516 typedef struct sli4_profile_descriptor_s {
1517 #if BYTE_ORDER == LITTLE_ENDIAN
1518 uint32_t profile_id:8,
1522 uint32_t profile_description[128];
1524 #error big endian version not defined
1532 #define MAX_PRODUCT_DESCRIPTORS 40
1537 typedef struct sli4_req_common_get_profile_list_s {
1539 #if BYTE_ORDER == LITTLE_ENDIAN
1540 uint32_t start_profile_index:8,
1543 #error big endian version not defined
1547 typedef struct sli4_res_common_get_profile_list_s {
1549 #if BYTE_ORDER == LITTLE_ENDIAN
1553 #error big endian version not defined
1560 typedef struct sli4_req_common_get_active_profile_s {
1564 typedef struct sli4_res_common_get_active_profile_s {
1566 #if BYTE_ORDER == LITTLE_ENDIAN
1567 uint32_t active_profile_id:8,
1572 #error big endian version not defined
1579 typedef struct sli4_req_common_set_active_profile_s {
1581 #if BYTE_ORDER == LITTLE_ENDIAN
1582 uint32_t active_profile_id:8,
1586 #error big endian version not defined
1593 typedef struct sli4_link_config_descriptor_s {
1594 #if BYTE_ORDER == LITTLE_ENDIAN
1595 uint32_t link_config_id:8,
1597 uint32_t config_description[8];
1599 #error big endian version not defined
1603 #define MAX_LINK_CONFIG_DESCRIPTORS 10
1608 typedef struct sli4_req_common_get_reconfig_link_info_s {
1610 #if BYTE_ORDER == LITTLE_ENDIAN
1612 #error big endian version not defined
1616 typedef struct sli4_res_common_get_reconfig_link_info_s {
1618 #if BYTE_ORDER == LITTLE_ENDIAN
1619 uint32_t active_link_config_id:8,
1621 next_link_config_id:8,
1623 uint32_t link_configuration_descriptor_count;
1626 #error big endian version not defined
1633 typedef struct sli4_req_common_set_reconfig_link_id_s {
1635 #if BYTE_ORDER == LITTLE_ENDIAN
1636 uint32_t next_link_config_id:8,
1640 #error big endian version not defined
1644 typedef struct sli4_res_common_set_reconfig_link_id_s {
1646 #if BYTE_ORDER == LITTLE_ENDIAN
1648 #error big endian version not defined
1652 typedef struct sli4_res_common_set_active_profile_s {
1659 typedef struct sli4_req_common_read_object_s {
1661 #if BYTE_ORDER == LITTLE_ENDIAN
1662 uint32_t desired_read_length:24,
1666 uint8_t object_name[104];
1670 #error big endian version not defined
1677 typedef struct sli4_req_common_write_object_s {
1679 #if BYTE_ORDER == LITTLE_ENDIAN
1680 uint32_t desired_write_length:24,
1684 uint8_t object_name[104];
1688 #error big endian version not defined
1695 typedef struct sli4_req_common_delete_object_s {
1697 #if BYTE_ORDER == LITTLE_ENDIAN
1700 uint8_t object_name[104];
1702 #error big endian version not defined
1709 typedef struct sli4_req_common_read_object_list_s {
1711 #if BYTE_ORDER == LITTLE_ENDIAN
1712 uint32_t descriptor_count:16,
1713 descriptor_offset:16;
1716 uint8_t object_name[104];
1720 #error big endian version not defined
1727 #define SLI4_SET_FEATURES_DIF_SEED 0x01
1728 #define SLI4_SET_FEATURES_XRI_TIMER 0x03
1729 #define SLI4_SET_FEATURES_MAX_PCIE_SPEED 0x04
1730 #define SLI4_SET_FEATURES_FCTL_CHECK 0x05
1731 #define SLI4_SET_FEATURES_FEC 0x06
1732 #define SLI4_SET_FEATURES_PCIE_RECV_DETECT 0x07
1733 #define SLI4_SET_FEATURES_DIF_MEMORY_MODE 0x08
1734 typedef struct sli4_req_common_set_features_s {
1736 #if BYTE_ORDER == LITTLE_ENDIAN
1741 #error big endian version not defined
1745 typedef struct sli4_req_common_set_features_t10_pi_mem_model_s {
1746 #if BYTE_ORDER == LITTLE_ENDIAN
1750 #error big endian version not defined
1757 typedef struct sli4_eqe_s {
1758 #if BYTE_ORDER == LITTLE_ENDIAN
1764 #error big endian version not defined
1773 typedef struct sli4_mcqe_s {
1774 #if BYTE_ORDER == LITTLE_ENDIAN
1775 uint32_t completion_status:16,
1788 #error big endian version not defined
1798 typedef struct sli4_acqe_s {
1799 #if BYTE_ORDER == LITTLE_ENDIAN
1800 uint32_t event_data[3];
1809 #error big endian version not defined
1813 #define SLI4_ACQE_EVENT_CODE_LINK_STATE 0x01
1814 #define SLI4_ACQE_EVENT_CODE_FCOE_FIP 0x02
1815 #define SLI4_ACQE_EVENT_CODE_ISCSI 0x04
1816 #define SLI4_ACQE_EVENT_CODE_GRP_5 0x05
1842 #define SLI4_PHSDEV_CONTROL_REG_23 0x0414
1843 #define SLI4_PHYDEV_CONTROL_DRST BIT(0)
1844 #define SLI4_PHYDEV_CONTROL_FRST BIT(1)
1845 #define SLI4_PHYDEV_CONTROL_DD BIT(2)
1846 #define SLI4_PHYDEV_CONTROL_FRL_MASK 0x000000f0
1847 #define SLI4_PHYDEV_CONTROL_FRL_SHIFT 4
1848 #define SLI4_PHYDEV_CONTROL_FRL(r) (((r) & SLI4_PHYDEV_CONTROL_FRL_MASK) >> \
1849 SLI4_PHYDEV_CONTROL_FRL_SHIFT_SHIFT)
1852 typedef struct sli4_reg_s {
1866 #define SLI_USER_MQ_COUNT 1
1867 #define SLI_USER_EQ_COUNT 1
2034 typedef struct sli4_wqe_context_s {
2046 typedef struct sli4_queue_s {
2088 #define SLI4_QUEUE_DEFAULT_CQ UINT16_MAX
2090 #define SLI4_QUEUE_RQ_BATCH 8
2104 typedef struct sli4_link_event_s {
2120 typedef struct sli4_new_tcp_cnx_event_s {
2124 typedef struct sli4_stateless_op_cmpl_event_s {
2130 typedef struct sli4_dhcp_op_cmpl_event_s {
2136 typedef struct sli4_icmpv6_error_event_s {
2141 typedef struct sli4_port_mtu_chg_event_s {
2145 typedef struct sli4_iscsi_async_event_s {
2199 struct sli_wqe_handlers;
2201 typedef struct sli4_s {
2210 uint8_t mac_addr[6];
2211 uint32_t sfp_a0[64];
2212 uint32_t sfp_a2[64];
2235 uint8_t is_ulp_iscsi[2];
2243 uint8_t fw_version[32];
2244 uint8_t fw_on_flash_version[32];
2255 int32_t (*link)(
void *,
void *);
2258 int32_t (*iscsi_async)(
void *,
void *);
2281 static inline uint32_t
2290 static inline uint32_t
2297 static inline uint32_t
2303 static inline uint32_t
2309 static inline uint32_t
2315 static inline uint32_t
2321 static inline uint32_t
2327 static inline uint32_t
2333 static inline uint32_t
2343 ocs_memset(sge, 0,
sizeof(*sge));
2352 sge->
cra = sge->
cra >> 3;
2355 static inline uint32_t
2361 static inline uint32_t
2367 static inline uint32_t
2373 static inline void *
2379 static inline uint32_t
2385 static inline char *
2391 static inline uint32_t
2397 count = 1 << ocs_lg2(mask);
2410 ocs_dma_t *, uint16_t, uint16_t);
2423 uint32_t, ocs_dma_t *);
2426 uint64_t tag, uint16_t wq_id,
2432 void *buf,
size_t size, uint64_t tag, uint8_t *mac_addr);
2435 size_t size, uint64_t tag,
2436 uint32_t start_profile_index, ocs_dma_t *dma);
2439 size_t size, uint64_t tag);
2442 size_t size, uint64_t tag,
2444 uint32_t active_profile_id);
2447 size_t size, uint64_t tag, ocs_dma_t *dma);
2450 size_t size, uint64_t tag, ocs_dma_t *dma,
2451 uint32_t fd, uint32_t active_link_config_id);
2454 size_t size, uint64_t tag);
2457 size_t size, uint64_t tag, ocs_dma_t *dma);
2460 size_t size, uint64_t tag, ocs_dma_t *dma,
2461 uint8_t profile_id, uint32_t descriptor_count,
2487 size_t, uint32_t, uint32_t);
2518 uint8_t *entry,
void *io);
2530 uint16_t icd_index);
2534 uint8_t *wait_for_tcp_ack,
2535 uint8_t tcp_ack_status);
uint16_t pci_sub_system_id
This structure contains the type and associated fields for a CQE completion.
Mailbox Completion Queue Entry.
uint32_t ulp1_toe_wq_total
uint8_t t10_dif_separate_capable
uint32_t ulp0_toe_defrq_total
sli4_port_type_e port_type
uint16_t frg_num_field_mask
void * sli_queue_iscsi_icd_lookup(sli4_t *sli4, sli4_queue_t *q, uint16_t icd_index)
Returns the IO tied to a specific ICD index.
Generic Common Create EQ/CQ/MQ/WQ/RQ Queue completion.
uint32_t ulp1_toe_rqid_base
This structure contains the fields in a T_DATA_DIGEST completion.
int32_t sli_raise_ue(sli4_t *sli4)
uint32_t ulp0_toe_rq_total
ocs_list_t ocs_list_link_t
static uint32_t sli_eq_doorbell(uint16_t n_popped, uint16_t id, uint8_t arm)
int32_t sli_fw_error_status(sli4_t *sli4)
Read the SLIPORT_SEMAPHORE and SLIPORT_STATUS registers to check if the port status indicates that a ...
uint16_t frg_num_field_offset
int32_t sli_queue_poke(sli4_t *sli4, sli4_queue_t *q, uint32_t index, uint8_t *entry)
int32_t get_sli4_parameters_t(struct sli4_s *sli4)
COMMON_EXT_FAT_READ_STRING_TABLE.
static void sli_chain_sge_build(sli4_t *sli4, sli4_chain_sge_t *sge, uint32_t icd_index, uint32_t frag_num, uint32_t offset)
uint32_t default_extended_timeout
int32_t sli_cmd_common_tcp_upload(sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint16_t wq_id, uint8_t graceful)
Write a COMMON_TCP_UPLOAD command.
uint32_t number_remaining_bytes
int32_t sli_cmd_mailbox_queue_entry(sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t length, ocs_dma_t *dma)
Write a MQE header in the provided buffer.
uint32_t ulp0_iscsi_icd_total
mailbox queue Element header
uint32_t maximum_log_entries
uint16_t pci_sub_vendor_id
uint32_t ulp0_nic_wq_total
uint32_t max_qentries[SLI_QTYPE_MAX]
sli4_wqe_context_t * wqe_context
sli4_icmpv6_error_event_t icmp_err
This structure contains the fields in a DMSG completion.
uint32_t chain_sge_init_0
static uint32_t sli_is_dif_separate_capable(sli4_t *sli4)
int32_t sli_eq_modify_delay(sli4_t *sli4, sli4_queue_t *eq, uint32_t num_eq, uint32_t shift, uint32_t delay_mult)
Modify the delay timer for all the EQs.
uint8_t iscsi_ver_min_max
uint32_t number_log_entries
int32_t sli_queue_peek(sli4_t *sli4, sli4_queue_t *q, uint32_t index, uint8_t *entry)
uint32_t firmware_post_status
get_sli4_parameters_t * get_sli4_parameters
uint32_t ulp1_iscsi_icd_total
int32_t sli_cmd_common_set_features(sli4_t *sli4, void *buf, size_t size, uint32_t feature, uint32_t param_len, void *parameter)
Write a COMMON_SET_FEATURES command.
static uint32_t sli_is_sgl_chaining_capable(sli4_t *sli4)
int32_t sli_fw_reset(sli4_t *sli4)
int32_t sli_setup(sli4_t *sli4, ocs_os_handle_t os, sli4_port_type_e port_type)
Setup the SLI context.
COMMON_GET_BE_CONFIGURATION_AND_RESOURCES (v1)
uint32_t ulp1_toe_defrq_total
int32_t sli_cmd_common_get_profile_config(sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_dma_t *dma)
Write a COMMON_COMMON_GET_PROFILE_CONFIG command.
uint32_t number_returned_bytes
int32_t sli_queue_iscsi_wqe_invalidate(sli4_t *sli4, sli4_queue_t *q, void *io)
int32_t sli_cmd_common_get_active_profile(sli4_t *sli4, void *buf, size_t size, uint64_t tag)
Write a COMMON_COMMON_GET_ACTIVE_PROFILE command.
int32_t sli_queue_write(sli4_t *sli4, sli4_queue_t *q, uint8_t *entry)
Write an entry to the queue object.
sli4_new_tcp_cnx_event_t new_tcp
uint32_t ulp0_nic_wqid_base
uint32_t partial_data_length
T10 DIF Seed Scatter-Gather Entry (SGE)
int32_t sli_cmd_common_set_profile_config(sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_dma_t *dma, uint8_t profile_id, uint32_t descriptor_count, uint8_t isap)
Write a COMMON_COMMON_SET_PROFILE_CONFIG command.
uint32_t data_buffer_size
static uint32_t sli_convert_mask_to_count(uint32_t method, uint32_t mask)
static uint32_t sli_is_dif_inline_capable(sli4_t *sli4)
static uint32_t sli_is_ulp_enabled(sli4_t *sli4, uint16_t ulp)
int32_t sli_queue_is_empty(sli4_t *sli4, sli4_queue_t *q)
Check if the given queue is empty.
COMMON_GET_CNTL_ATTRIBUTES.
uint32_t actual_response_length
uint32_t uint32_t write_offset
uint32_t ulp0_lro_rqid_base
sli4_qentry_fields_tx_dif_error_t tx_dif_err
uint32_t uint32_t read_offset
int32_t __sli_queue_init(sli4_t *sli4, sli4_queue_t *q, uint32_t qtype, uint32_t version, size_t size, uint32_t n_entries, uint32_t align)
Initialize a queue object.
uint32_t ulp1_iscsi_chain_icd_total
struct sli4_t::@37 features
uint32_t sge_supported_length
sli4_iscsi_async_event_e event
int32_t sli_cqe_mq(void *buf)
Check mailbox/queue completion entry.
int32_t sli_cmd_common_get_reconfig_link_info(sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_dma_t *dma)
Write a COMMON_COMMON_GET_RECONFIG_LINK_INFO command.
uint8_t multifunction_device
uint32_t functionalities_supported
int32_t sli_queue_read(sli4_t *sli4, sli4_queue_t *q, uint8_t *entry)
Read an entry from the queue object.
sli4_qentry_fields_tsol_t tsol
static uint32_t sli_get_max_sge(sli4_t *sli4)
uint32_t ulp1_nic_wq_total
T10 DIF Scatter-Gather Entry (SGE)
int32_t sli_teardown(sli4_t *sli4)
Tear down a SLI context.
#define SLI4_EQCQ_CQ_ID_MASK_LO
#define SLI4_EQCQ_EQ_ID_MASK_LO
COMMON_GET_EXT_FAT_CAPABILITIES.
static uint32_t sli_get_max_queue(sli4_t *sli4, sli4_qtype_e qtype)
uint32_t data_buffer_size
uint32_t bmbx_timeout_msecs
uint32_t sli_reg_read(sli4_t *sli, sli4_regname_e reg)
Read the given SLI register.
int32_t(* sli4_create_q_fn_t)(sli4_t *, void *, size_t, uint64_t, ocs_dma_t *, uint16_t, uint16_t)
Common Create Queue function prototype.
uint32_t driver_advanced_features_supported
int32_t sli_cqe_async(sli4_t *sli4, void *buf)
Check asynchronous event completion entry.
sli4_regname_e
Register name enums.
uint32_t trace_table_index
static uint32_t sli_is_dual_ulp_capable(sli4_t *sli4)
static uint32_t sli_get_max_qentries(sli4_t *sli4, sli4_qtype_e qtype)
uint32_t ulp1_iscsi_icd_base
uint32_t ulp0_toe_defrqid_base
uint32_t host_buffer_descriptor_count
sli4_qentry_fields_dpdu_t dpdu
int32_t sli_cmd_common_nop(sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint64_t context)
Write a COMMON_NOP command.
Buffer Descriptor Entry (BDE)
uint32_t host_buffer_descriptor_count
uint32_t ulp0_iscsi_icd_base
COMMON_SET_RECONFIG_LINK_ID.
uint16_t sgl_idx_field_mask
COMMON_GET_CNTL_ATTRIBUTES.
void * sli_queue_iscsi_icd_invalid(sli4_t *sli4, sli4_queue_t *q, uint16_t icd_index, uint8_t *wait_for_tcp_ack, uint8_t tcp_ack_status)
Processes a target command invalidation IO completion. Moves the WRB to the free list.
COMMON_SET_PROFILE_CONFIG.
uint32_t ulp0_iscsi_chain_icd_base
uint8_t pci_function_number
const uint8_t sli4_fw_initialize[]
FW_INITIALIZE - initialize a SLI port.
int32_t sli_eq_parse(sli4_t *sli4, uint8_t *buf, uint16_t *cq_id)
Parse an EQ entry to retrieve the CQ_ID for this event.
sli4_dhcp_op_cmpl_event_t dhcp_cmpl
static uint32_t sli_get_sli_rev(sli4_t *sli4)
uint32_t ulp1_nic_wqid_base
COMMON_GET_RECONFIG_LINK_INFO.
Asynchronous Completion Queue Entry.
uint32_t ulp1_lro_rq_total
int32_t sli_queue_free(sli4_t *sli4, sli4_queue_t *q)
Free a queue.
uint16_t sgl_idx_field_offset
uint32_t async_event_bitmap
int32_t sli_queue_iscsi_wq_write(sli4_t *sli4, sli4_queue_t *q, uint8_t *entry, void *io)
int32_t sli_cmd_common_get_function_config(sli4_t *sli4, void *buf, size_t size, uint64_t tag)
Write a COMMON_COMMON_GET_FUNCTION_CONFIG command.
int32_t _sli_queue_peek(sli4_t *sli4, sli4_queue_t *q, uint32_t index, uint8_t *entry)
sli4_asic_type_e asic_type
uint32_t profile_descriptor_count
sli4_qentry_fields_isol_t isol
COMMON_GET_FUNCTION_CONFIG.
sli4_qentry_fields_tcmdinv_t tcmdinv
This structure is used to track the WQEs for iSCSI.
uint32_t ulp1_toe_rq_total
#define SFP_PAGE_DATA_BYTES
COMMON_READ_TRANSCEIVER_DATA.
uint32_t buffer_address_low
uint8_t on_die_temperature
COMMON_GET_PROFILE_CONFIG.
This structure contains the fields in a T_DATA_DIGEST completion.
This structure contains the fields in a CNXINV completion.
static uint32_t sli_get_sli_family(sli4_t *sli4)
uint32_t ulp0_toe_rqid_base
sli4_qentry_fields_cnxinv_t cnxinv
sli4_port_mtu_chg_event_t mtu_chg
static uint32_t sli_get_vpd_len(sli4_t *sli4)
int32_t sli_queue_arm(sli4_t *sli4, sli4_queue_t *q, uint8_t arm)
Arm or dis-arm a queue.
sli4_qentry_fields_data_digest_t data_digest
struct sli4_t::@38 config
int32_t sli_reset(sli4_t *sli4)
static uint32_t sli_is_dif_capable(sli4_t *sli4)
uint32_t delay_multiplier
sli4_link_status_e status
COMMON_GET_ACTIVE_PROFILE.
uint8_t max_domains_supported
This structure is used to track the SLI4 queues.
uint32_t sgl_segment_address_low
#define MAX_PRODUCT_DESCRIPTORS
uint32_t function_capabilities
int32_t sli_cmd_common_set_active_profile(sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t fd, uint32_t active_profile_id)
Write a COMMON_COMMON_SET_ACTIVE_PROFILE command.
uint64_t unique_identifier
uint32_t ulp0_lro_rq_total
void sli_reg_write(sli4_t *sli, sli4_regname_e reg, uint32_t val)
Write the value to the given SLI register.
uint32_t ulp0_toe_wqid_base
uint32_t buffer_address_low
int32_t sli_cq_parse(sli4_t *sli4, sli4_queue_t *cq, uint8_t *cqe, sli4_qentry_fields_t *fields)
Parse a CQ entry to retrieve event type and associated queue.
int32_t __sli_create_queue(sli4_t *sli4, sli4_queue_t *q)
Issue command to create queue.
uint32_t number_log_entries
uint8_t additional_status
uint32_t resource_desc_cnt
uint32_t uint32_t supported_modes
void sli_queue_iscsi_cleanup(void *hal, sli4_t *sli4, sli4_queue_t *q)
Moves any WQE entries from the busy back to the free list when a connection is uploaded.
int32_t sli_queue_iscsi_tcp_ack(sli4_t *sli4, sli4_queue_t *q, uint8_t wqe_index)
Processes a TCP ACK completion.
uint8_t seeprom_version_lo
#define SLI4_SGE_TYPE_CHAIN
static char * sli_get_ipl_name(sli4_t *sli4)
int32_t _sli_queue_poke(sli4_t *sli4, sli4_queue_t *q, uint32_t index, uint8_t *entry)
COMMON_SET_EXT_FAT_CAPABILITIES.
uint8_t additional_status
sli4_qentry_fields_dmsg_t dmsg
uint32_t buffer_address_high
#define MAX_LINK_CONFIG_DESCRIPTORS
uint32_t ulp0_iscsi_chain_icd_total
int32_t sli_queue_reset(sli4_t *sli4, sli4_queue_t *q)
Zero all queue entries and reset the indexes.
This structure contains the fields in a DPDU completion.
uint32_t ulp1_toe_wqid_base
uint32_t buffer_address_high
int32_t sli_queue_alloc(sli4_t *sli4, uint32_t qtype, sli4_queue_t *q, uint32_t n_entries, sli4_queue_t *assoc, uint16_t ulp)
Allocate a queue.
uint32_t buffer_address_high
int32_t sli_bmbx_command(sli4_t *sli4)
Submit a command to the bootstrap mailbox and check the status.
Profile Descriptor for profile functions.
int32_t(* sli4_destroy_q_fn_t)(sli4_t *, void *, size_t, uint64_t, uint16_t)
Common Destroy Queue function prototype.
int32_t sli_cmd_common_set_be_configuration_and_resources(sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint8_t *mac_addr)
Write a COMMON_COMMON_SET_BE_CONFIGURATION_AND_RESOURCES command.
uint32_t sli_queue_iscsi_free_cnt(sli4_t *sli4, sli4_queue_t *q)
Return the number of free WRB entries.
int32_t sli_cmd_common_get_profile_list(sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t start_profile_index, ocs_dma_t *dma)
Write a COMMON_COMMON_GET_PROFILE_LIST command.
sli4_stateless_op_cmpl_event_t stateless_cmpl
int32_t sli_callback(sli4_t *sli4, sli4_callback_e which, void *func, void *arg)
Register a callback for the given event.
uint16_t num_sges_per_icd
Scatter-Gather Entry (SGE)
uint32_t ulp1_toe_defrqid_base
uint16_t max_qcount[SLI_QTYPE_MAX]
static uint32_t sli_get_if_type(sli4_t *sli4)
uint32_t ep_fw_data_struct_version
uint32_t ioctl_data_struct_version
uint32_t ulp1_iscsi_chain_icd_base
uint32_t flash_rom_access_operation_type
Generic Command Request header.
void sli_interrupt_set(sli4_t *sli, uint8_t enable)
uint32_t icd_num_per_page
struct sli_wqe_handlers * wqe_handlers
Generic Command Response header.
uint32_t chain_sge_init_1
COMMON_SET_ACTIVE_PROFILE.
void * sli_queue_iscsi_wqe_complete(sli4_t *sli4, sli4_queue_t *q, uint8_t wqe_index)
Processes a solicited IO completion. Moves the WRB to the free list.
uint8_t pci_device_number
uint8_t seeprom_version_hi
const uint8_t sli4_fw_deinitialize[]
FW_DEINITIALIZE - deinitialize a SLI port.
uint32_t ulp0_toe_wq_total
uint8_t sgl_chaining_capable
int32_t sli_cmd_common_set_reconfig_link_id(sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_dma_t *dma, uint32_t fd, uint32_t active_link_config_id)
Write a COMMON_COMMON_SET_RECONFIG_LINK_ID command.
int32_t sli_queue_index(sli4_t *sli4, sli4_queue_t *q)
int32_t _sli_queue_write(sli4_t *sli4, sli4_queue_t *q, uint8_t *entry)
Write an entry to the queue object.
uint8_t t10_dif_inline_capable
static void * sli_get_vpd(sli4_t *sli4)
uint32_t sgl_segment_address_high
int32_t sli_init(sli4_t *sli4)
COMMON_EXT_FAT_RETRIEVE_SNAPSHOT.
This structure contains the fields in a I_SOL completion.
uint32_t flash_rom_access_opcode
static uint32_t sli_cq_doorbell(uint16_t n_popped, uint16_t id, uint8_t arm)
uint16_t default_link_down_timeout
This structure contains the fields in a T_SOL completion.
uint32_t ulp1_lro_rqid_base
This structure contains the fields in a CMNDINV completion.
Link Config Descriptor for link config functions.
uint32_t buffer_address_low
uint32_t host_buffer_descriptor_count
COMMON_SET_BE_CONFIGURATION_AND_RESOURCES (v1)