1 /* 57xx_hsi_bnx2fc.h: QLogic Linux FCoE offload driver.
2 * Handles operations such as session offload/upload etc, and manages
3 * session resources such as connection id and qp resources.
5 * Copyright (c) 2008-2013 Broadcom Corporation
6 * Copyright (c) 2014-2016 QLogic Corporation
7 * Copyright (c) 2016-2017 Cavium Inc.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation.
15 #ifndef __57XX_FCOE_HSI_LINUX_LE__
16 #define __57XX_FCOE_HSI_LINUX_LE__
19 * common data for all protocols
21 struct b577xx_doorbell_hdr
{
23 #define B577XX_DOORBELL_HDR_RX (0x1<<0)
24 #define B577XX_DOORBELL_HDR_RX_SHIFT 0
25 #define B577XX_DOORBELL_HDR_DB_TYPE (0x1<<1)
26 #define B577XX_DOORBELL_HDR_DB_TYPE_SHIFT 1
27 #define B577XX_DOORBELL_HDR_DPM_SIZE (0x3<<2)
28 #define B577XX_DOORBELL_HDR_DPM_SIZE_SHIFT 2
29 #define B577XX_DOORBELL_HDR_CONN_TYPE (0xF<<4)
30 #define B577XX_DOORBELL_HDR_CONN_TYPE_SHIFT 4
34 * doorbell message sent to the chip
36 struct b577xx_doorbell
{
37 #if defined(__BIG_ENDIAN)
40 struct b577xx_doorbell_hdr header
;
41 #elif defined(__LITTLE_ENDIAN)
42 struct b577xx_doorbell_hdr header
;
51 * doorbell message sent to the chip
53 struct b577xx_doorbell_set_prod
{
54 #if defined(__BIG_ENDIAN)
57 struct b577xx_doorbell_hdr header
;
58 #elif defined(__LITTLE_ENDIAN)
59 struct b577xx_doorbell_hdr header
;
73 * ABTS info $$KEEP_ENDIANNESS$$
75 struct fcoe_abts_info
{
76 __le16 aborted_task_id
;
83 * Fixed size structure in order to plant it in Union structure
86 struct fcoe_abts_rsp_union
{
89 __le32 abts_rsp_payload
[7];
94 * 4 regs size $$KEEP_ENDIANNESS$$
107 * FCoE cached sges context $$KEEP_ENDIANNESS$$
109 struct fcoe_cached_sge_ctx
{
110 struct regpair cur_buf_addr
;
112 __le16 second_buf_rem
;
113 struct regpair second_buf_addr
;
118 * Cleanup info $$KEEP_ENDIANNESS$$
120 struct fcoe_cleanup_info
{
121 __le16 cleaned_task_id
;
122 __le16 rolled_tx_seq_cnt
;
123 __le32 rolled_tx_data_offset
;
128 * Fcp RSP flags $$KEEP_ENDIANNESS$$
130 struct fcoe_fcp_rsp_flags
{
132 #define FCOE_FCP_RSP_FLAGS_FCP_RSP_LEN_VALID (0x1<<0)
133 #define FCOE_FCP_RSP_FLAGS_FCP_RSP_LEN_VALID_SHIFT 0
134 #define FCOE_FCP_RSP_FLAGS_FCP_SNS_LEN_VALID (0x1<<1)
135 #define FCOE_FCP_RSP_FLAGS_FCP_SNS_LEN_VALID_SHIFT 1
136 #define FCOE_FCP_RSP_FLAGS_FCP_RESID_OVER (0x1<<2)
137 #define FCOE_FCP_RSP_FLAGS_FCP_RESID_OVER_SHIFT 2
138 #define FCOE_FCP_RSP_FLAGS_FCP_RESID_UNDER (0x1<<3)
139 #define FCOE_FCP_RSP_FLAGS_FCP_RESID_UNDER_SHIFT 3
140 #define FCOE_FCP_RSP_FLAGS_FCP_CONF_REQ (0x1<<4)
141 #define FCOE_FCP_RSP_FLAGS_FCP_CONF_REQ_SHIFT 4
142 #define FCOE_FCP_RSP_FLAGS_FCP_BIDI_FLAGS (0x7<<5)
143 #define FCOE_FCP_RSP_FLAGS_FCP_BIDI_FLAGS_SHIFT 5
147 * Fcp RSP payload $$KEEP_ENDIANNESS$$
149 struct fcoe_fcp_rsp_payload
{
150 struct regpair reserved0
;
153 struct fcoe_fcp_rsp_flags fcp_flags
;
154 __le16 retry_delay_timer
;
160 * Fixed size structure in order to plant it in Union structure
161 * $$KEEP_ENDIANNESS$$
163 struct fcoe_fcp_rsp_union
{
164 struct fcoe_fcp_rsp_payload payload
;
165 struct regpair reserved0
;
169 * FC header $$KEEP_ENDIANNESS$$
187 * FC header union $$KEEP_ENDIANNESS$$
189 struct fcoe_mp_rsp_union
{
190 struct fcoe_fc_hdr fc_hdr
;
191 __le32 mp_payload_len
;
196 * Completion information $$KEEP_ENDIANNESS$$
198 union fcoe_comp_flow_info
{
199 struct fcoe_fcp_rsp_union fcp_rsp
;
200 struct fcoe_abts_rsp_union abts_rsp
;
201 struct fcoe_mp_rsp_union mp_rsp
;
207 * External ABTS info $$KEEP_ENDIANNESS$$
209 struct fcoe_ext_abts_info
{
211 struct fcoe_abts_info ctx
;
216 * External cleanup info $$KEEP_ENDIANNESS$$
218 struct fcoe_ext_cleanup_info
{
220 struct fcoe_cleanup_info ctx
;
225 * Fcoe FW Tx sequence context $$KEEP_ENDIANNESS$$
227 struct fcoe_fw_tx_seq_ctx
{
234 * Fcoe external FW Tx sequence context $$KEEP_ENDIANNESS$$
236 struct fcoe_ext_fw_tx_seq_ctx
{
238 struct fcoe_fw_tx_seq_ctx ctx
;
243 * FCoE multiple sges context $$KEEP_ENDIANNESS$$
245 struct fcoe_mul_sges_ctx
{
246 struct regpair cur_sge_addr
;
253 * FCoE external multiple sges context $$KEEP_ENDIANNESS$$
255 struct fcoe_ext_mul_sges_ctx
{
256 struct fcoe_mul_sges_ctx mul_sgl
;
257 struct regpair rsrv0
;
262 * FCP CMD payload $$KEEP_ENDIANNESS$$
264 struct fcoe_fcp_cmd_payload
{
273 * Fcp xfr rdy payload $$KEEP_ENDIANNESS$$
275 struct fcoe_fcp_xfr_rdy_payload
{
282 * FC frame $$KEEP_ENDIANNESS$$
284 struct fcoe_fc_frame
{
285 struct fcoe_fc_hdr fc_hdr
;
293 * FCoE KCQ CQE parameters $$KEEP_ENDIANNESS$$
295 union fcoe_kcqe_params
{
300 * FCoE KCQ CQE $$KEEP_ENDIANNESS$$
304 __le32 completion_status
;
305 __le32 fcoe_conn_context_id
;
306 union fcoe_kcqe_params params
;
310 #define FCOE_KCQE_RESERVED0 (0x7<<0)
311 #define FCOE_KCQE_RESERVED0_SHIFT 0
312 #define FCOE_KCQE_RAMROD_COMPLETION (0x1<<3)
313 #define FCOE_KCQE_RAMROD_COMPLETION_SHIFT 3
314 #define FCOE_KCQE_LAYER_CODE (0x7<<4)
315 #define FCOE_KCQE_LAYER_CODE_SHIFT 4
316 #define FCOE_KCQE_LINKED_WITH_NEXT (0x1<<7)
317 #define FCOE_KCQE_LINKED_WITH_NEXT_SHIFT 7
323 * FCoE KWQE header $$KEEP_ENDIANNESS$$
325 struct fcoe_kwqe_header
{
328 #define FCOE_KWQE_HEADER_RESERVED0 (0xF<<0)
329 #define FCOE_KWQE_HEADER_RESERVED0_SHIFT 0
330 #define FCOE_KWQE_HEADER_LAYER_CODE (0x7<<4)
331 #define FCOE_KWQE_HEADER_LAYER_CODE_SHIFT 4
332 #define FCOE_KWQE_HEADER_RESERVED1 (0x1<<7)
333 #define FCOE_KWQE_HEADER_RESERVED1_SHIFT 7
337 * FCoE firmware init request 1 $$KEEP_ENDIANNESS$$
339 struct fcoe_kwqe_init1
{
341 struct fcoe_kwqe_header hdr
;
342 __le32 task_list_pbl_addr_lo
;
343 __le32 task_list_pbl_addr_hi
;
344 __le32 dummy_buffer_addr_lo
;
345 __le32 dummy_buffer_addr_hi
;
348 __le16 rq_buffer_log_size
;
353 #define FCOE_KWQE_INIT1_LOG_PAGE_SIZE (0xF<<0)
354 #define FCOE_KWQE_INIT1_LOG_PAGE_SIZE_SHIFT 0
355 #define FCOE_KWQE_INIT1_LOG_CACHED_PBES_PER_FUNC (0x7<<4)
356 #define FCOE_KWQE_INIT1_LOG_CACHED_PBES_PER_FUNC_SHIFT 4
357 #define FCOE_KWQE_INIT1_RESERVED1 (0x1<<7)
358 #define FCOE_KWQE_INIT1_RESERVED1_SHIFT 7
362 * FCoE firmware init request 2 $$KEEP_ENDIANNESS$$
364 struct fcoe_kwqe_init2
{
365 u8 hsi_major_version
;
366 u8 hsi_minor_version
;
367 struct fcoe_kwqe_header hdr
;
368 __le32 hash_tbl_pbl_addr_lo
;
369 __le32 hash_tbl_pbl_addr_hi
;
370 __le32 t2_hash_tbl_addr_lo
;
371 __le32 t2_hash_tbl_addr_hi
;
372 __le32 t2_ptr_hash_tbl_addr_lo
;
373 __le32 t2_ptr_hash_tbl_addr_hi
;
374 __le32 free_list_count
;
378 * FCoE firmware init request 3 $$KEEP_ENDIANNESS$$
380 struct fcoe_kwqe_init3
{
382 struct fcoe_kwqe_header hdr
;
383 __le32 error_bit_map_lo
;
384 __le32 error_bit_map_hi
;
391 * FCoE connection offload request 1 $$KEEP_ENDIANNESS$$
393 struct fcoe_kwqe_conn_offload1
{
395 struct fcoe_kwqe_header hdr
;
398 __le32 rq_pbl_addr_lo
;
399 __le32 rq_pbl_addr_hi
;
400 __le32 rq_first_pbe_addr_lo
;
401 __le32 rq_first_pbe_addr_hi
;
407 * FCoE connection offload request 2 $$KEEP_ENDIANNESS$$
409 struct fcoe_kwqe_conn_offload2
{
410 __le16 tx_max_fc_pay_len
;
411 struct fcoe_kwqe_header hdr
;
414 __le32 xferq_addr_lo
;
415 __le32 xferq_addr_hi
;
416 __le32 conn_db_addr_lo
;
417 __le32 conn_db_addr_hi
;
422 * FCoE connection offload request 3 $$KEEP_ENDIANNESS$$
424 struct fcoe_kwqe_conn_offload3
{
426 #define FCOE_KWQE_CONN_OFFLOAD3_VLAN_ID (0xFFF<<0)
427 #define FCOE_KWQE_CONN_OFFLOAD3_VLAN_ID_SHIFT 0
428 #define FCOE_KWQE_CONN_OFFLOAD3_CFI (0x1<<12)
429 #define FCOE_KWQE_CONN_OFFLOAD3_CFI_SHIFT 12
430 #define FCOE_KWQE_CONN_OFFLOAD3_PRIORITY (0x7<<13)
431 #define FCOE_KWQE_CONN_OFFLOAD3_PRIORITY_SHIFT 13
432 struct fcoe_kwqe_header hdr
;
434 u8 tx_max_conc_seqs_c3
;
437 #define FCOE_KWQE_CONN_OFFLOAD3_B_MUL_N_PORT_IDS (0x1<<0)
438 #define FCOE_KWQE_CONN_OFFLOAD3_B_MUL_N_PORT_IDS_SHIFT 0
439 #define FCOE_KWQE_CONN_OFFLOAD3_B_E_D_TOV_RES (0x1<<1)
440 #define FCOE_KWQE_CONN_OFFLOAD3_B_E_D_TOV_RES_SHIFT 1
441 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONT_INCR_SEQ_CNT (0x1<<2)
442 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONT_INCR_SEQ_CNT_SHIFT 2
443 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONF_REQ (0x1<<3)
444 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONF_REQ_SHIFT 3
445 #define FCOE_KWQE_CONN_OFFLOAD3_B_REC_VALID (0x1<<4)
446 #define FCOE_KWQE_CONN_OFFLOAD3_B_REC_VALID_SHIFT 4
447 #define FCOE_KWQE_CONN_OFFLOAD3_B_C2_VALID (0x1<<5)
448 #define FCOE_KWQE_CONN_OFFLOAD3_B_C2_VALID_SHIFT 5
449 #define FCOE_KWQE_CONN_OFFLOAD3_B_ACK_0 (0x1<<6)
450 #define FCOE_KWQE_CONN_OFFLOAD3_B_ACK_0_SHIFT 6
451 #define FCOE_KWQE_CONN_OFFLOAD3_B_VLAN_FLAG (0x1<<7)
452 #define FCOE_KWQE_CONN_OFFLOAD3_B_VLAN_FLAG_SHIFT 7
454 __le32 confq_first_pbe_addr_lo
;
455 __le32 confq_first_pbe_addr_hi
;
456 __le16 tx_total_conc_seqs
;
457 __le16 rx_max_fc_pay_len
;
458 __le16 rx_total_conc_seqs
;
459 u8 rx_max_conc_seqs_c3
;
460 u8 rx_open_seqs_exch_c3
;
464 * FCoE connection offload request 4 $$KEEP_ENDIANNESS$$
466 struct fcoe_kwqe_conn_offload4
{
467 u8 e_d_tov_timer_val
;
469 struct fcoe_kwqe_header hdr
;
470 u8 src_mac_addr_lo
[2];
471 u8 src_mac_addr_mid
[2];
472 u8 src_mac_addr_hi
[2];
473 u8 dst_mac_addr_hi
[2];
474 u8 dst_mac_addr_lo
[2];
475 u8 dst_mac_addr_mid
[2];
478 __le32 confq_pbl_base_addr_lo
;
479 __le32 confq_pbl_base_addr_hi
;
483 * FCoE connection enable request $$KEEP_ENDIANNESS$$
485 struct fcoe_kwqe_conn_enable_disable
{
487 struct fcoe_kwqe_header hdr
;
488 u8 src_mac_addr_lo
[2];
489 u8 src_mac_addr_mid
[2];
490 u8 src_mac_addr_hi
[2];
492 #define FCOE_KWQE_CONN_ENABLE_DISABLE_VLAN_ID (0xFFF<<0)
493 #define FCOE_KWQE_CONN_ENABLE_DISABLE_VLAN_ID_SHIFT 0
494 #define FCOE_KWQE_CONN_ENABLE_DISABLE_CFI (0x1<<12)
495 #define FCOE_KWQE_CONN_ENABLE_DISABLE_CFI_SHIFT 12
496 #define FCOE_KWQE_CONN_ENABLE_DISABLE_PRIORITY (0x7<<13)
497 #define FCOE_KWQE_CONN_ENABLE_DISABLE_PRIORITY_SHIFT 13
498 u8 dst_mac_addr_lo
[2];
499 u8 dst_mac_addr_mid
[2];
500 u8 dst_mac_addr_hi
[2];
512 * FCoE connection destroy request $$KEEP_ENDIANNESS$$
514 struct fcoe_kwqe_conn_destroy
{
516 struct fcoe_kwqe_header hdr
;
523 * FCoe destroy request $$KEEP_ENDIANNESS$$
525 struct fcoe_kwqe_destroy
{
527 struct fcoe_kwqe_header hdr
;
532 * FCoe statistics request $$KEEP_ENDIANNESS$$
534 struct fcoe_kwqe_stat
{
536 struct fcoe_kwqe_header hdr
;
537 __le32 stat_params_addr_lo
;
538 __le32 stat_params_addr_hi
;
543 * FCoE KWQ WQE $$KEEP_ENDIANNESS$$
546 struct fcoe_kwqe_init1 init1
;
547 struct fcoe_kwqe_init2 init2
;
548 struct fcoe_kwqe_init3 init3
;
549 struct fcoe_kwqe_conn_offload1 conn_offload1
;
550 struct fcoe_kwqe_conn_offload2 conn_offload2
;
551 struct fcoe_kwqe_conn_offload3 conn_offload3
;
552 struct fcoe_kwqe_conn_offload4 conn_offload4
;
553 struct fcoe_kwqe_conn_enable_disable conn_enable_disable
;
554 struct fcoe_kwqe_conn_destroy conn_destroy
;
555 struct fcoe_kwqe_destroy destroy
;
556 struct fcoe_kwqe_stat statistics
;
575 * TX SGL context $$KEEP_ENDIANNESS$$
577 union fcoe_sgl_union_ctx
{
578 struct fcoe_cached_sge_ctx cached_sge
;
579 struct fcoe_ext_mul_sges_ctx sgl
;
584 * Data-In/ELS/BLS information $$KEEP_ENDIANNESS$$
586 struct fcoe_read_flow_info
{
587 union fcoe_sgl_union_ctx sgl_ctx
;
593 * Fcoe stat context $$KEEP_ENDIANNESS$$
595 struct fcoe_s_stat_ctx
{
597 #define FCOE_S_STAT_CTX_ACTIVE (0x1<<0)
598 #define FCOE_S_STAT_CTX_ACTIVE_SHIFT 0
599 #define FCOE_S_STAT_CTX_ACK_ABORT_SEQ_COND (0x1<<1)
600 #define FCOE_S_STAT_CTX_ACK_ABORT_SEQ_COND_SHIFT 1
601 #define FCOE_S_STAT_CTX_ABTS_PERFORMED (0x1<<2)
602 #define FCOE_S_STAT_CTX_ABTS_PERFORMED_SHIFT 2
603 #define FCOE_S_STAT_CTX_SEQ_TIMEOUT (0x1<<3)
604 #define FCOE_S_STAT_CTX_SEQ_TIMEOUT_SHIFT 3
605 #define FCOE_S_STAT_CTX_P_RJT (0x1<<4)
606 #define FCOE_S_STAT_CTX_P_RJT_SHIFT 4
607 #define FCOE_S_STAT_CTX_ACK_EOFT (0x1<<5)
608 #define FCOE_S_STAT_CTX_ACK_EOFT_SHIFT 5
609 #define FCOE_S_STAT_CTX_RSRV1 (0x3<<6)
610 #define FCOE_S_STAT_CTX_RSRV1_SHIFT 6
614 * Fcoe rx seq context $$KEEP_ENDIANNESS$$
616 struct fcoe_rx_seq_ctx
{
618 struct fcoe_s_stat_ctx s_stat
;
626 * Fcoe rx_wr union context $$KEEP_ENDIANNESS$$
628 union fcoe_rx_wr_union_ctx
{
629 struct fcoe_read_flow_info read_info
;
630 union fcoe_comp_flow_info comp_info
;
637 * FCoE SQ element $$KEEP_ENDIANNESS$$
641 #define FCOE_SQE_TASK_ID (0x7FFF<<0)
642 #define FCOE_SQE_TASK_ID_SHIFT 0
643 #define FCOE_SQE_TOGGLE_BIT (0x1<<15)
644 #define FCOE_SQE_TOGGLE_BIT_SHIFT 15
650 * 14 regs $$KEEP_ENDIANNESS$$
652 struct fcoe_tce_tx_only
{
653 union fcoe_sgl_union_ctx sgl_ctx
;
658 * 32 bytes (8 regs) used for TX only purposes $$KEEP_ENDIANNESS$$
660 union fcoe_tx_wr_rx_rd_union_ctx
{
661 struct fcoe_fc_frame tx_frame
;
662 struct fcoe_fcp_cmd_payload fcp_cmd
;
663 struct fcoe_ext_cleanup_info cleanup
;
664 struct fcoe_ext_abts_info abts
;
665 struct fcoe_ext_fw_tx_seq_ctx tx_seq
;
670 * tce_tx_wr_rx_rd_const $$KEEP_ENDIANNESS$$
672 struct fcoe_tce_tx_wr_rx_rd_const
{
674 #define FCOE_TCE_TX_WR_RX_RD_CONST_TASK_TYPE (0x7<<0)
675 #define FCOE_TCE_TX_WR_RX_RD_CONST_TASK_TYPE_SHIFT 0
676 #define FCOE_TCE_TX_WR_RX_RD_CONST_DEV_TYPE (0x1<<3)
677 #define FCOE_TCE_TX_WR_RX_RD_CONST_DEV_TYPE_SHIFT 3
678 #define FCOE_TCE_TX_WR_RX_RD_CONST_CLASS_TYPE (0x1<<4)
679 #define FCOE_TCE_TX_WR_RX_RD_CONST_CLASS_TYPE_SHIFT 4
680 #define FCOE_TCE_TX_WR_RX_RD_CONST_CACHED_SGE (0x3<<5)
681 #define FCOE_TCE_TX_WR_RX_RD_CONST_CACHED_SGE_SHIFT 5
682 #define FCOE_TCE_TX_WR_RX_RD_CONST_SUPPORT_REC_TOV (0x1<<7)
683 #define FCOE_TCE_TX_WR_RX_RD_CONST_SUPPORT_REC_TOV_SHIFT 7
685 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_VALID (0x1<<0)
686 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_VALID_SHIFT 0
687 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_STATE (0xF<<1)
688 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_STATE_SHIFT 1
689 #define FCOE_TCE_TX_WR_RX_RD_CONST_RSRV1 (0x1<<5)
690 #define FCOE_TCE_TX_WR_RX_RD_CONST_RSRV1_SHIFT 5
691 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_SEQ_INIT (0x1<<6)
692 #define FCOE_TCE_TX_WR_RX_RD_CONST_TX_SEQ_INIT_SHIFT 6
693 #define FCOE_TCE_TX_WR_RX_RD_CONST_RSRV2 (0x1<<7)
694 #define FCOE_TCE_TX_WR_RX_RD_CONST_RSRV2_SHIFT 7
696 __le32 verify_tx_seq
;
700 * tce_tx_wr_rx_rd $$KEEP_ENDIANNESS$$
702 struct fcoe_tce_tx_wr_rx_rd
{
703 union fcoe_tx_wr_rx_rd_union_ctx union_ctx
;
704 struct fcoe_tce_tx_wr_rx_rd_const const_ctx
;
708 * tce_rx_wr_tx_rd_const $$KEEP_ENDIANNESS$$
710 struct fcoe_tce_rx_wr_tx_rd_const
{
713 #define FCOE_TCE_RX_WR_TX_RD_CONST_CID (0xFFFFFF<<0)
714 #define FCOE_TCE_RX_WR_TX_RD_CONST_CID_SHIFT 0
715 #define FCOE_TCE_RX_WR_TX_RD_CONST_RSRV0 (0xFF<<24)
716 #define FCOE_TCE_RX_WR_TX_RD_CONST_RSRV0_SHIFT 24
720 * tce_rx_wr_tx_rd_var $$KEEP_ENDIANNESS$$
722 struct fcoe_tce_rx_wr_tx_rd_var
{
724 #define FCOE_TCE_RX_WR_TX_RD_VAR_RSRV1 (0xF<<0)
725 #define FCOE_TCE_RX_WR_TX_RD_VAR_RSRV1_SHIFT 0
726 #define FCOE_TCE_RX_WR_TX_RD_VAR_NUM_RQ_WQE (0x7<<4)
727 #define FCOE_TCE_RX_WR_TX_RD_VAR_NUM_RQ_WQE_SHIFT 4
728 #define FCOE_TCE_RX_WR_TX_RD_VAR_CONF_REQ (0x1<<7)
729 #define FCOE_TCE_RX_WR_TX_RD_VAR_CONF_REQ_SHIFT 7
730 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_STATE (0xF<<8)
731 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_STATE_SHIFT 8
732 #define FCOE_TCE_RX_WR_TX_RD_VAR_EXP_FIRST_FRAME (0x1<<12)
733 #define FCOE_TCE_RX_WR_TX_RD_VAR_EXP_FIRST_FRAME_SHIFT 12
734 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_SEQ_INIT (0x1<<13)
735 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_SEQ_INIT_SHIFT 13
736 #define FCOE_TCE_RX_WR_TX_RD_VAR_RSRV2 (0x1<<14)
737 #define FCOE_TCE_RX_WR_TX_RD_VAR_RSRV2_SHIFT 14
738 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_VALID (0x1<<15)
739 #define FCOE_TCE_RX_WR_TX_RD_VAR_RX_VALID_SHIFT 15
741 struct fcoe_fcp_xfr_rdy_payload fcp_xfr_rdy
;
745 * tce_rx_wr_tx_rd $$KEEP_ENDIANNESS$$
747 struct fcoe_tce_rx_wr_tx_rd
{
748 struct fcoe_tce_rx_wr_tx_rd_const const_ctx
;
749 struct fcoe_tce_rx_wr_tx_rd_var var_ctx
;
753 * tce_rx_only $$KEEP_ENDIANNESS$$
755 struct fcoe_tce_rx_only
{
756 struct fcoe_rx_seq_ctx rx_seq_ctx
;
757 union fcoe_rx_wr_union_ctx union_ctx
;
761 * task_ctx_entry $$KEEP_ENDIANNESS$$
763 struct fcoe_task_ctx_entry
{
764 struct fcoe_tce_tx_only txwr_only
;
765 struct fcoe_tce_tx_wr_rx_rd txwr_rxrd
;
766 struct fcoe_tce_rx_wr_tx_rd rxwr_txrd
;
767 struct fcoe_tce_rx_only rxwr_only
;
780 * FCoE XFRQ element $$KEEP_ENDIANNESS$$
784 #define FCOE_XFRQE_TASK_ID (0x7FFF<<0)
785 #define FCOE_XFRQE_TASK_ID_SHIFT 0
786 #define FCOE_XFRQE_TOGGLE_BIT (0x1<<15)
787 #define FCOE_XFRQE_TOGGLE_BIT_SHIFT 15
792 * fcoe rx doorbell message sent to the chip $$KEEP_ENDIANNESS$$
794 struct b577xx_fcoe_rx_doorbell
{
795 struct b577xx_doorbell_hdr hdr
;
797 #define B577XX_FCOE_RX_DOORBELL_NEGATIVE_ARM (0x1F<<0)
798 #define B577XX_FCOE_RX_DOORBELL_NEGATIVE_ARM_SHIFT 0
799 #define B577XX_FCOE_RX_DOORBELL_OPCODE (0x7<<5)
800 #define B577XX_FCOE_RX_DOORBELL_OPCODE_SHIFT 5
801 __le16 doorbell_cq_cons
;
806 * FCoE CONFQ element $$KEEP_ENDIANNESS$$
816 * FCoE connection data base
818 struct fcoe_conn_db
{
819 #if defined(__BIG_ENDIAN)
822 #elif defined(__LITTLE_ENDIAN)
827 struct regpair cq_arm
;
832 * FCoE CQ element $$KEEP_ENDIANNESS$$
836 #define FCOE_CQE_CQE_INFO (0x3FFF<<0)
837 #define FCOE_CQE_CQE_INFO_SHIFT 0
838 #define FCOE_CQE_CQE_TYPE (0x1<<14)
839 #define FCOE_CQE_CQE_TYPE_SHIFT 14
840 #define FCOE_CQE_TOGGLE_BIT (0x1<<15)
841 #define FCOE_CQE_TOGGLE_BIT_SHIFT 15
846 * FCoE error/warning reporting entry $$KEEP_ENDIANNESS$$
848 struct fcoe_partial_err_report_entry
{
849 __le32 err_warn_bitmap_lo
;
850 __le32 err_warn_bitmap_hi
;
856 * FCoE error/warning reporting entry $$KEEP_ENDIANNESS$$
858 struct fcoe_err_report_entry
{
859 struct fcoe_partial_err_report_entry data
;
860 struct fcoe_fc_hdr fc_hdr
;
865 * FCoE hash table entry (32 bytes) $$KEEP_ENDIANNESS$$
867 struct fcoe_hash_table_entry
{
874 __le16 dst_mac_addr_hi
;
875 __le16 dst_mac_addr_mid
;
876 __le16 dst_mac_addr_lo
;
877 __le16 src_mac_addr_hi
;
879 __le16 src_mac_addr_lo
;
880 __le16 src_mac_addr_mid
;
886 #define FCOE_HASH_TABLE_ENTRY_CID (0xFFFFFF<<0)
887 #define FCOE_HASH_TABLE_ENTRY_CID_SHIFT 0
888 #define FCOE_HASH_TABLE_ENTRY_RESERVED3 (0x7F<<24)
889 #define FCOE_HASH_TABLE_ENTRY_RESERVED3_SHIFT 24
890 #define FCOE_HASH_TABLE_ENTRY_VALID (0x1<<31)
891 #define FCOE_HASH_TABLE_ENTRY_VALID_SHIFT 31
896 * FCoE LCQ element $$KEEP_ENDIANNESS$$
900 #define FCOE_LCQE_TASK_ID (0xFFFF<<0)
901 #define FCOE_LCQE_TASK_ID_SHIFT 0
902 #define FCOE_LCQE_LCQE_TYPE (0xFF<<16)
903 #define FCOE_LCQE_LCQE_TYPE_SHIFT 16
904 #define FCOE_LCQE_RESERVED (0xFF<<24)
905 #define FCOE_LCQE_RESERVED_SHIFT 24
911 * FCoE pending work request CQE $$KEEP_ENDIANNESS$$
913 struct fcoe_pend_wq_cqe
{
915 #define FCOE_PEND_WQ_CQE_TASK_ID (0x3FFF<<0)
916 #define FCOE_PEND_WQ_CQE_TASK_ID_SHIFT 0
917 #define FCOE_PEND_WQ_CQE_CQE_TYPE (0x1<<14)
918 #define FCOE_PEND_WQ_CQE_CQE_TYPE_SHIFT 14
919 #define FCOE_PEND_WQ_CQE_TOGGLE_BIT (0x1<<15)
920 #define FCOE_PEND_WQ_CQE_TOGGLE_BIT_SHIFT 15
925 * FCoE RX statistics parameters section#0 $$KEEP_ENDIANNESS$$
927 struct fcoe_rx_stat_params_section0
{
928 __le32 fcoe_rx_pkt_cnt
;
929 __le32 fcoe_rx_byte_cnt
;
934 * FCoE RX statistics parameters section#1 $$KEEP_ENDIANNESS$$
936 struct fcoe_rx_stat_params_section1
{
938 __le32 fcoe_rx_drop_pkt_cnt
;
943 * FCoE RX statistics parameters section#2 $$KEEP_ENDIANNESS$$
945 struct fcoe_rx_stat_params_section2
{
948 __le32 miss_frame_cnt
;
949 __le32 seq_timeout_cnt
;
951 __le32 fcoe_rx_drop_pkt_cnt
;
952 __le32 fcp_rx_pkt_cnt
;
958 * FCoE TX statistics parameters $$KEEP_ENDIANNESS$$
960 struct fcoe_tx_stat_params
{
961 __le32 fcoe_tx_pkt_cnt
;
962 __le32 fcoe_tx_byte_cnt
;
963 __le32 fcp_tx_pkt_cnt
;
968 * FCoE statistics parameters $$KEEP_ENDIANNESS$$
970 struct fcoe_statistics_params
{
971 struct fcoe_tx_stat_params tx_stat
;
972 struct fcoe_rx_stat_params_section0 rx_stat0
;
973 struct fcoe_rx_stat_params_section1 rx_stat1
;
974 struct fcoe_rx_stat_params_section2 rx_stat2
;
979 * FCoE t2 hash table entry (64 bytes) $$KEEP_ENDIANNESS$$
981 struct fcoe_t2_hash_table_entry
{
982 struct fcoe_hash_table_entry data
;
984 struct regpair reserved0
[3];
990 * FCoE unsolicited CQE $$KEEP_ENDIANNESS$$
992 struct fcoe_unsolicited_cqe
{
994 #define FCOE_UNSOLICITED_CQE_SUBTYPE (0x3<<0)
995 #define FCOE_UNSOLICITED_CQE_SUBTYPE_SHIFT 0
996 #define FCOE_UNSOLICITED_CQE_PKT_LEN (0xFFF<<2)
997 #define FCOE_UNSOLICITED_CQE_PKT_LEN_SHIFT 2
998 #define FCOE_UNSOLICITED_CQE_CQE_TYPE (0x1<<14)
999 #define FCOE_UNSOLICITED_CQE_CQE_TYPE_SHIFT 14
1000 #define FCOE_UNSOLICITED_CQE_TOGGLE_BIT (0x1<<15)
1001 #define FCOE_UNSOLICITED_CQE_TOGGLE_BIT_SHIFT 15
1004 #endif /* __57XX_FCOE_HSI_LINUX_LE__ */