1 #ifndef __57XX_FCOE_HSI_LINUX_LE__
2 #define __57XX_FCOE_HSI_LINUX_LE__
5 * common data for all protocols
7 struct b577xx_doorbell_hdr
{
9 #define B577XX_DOORBELL_HDR_RX (0x1<<0)
10 #define B577XX_DOORBELL_HDR_RX_SHIFT 0
11 #define B577XX_DOORBELL_HDR_DB_TYPE (0x1<<1)
12 #define B577XX_DOORBELL_HDR_DB_TYPE_SHIFT 1
13 #define B577XX_DOORBELL_HDR_DPM_SIZE (0x3<<2)
14 #define B577XX_DOORBELL_HDR_DPM_SIZE_SHIFT 2
15 #define B577XX_DOORBELL_HDR_CONN_TYPE (0xF<<4)
16 #define B577XX_DOORBELL_HDR_CONN_TYPE_SHIFT 4
20 * doorbell message sent to the chip
22 struct b577xx_doorbell
{
23 #if defined(__BIG_ENDIAN)
26 struct b577xx_doorbell_hdr header
;
27 #elif defined(__LITTLE_ENDIAN)
28 struct b577xx_doorbell_hdr header
;
37 * doorbell message sent to the chip
39 struct b577xx_doorbell_set_prod
{
40 #if defined(__BIG_ENDIAN)
43 struct b577xx_doorbell_hdr header
;
44 #elif defined(__LITTLE_ENDIAN)
45 struct b577xx_doorbell_hdr header
;
59 * ABTS info $$KEEP_ENDIANNESS$$
61 struct fcoe_abts_info
{
62 __le16 aborted_task_id
;
69 * Fixed size structure in order to plant it in Union structure
72 struct fcoe_abts_rsp_union
{
75 __le32 abts_rsp_payload
[7];
80 * 4 regs size $$KEEP_ENDIANNESS$$
93 * FCoE cached sges context $$KEEP_ENDIANNESS$$
95 struct fcoe_cached_sge_ctx
{
96 struct regpair cur_buf_addr
;
98 __le16 second_buf_rem
;
99 struct regpair second_buf_addr
;
104 * Cleanup info $$KEEP_ENDIANNESS$$
106 struct fcoe_cleanup_info
{
107 __le16 cleaned_task_id
;
108 __le16 rolled_tx_seq_cnt
;
109 __le32 rolled_tx_data_offset
;
114 * Fcp RSP flags $$KEEP_ENDIANNESS$$
116 struct fcoe_fcp_rsp_flags
{
118 #define FCOE_FCP_RSP_FLAGS_FCP_RSP_LEN_VALID (0x1<<0)
119 #define FCOE_FCP_RSP_FLAGS_FCP_RSP_LEN_VALID_SHIFT 0
120 #define FCOE_FCP_RSP_FLAGS_FCP_SNS_LEN_VALID (0x1<<1)
121 #define FCOE_FCP_RSP_FLAGS_FCP_SNS_LEN_VALID_SHIFT 1
122 #define FCOE_FCP_RSP_FLAGS_FCP_RESID_OVER (0x1<<2)
123 #define FCOE_FCP_RSP_FLAGS_FCP_RESID_OVER_SHIFT 2
124 #define FCOE_FCP_RSP_FLAGS_FCP_RESID_UNDER (0x1<<3)
125 #define FCOE_FCP_RSP_FLAGS_FCP_RESID_UNDER_SHIFT 3
126 #define FCOE_FCP_RSP_FLAGS_FCP_CONF_REQ (0x1<<4)
127 #define FCOE_FCP_RSP_FLAGS_FCP_CONF_REQ_SHIFT 4
128 #define FCOE_FCP_RSP_FLAGS_FCP_BIDI_FLAGS (0x7<<5)
129 #define FCOE_FCP_RSP_FLAGS_FCP_BIDI_FLAGS_SHIFT 5
133 * Fcp RSP payload $$KEEP_ENDIANNESS$$
135 struct fcoe_fcp_rsp_payload
{
136 struct regpair reserved0
;
139 struct fcoe_fcp_rsp_flags fcp_flags
;
140 __le16 retry_delay_timer
;
146 * Fixed size structure in order to plant it in Union structure
147 * $$KEEP_ENDIANNESS$$
149 struct fcoe_fcp_rsp_union
{
150 struct fcoe_fcp_rsp_payload payload
;
151 struct regpair reserved0
;
155 * FC header $$KEEP_ENDIANNESS$$
173 * FC header union $$KEEP_ENDIANNESS$$
175 struct fcoe_mp_rsp_union
{
176 struct fcoe_fc_hdr fc_hdr
;
177 __le32 mp_payload_len
;
182 * Completion information $$KEEP_ENDIANNESS$$
184 union fcoe_comp_flow_info
{
185 struct fcoe_fcp_rsp_union fcp_rsp
;
186 struct fcoe_abts_rsp_union abts_rsp
;
187 struct fcoe_mp_rsp_union mp_rsp
;
193 * External ABTS info $$KEEP_ENDIANNESS$$
195 struct fcoe_ext_abts_info
{
197 struct fcoe_abts_info ctx
;
202 * External cleanup info $$KEEP_ENDIANNESS$$
204 struct fcoe_ext_cleanup_info
{
206 struct fcoe_cleanup_info ctx
;
211 * Fcoe FW Tx sequence context $$KEEP_ENDIANNESS$$
213 struct fcoe_fw_tx_seq_ctx
{
220 * Fcoe external FW Tx sequence context $$KEEP_ENDIANNESS$$
222 struct fcoe_ext_fw_tx_seq_ctx
{
224 struct fcoe_fw_tx_seq_ctx ctx
;
229 * FCoE multiple sges context $$KEEP_ENDIANNESS$$
231 struct fcoe_mul_sges_ctx
{
232 struct regpair cur_sge_addr
;
239 * FCoE external multiple sges context $$KEEP_ENDIANNESS$$
241 struct fcoe_ext_mul_sges_ctx
{
242 struct fcoe_mul_sges_ctx mul_sgl
;
243 struct regpair rsrv0
;
248 * FCP CMD payload $$KEEP_ENDIANNESS$$
250 struct fcoe_fcp_cmd_payload
{
259 * Fcp xfr rdy payload $$KEEP_ENDIANNESS$$
261 struct fcoe_fcp_xfr_rdy_payload
{
268 * FC frame $$KEEP_ENDIANNESS$$
270 struct fcoe_fc_frame
{
271 struct fcoe_fc_hdr fc_hdr
;
279 * FCoE KCQ CQE parameters $$KEEP_ENDIANNESS$$
281 union fcoe_kcqe_params
{
286 * FCoE KCQ CQE $$KEEP_ENDIANNESS$$
290 __le32 completion_status
;
291 __le32 fcoe_conn_context_id
;
292 union fcoe_kcqe_params params
;
296 #define FCOE_KCQE_RESERVED0 (0x7<<0)
297 #define FCOE_KCQE_RESERVED0_SHIFT 0
298 #define FCOE_KCQE_RAMROD_COMPLETION (0x1<<3)
299 #define FCOE_KCQE_RAMROD_COMPLETION_SHIFT 3
300 #define FCOE_KCQE_LAYER_CODE (0x7<<4)
301 #define FCOE_KCQE_LAYER_CODE_SHIFT 4
302 #define FCOE_KCQE_LINKED_WITH_NEXT (0x1<<7)
303 #define FCOE_KCQE_LINKED_WITH_NEXT_SHIFT 7
309 * FCoE KWQE header $$KEEP_ENDIANNESS$$
311 struct fcoe_kwqe_header
{
314 #define FCOE_KWQE_HEADER_RESERVED0 (0xF<<0)
315 #define FCOE_KWQE_HEADER_RESERVED0_SHIFT 0
316 #define FCOE_KWQE_HEADER_LAYER_CODE (0x7<<4)
317 #define FCOE_KWQE_HEADER_LAYER_CODE_SHIFT 4
318 #define FCOE_KWQE_HEADER_RESERVED1 (0x1<<7)
319 #define FCOE_KWQE_HEADER_RESERVED1_SHIFT 7
323 * FCoE firmware init request 1 $$KEEP_ENDIANNESS$$
325 struct fcoe_kwqe_init1
{
327 struct fcoe_kwqe_header hdr
;
328 __le32 task_list_pbl_addr_lo
;
329 __le32 task_list_pbl_addr_hi
;
330 __le32 dummy_buffer_addr_lo
;
331 __le32 dummy_buffer_addr_hi
;
334 __le16 rq_buffer_log_size
;
339 #define FCOE_KWQE_INIT1_LOG_PAGE_SIZE (0xF<<0)
340 #define FCOE_KWQE_INIT1_LOG_PAGE_SIZE_SHIFT 0
341 #define FCOE_KWQE_INIT1_LOG_CACHED_PBES_PER_FUNC (0x7<<4)
342 #define FCOE_KWQE_INIT1_LOG_CACHED_PBES_PER_FUNC_SHIFT 4
343 #define FCOE_KWQE_INIT1_RESERVED1 (0x1<<7)
344 #define FCOE_KWQE_INIT1_RESERVED1_SHIFT 7
348 * FCoE firmware init request 2 $$KEEP_ENDIANNESS$$
350 struct fcoe_kwqe_init2
{
351 u8 hsi_major_version
;
352 u8 hsi_minor_version
;
353 struct fcoe_kwqe_header hdr
;
354 __le32 hash_tbl_pbl_addr_lo
;
355 __le32 hash_tbl_pbl_addr_hi
;
356 __le32 t2_hash_tbl_addr_lo
;
357 __le32 t2_hash_tbl_addr_hi
;
358 __le32 t2_ptr_hash_tbl_addr_lo
;
359 __le32 t2_ptr_hash_tbl_addr_hi
;
360 __le32 free_list_count
;
364 * FCoE firmware init request 3 $$KEEP_ENDIANNESS$$
366 struct fcoe_kwqe_init3
{
368 struct fcoe_kwqe_header hdr
;
369 __le32 error_bit_map_lo
;
370 __le32 error_bit_map_hi
;
377 * FCoE connection offload request 1 $$KEEP_ENDIANNESS$$
379 struct fcoe_kwqe_conn_offload1
{
381 struct fcoe_kwqe_header hdr
;
384 __le32 rq_pbl_addr_lo
;
385 __le32 rq_pbl_addr_hi
;
386 __le32 rq_first_pbe_addr_lo
;
387 __le32 rq_first_pbe_addr_hi
;
393 * FCoE connection offload request 2 $$KEEP_ENDIANNESS$$
395 struct fcoe_kwqe_conn_offload2
{
396 __le16 tx_max_fc_pay_len
;
397 struct fcoe_kwqe_header hdr
;
400 __le32 xferq_addr_lo
;
401 __le32 xferq_addr_hi
;
402 __le32 conn_db_addr_lo
;
403 __le32 conn_db_addr_hi
;
408 * FCoE connection offload request 3 $$KEEP_ENDIANNESS$$
410 struct fcoe_kwqe_conn_offload3
{
412 #define FCOE_KWQE_CONN_OFFLOAD3_VLAN_ID (0xFFF<<0)
413 #define FCOE_KWQE_CONN_OFFLOAD3_VLAN_ID_SHIFT 0
414 #define FCOE_KWQE_CONN_OFFLOAD3_CFI (0x1<<12)
415 #define FCOE_KWQE_CONN_OFFLOAD3_CFI_SHIFT 12
416 #define FCOE_KWQE_CONN_OFFLOAD3_PRIORITY (0x7<<13)
417 #define FCOE_KWQE_CONN_OFFLOAD3_PRIORITY_SHIFT 13
418 struct fcoe_kwqe_header hdr
;
420 u8 tx_max_conc_seqs_c3
;
423 #define FCOE_KWQE_CONN_OFFLOAD3_B_MUL_N_PORT_IDS (0x1<<0)
424 #define FCOE_KWQE_CONN_OFFLOAD3_B_MUL_N_PORT_IDS_SHIFT 0
425 #define FCOE_KWQE_CONN_OFFLOAD3_B_E_D_TOV_RES (0x1<<1)
426 #define FCOE_KWQE_CONN_OFFLOAD3_B_E_D_TOV_RES_SHIFT 1
427 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONT_INCR_SEQ_CNT (0x1<<2)
428 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONT_INCR_SEQ_CNT_SHIFT 2
429 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONF_REQ (0x1<<3)
430 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONF_REQ_SHIFT 3
431 #define FCOE_KWQE_CONN_OFFLOAD3_B_REC_VALID (0x1<<4)
432 #define FCOE_KWQE_CONN_OFFLOAD3_B_REC_VALID_SHIFT 4
433 #define FCOE_KWQE_CONN_OFFLOAD3_B_C2_VALID (0x1<<5)
434 #define FCOE_KWQE_CONN_OFFLOAD3_B_C2_VALID_SHIFT 5
435 #define FCOE_KWQE_CONN_OFFLOAD3_B_ACK_0 (0x1<<6)
436 #define FCOE_KWQE_CONN_OFFLOAD3_B_ACK_0_SHIFT 6
437 #define FCOE_KWQE_CONN_OFFLOAD3_B_VLAN_FLAG (0x1<<7)
438 #define FCOE_KWQE_CONN_OFFLOAD3_B_VLAN_FLAG_SHIFT 7
440 __le32 confq_first_pbe_addr_lo
;
441 __le32 confq_first_pbe_addr_hi
;
442 __le16 tx_total_conc_seqs
;
443 __le16 rx_max_fc_pay_len
;
444 __le16 rx_total_conc_seqs
;
445 u8 rx_max_conc_seqs_c3
;
446 u8 rx_open_seqs_exch_c3
;
450 * FCoE connection offload request 4 $$KEEP_ENDIANNESS$$
452 struct fcoe_kwqe_conn_offload4
{
453 u8 e_d_tov_timer_val
;
455 struct fcoe_kwqe_header hdr
;
456 u8 src_mac_addr_lo
[2];
457 u8 src_mac_addr_mid
[2];
458 u8 src_mac_addr_hi
[2];
459 u8 dst_mac_addr_hi
[2];
460 u8 dst_mac_addr_lo
[2];
461 u8 dst_mac_addr_mid
[2];
464 __le32 confq_pbl_base_addr_lo
;
465 __le32 confq_pbl_base_addr_hi
;
469 * FCoE connection enable request $$KEEP_ENDIANNESS$$
471 struct fcoe_kwqe_conn_enable_disable
{
473 struct fcoe_kwqe_header hdr
;
474 u8 src_mac_addr_lo
[2];
475 u8 src_mac_addr_mid
[2];
476 u8 src_mac_addr_hi
[2];
478 #define FCOE_KWQE_CONN_ENABLE_DISABLE_VLAN_ID (0xFFF<<0)
479 #define FCOE_KWQE_CONN_ENABLE_DISABLE_VLAN_ID_SHIFT 0
480 #define FCOE_KWQE_CONN_ENABLE_DISABLE_CFI (0x1<<12)
481 #define FCOE_KWQE_CONN_ENABLE_DISABLE_CFI_SHIFT 12
482 #define FCOE_KWQE_CONN_ENABLE_DISABLE_PRIORITY (0x7<<13)
483 #define FCOE_KWQE_CONN_ENABLE_DISABLE_PRIORITY_SHIFT 13
484 u8 dst_mac_addr_lo
[2];
485 u8 dst_mac_addr_mid
[2];
486 u8 dst_mac_addr_hi
[2];
498 * FCoE connection destroy request $$KEEP_ENDIANNESS$$
500 struct fcoe_kwqe_conn_destroy
{
502 struct fcoe_kwqe_header hdr
;
509 * FCoe destroy request $$KEEP_ENDIANNESS$$
511 struct fcoe_kwqe_destroy
{
513 struct fcoe_kwqe_header hdr
;
518 * FCoe statistics request $$KEEP_ENDIANNESS$$
520 struct fcoe_kwqe_stat
{
522 struct fcoe_kwqe_header hdr
;
523 __le32 stat_params_addr_lo
;
524 __le32 stat_params_addr_hi
;
529 * FCoE KWQ WQE $$KEEP_ENDIANNESS$$
532 struct fcoe_kwqe_init1 init1
;
533 struct fcoe_kwqe_init2 init2
;
534 struct fcoe_kwqe_init3 init3
;
535 struct fcoe_kwqe_conn_offload1 conn_offload1
;
536 struct fcoe_kwqe_conn_offload2 conn_offload2
;
537 struct fcoe_kwqe_conn_offload3 conn_offload3
;
538 struct fcoe_kwqe_conn_offload4 conn_offload4
;
539 struct fcoe_kwqe_conn_enable_disable conn_enable_disable
;
540 struct fcoe_kwqe_conn_destroy conn_destroy
;
541 struct fcoe_kwqe_destroy destroy
;
542 struct fcoe_kwqe_stat statistics
;
561 * TX SGL context $$KEEP_ENDIANNESS$$
563 union fcoe_sgl_union_ctx
{
564 struct fcoe_cached_sge_ctx cached_sge
;
565 struct fcoe_ext_mul_sges_ctx sgl
;
570 * Data-In/ELS/BLS information $$KEEP_ENDIANNESS$$
572 struct fcoe_read_flow_info
{
573 union fcoe_sgl_union_ctx sgl_ctx
;
579 * Fcoe stat context $$KEEP_ENDIANNESS$$
581 struct fcoe_s_stat_ctx
{
583 #define FCOE_S_STAT_CTX_ACTIVE (0x1<<0)
584 #define FCOE_S_STAT_CTX_ACTIVE_SHIFT 0
585 #define FCOE_S_STAT_CTX_ACK_ABORT_SEQ_COND (0x1<<1)
586 #define FCOE_S_STAT_CTX_ACK_ABORT_SEQ_COND_SHIFT 1
587 #define FCOE_S_STAT_CTX_ABTS_PERFORMED (0x1<<2)
588 #define FCOE_S_STAT_CTX_ABTS_PERFORMED_SHIFT 2
589 #define FCOE_S_STAT_CTX_SEQ_TIMEOUT (0x1<<3)
590 #define FCOE_S_STAT_CTX_SEQ_TIMEOUT_SHIFT 3
591 #define FCOE_S_STAT_CTX_P_RJT (0x1<<4)
592 #define FCOE_S_STAT_CTX_P_RJT_SHIFT 4
593 #define FCOE_S_STAT_CTX_ACK_EOFT (0x1<<5)
594 #define FCOE_S_STAT_CTX_ACK_EOFT_SHIFT 5
595 #define FCOE_S_STAT_CTX_RSRV1 (0x3<<6)
596 #define FCOE_S_STAT_CTX_RSRV1_SHIFT 6
600 * Fcoe rx seq context $$KEEP_ENDIANNESS$$
602 struct fcoe_rx_seq_ctx
{
604 struct fcoe_s_stat_ctx s_stat
;
612 * Fcoe rx_wr union context $$KEEP_ENDIANNESS$$
614 union fcoe_rx_wr_union_ctx
{
615 struct fcoe_read_flow_info read_info
;
616 union fcoe_comp_flow_info comp_info
;
623 * FCoE SQ element $$KEEP_ENDIANNESS$$
627 #define FCOE_SQE_TASK_ID (0x7FFF<<0)
628 #define FCOE_SQE_TASK_ID_SHIFT 0
629 #define FCOE_SQE_TOGGLE_BIT (0x1<<15)
630 #define FCOE_SQE_TOGGLE_BIT_SHIFT 15
636 * 14 regs $$KEEP_ENDIANNESS$$
638 struct fcoe_tce_tx_only
{
639 union fcoe_sgl_union_ctx sgl_ctx
;
644 * 32 bytes (8 regs) used for TX only purposes $$KEEP_ENDIANNESS$$
646 union fcoe_tx_wr_rx_rd_union_ctx
{
647 struct fcoe_fc_frame tx_frame
;
648 struct fcoe_fcp_cmd_payload fcp_cmd
;
649 struct fcoe_ext_cleanup_info cleanup
;
650 struct fcoe_ext_abts_info abts
;
651 struct fcoe_ext_fw_tx_seq_ctx tx_seq
;
656 * tce_tx_wr_rx_rd_const $$KEEP_ENDIANNESS$$
658 struct fcoe_tce_tx_wr_rx_rd_const
{
660 #define FCOE_TCE_TX_WR_RX_RD_CONST_TASK_TYPE (0x7<<0)
661 #define FCOE_TCE_TX_WR_RX_RD_CONST_TASK_TYPE_SHIFT 0
662 #define FCOE_TCE_TX_WR_RX_RD_CONST_DEV_TYPE (0x1<<3)
663 #define FCOE_TCE_TX_WR_RX_RD_CONST_DEV_TYPE_SHIFT 3
664 #define FCOE_TCE_TX_WR_RX_RD_CONST_CLASS_TYPE (0x1<<4)
665 #define FCOE_TCE_TX_WR_RX_RD_CONST_CLASS_TYPE_SHIFT 4
666 #define FCOE_TCE_TX_WR_RX_RD_CONST_CACHED_SGE (0x3<<5)
667 #define FCOE_TCE_TX_WR_RX_RD_CONST_CACHED_SGE_SHIFT 5
668 #define FCOE_TCE_TX_WR_RX_RD_CONST_SUPPORT_REC_TOV (0x1<<7)
669 #define FCOE_TCE_TX_WR_RX_RD_CONST_SUPPORT_REC_TOV_SHIFT 7
671 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_VALID (0x1<<0)
672 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_VALID_SHIFT 0
673 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_STATE (0xF<<1)
674 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_STATE_SHIFT 1
675 #define FCOE_TCE_TX_WR_RX_RD_CONST_RSRV1 (0x1<<5)
676 #define FCOE_TCE_TX_WR_RX_RD_CONST_RSRV1_SHIFT 5
677 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_SEQ_INIT (0x1<<6)
678 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_SEQ_INIT_SHIFT 6
679 #define FCOE_TCE_TX_WR_RX_RD_CONST_RSRV2 (0x1<<7)
680 #define FCOE_TCE_TX_WR_RX_RD_CONST_RSRV2_SHIFT 7
682 __le32 verify_tx_seq
;
686 * tce_tx_wr_rx_rd $$KEEP_ENDIANNESS$$
688 struct fcoe_tce_tx_wr_rx_rd
{
689 union fcoe_tx_wr_rx_rd_union_ctx union_ctx
;
690 struct fcoe_tce_tx_wr_rx_rd_const const_ctx
;
694 * tce_rx_wr_tx_rd_const $$KEEP_ENDIANNESS$$
696 struct fcoe_tce_rx_wr_tx_rd_const
{
699 #define FCOE_TCE_RX_WR_TX_RD_CONST_CID (0xFFFFFF<<0)
700 #define FCOE_TCE_RX_WR_TX_RD_CONST_CID_SHIFT 0
701 #define FCOE_TCE_RX_WR_TX_RD_CONST_RSRV0 (0xFF<<24)
702 #define FCOE_TCE_RX_WR_TX_RD_CONST_RSRV0_SHIFT 24
706 * tce_rx_wr_tx_rd_var $$KEEP_ENDIANNESS$$
708 struct fcoe_tce_rx_wr_tx_rd_var
{
710 #define FCOE_TCE_RX_WR_TX_RD_VAR_RSRV1 (0xF<<0)
711 #define FCOE_TCE_RX_WR_TX_RD_VAR_RSRV1_SHIFT 0
712 #define FCOE_TCE_RX_WR_TX_RD_VAR_NUM_RQ_WQE (0x7<<4)
713 #define FCOE_TCE_RX_WR_TX_RD_VAR_NUM_RQ_WQE_SHIFT 4
714 #define FCOE_TCE_RX_WR_TX_RD_VAR_CONF_REQ (0x1<<7)
715 #define FCOE_TCE_RX_WR_TX_RD_VAR_CONF_REQ_SHIFT 7
716 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_STATE (0xF<<8)
717 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_STATE_SHIFT 8
718 #define FCOE_TCE_RX_WR_TX_RD_VAR_EXP_FIRST_FRAME (0x1<<12)
719 #define FCOE_TCE_RX_WR_TX_RD_VAR_EXP_FIRST_FRAME_SHIFT 12
720 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_SEQ_INIT (0x1<<13)
721 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_SEQ_INIT_SHIFT 13
722 #define FCOE_TCE_RX_WR_TX_RD_VAR_RSRV2 (0x1<<14)
723 #define FCOE_TCE_RX_WR_TX_RD_VAR_RSRV2_SHIFT 14
724 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_VALID (0x1<<15)
725 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_VALID_SHIFT 15
727 struct fcoe_fcp_xfr_rdy_payload fcp_xfr_rdy
;
731 * tce_rx_wr_tx_rd $$KEEP_ENDIANNESS$$
733 struct fcoe_tce_rx_wr_tx_rd
{
734 struct fcoe_tce_rx_wr_tx_rd_const const_ctx
;
735 struct fcoe_tce_rx_wr_tx_rd_var var_ctx
;
739 * tce_rx_only $$KEEP_ENDIANNESS$$
741 struct fcoe_tce_rx_only
{
742 struct fcoe_rx_seq_ctx rx_seq_ctx
;
743 union fcoe_rx_wr_union_ctx union_ctx
;
747 * task_ctx_entry $$KEEP_ENDIANNESS$$
749 struct fcoe_task_ctx_entry
{
750 struct fcoe_tce_tx_only txwr_only
;
751 struct fcoe_tce_tx_wr_rx_rd txwr_rxrd
;
752 struct fcoe_tce_rx_wr_tx_rd rxwr_txrd
;
753 struct fcoe_tce_rx_only rxwr_only
;
766 * FCoE XFRQ element $$KEEP_ENDIANNESS$$
770 #define FCOE_XFRQE_TASK_ID (0x7FFF<<0)
771 #define FCOE_XFRQE_TASK_ID_SHIFT 0
772 #define FCOE_XFRQE_TOGGLE_BIT (0x1<<15)
773 #define FCOE_XFRQE_TOGGLE_BIT_SHIFT 15
778 * fcoe rx doorbell message sent to the chip $$KEEP_ENDIANNESS$$
780 struct b577xx_fcoe_rx_doorbell
{
781 struct b577xx_doorbell_hdr hdr
;
783 #define B577XX_FCOE_RX_DOORBELL_NEGATIVE_ARM (0x1F<<0)
784 #define B577XX_FCOE_RX_DOORBELL_NEGATIVE_ARM_SHIFT 0
785 #define B577XX_FCOE_RX_DOORBELL_OPCODE (0x7<<5)
786 #define B577XX_FCOE_RX_DOORBELL_OPCODE_SHIFT 5
787 __le16 doorbell_cq_cons
;
792 * FCoE CONFQ element $$KEEP_ENDIANNESS$$
802 * FCoE conection data base
804 struct fcoe_conn_db
{
805 #if defined(__BIG_ENDIAN)
808 #elif defined(__LITTLE_ENDIAN)
813 struct regpair cq_arm
;
818 * FCoE CQ element $$KEEP_ENDIANNESS$$
822 #define FCOE_CQE_CQE_INFO (0x3FFF<<0)
823 #define FCOE_CQE_CQE_INFO_SHIFT 0
824 #define FCOE_CQE_CQE_TYPE (0x1<<14)
825 #define FCOE_CQE_CQE_TYPE_SHIFT 14
826 #define FCOE_CQE_TOGGLE_BIT (0x1<<15)
827 #define FCOE_CQE_TOGGLE_BIT_SHIFT 15
832 * FCoE error/warning reporting entry $$KEEP_ENDIANNESS$$
834 struct fcoe_partial_err_report_entry
{
835 __le32 err_warn_bitmap_lo
;
836 __le32 err_warn_bitmap_hi
;
842 * FCoE error/warning reporting entry $$KEEP_ENDIANNESS$$
844 struct fcoe_err_report_entry
{
845 struct fcoe_partial_err_report_entry data
;
846 struct fcoe_fc_hdr fc_hdr
;
851 * FCoE hash table entry (32 bytes) $$KEEP_ENDIANNESS$$
853 struct fcoe_hash_table_entry
{
860 __le16 dst_mac_addr_hi
;
861 __le16 dst_mac_addr_mid
;
862 __le16 dst_mac_addr_lo
;
863 __le16 src_mac_addr_hi
;
865 __le16 src_mac_addr_lo
;
866 __le16 src_mac_addr_mid
;
872 #define FCOE_HASH_TABLE_ENTRY_CID (0xFFFFFF<<0)
873 #define FCOE_HASH_TABLE_ENTRY_CID_SHIFT 0
874 #define FCOE_HASH_TABLE_ENTRY_RESERVED3 (0x7F<<24)
875 #define FCOE_HASH_TABLE_ENTRY_RESERVED3_SHIFT 24
876 #define FCOE_HASH_TABLE_ENTRY_VALID (0x1<<31)
877 #define FCOE_HASH_TABLE_ENTRY_VALID_SHIFT 31
882 * FCoE LCQ element $$KEEP_ENDIANNESS$$
886 #define FCOE_LCQE_TASK_ID (0xFFFF<<0)
887 #define FCOE_LCQE_TASK_ID_SHIFT 0
888 #define FCOE_LCQE_LCQE_TYPE (0xFF<<16)
889 #define FCOE_LCQE_LCQE_TYPE_SHIFT 16
890 #define FCOE_LCQE_RESERVED (0xFF<<24)
891 #define FCOE_LCQE_RESERVED_SHIFT 24
897 * FCoE pending work request CQE $$KEEP_ENDIANNESS$$
899 struct fcoe_pend_wq_cqe
{
901 #define FCOE_PEND_WQ_CQE_TASK_ID (0x3FFF<<0)
902 #define FCOE_PEND_WQ_CQE_TASK_ID_SHIFT 0
903 #define FCOE_PEND_WQ_CQE_CQE_TYPE (0x1<<14)
904 #define FCOE_PEND_WQ_CQE_CQE_TYPE_SHIFT 14
905 #define FCOE_PEND_WQ_CQE_TOGGLE_BIT (0x1<<15)
906 #define FCOE_PEND_WQ_CQE_TOGGLE_BIT_SHIFT 15
911 * FCoE RX statistics parameters section#0 $$KEEP_ENDIANNESS$$
913 struct fcoe_rx_stat_params_section0
{
914 __le32 fcoe_rx_pkt_cnt
;
915 __le32 fcoe_rx_byte_cnt
;
920 * FCoE RX statistics parameters section#1 $$KEEP_ENDIANNESS$$
922 struct fcoe_rx_stat_params_section1
{
924 __le32 fcoe_rx_drop_pkt_cnt
;
929 * FCoE RX statistics parameters section#2 $$KEEP_ENDIANNESS$$
931 struct fcoe_rx_stat_params_section2
{
934 __le32 miss_frame_cnt
;
935 __le32 seq_timeout_cnt
;
937 __le32 fcoe_rx_drop_pkt_cnt
;
938 __le32 fcp_rx_pkt_cnt
;
944 * FCoE TX statistics parameters $$KEEP_ENDIANNESS$$
946 struct fcoe_tx_stat_params
{
947 __le32 fcoe_tx_pkt_cnt
;
948 __le32 fcoe_tx_byte_cnt
;
949 __le32 fcp_tx_pkt_cnt
;
954 * FCoE statistics parameters $$KEEP_ENDIANNESS$$
956 struct fcoe_statistics_params
{
957 struct fcoe_tx_stat_params tx_stat
;
958 struct fcoe_rx_stat_params_section0 rx_stat0
;
959 struct fcoe_rx_stat_params_section1 rx_stat1
;
960 struct fcoe_rx_stat_params_section2 rx_stat2
;
965 * FCoE t2 hash table entry (64 bytes) $$KEEP_ENDIANNESS$$
967 struct fcoe_t2_hash_table_entry
{
968 struct fcoe_hash_table_entry data
;
970 struct regpair reserved0
[3];
976 * FCoE unsolicited CQE $$KEEP_ENDIANNESS$$
978 struct fcoe_unsolicited_cqe
{
980 #define FCOE_UNSOLICITED_CQE_SUBTYPE (0x3<<0)
981 #define FCOE_UNSOLICITED_CQE_SUBTYPE_SHIFT 0
982 #define FCOE_UNSOLICITED_CQE_PKT_LEN (0xFFF<<2)
983 #define FCOE_UNSOLICITED_CQE_PKT_LEN_SHIFT 2
984 #define FCOE_UNSOLICITED_CQE_CQE_TYPE (0x1<<14)
985 #define FCOE_UNSOLICITED_CQE_CQE_TYPE_SHIFT 14
986 #define FCOE_UNSOLICITED_CQE_TOGGLE_BIT (0x1<<15)
987 #define FCOE_UNSOLICITED_CQE_TOGGLE_BIT_SHIFT 15
990 #endif /* __57XX_FCOE_HSI_LINUX_LE__ */