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)
48 #define SLI4_BMBX_TIMEOUT_MSEC 30000
49 #define SLI4_FW_READY_TIMEOUT_MSEC 30000
50 #define SLI4_FW_DUMP_TIMEOUT_MSEC 60000
52 static inline uint32_t
55 uint32_t mask = page_size - 1;
78 return (bytes + mask) >> shift;
85 #define SLI4_PCI_CLASS_REVISION 0x0008
86 #define SLI4_PCI_REV_ID_SHIFT 0
87 #define SLI4_PCI_REV_ID_MASK 0xff
88 #define SLI4_PCI_CLASS_SHIFT 8
89 #define SLI4_PCI_CLASS_MASK 0xfff
91 #define SLI4_PCI_SOFT_RESET_CSR 0x005c
92 #define SLI4_PCI_SOFT_RESET_MASK 0x0080
101 #define SLI4_INTF_REG 0x0058
102 #define SLI4_INTF_VALID_SHIFT 29
103 #define SLI4_INTF_VALID_MASK 0x7
104 #define SLI4_INTF_VALID 0x6
105 #define SLI4_INTF_IF_TYPE_SHIFT 12
106 #define SLI4_INTF_IF_TYPE_MASK 0xf
107 #define SLI4_INTF_SLI_FAMILY_SHIFT 8
108 #define SLI4_INTF_SLI_FAMILY_MASK 0xf
109 #define SLI4_INTF_SLI_REVISION_SHIFT 4
110 #define SLI4_INTF_SLI_REVISION_MASK 0xf
111 #define SLI4_FAMILY_CHECK_ASIC_TYPE 0xf
113 #define SLI4_IF_TYPE_BE3_SKH_PF 0
114 #define SLI4_IF_TYPE_BE3_SKH_VF 1
115 #define SLI4_IF_TYPE_LANCER_FC_ETH 2
116 #define SLI4_IF_TYPE_LANCER_RDMA 3
117 #define SLI4_IF_TYPE_LANCER_G7 6
118 #define SLI4_MAX_IF_TYPES 7
123 #define SLI4_ASIC_ID_REG 0x009c
124 #define SLI4_ASIC_REV_SHIFT 0
125 #define SLI4_ASIC_REV_MASK 0xf
126 #define SLI4_ASIC_VER_SHIFT 4
127 #define SLI4_ASIC_VER_MASK 0xf
128 #define SLI4_ASIC_GEN_SHIFT 8
129 #define SLI4_ASIC_GEN_MASK 0xff
130 #define SLI4_ASIC_GEN_BE2 0x00
131 #define SLI4_ASIC_GEN_BE3 0x03
132 #define SLI4_ASIC_GEN_SKYHAWK 0x04
133 #define SLI4_ASIC_GEN_CORSAIR 0x05
134 #define SLI4_ASIC_GEN_LANCER 0x0b
140 #define SLI4_BMBX_REG 0x0160
141 #define SLI4_BMBX_MASK_HI 0x3
142 #define SLI4_BMBX_MASK_LO 0xf
143 #define SLI4_BMBX_RDY BIT(0)
144 #define SLI4_BMBX_HI BIT(1)
145 #define SLI4_BMBX_WRITE_HI(r) ((ocs_addr32_hi(r) & ~SLI4_BMBX_MASK_HI) | \
147 #define SLI4_BMBX_WRITE_LO(r) (((ocs_addr32_hi(r) & SLI4_BMBX_MASK_HI) << 30) | \
148 (((r) & ~SLI4_BMBX_MASK_LO) >> 2))
150 #define SLI4_BMBX_SIZE 256
152 #define SLI4_PORT_MIGRATION_BIT 16
157 #define SLI4_EQCQ_DOORBELL_REG 0x120
158 #define SLI4_EQCQ_DOORBELL_CI BIT(9)
159 #define SLI4_EQCQ_DOORBELL_QT BIT(10)
160 #define SLI4_EQCQ_DOORBELL_ARM BIT(29)
161 #define SLI4_EQCQ_DOORBELL_SE BIT(31)
162 #define SLI4_EQCQ_NUM_SHIFT 16
163 #define SLI4_EQCQ_NUM_MASK 0x01ff
164 #define SLI4_EQCQ_EQ_ID_MASK 0x3fff
165 #define SLI4_EQCQ_CQ_ID_MASK 0x7fff
166 #define SLI4_EQCQ_EQ_ID_MASK_LO 0x01ff
167 #define SLI4_EQCQ_CQ_ID_MASK_LO 0x03ff
168 #define SLI4_EQCQ_EQCQ_ID_MASK_HI 0xf800
170 #define SLI4_IF6_EQ_DOORBELL_REG 0x120
171 #define SLI4_IF6_CQ_DOORBELL_REG 0xC0
172 #define SLI4_IF6_DPP_DOORBELL_REG_SET 2
176 #define SLI4_SLIPORT_CONTROL_REG 0x0408
177 #define SLI4_SLIPORT_CONTROL_END BIT(30)
178 #define SLI4_SLIPORT_CONTROL_LITTLE_ENDIAN (0)
179 #define SLI4_SLIPORT_CONTROL_BIG_ENDIAN BIT(30)
180 #define SLI4_SLIPORT_CONTROL_IP BIT(27)
181 #define SLI4_SLIPORT_CONTROL_IDIS BIT(22)
182 #define SLI4_SLIPORT_CONTROL_FDD BIT(31)
187 #define SLI4_SLIPORT_ERROR1 0x040c
188 #define SLI4_SLIPORT_ERROR1_RQ_EMPTY_TIMEOUT 0x52004a01
193 #define SLI4_SLIPORT_ERROR2 0x0410
198 #define SLI4_UERR_STATUS_LOW_REG 0xA0
199 #define SLI4_UERR_STATUS_HIGH_REG 0xA4
200 #define SLI4_UERR_MASK_LOW_REG 0xA8
201 #define SLI4_UERR_MASK_HIGH_REG 0xAC
206 #define SLI4_SW_UE_CSR1 0x138
207 #define SLI4_SW_UE_CSR2 0x1FFFC
212 #define SLI4_SW_UE_REG 0x5C
217 #if BYTE_ORDER == LITTLE_ENDIAN
227 } * eq_doorbell = (
void *)®
229 #error big endian version not defined
234 eq_doorbell->eq_id_hi = (
id >> 9) & 0x1f;
235 eq_doorbell->number_popped = n_popped;
236 eq_doorbell->arm = arm;
237 eq_doorbell->ci = TRUE;
245 #if BYTE_ORDER == LITTLE_ENDIAN
247 uint32_t cq_id_lo:10,
254 } * cq_doorbell = (
void *)®
256 #error big endian version not defined
261 cq_doorbell->cq_id_hi = (
id >> 10) & 0x1f;
262 cq_doorbell->number_popped = n_popped;
263 cq_doorbell->arm = arm;
271 #if BYTE_ORDER == LITTLE_ENDIAN
279 } * eq_doorbell = (
void *)®
281 #error big endian version not defined
284 eq_doorbell->eq_id = id;
285 eq_doorbell->number_popped = n_popped;
286 eq_doorbell->arm = arm;
294 #if BYTE_ORDER == LITTLE_ENDIAN
301 } * cq_doorbell = (
void *)®
303 #error big endian version not defined
306 cq_doorbell->cq_id = id;
307 cq_doorbell->number_popped = n_popped;
308 cq_doorbell->arm = arm;
316 #define SLI4_MQ_DOORBELL_REG 0x0140
317 #define SLI4_IF6_MQ_DOORBELL_REG 0x0160
318 #define SLI4_MQ_DOORBELL_NUM_SHIFT 16
319 #define SLI4_MQ_DOORBELL_NUM_MASK 0x3fff
320 #define SLI4_MQ_DOORBELL_ID_MASK 0xffff
321 #define SLI4_MQ_DOORBELL(n, i) ((((n) & SLI4_MQ_DOORBELL_NUM_MASK) << SLI4_MQ_DOORBELL_NUM_SHIFT) | \
322 ((i) & SLI4_MQ_DOORBELL_ID_MASK))
327 #define SLI4_RQ_DOORBELL_REG 0x0a0
328 #define SLI4_IF6_RQ_DOORBELL_REG 0x0080
329 #define SLI4_RQ_DOORBELL_NUM_SHIFT 16
330 #define SLI4_RQ_DOORBELL_NUM_MASK 0x3fff
331 #define SLI4_RQ_DOORBELL_ID_MASK 0xffff
332 #define SLI4_RQ_DOORBELL(n, i) ((((n) & SLI4_RQ_DOORBELL_NUM_MASK) << SLI4_RQ_DOORBELL_NUM_SHIFT) | \
333 ((i) & SLI4_RQ_DOORBELL_ID_MASK))
338 #define SLI4_IO_WQ_DOORBELL_REG 0x040
339 #define SLI4_IF6_WQ_DOORBELL_REG 0x040
340 #define SLI4_WQ_DOORBELL_IDX_SHIFT 16
341 #define SLI4_WQ_DOORBELL_IDX_MASK 0x00ff
342 #define SLI4_WQ_DOORBELL_NUM_SHIFT 24
343 #define SLI4_WQ_DOORBELL_NUM_MASK 0x00ff
344 #define SLI4_WQ_DOORBELL_ID_MASK 0xffff
345 #define SLI4_WQ_DOORBELL(n, x, i) ((((n) & SLI4_WQ_DOORBELL_NUM_MASK) << SLI4_WQ_DOORBELL_NUM_SHIFT) | \
346 (((x) & SLI4_WQ_DOORBELL_IDX_MASK) << SLI4_WQ_DOORBELL_IDX_SHIFT) | \
347 ((i) & SLI4_WQ_DOORBELL_ID_MASK))
349 #define SLI4_DPP_WQ_DOORBELL_NUM_SHIFT 24
350 #define SLI4_DPP_WQ_DOORBELL_NUM_MASK 0x00ff
351 #define SLI4_DPP_WQ_DOORBELL_DPP BIT(23)
352 #define SLI4_DPP_WQ_DOORBELL_DPP_ID_SHIFT 16
353 #define SLI4_DPP_WQ_DOORBELL_DPP_ID_MASK 0x001f
354 #define SLI4_DPP_WQ_DOORBELL_ID_MASK 0xffff
355 #define SLI4_DPP_WQ_DOORBELL(n, x, i) ((((n) & SLI4_DPP_WQ_DOORBELL_NUM_MASK) << SLI4_DPP_WQ_DOORBELL_NUM_SHIFT) | \
356 (SLI4_DPP_WQ_DOORBELL_DPP) | \
357 (((x) & SLI4_DPP_WQ_DOORBELL_DPP_ID_MASK) << SLI4_DPP_WQ_DOORBELL_DPP_ID_SHIFT) | \
358 ((i) & SLI4_WQ_DOORBELL_ID_MASK))
363 #define SLI4_PORT_SEMAPHORE_REG_0 0x00ac
364 #define SLI4_PORT_SEMAPHORE_REG_1 0x0180
365 #define SLI4_PORT_SEMAPHORE_REG_236 0x0400
366 #define SLI4_PORT_SEMAPHORE_PORT_MASK 0x0000ffff
367 #define SLI4_PORT_SEMAPHORE_PORT(r) ((r) & SLI4_PORT_SEMAPHORE_PORT_MASK)
368 #define SLI4_PORT_SEMAPHORE_HOST_MASK 0x00ff0000
369 #define SLI4_PORT_SEMAPHORE_HOST_SHIFT 16
370 #define SLI4_PORT_SEMAPHORE_HOST(r) (((r) & SLI4_PORT_SEMAPHORE_HOST_MASK) >> \
371 SLI4_PORT_SEMAPHORE_HOST_SHIFT)
372 #define SLI4_PORT_SEMAPHORE_SCR2 BIT(26)
373 #define SLI4_PORT_SEMAPHORE_SCR1 BIT(27)
374 #define SLI4_PORT_SEMAPHORE_IPC BIT(28)
375 #define SLI4_PORT_SEMAPHORE_NIP BIT(29)
376 #define SLI4_PORT_SEMAPHORE_SFI BIT(30)
377 #define SLI4_PORT_SEMAPHORE_PERR BIT(31)
379 #define SLI4_PORT_SEMAPHORE_STATUS_POST_READY 0xc000
380 #define SLI4_PORT_SEMAPHORE_STATUS_UNRECOV_ERR 0xf000
381 #define SLI4_PORT_SEMAPHORE_STATUS_ERR_MASK 0xf000
382 #define SLI4_PORT_SEMAPHORE_IN_ERR(r) (SLI4_PORT_SEMAPHORE_STATUS_UNRECOV_ERR == ((r) & \
383 SLI4_PORT_SEMAPHORE_STATUS_ERR_MASK))
389 #define SLI4_PORT_STATUS_REG_236 0x0404
390 #define SLI4_PORT_STATUS_FDP BIT(21)
391 #define SLI4_PORT_STATUS_RDY BIT(23)
392 #define SLI4_PORT_STATUS_RN BIT(24)
393 #define SLI4_PORT_STATUS_DIP BIT(25)
394 #define SLI4_PORT_STATUS_SPP BIT(27)
395 #define SLI4_PORT_STATUS_OTI BIT(29)
396 #define SLI4_PORT_STATUS_END BIT(30)
397 #define SLI4_PORT_STATUS_ERR BIT(31)
398 #define SLI4_PORT_STATUS_READY(r) ((r) & SLI4_PORT_STATUS_RDY)
399 #define SLI4_PORT_STATUS_ERROR(r) ((r) & SLI4_PORT_STATUS_ERR)
400 #define SLI4_PORT_STATUS_DUMP_PRESENT(r) ((r) & SLI4_PORT_STATUS_DIP)
401 #define SLI4_PORT_STATUS_FDP_PRESENT(r) ((r) & SLI4_PORT_STATUS_FDP)
404 #define SLI4_PHSDEV_CONTROL_REG_236 0x0414
405 #define SLI4_PHYDEV_CONTROL_DRST BIT(0)
406 #define SLI4_PHYDEV_CONTROL_FRST BIT(1)
407 #define SLI4_PHYDEV_CONTROL_DD BIT(2)
408 #define SLI4_PHYDEV_CONTROL_FRL_MASK 0x000000f0
409 #define SLI4_PHYDEV_CONTROL_FRL_SHIFT 4
410 #define SLI4_PHYDEV_CONTROL_FRL(r) (((r) & SLI4_PHYDEV_CONTROL_FRL_MASK) >> \
411 SLI4_PHYDEV_CONTROL_FRL_SHIFT_SHIFT)
412 #define SLI4_PHYDEV_CONTROL_CFP BIT(11)
418 typedef struct sli4_mbox_command_header_s {
419 #if BYTE_ORDER == LITTLE_ENDIAN
424 #error big endian version not defined
428 #define SLI4_MBOX_COMMAND_CONFIG_LINK 0x07
429 #define SLI4_MBOX_COMMAND_DUMP 0x17
430 #define SLI4_MBOX_COMMAND_DOWN_LINK 0x06
431 #define SLI4_MBOX_COMMAND_INIT_LINK 0x05
432 #define SLI4_MBOX_COMMAND_INIT_VFI 0xa3
433 #define SLI4_MBOX_COMMAND_INIT_VPI 0xa4
434 #define SLI4_MBOX_COMMAND_POST_XRI 0xa7
435 #define SLI4_MBOX_COMMAND_RELEASE_XRI 0xac
436 #define SLI4_MBOX_COMMAND_READ_CONFIG 0x0b
437 #define SLI4_MBOX_COMMAND_READ_STATUS 0x0e
438 #define SLI4_MBOX_COMMAND_READ_NVPARMS 0x02
439 #define SLI4_MBOX_COMMAND_READ_REV 0x11
440 #define SLI4_MBOX_COMMAND_READ_LNK_STAT 0x12
441 #define SLI4_MBOX_COMMAND_READ_SPARM64 0x8d
442 #define SLI4_MBOX_COMMAND_READ_TOPOLOGY 0x95
443 #define SLI4_MBOX_COMMAND_REG_FCFI 0xa0
444 #define SLI4_MBOX_COMMAND_REG_FCFI_MRQ 0xaf
445 #define SLI4_MBOX_COMMAND_REG_RPI 0x93
446 #define SLI4_MBOX_COMMAND_REG_RX_RQ 0xa6
447 #define SLI4_MBOX_COMMAND_REG_VFI 0x9f
448 #define SLI4_MBOX_COMMAND_REG_VPI 0x96
449 #define SLI4_MBOX_COMMAND_REQUEST_FEATURES 0x9d
450 #define SLI4_MBOX_COMMAND_SLI_CONFIG 0x9b
451 #define SLI4_MBOX_COMMAND_UNREG_FCFI 0xa2
452 #define SLI4_MBOX_COMMAND_UNREG_RPI 0x14
453 #define SLI4_MBOX_COMMAND_UNREG_VFI 0xa1
454 #define SLI4_MBOX_COMMAND_UNREG_VPI 0x97
455 #define SLI4_MBOX_COMMAND_WRITE_NVPARMS 0x03
456 #define SLI4_MBOX_COMMAND_CONFIG_TOW 0xAD
457 #define SLI4_MBOX_COMMAND_CONFIG_TOW_HP 0xAE
459 #define SLI4_MBOX_STATUS_SUCCESS 0x0000
460 #define SLI4_MBOX_STATUS_FAILURE 0x0001
461 #define SLI4_MBOX_STATUS_RPI_NOT_REG 0x1400
462 #define SLI4_MBOX_EXT_STATUS_OBJ_UNSUPPORTED_FIRMWARE 0xEB
467 typedef struct sli4_bde_s {
468 #if BYTE_ORDER == LITTLE_ENDIAN
469 uint32_t buffer_length:24,
486 #error big endian version not defined
490 #define SLI4_BDE_TYPE_BDE_64 0x00
491 #define SLI4_BDE_TYPE_BDE_IMM 0x01
492 #define SLI4_BDE_TYPE_BLP 0x40
497 typedef struct sli4_sge_s {
498 #if BYTE_ORDER == LITTLE_ENDIAN
501 uint32_t data_offset:27,
506 #error big endian version not defined
513 typedef struct sli4_dif_sge_s {
514 #if BYTE_ORDER == LITTLE_ENDIAN
522 #error big endian version not defined
529 typedef struct sli4_diseed_sge_s {
530 #if BYTE_ORDER == LITTLE_ENDIAN
533 uint32_t app_tag_repl:16,
546 uint32_t app_tag_cmp:16,
556 #error big endian version not defined
563 typedef struct sli4_lsp_sge_s {
564 #if BYTE_ORDER == LITTLE_ENDIAN
570 uint32_t segment_length:24,
573 #error big endian version not defined
577 #define SLI4_SGE_MAX_RESERVED 3
579 #define SLI4_SGE_DIF_OP_IN_NODIF_OUT_CRC 0x00
580 #define SLI4_SGE_DIF_OP_IN_CRC_OUT_NODIF 0x01
581 #define SLI4_SGE_DIF_OP_IN_NODIF_OUT_CHKSUM 0x02
582 #define SLI4_SGE_DIF_OP_IN_CHKSUM_OUT_NODIF 0x03
583 #define SLI4_SGE_DIF_OP_IN_CRC_OUT_CRC 0x04
584 #define SLI4_SGE_DIF_OP_IN_CHKSUM_OUT_CHKSUM 0x05
585 #define SLI4_SGE_DIF_OP_IN_CRC_OUT_CHKSUM 0x06
586 #define SLI4_SGE_DIF_OP_IN_CHKSUM_OUT_CRC 0x07
587 #define SLI4_SGE_DIF_OP_IN_RAW_OUT_RAW 0x08
589 #define SLI4_SGE_TYPE_DATA 0x00
590 #define SLI4_SGE_TYPE_CHAIN 0x03
591 #define SLI4_SGE_TYPE_DIF 0x04
592 #define SLI4_SGE_TYPE_LSP 0x05
593 #define SLI4_SGE_TYPE_PEDIF 0x06
594 #define SLI4_SGE_TYPE_PESEED 0x07
595 #define SLI4_SGE_TYPE_DISEED 0x08
596 #define SLI4_SGE_TYPE_ENC 0x09
597 #define SLI4_SGE_TYPE_ATM 0x0a
598 #define SLI4_SGE_TYPE_SKIP 0x0c
603 typedef struct sli4_cmd_config_link_s {
605 #if BYTE_ORDER == LITTLE_ENDIAN
623 #error big endian version not defined
630 #define SLI4_WKI_TAG_SAT_TEM 0x1040
631 typedef struct sli4_cmd_dump4_s {
633 #if BYTE_ORDER == LITTLE_ENDIAN
636 uint32_t wki_selection:16,
640 uint32_t resp_data[59];
642 #error big endian version not defined
665 typedef struct sli4_cmd_init_link_flags_s {
668 #define FC_TOPOLOGY_FCAL 0
669 #define FC_TOPOLOGY_P2P 1
673 gen_loop_validity_check:1,
675 enable_topology_failover:1,
678 select_hightest_al_pa:1,
682 #define SLI4_INIT_LINK_F_LOOP_BACK BIT(0)
683 #define SLI4_INIT_LINK_F_UNFAIR BIT(6)
684 #define SLI4_INIT_LINK_F_NO_LIRP BIT(7)
685 #define SLI4_INIT_LINK_F_LOOP_VALID_CHK BIT(8)
686 #define SLI4_INIT_LINK_F_NO_LISA BIT(9)
687 #define SLI4_INIT_LINK_F_FAIL_OVER BIT(10)
688 #define SLI4_INIT_LINK_F_NO_AUTOSPEED BIT(11)
689 #define SLI4_INIT_LINK_F_PICK_HI_ALPA BIT(15)
691 #define SLI4_INIT_LINK_F_P2P_ONLY 1
692 #define SLI4_INIT_LINK_F_FCAL_ONLY 2
694 #define SLI4_INIT_LINK_F_FCAL_FAIL_OVER 0
695 #define SLI4_INIT_LINK_F_P2P_FAIL_OVER 1
697 typedef struct sli4_cmd_init_link_s {
699 #if BYTE_ORDER == LITTLE_ENDIAN
700 uint32_t selective_reset_al_pa:8,
704 #define FC_LINK_SPEED_1G 1
705 #define FC_LINK_SPEED_2G 2
706 #define FC_LINK_SPEED_AUTO_1_2 3
707 #define FC_LINK_SPEED_4G 4
708 #define FC_LINK_SPEED_AUTO_4_1 5
709 #define FC_LINK_SPEED_AUTO_4_2 6
710 #define FC_LINK_SPEED_AUTO_4_2_1 7
711 #define FC_LINK_SPEED_8G 8
712 #define FC_LINK_SPEED_AUTO_8_1 9
713 #define FC_LINK_SPEED_AUTO_8_2 10
714 #define FC_LINK_SPEED_AUTO_8_2_1 11
715 #define FC_LINK_SPEED_AUTO_8_4 12
716 #define FC_LINK_SPEED_AUTO_8_4_1 13
717 #define FC_LINK_SPEED_AUTO_8_4_2 14
718 #define FC_LINK_SPEED_10G 16
719 #define FC_LINK_SPEED_16G 17
720 #define FC_LINK_SPEED_AUTO_16_8_4 18
721 #define FC_LINK_SPEED_AUTO_16_8 19
722 #define FC_LINK_SPEED_32G 20
723 #define FC_LINK_SPEED_AUTO_32_16_8 21
724 #define FC_LINK_SPEED_AUTO_32_16 22
726 #error big endian version not defined
733 typedef struct sli4_cmd_init_vfi_s {
735 #if BYTE_ORDER == LITTLE_ENDIAN
750 #error big endian version not defined
757 typedef struct sli4_cmd_init_vpi_s {
759 #if BYTE_ORDER == LITTLE_ENDIAN
763 #error big endian version not defined
770 typedef struct sli4_cmd_post_xri_s {
772 #if BYTE_ORDER == LITTLE_ENDIAN
773 uint32_t xri_base:16,
783 #error big endian version not defined
790 typedef struct sli4_cmd_release_xri_s {
792 #if BYTE_ORDER == LITTLE_ENDIAN
793 uint32_t released_xri_count:5,
798 uint32_t xri_tag0:16,
802 #error big endian version not defined
809 typedef struct sli4_cmd_read_config_s {
813 typedef struct sli4_res_read_config_s {
815 #if BYTE_ORDER == LITTLE_ENDIAN
827 uint32_t bbscn_min:4,
835 uint32_t xri_base:16,
837 uint32_t rpi_base:16,
839 uint32_t vpi_base:16,
841 uint32_t vfi_base:16,
845 uint32_t rq_count:16,
847 uint32_t wq_count:16,
851 #error big endian version not defined
855 #define SLI4_READ_CFG_TOPO_FCOE 0x0
856 #define SLI4_READ_CFG_TOPO_FC 0x1
857 #define SLI4_READ_CFG_TOPO_FC_DA 0x2
858 #define SLI4_READ_CFG_TOPO_FC_AL 0x3
863 typedef struct sli4_cmd_read_nvparms_s {
865 #if BYTE_ORDER == LITTLE_ENDIAN
872 uint32_t hard_alpa:8,
875 #error big endian version not defined
882 typedef struct sli4_cmd_write_nvparms_s {
884 #if BYTE_ORDER == LITTLE_ENDIAN
891 uint32_t hard_alpa:8,
894 #error big endian version not defined
901 typedef struct sli4_cmd_read_rev_s {
903 #if BYTE_ORDER == LITTLE_ENDIAN
911 uint32_t first_hw_revision;
915 uint32_t fc_ph_low:8,
918 feature_level_high:8;
921 char first_fw_name[16];
923 char second_fw_name[16];
925 uint32_t available_length:24,
932 #error big endian version not defined
939 typedef struct sli4_cmd_read_sparm64_s {
941 #if BYTE_ORDER == LITTLE_ENDIAN
947 uint32_t port_name_start:16,
949 uint32_t node_name_start:16,
952 #error big endian version not defined
956 #define SLI4_READ_SPARM64_VPI_DEFAULT 0
957 #define SLI4_READ_SPARM64_VPI_SPECIAL UINT16_MAX
959 #define SLI4_READ_SPARM64_WWPN_OFFSET (4 * sizeof(uint32_t))
960 #define SLI4_READ_SPARM64_WWNN_OFFSET (SLI4_READ_SPARM64_WWPN_OFFSET + sizeof(uint64_t))
962 typedef struct sli4_port_state_s {
963 #if BYTE_ORDER == LITTLE_ENDIAN
964 uint32_t nx_port_recv_state:2,
965 nx_port_trans_state:2,
966 nx_port_state_machine:4,
972 #error big endian version not defined
979 typedef struct sli4_cmd_read_topology_s {
981 #if BYTE_ORDER == LITTLE_ENDIAN
983 uint32_t attention_type:8,
1006 uint32_t acquired_al_pa:8,
1010 uint32_t initial_n_port_id:24,
1012 uint32_t trunk_config:8,
1015 #error big endian version not defined
1019 #define SLI4_MIN_LOOP_MAP_BYTES 128
1021 #define SLI4_READ_TOPOLOGY_LINK_UP 0x1
1022 #define SLI4_READ_TOPOLOGY_LINK_DOWN 0x2
1023 #define SLI4_READ_TOPOLOGY_LINK_NO_ALPA 0x3
1025 #define SLI4_READ_TOPOLOGY_UNKNOWN 0x0
1026 #define SLI4_READ_TOPOLOGY_NPORT 0x1
1027 #define SLI4_READ_TOPOLOGY_FC_AL 0x2
1029 #define SLI4_READ_TOPOLOGY_SPEED_NONE 0x00
1030 #define SLI4_READ_TOPOLOGY_SPEED_1G 0x04
1031 #define SLI4_READ_TOPOLOGY_SPEED_2G 0x08
1032 #define SLI4_READ_TOPOLOGY_SPEED_4G 0x10
1033 #define SLI4_READ_TOPOLOGY_SPEED_8G 0x20
1034 #define SLI4_READ_TOPOLOGY_SPEED_10G 0x40
1035 #define SLI4_READ_TOPOLOGY_SPEED_16G 0x80
1036 #define SLI4_READ_TOPOLOGY_SPEED_32G 0x90
1041 #define SLI4_CMD_REG_FCFI_NUM_RQ_CFG 4
1042 typedef struct sli4_cmd_reg_fcfi_s {
1044 #if BYTE_ORDER == LITTLE_ENDIAN
1045 uint32_t fcf_index:16,
1047 uint32_t rq_id_1:16,
1049 uint32_t rq_id_3:16,
1052 uint32_t r_ctl_mask:8,
1057 uint32_t vlan_tag:12,
1061 #error big endian version not defined
1065 #define SLI4_CMD_REG_FCFI_SET_FCFI_MODE 0
1066 #define SLI4_CMD_REG_FCFI_SET_MRQ_MODE 1
1068 typedef struct sli4_cmd_reg_fcfi_mrq_s {
1070 #if BYTE_ORDER == LITTLE_ENDIAN
1071 uint32_t fcf_index:16,
1074 uint32_t rq_id_1:16,
1077 uint32_t rq_id_3:16,
1081 uint32_t r_ctl_mask:8,
1087 uint32_t vlan_tag:12,
1095 uint32_t num_mrq_pairs_1:8,
1096 mrq_filter_bitmask_1:4,
1097 rq_selection_policy_1:4,
1098 alt_mrq_filter_bit_mask_1:8,
1101 uint32_t num_mrq_pairs_2:8,
1102 mrq_filter_bitmask_2:4,
1103 rq_selection_policy_2:4,
1104 alt_mrq_filter_bit_mask_2:8,
1107 uint32_t rq_id_5:16,
1110 uint32_t rq_id_7:16,
1114 uint32_t r_ctl_mask:8,
1125 typedef struct sli4_cmd_reg_rpi_s {
1127 #if BYTE_ORDER == LITTLE_ENDIAN
1130 uint32_t remote_n_port_id:24,
1142 #error big endian version not defined
1145 #define SLI4_REG_RPI_BUF_LEN 0x70
1151 typedef struct sli4_cmd_reg_vfi_s {
1153 #if BYTE_ORDER == LITTLE_ENDIAN
1165 uint32_t local_n_port_id:24,
1170 #error big endian version not defined
1177 typedef struct sli4_cmd_reg_vpi_s {
1179 #if BYTE_ORDER == LITTLE_ENDIAN
1181 uint32_t local_n_port_id:24,
1189 #error big endian version not defined
1197 #if BYTE_ORDER == LITTLE_ENDIAN
1221 #error big endian version not defined
1225 typedef struct sli4_cmd_request_features_s {
1227 #if BYTE_ORDER == LITTLE_ENDIAN
1231 #error big endian version not defined
1244 #define SLI4_GET_SLI_CONFIG_OFFSET(buf, offset) ((uint8_t *)buf + offset)
1246 typedef struct sli4_sli_config_pmd_s {
1253 typedef struct sli4_cmd_sli_config_s {
1255 #if BYTE_ORDER == LITTLE_ENDIAN
1260 uint32_t payload_length;
1265 uint8_t embed[58 *
sizeof(uint32_t)];
1269 #error big endian version not defined
1278 typedef struct sli4_cmd_read_status_s {
1280 #if BYTE_ORDER == LITTLE_ENDIAN
1300 #error big endian version not defined
1309 typedef struct sli4_cmd_read_link_stats_s {
1311 #if BYTE_ORDER == LITTLE_ENDIAN
1363 #error big endian version not defined
1381 uint32_t *wqe = entry;
1387 #if BYTE_ORDER == LITTLE_ENDIAN
1389 wqe[10] |= q_id << 1;
1391 #error big endian version not defined
1398 typedef struct sli4_cmd_unreg_fcfi_s {
1401 #if BYTE_ORDER == LITTLE_ENDIAN
1405 #error big endian version not defined
1412 typedef struct sli4_cmd_unreg_rpi_s {
1414 #if BYTE_ORDER == LITTLE_ENDIAN
1419 uint32_t destination_n_port_id:24,
1422 #error big endian version not defined
1426 #define SLI4_UNREG_RPI_II_RPI 0x0
1427 #define SLI4_UNREG_RPI_II_VPI 0x1
1428 #define SLI4_UNREG_RPI_II_VFI 0x2
1429 #define SLI4_UNREG_RPI_II_FCFI 0x3
1434 typedef struct sli4_cmd_unreg_vfi_s {
1436 #if BYTE_ORDER == LITTLE_ENDIAN
1442 #error big endian version not defined
1446 #define SLI4_UNREG_VFI_II_VFI 0x0
1447 #define SLI4_UNREG_VFI_II_FCFI 0x3
1459 typedef struct sli4_cmd_unreg_vpi_s {
1461 #if BYTE_ORDER == LITTLE_ENDIAN
1467 #error big endian version not defined
1471 #define SLI4_UNREG_VPI_II_VPI 0x0
1472 #define SLI4_UNREG_VPI_II_VFI 0x2
1473 #define SLI4_UNREG_VPI_II_FCFI 0x3
1479 typedef struct sli4_cmd_config_auto_xfer_rdy_s {
1481 #if BYTE_ORDER == LITTLE_ENDIAN
1485 #error big endian version not defined
1489 typedef struct sli4_cmd_config_auto_xfer_rdy_hp_s {
1491 #if BYTE_ORDER == LITTLE_ENDIAN
1496 uint32_t block_size:16,
1499 #error big endian version not defined
1506 typedef struct sli4_cmd_config_tow_s {
1508 #if BYTE_ORDER == LITTLE_ENDIAN
1520 uint32_t scsi_max_data_len;
1525 uint32_t pool0_xri_cnt:16,
1528 #error big endian version not defined
1532 typedef struct sli4_cmd_config_tow_hp_s {
1534 #if BYTE_ORDER == LITTLE_ENDIAN
1546 uint32_t scsi_max_data_len;
1551 uint32_t scsi_block_size:16,
1554 uint32_t pool0_xri_cnt:16,
1557 #error big endian version not defined
1564 typedef struct sli4_cmd_config_run_biu_diag_s {
1566 #if BYTE_ORDER == LITTLE_ENDIAN
1568 uint32_t tx_buf_len:24,
1572 uint32_t rx_buf_len:24,
1577 #error big endian version not defined
1584 #define SLI4_CFG_STATUS_SUCCESS 0x00
1585 #define SLI4_CFG_STATUS_FAILED 0x01
1586 #define SLI4_CFG_STATUS_ILLEGAL_REQUEST 0x02
1587 #define SLI4_CFG_STATUS_ILLEGAL_FIELD 0x03
1589 #define SLI4_MGMT_STATUS_FLASHROM_READ_FAILED 0xcb
1590 #define SLI4_MGMT_STATUS_FEATURE_NOT_SUPPORTED 0x44
1592 #define SLI4_CFG_ADD_STATUS_NO_STATUS 0x00
1593 #define SLI4_CFG_ADD_STATUS_INVALID_OPCODE 0x1e
1598 #define SLI4_SUBSYSTEM_COMMON 0x01
1599 #define SLI4_SUBSYSTEM_LOWLEVEL 0x0B
1600 #define SLI4_SUBSYSTEM_FCFCOE 0x0c
1601 #define SLI4_SUBSYSTEM_DMTF 0x11
1603 #define SLI4_OPC_LOWLEVEL_SET_WATCHDOG 0X36
1604 #define SLI4_OPC_LOWLEVEL_SET_DIAG_LOG_OPTIONS 0X37
1605 #define SLI4_OPC_LOWLEVEL_GET_ITCM_PARITY_STATS 0x38
1610 #define SLI4_OPC_COMMON_FUNCTION_RESET 0x3d
1611 #define SLI4_OPC_COMMON_CREATE_CQ 0x0c
1612 #define SLI4_OPC_COMMON_CREATE_CQ_SET 0x1d
1613 #define SLI4_OPC_COMMON_DESTROY_CQ 0x36
1614 #define SLI4_OPC_COMMON_MODIFY_EQ_DELAY 0x29
1615 #define SLI4_OPC_COMMON_CREATE_EQ 0x0d
1616 #define SLI4_OPC_COMMON_DESTROY_EQ 0x37
1617 #define SLI4_OPC_COMMON_CREATE_MQ_EXT 0x5a
1618 #define SLI4_OPC_COMMON_DESTROY_MQ 0x35
1619 #define SLI4_OPC_COMMON_GET_CNTL_ATTRIBUTES 0x20
1620 #define SLI4_OPC_COMMON_NOP 0x21
1621 #define SLI4_OPC_COMMON_GET_RESOURCE_EXTENT_INFO 0x9a
1622 #define SLI4_OPC_COMMON_GET_SLI4_PARAMETERS 0xb5
1623 #define SLI4_OPC_COMMON_QUERY_FW_CONFIG 0x3a
1624 #define SLI4_OPC_COMMON_GET_PORT_NAME 0x4d
1626 #define SLI4_OPC_COMMON_WRITE_FLASHROM 0x07
1627 #define SLI4_OPC_COMMON_MANAGE_FAT 0x44
1628 #define SLI4_OPC_COMMON_READ_TRANSCEIVER_DATA 0x49
1629 #define SLI4_OPC_COMMON_GET_CNTL_ADDL_ATTRIBUTES 0x79
1630 #define SLI4_OPC_COMMON_GET_EXT_FAT_CAPABILITIES 0x7d
1631 #define SLI4_OPC_COMMON_SET_EXT_FAT_CAPABILITIES 0x7e
1632 #define SLI4_OPC_COMMON_EXT_FAT_CONFIGURE_SNAPSHOT 0x7f
1633 #define SLI4_OPC_COMMON_EXT_FAT_RETRIEVE_SNAPSHOT 0x80
1634 #define SLI4_OPC_COMMON_EXT_FAT_READ_STRING_TABLE 0x82
1635 #define SLI4_OPC_COMMON_RUN_BIU_DIAG 0x84
1636 #define SLI4_OPC_COMMON_GET_FUNCTION_CONFIG 0xa0
1637 #define SLI4_OPC_COMMON_GET_PROFILE_CONFIG 0xa4
1638 #define SLI4_OPC_COMMON_SET_PROFILE_CONFIG 0xa5
1639 #define SLI4_OPC_COMMON_GET_PROFILE_LIST 0xa6
1640 #define SLI4_OPC_COMMON_GET_ACTIVE_PROFILE 0xa7
1641 #define SLI4_OPC_COMMON_SET_ACTIVE_PROFILE 0xa8
1642 #define SLI4_OPC_COMMON_READ_OBJECT 0xab
1643 #define SLI4_OPC_COMMON_WRITE_OBJECT 0xac
1644 #define SLI4_OPC_COMMON_DELETE_OBJECT 0xae
1645 #define SLI4_OPC_COMMON_READ_OBJECT_LIST 0xad
1646 #define SLI4_OPC_COMMON_SET_DUMP_LOCATION 0xb8
1647 #define SLI4_OPC_COMMON_SET_FEATURES 0xbf
1648 #define SLI4_OPC_COMMON_GET_RECONFIG_LINK_INFO 0xc9
1649 #define SLI4_OPC_COMMON_SET_RECONFIG_LINK_ID 0xca
1651 #define SLI4_OPC_FCOE_SET_LINK_DIAG_STATE 0x22
1652 #define SLI4_OPC_FCOE_SET_LINK_DIAG_LOOPBACK 0x23
1653 #define SLI4_OPC_FCOE_SET_DPORT_MODE 0x27
1654 #define SLI4_OPC_FCOE_GET_DPORT_RESULTS 0x28
1655 #define SLI4_OPC_FC_SET_TRUNK_MODE 0x42
1661 #define SLI4_OPC_DMTF_EXEC_CLP_CMD 0x01
1666 typedef struct sli4_req_hdr_s {
1667 #if BYTE_ORDER == LITTLE_ENDIAN
1676 #error big endian version not defined
1683 typedef struct sli4_res_hdr_s {
1684 #if BYTE_ORDER == LITTLE_ENDIAN
1689 additional_status:8,
1691 uint32_t response_length;
1694 #error big endian version not defined
1705 typedef struct sli4_req_common_function_reset_s {
1710 typedef struct sli4_res_common_function_reset_s {
1719 typedef struct sli4_req_common_create_cq_v0_s {
1721 #if BYTE_ORDER == LITTLE_ENDIAN
1722 uint32_t num_pages:16,
1740 } page_physical_address[0];
1742 #error big endian version not defined
1751 typedef struct sli4_req_common_create_cq_v2_s {
1753 #if BYTE_ORDER == LITTLE_ENDIAN
1754 uint32_t num_pages:16,
1769 uint32_t cqe_count:16,
1775 } page_physical_address[0];
1777 #error big endian version not defined
1788 typedef struct sli4_req_common_create_cq_set_v0_s {
1790 #if BYTE_ORDER == LITTLE_ENDIAN
1791 uint32_t num_pages:16,
1803 uint32_t num_cq_req:16,
1810 } page_physical_address[0];
1812 #error big endian version not defined
1819 #define SLI4_CQ_CNT_256 0
1820 #define SLI4_CQ_CNT_512 1
1821 #define SLI4_CQ_CNT_1024 2
1822 #define SLI4_CQ_CNT_LARGE 3
1824 #define SLI4_CQE_BYTES (4 * sizeof(uint32_t))
1826 #define SLI4_COMMON_CREATE_CQ_V2_MAX_PAGES 8
1831 typedef struct sli4_res_common_create_queue_s {
1833 #if BYTE_ORDER == LITTLE_ENDIAN
1841 #error big endian version not defined
1845 typedef struct sli4_res_create_dpp_wq_s {
1847 #if BYTE_ORDER == LITTLE_ENDIAN
1851 uint32_t wq_reg_set:4,
1853 uint32_t wq_db_offset;
1854 uint32_t dpp_reg_set:4,
1858 uint32_t dpp_offset;
1860 #error big endian version not defined
1865 typedef struct sli4_res_common_create_queue_set_s {
1867 #if BYTE_ORDER == LITTLE_ENDIAN
1871 #error big endian version not defined
1879 typedef struct sli4_req_common_destroy_cq_s {
1881 #if BYTE_ORDER == LITTLE_ENDIAN
1885 #error big endian version not defined
1894 typedef struct sli4_req_common_modify_eq_delay_s {
1896 #if BYTE_ORDER == LITTLE_ENDIAN
1902 } eq_delay_record[8];
1904 #error big endian version not defined
1913 typedef struct sli4_req_common_create_eq_s {
1915 #if BYTE_ORDER == LITTLE_ENDIAN
1916 uint32_t num_pages:16,
1928 delay_multiplier:10,
1936 #error big endian version not defined
1940 #define SLI4_EQ_CNT_256 0
1941 #define SLI4_EQ_CNT_512 1
1942 #define SLI4_EQ_CNT_1024 2
1943 #define SLI4_EQ_CNT_2048 3
1944 #define SLI4_EQ_CNT_4096 4
1946 #define SLI4_EQE_SIZE_4 0
1947 #define SLI4_EQE_SIZE_16 1
1949 #define SLI4_EQE_BYTES (sizeof(uint32_t))
1954 typedef struct sli4_req_common_destroy_eq_s {
1956 #if BYTE_ORDER == LITTLE_ENDIAN
1960 #error big endian version not defined
1969 typedef struct sli4_req_common_create_mq_ext_s {
1971 #if BYTE_ORDER == LITTLE_ENDIAN
1972 uint32_t num_pages:16,
1975 uint32_t async_cq_id_v1:16,
1988 } page_physical_address[8];
1990 #error big endian version not defined
1994 #define SLI4_MQE_SIZE_16 0x05
1995 #define SLI4_MQE_SIZE_32 0x06
1996 #define SLI4_MQE_SIZE_64 0x07
1997 #define SLI4_MQE_SIZE_128 0x08
1999 #define SLI4_MQE_BYTES 256
2001 #define SLI4_ASYNC_EVT_LINK_STATE BIT(1)
2002 #define SLI4_ASYNC_EVT_FCOE_FIP BIT(2)
2003 #define SLI4_ASYNC_EVT_DCBX BIT(3)
2004 #define SLI4_ASYNC_EVT_ISCSI BIT(4)
2005 #define SLI4_ASYNC_EVT_GRP5 BIT(5)
2006 #define SLI4_ASYNC_EVT_FC BIT(16)
2007 #define SLI4_ASYNC_EVT_SLI_PORT BIT(17)
2008 #define SLI4_ASYNC_EVT_VF BIT(18)
2009 #define SLI4_ASYNC_EVT_MR BIT(19)
2011 #define SLI4_ASYNC_EVT_ALL \
2012 SLI4_ASYNC_EVT_LINK_STATE | \
2013 SLI4_ASYNC_EVT_FCOE_FIP | \
2014 SLI4_ASYNC_EVT_DCBX | \
2015 SLI4_ASYNC_EVT_ISCSI | \
2016 SLI4_ASYNC_EVT_GRP5 | \
2017 SLI4_ASYNC_EVT_FC | \
2018 SLI4_ASYNC_EVT_SLI_PORT | \
2019 SLI4_ASYNC_EVT_VF |\
2022 #define SLI4_ASYNC_EVT_FC_FCOE \
2023 SLI4_ASYNC_EVT_LINK_STATE | \
2024 SLI4_ASYNC_EVT_FCOE_FIP | \
2025 SLI4_ASYNC_EVT_GRP5 | \
2026 SLI4_ASYNC_EVT_FC | \
2027 SLI4_ASYNC_EVT_SLI_PORT
2032 typedef struct sli4_req_common_destroy_mq_s {
2034 #if BYTE_ORDER == LITTLE_ENDIAN
2038 #error big endian version not defined
2047 typedef struct sli4_res_common_get_cntl_attributes_s {
2049 #if BYTE_ORDER == LITTLE_ENDIAN
2050 uint8_t version_string[32];
2051 uint8_t manufacturer_name[32];
2053 uint32_t eprom_version_lo:8,
2058 uint8_t ncsi_version_string[12];
2060 uint8_t model_number[32];
2061 uint8_t description[64];
2062 uint8_t serial_number[32];
2063 uint8_t ip_version_string[32];
2064 uint8_t fw_version_string[32];
2065 uint8_t bios_version_string[32];
2066 uint8_t redboot_version_string[32];
2067 uint8_t driver_version_string[32];
2068 uint8_t fw_on_flash_version_string[32];
2070 uint32_t max_cdb_length:16,
2072 generational_guid0:8;
2073 uint32_t generational_guid1_12[3];
2074 uint32_t generational_guid13:24,
2076 uint32_t default_link_down_timeout:16,
2077 iscsi_version_min_max:8,
2078 multifunctional_device:8;
2079 uint32_t cache_valid:8,
2081 max_domains_supported:8,
2086 uint32_t iscsi_features:8,
2088 uint32_t pci_vendor_id:16,
2090 uint32_t pci_sub_vendor_id:16,
2091 pci_sub_system_id:16;
2092 uint32_t pci_bus_number:8,
2093 pci_device_number:8,
2094 pci_function_number:8,
2097 uint32_t number_of_netfilters:8,
2100 #error big endian version not defined
2109 typedef struct sli4_req_common_get_cntl_addl_attributes_s {
2114 typedef struct sli4_res_common_get_cntl_addl_attributes_s {
2123 char fcoe_universal_bios_version[32];
2124 char fcoe_x86_bios_version[32];
2125 char fcoe_efi_bios_version[32];
2126 char fcoe_fcode_version[32];
2127 char uefi_bios_version[32];
2128 char uefi_nic_version[32];
2129 char uefi_fcode_version[32];
2130 char uefi_iscsi_version[32];
2131 char iscsi_x86_bios_version[32];
2132 char pxe_x86_bios_version[32];
2133 uint8_t fcoe_default_wwpn[8];
2134 uint8_t ext_phy_version[32];
2135 uint8_t fc_universal_bios_version[32];
2136 uint8_t fc_x86_bios_version[32];
2137 uint8_t fc_efi_bios_version[32];
2138 uint8_t fc_fcode_version[32];
2139 uint8_t ext_phy_crc_label[8];
2140 uint8_t ipl_file_name[16];
2149 typedef struct sli4_req_common_nop_s {
2151 #if BYTE_ORDER == LITTLE_ENDIAN
2152 uint32_t context[2];
2154 #error big endian version not defined
2158 typedef struct sli4_res_common_nop_s {
2160 #if BYTE_ORDER == LITTLE_ENDIAN
2161 uint32_t context[2];
2163 #error big endian version not defined
2170 typedef struct sli4_req_common_get_resource_extent_info_s {
2172 #if BYTE_ORDER == LITTLE_ENDIAN
2173 uint32_t resource_type:16,
2176 #error big endian version not defined
2180 #define SLI4_RSC_TYPE_ISCSI_INI_XRI 0x0c
2181 #define SLI4_RSC_TYPE_FCOE_VFI 0x20
2182 #define SLI4_RSC_TYPE_FCOE_VPI 0x21
2183 #define SLI4_RSC_TYPE_FCOE_RPI 0x22
2184 #define SLI4_RSC_TYPE_FCOE_XRI 0x23
2186 typedef struct sli4_res_common_get_resource_extent_info_s {
2188 #if BYTE_ORDER == LITTLE_ENDIAN
2189 uint32_t resource_extent_count:16,
2190 resource_extent_size:16;
2192 #error big endian version not defined
2197 #define SLI4_128BYTE_WQE_SUPPORT 0x02
2201 typedef struct sli4_res_common_get_sli4_parameters_s {
2203 #if BYTE_ORDER == LITTLE_ENDIAN
2204 uint32_t protocol_type:8,
2214 uint32_t eq_page_cnt:4,
2221 uint32_t eqe_count_mask:16,
2223 uint32_t cq_page_cnt:4,
2231 uint32_t cqe_count_mask:16,
2233 uint32_t mq_page_cnt:4,
2239 uint32_t mqe_count_mask:16,
2241 uint32_t wq_page_cnt:4,
2249 uint32_t wqe_count_mask:16,
2251 uint32_t rq_page_cnt:4,
2259 uint32_t rqe_count_mask:16,
2292 uint32_t sgl_page_cnt:4,
2297 uint32_t min_rq_buffer_size:16,
2299 uint32_t max_rq_buffer_size;
2300 uint32_t physical_xri_max:16,
2301 physical_rpi_max:16;
2302 uint32_t physical_vpi_max:16,
2303 physical_vfi_max:16;
2317 uint32_t sgl_index_field_offset:16,
2318 sgl_index_field_size:16;
2322 #error big endian version not defined
2333 typedef struct sli4_req_common_query_fw_config_s {
2338 #define SLI4_FUNCTION_MODE_FCOE_INI_MODE 0x40
2339 #define SLI4_FUNCTION_MODE_FCOE_TGT_MODE 0x80
2340 #define SLI4_FUNCTION_MODE_DUA_MODE 0x800
2342 #define SLI4_ULP_MODE_FCOE_INI 0x40
2343 #define SLI4_ULP_MODE_FCOE_TGT 0x80
2345 typedef struct sli4_res_common_query_fw_config_s {
2391 typedef struct sli4_req_common_get_port_name_s {
2393 #if BYTE_ORDER == LITTLE_ENDIAN
2397 #error big endian version not defined
2401 typedef struct sli4_res_common_get_port_name_s {
2409 typedef struct sli4_req_common_write_flashrom_s {
2411 #if BYTE_ORDER == LITTLE_ENDIAN
2416 uint8_t data_buffer[4];
2418 #error big endian version not defined
2422 #define SLI4_MGMT_FLASHROM_OPCODE_FLASH 0x01
2423 #define SLI4_MGMT_FLASHROM_OPCODE_SAVE 0x02
2424 #define SLI4_MGMT_FLASHROM_OPCODE_CLEAR 0x03
2425 #define SLI4_MGMT_FLASHROM_OPCODE_REPORT 0x04
2426 #define SLI4_MGMT_FLASHROM_OPCODE_IMAGE_INFO 0x05
2427 #define SLI4_MGMT_FLASHROM_OPCODE_IMAGE_CRC 0x06
2428 #define SLI4_MGMT_FLASHROM_OPCODE_OFFSET_BASED_FLASH 0x07
2429 #define SLI4_MGMT_FLASHROM_OPCODE_OFFSET_BASED_SAVE 0x08
2430 #define SLI4_MGMT_PHY_FLASHROM_OPCODE_FLASH 0x09
2431 #define SLI4_MGMT_PHY_FLASHROM_OPCODE_SAVE 0x0a
2433 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_ISCSI 0x00
2434 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_REDBOOT 0x01
2435 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_BIOS 0x02
2436 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_PXE_BIOS 0x03
2437 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_CODE_CONTROL 0x04
2438 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_IPSEC_CFG 0x05
2439 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_INIT_DATA 0x06
2440 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_ROM_OFFSET 0x07
2441 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_FCOE_BIOS 0x08
2442 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_ISCSI_BAK 0x09
2443 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_FCOE_ACT 0x0a
2444 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_FCOE_BAK 0x0b
2445 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_CODE_CTRL_P 0x0c
2446 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_NCSI 0x0d
2447 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_NIC 0x0e
2448 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_DCBX 0x0f
2449 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_PXE_BIOS_CFG 0x10
2450 #define SLI4_FLASH_ROM_ACCESS_OP_TYPE_ALL_CFG_DATA 0x11
2455 typedef struct sli4_req_common_manage_fat_s {
2457 #if BYTE_ORDER == LITTLE_ENDIAN
2464 #error big endian version not defined
2471 typedef struct sli4_req_common_get_ext_fat_capabilities_s {
2473 #if BYTE_ORDER == LITTLE_ENDIAN
2476 #error big endian version not defined
2483 typedef struct sli4_req_common_set_ext_fat_capabilities_s {
2485 #if BYTE_ORDER == LITTLE_ENDIAN
2488 uint32_t logging_type:8,
2489 maximum_logging_functions:8,
2490 maximum_logging_ports:8,
2494 uint32_t debug_module[14];
2496 #error big endian version not defined
2503 typedef struct sli4_req_common_ext_fat_configure_snapshot_s {
2505 #if BYTE_ORDER == LITTLE_ENDIAN
2508 #error big endian version not defined
2515 typedef struct sli4_req_common_ext_fat_retrieve_snapshot_s {
2517 #if BYTE_ORDER == LITTLE_ENDIAN
2522 #error big endian version not defined
2526 typedef struct sli4_res_common_ext_fat_retrieve_snapshot_s {
2528 #if BYTE_ORDER == LITTLE_ENDIAN
2534 uint32_t module_mask[2];
2537 uint8_t string_data[16];
2540 #error big endian version not defined
2547 typedef struct sli4_req_common_ext_fat_read_string_table_s {
2549 #if BYTE_ORDER == LITTLE_ENDIAN
2553 #error big endian version not defined
2557 typedef struct sli4_res_common_ext_fat_read_string_table_s {
2559 #if BYTE_ORDER == LITTLE_ENDIAN
2562 uint32_t table_data0:8,
2564 uint8_t table_data[0];
2566 #error big endian version not defined
2576 typedef struct sli4_req_common_read_transceiver_data_s {
2578 #if BYTE_ORDER == LITTLE_ENDIAN
2582 #error big endian version not defined
2586 typedef struct sli4_res_common_read_transceiver_data_s {
2588 #if BYTE_ORDER == LITTLE_ENDIAN
2591 uint32_t page_data[32];
2592 uint32_t page_data_2[32];
2594 #error big endian version not defined
2601 typedef struct sli4_req_common_read_object_s {
2603 #if BYTE_ORDER == LITTLE_ENDIAN
2604 uint32_t desired_read_length:24,
2607 uint8_t object_name[104];
2611 #error big endian version not defined
2615 typedef struct sli4_res_common_read_object_s {
2617 #if BYTE_ORDER == LITTLE_ENDIAN
2622 #error big endian version not defined
2629 typedef struct sli4_req_common_write_object_s {
2631 #if BYTE_ORDER == LITTLE_ENDIAN
2632 uint32_t desired_write_length:24,
2637 uint8_t object_name[104];
2641 #error big endian version not defined
2645 typedef struct sli4_res_common_write_object_s {
2647 #if BYTE_ORDER == LITTLE_ENDIAN
2649 uint32_t change_status:8,
2652 #error big endian version not defined
2659 typedef struct sli4_req_common_delete_object_s {
2661 #if BYTE_ORDER == LITTLE_ENDIAN
2664 uint8_t object_name[104];
2666 #error big endian version not defined
2673 typedef struct sli4_req_common_read_object_list_s {
2675 #if BYTE_ORDER == LITTLE_ENDIAN
2676 uint32_t desired_read_length:24,
2679 uint8_t object_name[104];
2683 #error big endian version not defined
2690 typedef struct sli4_req_common_set_dump_location_s {
2692 #if BYTE_ORDER == LITTLE_ENDIAN
2693 uint32_t buffer_length:24,
2701 #error big endian version not defined
2705 typedef struct sli4_res_common_set_dump_location_s {
2707 #if BYTE_ORDER == LITTLE_ENDIAN
2710 #error big endian version not defined
2717 typedef struct sli4_req_common_set_loopback_mode_s {
2719 #if BYTE_ORDER == LITTLE_ENDIAN
2726 #error big endian version not defined
2730 typedef struct sli4_res_common_set_loopback_mode_s {
2737 #define SLI4_SET_FEATURES_DIF_SEED 0x01
2738 #define SLI4_SET_FEATURES_XRI_TIMER 0x03
2739 #define SLI4_SET_FEATURES_MAX_PCIE_SPEED 0x04
2740 #define SLI4_SET_FEATURES_FCTL_CHECK 0x05
2741 #define SLI4_SET_FEATURES_FEC 0x06
2742 #define SLI4_SET_FEATURES_PCIE_RECV_DETECT 0x07
2743 #define SLI4_SET_FEATURES_DIF_MEMORY_MODE 0x08
2744 #define SLI4_SET_FEATURES_SLI_PORT_PAUSE_STATE 0x09
2745 #define SLI4_SET_FEATURES_ENABLE_PCIE_OPTIONS 0x0A
2746 #define SLI4_SET_FEATURES_SET_CONFIG_AXR_T10PI 0x0C
2747 #define SLI4_SET_FEATURES_SET_CONFIG_TOW_T10PI 0x1C
2748 #define SLI4_SET_FEATURES_ENABLE_MULTI_RECEIVE_QUEUE 0x0D
2749 #define SLI4_SET_FEATURES_SET_FTD_XFER_HINT 0x0F
2750 #define SLI4_SET_FEATURES_SLI_PORT_HEALTH_CHECK 0x11
2751 #define SLI4_SET_FEATURES_AUTO_RSP_PARAM_RESET 0x19
2753 typedef struct sli4_req_common_set_features_s {
2755 #if BYTE_ORDER == LITTLE_ENDIAN
2760 #error big endian version not defined
2764 typedef struct sli4_req_common_set_features_dif_seed_s {
2765 #if BYTE_ORDER == LITTLE_ENDIAN
2769 #error big endian version not defined
2773 typedef struct sli4_req_common_set_features_t10_pi_mem_model_s {
2774 #if BYTE_ORDER == LITTLE_ENDIAN
2778 #error big endian version not defined
2782 typedef struct sli4_req_common_set_features_multirq_s {
2783 #if BYTE_ORDER == LITTLE_ENDIAN
2791 #error big endian version not defined
2795 typedef struct sli4_req_common_set_features_axr_t10pi_s {
2796 #if BYTE_ORDER == LITTLE_ENDIAN
2804 uint32_t app_tag:16,
2807 #error big endian version not defined
2811 typedef struct sli4_req_common_set_features_tow_t10pi_s {
2812 #if BYTE_ORDER == LITTLE_ENDIAN
2826 uint32_t nvme_diseed_sge[4];
2828 #error big endian version not defined
2832 typedef struct sli4_req_common_set_features_health_check_s {
2833 #if BYTE_ORDER == LITTLE_ENDIAN
2838 #error big endian version not defined
2842 typedef struct sli4_req_common_set_features_set_fdt_xfer_hint_s {
2843 #if BYTE_ORDER == LITTLE_ENDIAN
2846 #error big endian version not defined
2851 #define SLI4_CONFIG_FEC_LINK_TYPE_ETH (0)
2852 #define SLI4_CONFIG_FEC_LINK_TYPE_FC (1)
2854 typedef struct sli4_req_common_set_features_config_fec_s {
2855 #if BYTE_ORDER == LITTLE_ENDIAN
2856 uint32_t link_number:6,
2862 #error big endian version not defined
2866 typedef struct sli4_req_common_set_features_pause_state_s {
2867 #if BYTE_ORDER == LITTLE_ENDIAN
2871 #error big endian version not defined
2875 typedef struct sli4_req_common_set_features_auto_response_param_val_reset_s {
2876 #if BYTE_ORDER == LITTLE_ENDIAN
2880 #error big endian version not defined
2887 typedef struct sli4_req_dmtf_exec_clp_cmd_s {
2889 #if BYTE_ORDER == LITTLE_ENDIAN
2897 #error big endian version not defined
2901 typedef struct sli4_res_dmtf_exec_clp_cmd_s {
2903 #if BYTE_ORDER == LITTLE_ENDIAN
2913 #error big endian version not defined
2921 #define SLI4_RESOURCE_DESCRIPTOR_TYPE_PCIE 0x50
2922 #define SLI4_RESOURCE_DESCRIPTOR_TYPE_NIC 0x51
2923 #define SLI4_RESOURCE_DESCRIPTOR_TYPE_ISCSI 0x52
2924 #define SLI4_RESOURCE_DESCRIPTOR_TYPE_FCFCOE 0x53
2925 #define SLI4_RESOURCE_DESCRIPTOR_TYPE_RDMA 0x54
2926 #define SLI4_RESOURCE_DESCRIPTOR_TYPE_PORT 0x55
2927 #define SLI4_RESOURCE_DESCRIPTOR_TYPE_ISAP 0x56
2929 #define SLI4_PROTOCOL_NIC_TOE 0x01
2930 #define SLI4_PROTOCOL_ISCSI 0x02
2931 #define SLI4_PROTOCOL_FCOE 0x04
2932 #define SLI4_PROTOCOL_NIC_TOE_RDMA 0x08
2933 #define SLI4_PROTOCOL_FC 0x10
2934 #define SLI4_PROTOCOL_DEFAULT 0xff
2936 typedef struct sli4_resource_descriptor_v1_s {
2937 uint32_t descriptor_type:8,
2938 descriptor_length:8,
2940 uint32_t type_specific[0];
2943 typedef struct sli4_pcie_resource_descriptor_v1_s {
2944 uint32_t descriptor_type:8,
2945 descriptor_length:8,
2953 uint32_t sriov_state:8,
2957 uint32_t number_of_vfs:16,
2959 uint32_t mission_roles:8,
2968 typedef struct sli4_isap_resource_descriptor_v1_s {
2969 uint32_t descriptor_type:8,
2970 descriptor_length:8,
2972 uint32_t iscsi_tgt:1,
2977 uint32_t fcoe_tgt:1,
2982 uint32_t mc_type0:8,
2992 typedef struct sli4_req_common_get_function_config_s {
2996 typedef struct sli4_res_common_get_function_config_s {
2998 #if BYTE_ORDER == LITTLE_ENDIAN
3002 #error big endian version not defined
3009 typedef struct sli4_req_common_get_profile_config_s {
3011 uint32_t profile_id:8,
3016 typedef struct sli4_res_common_get_profile_config_s {
3018 #if BYTE_ORDER == LITTLE_ENDIAN
3022 #error big endian version not defined
3029 typedef struct sli4_req_common_set_profile_config_s {
3031 uint32_t profile_id:8,
3038 typedef struct sli4_res_common_set_profile_config_s {
3040 #if BYTE_ORDER == LITTLE_ENDIAN
3042 #error big endian version not defined
3049 typedef struct sli4_profile_descriptor_s {
3050 #if BYTE_ORDER == LITTLE_ENDIAN
3051 uint32_t profile_id:8,
3055 uint32_t profile_description[128];
3057 #error big endian version not defined
3065 #define MAX_PRODUCT_DESCRIPTORS 40
3070 typedef struct sli4_req_common_get_profile_list_s {
3072 #if BYTE_ORDER == LITTLE_ENDIAN
3073 uint32_t start_profile_index:8,
3076 #error big endian version not defined
3080 typedef struct sli4_res_common_get_profile_list_s {
3082 #if BYTE_ORDER == LITTLE_ENDIAN
3086 #error big endian version not defined
3093 typedef struct sli4_req_common_get_active_profile_s {
3097 typedef struct sli4_res_common_get_active_profile_s {
3099 #if BYTE_ORDER == LITTLE_ENDIAN
3100 uint32_t active_profile_id:8,
3105 #error big endian version not defined
3112 typedef struct sli4_req_common_set_active_profile_s {
3114 #if BYTE_ORDER == LITTLE_ENDIAN
3115 uint32_t active_profile_id:8,
3119 #error big endian version not defined
3123 typedef struct sli4_res_common_set_active_profile_s {
3130 typedef struct sli4_link_config_descriptor_s {
3131 #if BYTE_ORDER == LITTLE_ENDIAN
3132 uint32_t link_config_id:8,
3134 uint32_t config_description[8];
3136 #error big endian version not defined
3140 #define MAX_LINK_CONFIG_DESCRIPTORS 10
3145 typedef struct sli4_req_common_get_reconfig_link_info_s {
3147 #if BYTE_ORDER == LITTLE_ENDIAN
3149 #error big endian version not defined
3153 typedef struct sli4_res_common_get_reconfig_link_info_s {
3155 #if BYTE_ORDER == LITTLE_ENDIAN
3156 uint32_t active_link_config_id:8,
3158 next_link_config_id:8,
3160 uint32_t link_configuration_descriptor_count;
3163 #error big endian version not defined
3170 typedef struct sli4_req_common_set_reconfig_link_id_s {
3172 #if BYTE_ORDER == LITTLE_ENDIAN
3173 uint32_t next_link_config_id:8,
3177 #error big endian version not defined
3181 typedef struct sli4_res_common_set_reconfig_link_id_s {
3183 #if BYTE_ORDER == LITTLE_ENDIAN
3185 #error big endian version not defined
3189 #define SLI4_MAX_ULP 8
3191 typedef struct sli4_req_lowlevel_get_itcm_parity_stats_s {
3193 #if BYTE_ORDER == LITTLE_ENDIAN
3199 #error big endian version not defined
3203 typedef struct sli4_parity_err_count_s {
3208 typedef struct sli4_res_lowlevel_get_itcm_parity_stats_s {
3210 #if BYTE_ORDER == LITTLE_ENDIAN
3217 #error big endian version not defined
3221 typedef struct sli4_req_lowlevel_set_watchdog_s {
3223 #if BYTE_ORDER == LITTLE_ENDIAN
3224 uint32_t watchdog_timeout:16,
3227 #error big endian version not defined
3233 typedef struct sli4_res_lowlevel_set_watchdog_s {
3235 #if BYTE_ORDER == LITTLE_ENDIAN
3238 #error big endian version not defined
3243 #define SLI4_TRUNK_MODE_NONE 0x0
3244 #define SLI4_TRUNK_MODE_2_LINKS_PER_TRUNK 0x1
3245 #define SLI4_TRUNK_MODE_4_LINKS_PER_TRUNK 0x2
3247 typedef struct sli4_req_set_trunk_mode_s {
3249 #if BYTE_ORDER == LITTLE_ENDIAN
3252 uint32_t reserved[2];
3254 #error big endian version not defined
3260 typedef struct sli4_res_set_trunk_mode_s {
3262 #if BYTE_ORDER == LITTLE_ENDIAN
3265 #error big endian version not defined
3269 typedef struct sli4_req_lowlevel_set_diag_log_options_s {
3271 #if BYTE_ORDER == LITTLE_ENDIAN
3279 uint32_t acqe_interval:16,
3288 #error big endian version not defined
3293 typedef struct sli4_res_lowlevel_set_diag_log_options_s {
3295 #if BYTE_ORDER == LITTLE_ENDIAN
3298 #error big endian version not defined
3305 typedef struct sli4_eqe_s {
3306 #if BYTE_ORDER == LITTLE_ENDIAN
3312 #error big endian version not defined
3316 #define SLI4_MAJOR_CODE_STANDARD 0
3317 #define SLI4_MAJOR_CODE_SENTINEL 1
3324 typedef struct sli4_mcqe_s {
3325 #if BYTE_ORDER == LITTLE_ENDIAN
3326 uint32_t completion_status:16,
3337 #error big endian version not defined
3347 typedef struct sli4_acqe_s {
3348 #if BYTE_ORDER == LITTLE_ENDIAN
3349 uint32_t event_data[3];
3357 #error big endian version not defined
3361 typedef struct sli4_port_event_acqe_s {
3362 #if BYTE_ORDER == LITTLE_ENDIAN
3376 #error big endian version not defined
3380 #define SLI4_ACQE_EVENT_CODE_LINK_STATE 0x01
3381 #define SLI4_ACQE_EVENT_CODE_FCOE_FIP 0x02
3382 #define SLI4_ACQE_EVENT_CODE_DCBX 0x03
3383 #define SLI4_ACQE_EVENT_CODE_ISCSI 0x04
3384 #define SLI4_ACQE_EVENT_CODE_GRP_5 0x05
3385 #define SLI4_ACQE_EVENT_CODE_FC_LINK_EVENT 0x10
3386 #define SLI4_ACQE_EVENT_CODE_SLI_PORT_EVENT 0x11
3387 #define SLI4_ACQE_EVENT_CODE_VF_EVENT 0x12
3388 #define SLI4_ACQE_EVENT_CODE_MR_EVENT 0x13
3390 #define SLI4_ACQE_PORT_EVENT_TYPE_MISCONF_PHYPORTS 0x09
3391 #define SLI4_ACQE_PORT_EVENT_TYPE_ITCM_PARITY_EVENT 0x0D
3418 typedef struct sli4_reg_s {
3432 #define SLI_USER_MQ_COUNT 1
3433 #define SLI_MAX_CQ_SET_COUNT 16
3434 #define SLI_MAX_RQ_SET_COUNT 16
3448 typedef struct sli4_queue_s {
3495 ocs_unlock(&q->
lock);
3498 #define SLI4_PAUSE_ERRX_PAIR_CNT 16
3500 #define SLI4_QUEUE_DEFAULT_CQ UINT16_MAX
3502 #define SLI4_QUEUE_RQ_BATCH 8
3535 typedef struct sli4_link_event_s {
3549 typedef struct sli4_sgl_chaining_params_s {
3559 typedef struct sli4_fip_event_s {
3601 typedef struct sli4_s {
3629 uint8_t fw_name[2][16];
3635 char bios_version_string[32];
3637 uint8_t is_ulp_fc[2];
3654 uint32_t has_extents:1,
3660 perf_wq_id_association:1,
3661 cq_create_version:2,
3662 mq_create_version:2,
3664 sgl_pre_registered:1,
3665 sgl_pre_registration_required:1,
3666 t10_dif_inline_capable:1,
3667 t10_dif_separate_capable:1,
3671 suppress_rsp_not_supported:1,
3673 uint32_t sge_supported_length;
3680 uint8_t bbscn_max:4,
3687 int32_t (*link)(
void *,
void *);
3689 int32_t (*fip)(
void *,
void *);
3693 #if defined(OCS_INCLUDE_DEBUG)
3696 ocs_dma_t *bmbx_non_emb_pmd;
3713 static inline uint32_t
3723 static inline uint32_t
3732 static inline uint32_t
3739 static inline uint32_t
3745 static inline uint32_t
3750 ocs_log_test(sli4->
os,
"unsupported SGL page sizes %#x\n",
3779 ocs_memset(sge, 0,
sizeof(*sge));
3791 static inline uint32_t
3797 static inline uint32_t
3803 static inline uint32_t
3809 static inline void *
3815 static inline void *
3821 static inline void *
3827 static inline uint32_t
3833 static inline uint32_t
3839 static inline void *
3845 static inline char *
3851 static inline uint32_t
3857 static inline uint32_t
3863 static inline uint32_t
3884 static inline uint32_t
3890 static inline uint32_t
3896 static inline uint32_t
3902 static inline uint32_t
3908 static inline uint32_t
3914 static inline uint32_t
3920 static inline uint32_t
3926 static inline int32_t
3930 ocs_log_test(sli4->
os,
"HLM not supported\n");
3939 static inline uint32_t
3945 static inline uint32_t
3951 static inline int32_t
3955 ocs_log_test(sli4->
os,
"DPP not supported\n");
3959 sli4->
config.
dpp = value != 0 ? TRUE : FALSE;
3964 static inline uint32_t
3970 static inline uint32_t
3976 static inline uint32_t
3982 static inline int32_t
3986 ocs_log_test(sli4->
os,
"SGL pre-registration required\n");
4007 static inline int32_t
4020 ocs_log_test(sli4->
os,
"unsupported topology %#x\n", value);
4027 static inline uint16_t
4033 static inline uint32_t
4039 static inline char *
4045 static inline uint32_t
4051 count = 1 << ocs_lg2(mask);
4078 uint32_t, uint32_t, uint32_t, uint32_t);
4113 extern int32_t
sli_cmd_reg_rpi(
sli4_t *,
void *,
size_t, uint32_t, uint16_t, uint16_t, ocs_dma_t *, uint8_t, uint8_t, uint8_t);
4125 uint16_t, uint16_t, uint32_t, uint32_t,
char *, ocs_dma_t *);
4128 uint32_t,
char *, ocs_dma_t *);
4133 uint8_t query, uint8_t is_buffer_list,
4134 ocs_dma_t *buffer, uint8_t fdb);
4137 ocs_dma_t *tx_buffer,
size_t tx_buf_len,
4138 ocs_dma_t *rx_buffer,
size_t rx_buf_len);
4143 size_t size, uint32_t start_profile_index, ocs_dma_t *dma);
4149 uint32_t active_profile_id);
4151 size_t size, ocs_dma_t *dma);
4153 size_t size, ocs_dma_t *dma,
4154 uint32_t fd, uint32_t active_link_config_id);
4158 size_t size, ocs_dma_t *dma);
4160 size_t size, ocs_dma_t *dma,
4161 uint8_t profile_id, uint32_t descriptor_count,
sli4_mbox_command_header_t hdr
uint32_t chain_sge_initial_value_hi
READ_STATUS - read tx/rx status of a particular port.
Mailbox Completion Queue Entry.
uint32_t ulp1_toe_wq_total
int32_t sli_cmd_read_link_stats(sli4_t *sli4, void *buf, size_t size, uint8_t req_ext_counters, uint8_t clear_overflow_flags, uint8_t clear_all_counters)
Write a READ_LINK_STAT command to the provided buffer.
int32_t sli_cmd_down_link(sli4_t *sli4, void *buf, size_t size)
Write a DOWN_LINK command to the provided buffer.
uint32_t uint32_t sge_supported_length
int32_t sli_cmd_read_status(sli4_t *sli4, void *buf, size_t size, uint8_t clear_counters)
Write a READ_STATUS command to the provided buffer.
int32_t sli_cmd_common_nop(sli4_t *sli4, void *buf, size_t size, uint64_t context)
Write a COMMON_NOP command.
uint32_t ulp0_toe_defrq_total
sli4_port_type_e port_type
int32_t sli_cmd_write_nvparms(sli4_t *sli4, void *buf, size_t size, uint8_t *wwpn, uint8_t *wwnn, uint8_t hard_alpa, uint32_t preferred_d_id)
Write a WRITE_NVPARMS command to the provided buffer.
uint32_t received_dropped_no_available_rpi_resources_count
UNREG_RPI - unregister one or more RPI.
static uint32_t sli_get_hlm_capable(sli4_t *sli4)
char bios_version_string[32]
Generic Common Create EQ/CQ/MQ/WQ/RQ Queue completion.
uint32_t ulp1_toe_rqid_base
uint32_t empty_xri_pool_count
int32_t sli_cmd_common_read_transceiver_data(sli4_t *sli4, void *buf, size_t size, uint32_t page_num, ocs_dma_t *dma)
Write a COMMON_READ_TRANSCEIVER_DATA command.
REG_RPI - register a Remote Port Indicator.
uint32_t ulp0_toe_rq_total
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 ...
sli4_link_medium_e medium
static uint32_t sli_get_is_ulp_enabled(sli4_t *sli4, uint16_t ulp)
int32_t sli_queue_poke(sli4_t *sli4, sli4_queue_t *q, uint32_t index, uint8_t *entry)
uint32_t uint32_t timeout
uint16_t link_module_type
sli4_mbox_command_header_t hdr
COMMON_EXT_FAT_READ_STRING_TABLE.
static uint32_t sli_get_max_sgl(sli4_t *sli4)
uint32_t ep_firmware_data_structure_version
int32_t sli_cmd_common_set_dump_location(sli4_t *sli4, void *buf, size_t size, uint8_t query, uint8_t is_buffer_list, ocs_dma_t *buffer, uint8_t fdb)
Write a COMMON_SET_DUMP_LOCATION command.
uint32_t default_extended_timeout
uint32_t number_remaining_bytes
sli4_mbox_command_header_t hdr
sli4_link_topology_e topology
sli4_mbox_command_header_t hdr
uint32_t ulp0_iscsi_icd_total
INIT_VFI - initialize the VFI resource.
int32_t sli_cq_parse(sli4_t *sli4, sli4_queue_t *cq, uint8_t *cqe, sli4_qentry_e *etype, uint16_t *q_id)
Parse a CQ entry to retrieve the event type and the associated queue.
uint32_t maximum_log_entries
int32_t sli_dump_is_ready(sli4_t *sli4)
Read the SLIPORT_STATUS register to to check if a dump is present.
uint16_t sgl_index_field_offset
uint32_t ulp0_nic_wq_total
#define SLI4_PAUSE_ERRX_PAIR_CNT
uint32_t max_qentries[SLI_QTYPE_MAX]
struct sli4_features_t::@35 flag
uint32_t clp_detailed_status
uint32_t suppress_rsp_not_supported
void sli_validate_pause_errors(sli4_t *sli4, uint32_t *skip_dump)
static void * sli_get_wwn_port(sli4_t *sli4)
static uint32_t sli_is_dif_separate_capable(sli4_t *sli4)
int32_t sli_cmd_init_link(sli4_t *sli4, void *buf, size_t size, uint32_t speed, uint8_t reset_alpa)
Write an INIT_LINK command to the provided buffer.
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.
uint32_t number_log_entries
uint32_t total_exchanges_originator
uint32_t firmware_post_status
uint32_t receive_frame_count
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.
#define SLI4_READ_CFG_TOPO_FC_DA
sli4_sli_config_pmd_t mem
#define SLI4_READ_CFG_TOPO_FCOE
static uint32_t sli_get_fw_revision(sli4_t *sli4, uint32_t which)
int32_t sli_setup(sli4_t *sli4, ocs_os_handle_t os, sli4_port_type_e port_type)
Set up the SLI context.
static uint32_t sli_iftype6_eq_doorbell(uint16_t n_popped, uint16_t id, uint8_t arm)
#define SLI4_CMD_REG_FCFI_NUM_RQ_CFG
REG_FCFI - activate a FC Forwarder.
uint32_t logical_link_speed
static int32_t sli_set_dpp(sli4_t *sli4, uint32_t value)
sli4_mbox_command_header_t hdr
int32_t sli_cmd_config_optimized_write_hp(sli4_t *sli4, void *buf, size_t size, uint32_t max_burst_len, uint32_t xri_cnt, uint32_t block_size, uint32_t tow_feature)
Write an CONFIG_OPTIMIZED_WRITE_HP command to the provided buffer.
uint32_t ulp1_toe_defrq_total
uint32_t sgl_pre_registered
sli4_mbox_command_header_t hdr
UNREG_VFI - unregister one or more VFI.
uint32_t number_returned_bytes
INIT_VPI - initialize the VPI resource.
sli4_mbox_command_header_t hdr
int32_t sli_queue_write(sli4_t *sli4, sli4_queue_t *q, uint8_t *entry)
Write an entry to the queue object.
static uint32_t sli_iftype6_cq_doorbell(uint16_t n_popped, uint16_t id, uint8_t arm)
sli4_sgl_chaining_params_t sgl_chaining_params
uint32_t ulp0_nic_wqid_base
T10 DIF Seed Scatter-Gather Entry (SGE)
uint32_t nvme_max_data_len
static uint32_t sli_get_tow_capable(sli4_t *sli4)
static void sli_queue_lock(sli4_queue_t *q)
int32_t sli_queue_free(sli4_t *sli4, sli4_queue_t *q, uint32_t destroy_queues, uint32_t free_memory)
Free a queue.
int32_t sli_fw_ready(sli4_t *sli4)
Determine if the chip FW is in a ready state.
int32_t sli_queue_reset(sli4_t *sli4, sli4_queue_t *q)
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)
int32_t sli_resource_alloc(sli4_t *sli4, sli4_resource_e rtype, uint32_t *rid, uint32_t *index)
Allocate SLI Port resources.
READ_SPARM64 - read the Port service parameters.
int32_t sli_cmd_unreg_rpi(sli4_t *sli4, void *buf, size_t size, uint16_t indicator, sli4_resource_e which, uint32_t fc_id)
Write an UNREG_RPI command to the provided buffer.
int32_t sli_cmd_post_xri(sli4_t *sli4, void *buf, size_t size, uint16_t xri_base, uint16_t xri_count)
Write a POST_XRI command to the provided buffer.
int32_t sli_queue_is_empty(sli4_t *sli4, sli4_queue_t *q)
Check if the given queue is empty.
sli4_mbox_command_header_t hdr
int32_t sli_cmd_fc_set_trunk_mode(sli4_t *sli4, void *buf, size_t size, uint32_t trunk_mode)
Write a SLI4_OPC_FC_SET_TRUNK_MODE command.
uint32_t actual_response_length
uint32_t ulp0_lro_rqid_base
uint32_t buffer_address_high
uint32_t cmd_buf_addr_low
uint32_t uint32_t read_offset
void sli_reg_write(sli4_t *sli, sli4_regname_e reg, uint32_t val)
Write the value to the given SLI register.
uint32_t dropped_frames_due_to_no_rq_buffer_count
uint32_t ulp1_iscsi_chain_icd_total
int32_t sli_cmd_reg_fcfi(sli4_t *sli4, void *buf, size_t size, uint16_t index, sli4_cmd_rq_cfg_t rq_cfg[SLI4_CMD_REG_FCFI_NUM_RQ_CFG], uint16_t vlan_id)
Write a REG_FCFI command to the provided buffer.
uint32_t receive_kbyte_count
int32_t sli_resource_reset(sli4_t *sli4, sli4_resource_e rtype)
int32_t sli_cqe_mq(void *buf)
Check the mailbox/queue completion entry.
uint32_t advertised_receive_bufftor_to_buffer_credit
sli4_mbox_command_header_t hdr
static sli4_link_medium_e sli_get_medium(sli4_t *sli4)
uint32_t actual_read_length
sli4_mbox_command_header_t hdr
int32_t sli_cmd_config_optimized_write(sli4_t *sli4, void *buf, size_t size, uint32_t max_burst_len, uint32_t xri_cnt, uint32_t tow_feature)
Write an CONFIG_OPTIMIZED_WRITE command to the provided buffer.
READ_LNK_STAT - read link status of a particular port.
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.
static void * sli_get_wwn_node(sli4_t *sli4)
uint32_t uint32_t physical_address_low
uint32_t returned_vpd_length
static uint32_t sli_get_max_sge(sli4_t *sli4)
#define SLI4_READ_CFG_TOPO_FC
uint32_t ulp1_nic_wq_total
T10 DIF Scatter-Gather Entry (SGE)
int32_t sli_teardown(sli4_t *sli4)
Tear down a SLI context.
uint32_t aggregate_link_speed
#define SLI4_EQCQ_CQ_ID_MASK_LO
int32_t sli_cmd_reg_fcfi_mrq(sli4_t *sli4, void *buf, size_t size, uint8_t mode, uint16_t fcf_index, uint16_t vlan_id, sli4_cmd_rq_cfg_t rq_cfg[SLI4_CMD_REG_FCFI_NUM_RQ_CFG])
Write REG_FCFI_MRQ to provided command buffer.
int32_t sli_cmd_common_write_object(sli4_t *sli4, void *buf, size_t size, uint16_t noc, uint16_t eof, uint32_t desired_write_length, uint32_t offset, char *object_name, ocs_dma_t *dma)
Write a COMMON_WRITE_OBJECT command.
uint32_t returned_byte_cnt
#define SLI4_EQCQ_EQ_ID_MASK_LO
COMMON_GET_EXT_FAT_CAPABILITIES.
READ_NVPARMS - read SLI port configuration parameters.
sli4_mbox_command_header_t hdr
static int32_t sli_set_sgl_preregister(sli4_t *sli4, uint32_t value)
static uint32_t sli_get_sgl_preregister_required(sli4_t *sli4)
static uint32_t sli_get_max_queue(sli4_t *sli4, sli4_qtype_e qtype)
uint32_t data_buffer_size
uint32_t third_hw_revision
void sli_calc_max_qentries(sli4_t *sli4)
Calculate max queue entries.
int32_t sli_link_is_configurable(sli4_t *sli)
Determine if the link can be configured.
sli4_mbox_command_header_t hdr
struct sli4_t::@47 config
int32_t sli_resource_free(sli4_t *sli4, sli4_resource_e rtype, uint32_t rid)
Free the SLI Port resources.
static uint32_t sli_get_dpp(sli4_t *sli4)
static void * sli_get_fw_name(sli4_t *sli4, uint32_t which)
uint32_t driver_advanced_features_supported
int32_t sli_cqe_async(sli4_t *sli4, void *buf)
Check the asynchronous event completion entry.
int32_t sli_cmd_config_auto_xfer_rdy(sli4_t *sli4, void *buf, size_t size, uint32_t max_burst_len)
Write an CONFIG_AUTO_XFER_RDY command to the provided buffer. Command to enable AXR in G5...
static uint32_t sli_get_suppress_rsp_not_supported(sli4_t *sli4)
static uint32_t sli_get_hlm(sli4_t *sli4)
sli4_regname_e
Register name enums.
uint32_t rx_phy_addr_high
uint32_t trace_table_index
COMMON_SET_DUMP_LOCATION.
sli4_mbox_command_header_t hdr
int32_t sli_cmd_read_sparm64(sli4_t *sli4, void *buf, size_t size, ocs_dma_t *dma, uint16_t vpi)
Write a READ_SPARM64 command to the provided buffer.
uint32_t chain_sge_initial_value_hi
int32_t sli_cmd_common_set_reconfig_link_id(sli4_t *sli4, void *buf, size_t size, ocs_dma_t *dma, uint32_t fd, uint32_t active_link_config_id)
Write a COMMON_SET_RECONFIG_LINK_ID command.
uint32_t uint32_t read_offset
int32_t sli_port_migration(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_mbox_command_header_t hdr
uint32_t received_eofa_count
int32_t sli_queue_eq_arm(sli4_t *sli4, sli4_queue_t *q, uint8_t arm)
Arm an EQ.
AUTO_XFER_RDY - Configure the auto-generate XFER-RDY feature.
int32_t sli_raise_ue(sli4_t *sli4, uint8_t dump)
Cause chip to enter an unrecoverable error state.
Buffer Descriptor Entry (BDE)
uint32_t t10_dif_inline_capable
uint32_t chain_sge_initial_value_lo
uint32_t host_buffer_descriptor_count
uint32_t ulp0_iscsi_icd_base
COMMON_SET_RECONFIG_LINK_ID.
sli4_mbox_command_header_t hdr
static void sli_set_wq_id_association(void *entry, uint16_t q_id)
Format a WQE with WQ_ID Association performance hint.
COMMON_GET_CNTL_ATTRIBUTES.
static uint32_t sli_get_hw_revision(sli4_t *sli4, uint32_t which)
COMMON_SET_PROFILE_CONFIG.
uint32_t cmd_buf_addr_high
int32_t sli_get_queue_entry_size(sli4_t *sli4, uint32_t qtype)
Get queue entry size.
uint32_t ulp0_iscsi_chain_icd_base
int32_t sli_cmd_reg_vpi(sli4_t *sli4, void *buf, size_t size, ocs_sli_port_t *sport, uint8_t update)
Write a REG_VPI command to the provided buffer.
COMMON_GET_SLI4_PARAMETERS.
sli4_mbox_command_header_t hdr
uint32_t elastic_buffer_overrun_error_count
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_mbox_command_header_t hdr
static uint32_t sli_get_sli_rev(sli4_t *sli4)
uint32_t ulp1_nic_wqid_base
struct sli4_t::@47::@50 extent[SLI_RSRC_MAX]
COMMON_GET_RECONFIG_LINK_INFO.
Asynchronous Completion Queue Entry.
uint32_t empty_rq_timeout_count
static sli4_asic_rev_e sli_get_asic_rev(sli4_t *sli4)
uint32_t t10_dif_separate_capable
int32_t sli_cmd_common_get_resource_extent_info(sli4_t *sli4, void *buf, size_t size, uint16_t rtype)
Write a COMMON_GET_RESOURCE_EXTENT_INFO command.
uint32_t ulp1_lro_rq_total
POST_XRI - post XRI resources to the SLI Port.
uint32_t dropped_frames_due_to_no_xri_count
uint32_t received_eofni_count
static int32_t sli_set_topology(sli4_t *sli4, uint32_t value)
uint32_t async_event_bitmap
uint32_t received_eofdti_count
sli4_mbox_command_header_t hdr
static uint32_t sli_get_sgl_preregister(sli4_t *sli4)
#define SLI4_READ_CFG_TOPO_FC_AL
uint32_t physical_address_high
uint32_t advertised_transmit_buffer_to_buffer_credit
COMMON_READ_TRANSCEIVER_DATA.
uint32_t arbitration_fc_al_timout_count
sli4_mbox_command_header_t hdr
sli4_asic_type_e asic_type
int32_t sli_cmd_read_nvparms(sli4_t *sli4, void *buf, size_t size)
Write a READ_NVPARMS command to the provided buffer.
uint32_t primitive_sequence_event_timeout_count
int32_t sli_dump_is_present(sli4_t *sli4)
Read the SLIPORT_STATUS register to check if a dump is present.
uint32_t profile_descriptor_count
uint32_t received_dropped_no_aer_count
COMMON_GET_FUNCTION_CONFIG.
static void sli_skh_chain_sge_build(sli4_t *sli4, sli4_sge_t *sge, uint32_t xri_index, uint32_t frag_num, uint32_t offset)
uint32_t ulp1_toe_rq_total
uint32_t buffer_address_low
uint32_t fec_uncorrectable_blocks_count
int32_t sli_cmd_sli_config(sli4_t *sli4, void *buf, size_t size, uint32_t length, ocs_dma_t *dma)
Write a SLI_CONFIG command to the provided buffer.
uint32_t receive_f_bsy_count
uint8_t on_die_temperature
uint32_t received_soff_count
COMMON_GET_PROFILE_CONFIG.
uint32_t resp_buf_addr_low
static uint32_t sli_get_sli_family(sli4_t *sli4)
REQUEST_FEATURES - request / query SLI features.
int32_t(* sli4_create_q_fn_t)(sli4_t *, void *, size_t, ocs_dma_t *, uint16_t, uint16_t)
Common Create Queue function prototype.
int32_t sli_cmd_fcoe_set_loopback_mode(sli4_t *sli4, void *buf, size_t size, int type)
Write a SLI4_OPC_FCOE_SET_LINK_DIAG_LOOPBACK command.
uint32_t ulp0_toe_rqid_base
int32_t sli_cmd_common_get_profile_list(sli4_t *sli4, void *buf, size_t size, uint32_t start_profile_index, ocs_dma_t *dma)
Write a COMMON_COMMON_GET_PROFILE_LIST command.
AUTO_XFER_RDY - Configure the Target Optimized Write Feature.
int32_t sli_cmd_common_read_object(sli4_t *sli4, void *buf, size_t size, uint32_t desired_read_length, uint32_t offset, char *object_name, ocs_dma_t *dma)
Write a COMMON_READ_OBJECT command.
static uint32_t sli_get_vpd_len(sli4_t *sli4)
static uint32_t sli_get_max_rsrc(sli4_t *sli4, sli4_resource_e rsrc)
uint32_t resp_buf_addr_high
sli4_mbox_command_header_t hdr
static char * sli_get_bios_version_string(sli4_t *sli4)
WRITE_NVPARMS - write SLI port configuration parameters.
int32_t sli_queue_arm(sli4_t *sli4, sli4_queue_t *q, uint8_t arm)
Arm a queue.
Fields retrieved from skyhawk that used used to build chained SGL.
uint32_t link_speed_selection_code
int32_t sli_reset(sli4_t *sli4)
int32_t sli_cmd_dmtf_exec_clp_cmd(sli4_t *sli4, void *buf, size_t size, ocs_dma_t *cmd, ocs_dma_t *resp)
Write a DMTF_EXEC_CLP_CMD command.
uint32_t uint32_t uint32_t rsvd3
RELEASE_XRI - Release XRI resources from the SLI Port.
uint32_t current_receive_buffer_to_buffer_credit
static void sli_queue_unlock(sli4_queue_t *q)
int32_t sli_cq_alloc_set(sli4_t *sli4, sli4_queue_t *qs[], uint32_t num_cqs, uint32_t n_entries, sli4_queue_t *eqs[])
Allocate a c queue set.
COMMON_GET_RESOURCE_EXTENT_INFO.
uint32_t sgl_pre_registration_required
uint32_t max_num_processed
static uint32_t sli_get_dpp_capable(sli4_t *sli4)
sli4_mbox_command_header_t hdr
int32_t sli_cmd_common_get_profile_config(sli4_t *sli4, void *buf, size_t size, ocs_dma_t *dma)
Write a COMMON_COMMON_GET_PROFILE_CONFIG command.
COMMON_SET_LOOPBACK_MODE.
uint32_t delay_multiplier
sli4_link_status_e status
sli4_mbox_command_header_t hdr
sli4_port_state_t link_current
COMMON_GET_ACTIVE_PROFILE.
UNREG_FCFI - unregister a FCFI.
uint32_t sgl_segment_address_low
static uint32_t sli_page_count(size_t bytes, uint32_t page_size)
#define MAX_PRODUCT_DESCRIPTORS
static sli4_asic_type_e sli_get_asic_type(sli4_t *sli4)
static uint16_t sli_get_link_module_type(sli4_t *sli4)
int32_t sli_cmd_config_auto_xfer_rdy_hp(sli4_t *sli4, void *buf, size_t size, uint32_t max_burst_len, uint32_t block_size)
Write an CONFIG_AUTO_XFER_RDY_HP command to the provided buffer.
uint32_t loss_of_sync_error_count
int32_t sli_reset_required(sli4_t *sli4)
Read the SLIPORT_STATUS register to check if the reset required is set.
uint32_t function_capabilities
uint32_t sli_reg_read(sli4_t *sli, sli4_regname_e reg)
Read the given SLI register.
uint32_t last_processed_time
int32_t sli_cmd_common_delete_object(sli4_t *sli4, void *buf, size_t size, char *object_name)
Write a COMMON_DELETE_OBJECT command.
uint64_t unique_identifier
uint32_t ulp0_lro_rq_total
uint32_t ulp0_toe_wqid_base
uint32_t buffer_address_low
INIT_LINK - initialize the link for a FC/FCoE port.
int32_t sli_cmd_common_get_function_config(sli4_t *sli4, void *buf, size_t size)
#define SLI4_IF_TYPE_LANCER_G7
static uint32_t sli_get_is_sgl_chaining_capable(sli4_t *sli4)
uint32_t actual_vpd_length
uint32_t primitive_sequence_error_count
READ_TOPOLOGY - read the link event information.
uint32_t nvme_max_data_len
uint32_t actual_write_length
int32_t __sli_create_queue(sli4_t *sli4, sli4_queue_t *q)
Issue the command to create a queue.
uint32_t tx_phy_addr_high
uint32_t sge_supported_length
uint32_t number_log_entries
sli4_port_state_t link_down
uint32_t buffer_address_low
sli4_mbox_command_header_t hdr
int32_t __sli_queue_init(sli4_t *sli4, sli4_queue_t *q, uint32_t qtype, size_t size, uint32_t n_entries, uint32_t align)
Initialize a queue object.
uint32_t uint32_t supported_modes
int32_t sli_fw_reset(sli4_t *sli4)
Issue a Firmware Reset.
int32_t sli_cmd_reg_vfi(sli4_t *sli4, void *buf, size_t size, ocs_domain_t *domain)
Write a REG_VFI command to the provided buffer.
#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.
int32_t sli_cmd_common_get_reconfig_link_info(sli4_t *sli4, void *buf, size_t size, ocs_dma_t *dma)
Write a COMMON_GET_RECONFIG_LINK_INFO command.
uint32_t uint32_t uint32_t rsvd10
int32_t sli_cmd_unreg_vpi(sli4_t *sli4, void *buf, size_t size, uint16_t indicator, uint32_t which)
Write an UNREG_VPI command to the provided buffer.
sli4_mbox_command_header_t hdr
int32_t sli_cmd_common_set_active_profile(sli4_t *sli4, void *buf, size_t size, uint32_t fd, uint32_t active_profile_id)
Write a COMMON_COMMON_SET_ACTIVE_PROFILE command.
uint32_t buffer_address_high
int32_t sli_cmd_common_get_active_profile(sli4_t *sli4, void *buf, size_t size)
Write a COMMON_COMMON_GET_ACTIVE_PROFILE command.
#define MAX_LINK_CONFIG_DESCRIPTORS
uint32_t ulp0_iscsi_chain_icd_total
sli4_mbox_command_header_t hdr
static int32_t sli_set_hlm(sli4_t *sli4, uint32_t value)
int32_t sli_cmd_release_xri(sli4_t *sli4, void *buf, size_t size, uint8_t num_xri)
Write a RELEASE_XRI command to the provided buffer.
uint32_t ulp1_toe_wqid_base
int32_t sli_cmd_read_config(sli4_t *sli4, void *buf, size_t size)
Write a READ_CONFIG command to the provided buffer.
uint32_t receive_p_bsy_count
uint32_t chain_sge_initial_value_lo
sli4_mbox_command_header_t hdr
int32_t sli_is_paused(sli4_t *sli4)
COMMON_GET_CNTL_ATTRIBUTES.
static uint32_t sli_get_dif_capable(sli4_t *sli4)
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.
sli4_mbox_command_header_t hdr
uint32_t buffer_address_high
List Segment Pointer Scatter-Gather Entry (SGE)
uint32_t fec_corrected_blocks_count
UNREG_VPI - unregister one or more VPI.
int32_t sli_bmbx_command(sli4_t *sli4)
Submit a command to the bootstrap mailbox and check the status.
Profile Descriptor for profile functions.
uint32_t receive_sequence_count
uint32_t current_transmit_buffer_to_buffer_credit
int32_t sli_cmd_unreg_vfi(sli4_t *sli4, void *buf, size_t size, ocs_domain_t *domain, uint32_t which)
Write an UNREG_VFI command to the provided buffer.
int32_t sli_cmd_dump_type4(sli4_t *sli4, void *buf, size_t size, uint16_t wki)
Write a DUMP Type 4 command to the provided buffer.
int32_t sli_cmd_init_vpi(sli4_t *sli4, void *buf, size_t size, uint16_t vpi, uint16_t vfi)
Write an INIT_VPI command to the provided buffer.
int32_t sli_callback(sli4_t *sli4, sli4_callback_e which, void *func, void *arg)
Register a callback for the given event.
Scatter-Gather Entry (SGE)
READ_CONFIG - read SLI port configuration parameters.
uint32_t ulp1_toe_defrqid_base
int32_t sli_cmd_common_set_profile_config(sli4_t *sli4, void *buf, size_t size, ocs_dma_t *dma, uint8_t profile_id, uint32_t descriptor_count, uint8_t isap)
Write a COMMON_COMMON_SET_PROFILE_CONFIG command.
REG_VFI - register a Virtual Fabric Indicator.
int32_t sli_cmd_common_get_sli4_parameters(sli4_t *sli4, void *buf, size_t size)
Write a COMMON_GET_SLI4_PARAMETERS command.
uint16_t max_qcount[SLI_QTYPE_MAX]
REG_VPI - register a Virtual Port Indicator.
int32_t sli_cmd_config_run_biu_diag(sli4_t *sli4, void *buf, size_t size, ocs_dma_t *tx_buffer, size_t tx_buf_len, ocs_dma_t *rx_buffer, size_t rx_buf_len)
Write a RUN_BIU_DIAG command.
static uint32_t sli_get_if_type(sli4_t *sli4)
int32_t sli_cmd_init_vfi(sli4_t *sli4, void *buf, size_t size, uint16_t vfi, uint16_t fcfi, uint16_t vpi)
Write an INIT_VFI command to the provided buffer.
uint64_t sgl_index_field_mask
sli4_mbox_command_header_t hdr
static uint32_t sli_get_is_dual_ulp_capable(sli4_t *sli4)
uint32_t total_exchanges_responder
uint16_t frag_num_field_offset
int32_t sli_cmd_unreg_fcfi(sli4_t *sli4, void *buf, size_t size, uint16_t indicator)
Write a UNREG_FCFI command to the provided buffer.
int32_t sli_cmd_config_link(sli4_t *sli4, void *buf, size_t size)
Write a CONFIG_LINK command to the provided buffer.
uint32_t ulp1_iscsi_chain_icd_base
uint32_t flash_rom_access_operation_type
sli4_mbox_command_header_t hdr
uint64_t frag_num_field_mask
Generic Command Request header.
sli4_mbox_command_header_t hdr
sli4_mbox_command_header_t hdr
uint64_t max_process_time_ms
Generic Command Response header.
COMMON_SET_ACTIVE_PROFILE.
uint32_t transmit_sequence_count
uint32_t invalid_transmission_word_error_count
const uint8_t sli4_fw_deinitialize[]
FW_DEINITIALIZE - deinitialize a SLI port.
uint32_t ulp0_toe_wq_total
uint32_t second_hw_revision
READ_REV - read the Port revision levels.
int32_t sli_cmd_read_topology(sli4_t *sli4, void *buf, size_t size, ocs_dma_t *dma)
Write a READ_TOPOLOGY command to the provided buffer.
int32_t sli_queue_index(sli4_t *sli4, sli4_queue_t *q)
static uint32_t sli_get_xib_capable(sli4_t *sli4)
int32_t _sli_queue_write(sli4_t *sli4, sli4_queue_t *q, uint8_t *entry)
Write an entry to the queue object.
static void * sli_get_vpd(sli4_t *sli4)
uint32_t transmit_kbyte_count
uint32_t sgl_segment_address_high
uint32_t loss_of_signal_error_count
static uint32_t sli_get_portnum(sli4_t *sli4)
int32_t sli_init(sli4_t *sli4)
COMMON_EXT_FAT_RETRIEVE_SNAPSHOT.
int32_t sli_cmd_reg_rpi(sli4_t *sli4, void *buf, size_t size, uint32_t nport_id, uint16_t rpi, uint16_t vpi, ocs_dma_t *dma, uint8_t update, uint8_t enable_t10_pi, uint8_t hlm)
Write a REG_RPI command to the provided buffer.
uint32_t flash_rom_access_opcode
static uint32_t sli_cq_doorbell(uint16_t n_popped, uint16_t id, uint8_t arm)
uint32_t uint32_t mbx_data_structure_version
uint32_t link_failure_error_count
static uint32_t sli_get_auto_xfer_rdy_capable(sli4_t *sli4)
uint32_t transmit_frame_count
sli4_mbox_command_header_t hdr
uint32_t ulp1_lro_rqid_base
static uint32_t sli_get_tow_xris_max(sli4_t *sli4)
int32_t(* sli4_destroy_q_fn_t)(sli4_t *, void *, size_t, uint16_t)
Common Destroy Queue function prototype.
Link Config Descriptor for link config functions.
uint32_t received_dropped_no_available_xri_resources_count
uint32_t buffer_address_low
uint32_t host_buffer_descriptor_count