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_set_prod
{
23 #if defined(__BIG_ENDIAN)
26 struct b577xx_doorbell_hdr header
;
27 #elif defined(__LITTLE_ENDIAN)
28 struct b577xx_doorbell_hdr header
;
42 * Fixed size structure in order to plant it in Union structure
44 struct fcoe_abts_rsp_union
{
46 u32 abts_rsp_payload
[7];
56 #if defined(__BIG_ENDIAN)
59 #elif defined(__LITTLE_ENDIAN)
63 #if defined(__BIG_ENDIAN)
66 #elif defined(__LITTLE_ENDIAN)
73 struct fcoe_cleanup_flow_info
{
74 #if defined(__BIG_ENDIAN)
77 #elif defined(__LITTLE_ENDIAN)
85 struct fcoe_fcp_cmd_payload
{
90 #if defined(__BIG_ENDIAN)
93 #elif defined(__LITTLE_ENDIAN)
97 #if defined(__BIG_ENDIAN)
100 #elif defined(__LITTLE_ENDIAN)
104 #if defined(__BIG_ENDIAN)
108 #elif defined(__LITTLE_ENDIAN)
113 #if defined(__BIG_ENDIAN)
116 #elif defined(__LITTLE_ENDIAN)
121 #if defined(__BIG_ENDIAN)
124 #elif defined(__LITTLE_ENDIAN)
130 struct fcoe_fc_frame
{
131 struct fcoe_fc_hdr fc_hdr
;
135 union fcoe_cmd_flow_info
{
136 struct fcoe_fcp_cmd_payload fcp_cmd_payload
;
137 struct fcoe_fc_frame mp_fc_frame
;
142 struct fcoe_fcp_rsp_flags
{
144 #define FCOE_FCP_RSP_FLAGS_FCP_RSP_LEN_VALID (0x1<<0)
145 #define FCOE_FCP_RSP_FLAGS_FCP_RSP_LEN_VALID_SHIFT 0
146 #define FCOE_FCP_RSP_FLAGS_FCP_SNS_LEN_VALID (0x1<<1)
147 #define FCOE_FCP_RSP_FLAGS_FCP_SNS_LEN_VALID_SHIFT 1
148 #define FCOE_FCP_RSP_FLAGS_FCP_RESID_OVER (0x1<<2)
149 #define FCOE_FCP_RSP_FLAGS_FCP_RESID_OVER_SHIFT 2
150 #define FCOE_FCP_RSP_FLAGS_FCP_RESID_UNDER (0x1<<3)
151 #define FCOE_FCP_RSP_FLAGS_FCP_RESID_UNDER_SHIFT 3
152 #define FCOE_FCP_RSP_FLAGS_FCP_CONF_REQ (0x1<<4)
153 #define FCOE_FCP_RSP_FLAGS_FCP_CONF_REQ_SHIFT 4
154 #define FCOE_FCP_RSP_FLAGS_FCP_BIDI_FLAGS (0x7<<5)
155 #define FCOE_FCP_RSP_FLAGS_FCP_BIDI_FLAGS_SHIFT 5
159 struct fcoe_fcp_rsp_payload
{
160 struct regpair reserved0
;
162 #if defined(__BIG_ENDIAN)
163 u16 retry_delay_timer
;
164 struct fcoe_fcp_rsp_flags fcp_flags
;
166 #elif defined(__LITTLE_ENDIAN)
168 struct fcoe_fcp_rsp_flags fcp_flags
;
169 u16 retry_delay_timer
;
177 * Fixed size structure in order to plant it in Union structure
179 struct fcoe_fcp_rsp_union
{
180 struct fcoe_fcp_rsp_payload payload
;
181 struct regpair reserved0
;
185 struct fcoe_fcp_xfr_rdy_payload
{
190 struct fcoe_read_flow_info
{
191 struct fcoe_fc_hdr fc_data_in_hdr
;
195 struct fcoe_write_flow_info
{
196 struct fcoe_fc_hdr fc_data_out_hdr
;
197 struct fcoe_fcp_xfr_rdy_payload fcp_xfr_payload
;
200 union fcoe_rsp_flow_info
{
201 struct fcoe_fcp_rsp_union fcp_rsp
;
202 struct fcoe_abts_rsp_union abts_rsp
;
206 * 32 bytes used for general purposes
208 union fcoe_general_task_ctx
{
209 union fcoe_cmd_flow_info cmd_info
;
210 struct fcoe_read_flow_info read_info
;
211 struct fcoe_write_flow_info write_info
;
212 union fcoe_rsp_flow_info rsp_info
;
213 struct fcoe_cleanup_flow_info cleanup_info
;
219 * FCoE KCQ CQE parameters
221 union fcoe_kcqe_params
{
230 u32 completion_status
;
231 u32 fcoe_conn_context_id
;
232 union fcoe_kcqe_params params
;
233 #if defined(__BIG_ENDIAN)
235 #define FCOE_KCQE_RESERVED0 (0x7<<0)
236 #define FCOE_KCQE_RESERVED0_SHIFT 0
237 #define FCOE_KCQE_RAMROD_COMPLETION (0x1<<3)
238 #define FCOE_KCQE_RAMROD_COMPLETION_SHIFT 3
239 #define FCOE_KCQE_LAYER_CODE (0x7<<4)
240 #define FCOE_KCQE_LAYER_CODE_SHIFT 4
241 #define FCOE_KCQE_LINKED_WITH_NEXT (0x1<<7)
242 #define FCOE_KCQE_LINKED_WITH_NEXT_SHIFT 7
245 #elif defined(__LITTLE_ENDIAN)
249 #define FCOE_KCQE_RESERVED0 (0x7<<0)
250 #define FCOE_KCQE_RESERVED0_SHIFT 0
251 #define FCOE_KCQE_RAMROD_COMPLETION (0x1<<3)
252 #define FCOE_KCQE_RAMROD_COMPLETION_SHIFT 3
253 #define FCOE_KCQE_LAYER_CODE (0x7<<4)
254 #define FCOE_KCQE_LAYER_CODE_SHIFT 4
255 #define FCOE_KCQE_LINKED_WITH_NEXT (0x1<<7)
256 #define FCOE_KCQE_LINKED_WITH_NEXT_SHIFT 7
263 struct fcoe_kwqe_header
{
264 #if defined(__BIG_ENDIAN)
266 #define FCOE_KWQE_HEADER_RESERVED0 (0xF<<0)
267 #define FCOE_KWQE_HEADER_RESERVED0_SHIFT 0
268 #define FCOE_KWQE_HEADER_LAYER_CODE (0x7<<4)
269 #define FCOE_KWQE_HEADER_LAYER_CODE_SHIFT 4
270 #define FCOE_KWQE_HEADER_RESERVED1 (0x1<<7)
271 #define FCOE_KWQE_HEADER_RESERVED1_SHIFT 7
273 #elif defined(__LITTLE_ENDIAN)
276 #define FCOE_KWQE_HEADER_RESERVED0 (0xF<<0)
277 #define FCOE_KWQE_HEADER_RESERVED0_SHIFT 0
278 #define FCOE_KWQE_HEADER_LAYER_CODE (0x7<<4)
279 #define FCOE_KWQE_HEADER_LAYER_CODE_SHIFT 4
280 #define FCOE_KWQE_HEADER_RESERVED1 (0x1<<7)
281 #define FCOE_KWQE_HEADER_RESERVED1_SHIFT 7
286 * FCoE firmware init request 1
288 struct fcoe_kwqe_init1
{
289 #if defined(__BIG_ENDIAN)
290 struct fcoe_kwqe_header hdr
;
292 #elif defined(__LITTLE_ENDIAN)
294 struct fcoe_kwqe_header hdr
;
296 u32 task_list_pbl_addr_lo
;
297 u32 task_list_pbl_addr_hi
;
298 u32 dummy_buffer_addr_lo
;
299 u32 dummy_buffer_addr_hi
;
300 #if defined(__BIG_ENDIAN)
303 #elif defined(__LITTLE_ENDIAN)
307 #if defined(__BIG_ENDIAN)
309 u16 rq_buffer_log_size
;
310 #elif defined(__LITTLE_ENDIAN)
311 u16 rq_buffer_log_size
;
314 #if defined(__BIG_ENDIAN)
316 #define FCOE_KWQE_INIT1_LOG_PAGE_SIZE (0xF<<0)
317 #define FCOE_KWQE_INIT1_LOG_PAGE_SIZE_SHIFT 0
318 #define FCOE_KWQE_INIT1_LOG_CACHED_PBES_PER_FUNC (0x7<<4)
319 #define FCOE_KWQE_INIT1_LOG_CACHED_PBES_PER_FUNC_SHIFT 4
320 #define FCOE_KWQE_INIT1_RESERVED1 (0x1<<7)
321 #define FCOE_KWQE_INIT1_RESERVED1_SHIFT 7
324 #elif defined(__LITTLE_ENDIAN)
328 #define FCOE_KWQE_INIT1_LOG_PAGE_SIZE (0xF<<0)
329 #define FCOE_KWQE_INIT1_LOG_PAGE_SIZE_SHIFT 0
330 #define FCOE_KWQE_INIT1_LOG_CACHED_PBES_PER_FUNC (0x7<<4)
331 #define FCOE_KWQE_INIT1_LOG_CACHED_PBES_PER_FUNC_SHIFT 4
332 #define FCOE_KWQE_INIT1_RESERVED1 (0x1<<7)
333 #define FCOE_KWQE_INIT1_RESERVED1_SHIFT 7
338 * FCoE firmware init request 2
340 struct fcoe_kwqe_init2
{
341 #if defined(__BIG_ENDIAN)
342 struct fcoe_kwqe_header hdr
;
344 #elif defined(__LITTLE_ENDIAN)
346 struct fcoe_kwqe_header hdr
;
348 u32 hash_tbl_pbl_addr_lo
;
349 u32 hash_tbl_pbl_addr_hi
;
350 u32 t2_hash_tbl_addr_lo
;
351 u32 t2_hash_tbl_addr_hi
;
352 u32 t2_ptr_hash_tbl_addr_lo
;
353 u32 t2_ptr_hash_tbl_addr_hi
;
358 * FCoE firmware init request 3
360 struct fcoe_kwqe_init3
{
361 #if defined(__BIG_ENDIAN)
362 struct fcoe_kwqe_header hdr
;
364 #elif defined(__LITTLE_ENDIAN)
366 struct fcoe_kwqe_header hdr
;
368 u32 error_bit_map_lo
;
369 u32 error_bit_map_hi
;
370 #if defined(__BIG_ENDIAN)
372 u8 cached_session_enable
;
373 #elif defined(__LITTLE_ENDIAN)
374 u8 cached_session_enable
;
381 * FCoE connection offload request 1
383 struct fcoe_kwqe_conn_offload1
{
384 #if defined(__BIG_ENDIAN)
385 struct fcoe_kwqe_header hdr
;
387 #elif defined(__LITTLE_ENDIAN)
389 struct fcoe_kwqe_header hdr
;
395 u32 rq_first_pbe_addr_lo
;
396 u32 rq_first_pbe_addr_hi
;
397 #if defined(__BIG_ENDIAN)
400 #elif defined(__LITTLE_ENDIAN)
407 * FCoE connection offload request 2
409 struct fcoe_kwqe_conn_offload2
{
410 #if defined(__BIG_ENDIAN)
411 struct fcoe_kwqe_header hdr
;
412 u16 tx_max_fc_pay_len
;
413 #elif defined(__LITTLE_ENDIAN)
414 u16 tx_max_fc_pay_len
;
415 struct fcoe_kwqe_header hdr
;
427 * FCoE connection offload request 3
429 struct fcoe_kwqe_conn_offload3
{
430 #if defined(__BIG_ENDIAN)
431 struct fcoe_kwqe_header hdr
;
433 #define FCOE_KWQE_CONN_OFFLOAD3_VLAN_ID (0xFFF<<0)
434 #define FCOE_KWQE_CONN_OFFLOAD3_VLAN_ID_SHIFT 0
435 #define FCOE_KWQE_CONN_OFFLOAD3_CFI (0x1<<12)
436 #define FCOE_KWQE_CONN_OFFLOAD3_CFI_SHIFT 12
437 #define FCOE_KWQE_CONN_OFFLOAD3_PRIORITY (0x7<<13)
438 #define FCOE_KWQE_CONN_OFFLOAD3_PRIORITY_SHIFT 13
439 #elif defined(__LITTLE_ENDIAN)
441 #define FCOE_KWQE_CONN_OFFLOAD3_VLAN_ID (0xFFF<<0)
442 #define FCOE_KWQE_CONN_OFFLOAD3_VLAN_ID_SHIFT 0
443 #define FCOE_KWQE_CONN_OFFLOAD3_CFI (0x1<<12)
444 #define FCOE_KWQE_CONN_OFFLOAD3_CFI_SHIFT 12
445 #define FCOE_KWQE_CONN_OFFLOAD3_PRIORITY (0x7<<13)
446 #define FCOE_KWQE_CONN_OFFLOAD3_PRIORITY_SHIFT 13
447 struct fcoe_kwqe_header hdr
;
449 #if defined(__BIG_ENDIAN)
450 u8 tx_max_conc_seqs_c3
;
452 #elif defined(__LITTLE_ENDIAN)
454 u8 tx_max_conc_seqs_c3
;
456 #if defined(__BIG_ENDIAN)
458 #define FCOE_KWQE_CONN_OFFLOAD3_B_MUL_N_PORT_IDS (0x1<<0)
459 #define FCOE_KWQE_CONN_OFFLOAD3_B_MUL_N_PORT_IDS_SHIFT 0
460 #define FCOE_KWQE_CONN_OFFLOAD3_B_E_D_TOV_RES (0x1<<1)
461 #define FCOE_KWQE_CONN_OFFLOAD3_B_E_D_TOV_RES_SHIFT 1
462 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONT_INCR_SEQ_CNT (0x1<<2)
463 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONT_INCR_SEQ_CNT_SHIFT 2
464 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONF_REQ (0x1<<3)
465 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONF_REQ_SHIFT 3
466 #define FCOE_KWQE_CONN_OFFLOAD3_B_REC_VALID (0x1<<4)
467 #define FCOE_KWQE_CONN_OFFLOAD3_B_REC_VALID_SHIFT 4
468 #define FCOE_KWQE_CONN_OFFLOAD3_B_C2_VALID (0x1<<5)
469 #define FCOE_KWQE_CONN_OFFLOAD3_B_C2_VALID_SHIFT 5
470 #define FCOE_KWQE_CONN_OFFLOAD3_B_ACK_0 (0x1<<6)
471 #define FCOE_KWQE_CONN_OFFLOAD3_B_ACK_0_SHIFT 6
472 #define FCOE_KWQE_CONN_OFFLOAD3_B_VLAN_FLAG (0x1<<7)
473 #define FCOE_KWQE_CONN_OFFLOAD3_B_VLAN_FLAG_SHIFT 7
475 #elif defined(__LITTLE_ENDIAN)
478 #define FCOE_KWQE_CONN_OFFLOAD3_B_MUL_N_PORT_IDS (0x1<<0)
479 #define FCOE_KWQE_CONN_OFFLOAD3_B_MUL_N_PORT_IDS_SHIFT 0
480 #define FCOE_KWQE_CONN_OFFLOAD3_B_E_D_TOV_RES (0x1<<1)
481 #define FCOE_KWQE_CONN_OFFLOAD3_B_E_D_TOV_RES_SHIFT 1
482 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONT_INCR_SEQ_CNT (0x1<<2)
483 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONT_INCR_SEQ_CNT_SHIFT 2
484 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONF_REQ (0x1<<3)
485 #define FCOE_KWQE_CONN_OFFLOAD3_B_CONF_REQ_SHIFT 3
486 #define FCOE_KWQE_CONN_OFFLOAD3_B_REC_VALID (0x1<<4)
487 #define FCOE_KWQE_CONN_OFFLOAD3_B_REC_VALID_SHIFT 4
488 #define FCOE_KWQE_CONN_OFFLOAD3_B_C2_VALID (0x1<<5)
489 #define FCOE_KWQE_CONN_OFFLOAD3_B_C2_VALID_SHIFT 5
490 #define FCOE_KWQE_CONN_OFFLOAD3_B_ACK_0 (0x1<<6)
491 #define FCOE_KWQE_CONN_OFFLOAD3_B_ACK_0_SHIFT 6
492 #define FCOE_KWQE_CONN_OFFLOAD3_B_VLAN_FLAG (0x1<<7)
493 #define FCOE_KWQE_CONN_OFFLOAD3_B_VLAN_FLAG_SHIFT 7
496 u32 confq_first_pbe_addr_lo
;
497 u32 confq_first_pbe_addr_hi
;
498 #if defined(__BIG_ENDIAN)
499 u16 rx_max_fc_pay_len
;
500 u16 tx_total_conc_seqs
;
501 #elif defined(__LITTLE_ENDIAN)
502 u16 tx_total_conc_seqs
;
503 u16 rx_max_fc_pay_len
;
505 #if defined(__BIG_ENDIAN)
506 u8 rx_open_seqs_exch_c3
;
507 u8 rx_max_conc_seqs_c3
;
508 u16 rx_total_conc_seqs
;
509 #elif defined(__LITTLE_ENDIAN)
510 u16 rx_total_conc_seqs
;
511 u8 rx_max_conc_seqs_c3
;
512 u8 rx_open_seqs_exch_c3
;
517 * FCoE connection offload request 4
519 struct fcoe_kwqe_conn_offload4
{
520 #if defined(__BIG_ENDIAN)
521 struct fcoe_kwqe_header hdr
;
523 u8 e_d_tov_timer_val
;
524 #elif defined(__LITTLE_ENDIAN)
525 u8 e_d_tov_timer_val
;
527 struct fcoe_kwqe_header hdr
;
529 u8 src_mac_addr_lo32
[4];
530 #if defined(__BIG_ENDIAN)
531 u8 dst_mac_addr_hi16
[2];
532 u8 src_mac_addr_hi16
[2];
533 #elif defined(__LITTLE_ENDIAN)
534 u8 src_mac_addr_hi16
[2];
535 u8 dst_mac_addr_hi16
[2];
537 u8 dst_mac_addr_lo32
[4];
540 u32 confq_pbl_base_addr_lo
;
541 u32 confq_pbl_base_addr_hi
;
545 * FCoE connection enable request
547 struct fcoe_kwqe_conn_enable_disable
{
548 #if defined(__BIG_ENDIAN)
549 struct fcoe_kwqe_header hdr
;
551 #elif defined(__LITTLE_ENDIAN)
553 struct fcoe_kwqe_header hdr
;
555 u8 src_mac_addr_lo32
[4];
556 #if defined(__BIG_ENDIAN)
558 #define FCOE_KWQE_CONN_ENABLE_DISABLE_VLAN_ID (0xFFF<<0)
559 #define FCOE_KWQE_CONN_ENABLE_DISABLE_VLAN_ID_SHIFT 0
560 #define FCOE_KWQE_CONN_ENABLE_DISABLE_CFI (0x1<<12)
561 #define FCOE_KWQE_CONN_ENABLE_DISABLE_CFI_SHIFT 12
562 #define FCOE_KWQE_CONN_ENABLE_DISABLE_PRIORITY (0x7<<13)
563 #define FCOE_KWQE_CONN_ENABLE_DISABLE_PRIORITY_SHIFT 13
564 u8 src_mac_addr_hi16
[2];
565 #elif defined(__LITTLE_ENDIAN)
566 u8 src_mac_addr_hi16
[2];
568 #define FCOE_KWQE_CONN_ENABLE_DISABLE_VLAN_ID (0xFFF<<0)
569 #define FCOE_KWQE_CONN_ENABLE_DISABLE_VLAN_ID_SHIFT 0
570 #define FCOE_KWQE_CONN_ENABLE_DISABLE_CFI (0x1<<12)
571 #define FCOE_KWQE_CONN_ENABLE_DISABLE_CFI_SHIFT 12
572 #define FCOE_KWQE_CONN_ENABLE_DISABLE_PRIORITY (0x7<<13)
573 #define FCOE_KWQE_CONN_ENABLE_DISABLE_PRIORITY_SHIFT 13
575 u8 dst_mac_addr_lo32
[4];
576 #if defined(__BIG_ENDIAN)
578 u8 dst_mac_addr_hi16
[2];
579 #elif defined(__LITTLE_ENDIAN)
580 u8 dst_mac_addr_hi16
[2];
583 #if defined(__BIG_ENDIAN)
586 #elif defined(__LITTLE_ENDIAN)
590 #if defined(__BIG_ENDIAN)
593 #elif defined(__LITTLE_ENDIAN)
603 * FCoE connection destroy request
605 struct fcoe_kwqe_conn_destroy
{
606 #if defined(__BIG_ENDIAN)
607 struct fcoe_kwqe_header hdr
;
609 #elif defined(__LITTLE_ENDIAN)
611 struct fcoe_kwqe_header hdr
;
619 * FCoe destroy request
621 struct fcoe_kwqe_destroy
{
622 #if defined(__BIG_ENDIAN)
623 struct fcoe_kwqe_header hdr
;
625 #elif defined(__LITTLE_ENDIAN)
627 struct fcoe_kwqe_header hdr
;
633 * FCoe statistics request
635 struct fcoe_kwqe_stat
{
636 #if defined(__BIG_ENDIAN)
637 struct fcoe_kwqe_header hdr
;
639 #elif defined(__LITTLE_ENDIAN)
641 struct fcoe_kwqe_header hdr
;
643 u32 stat_params_addr_lo
;
644 u32 stat_params_addr_hi
;
652 struct fcoe_kwqe_init1 init1
;
653 struct fcoe_kwqe_init2 init2
;
654 struct fcoe_kwqe_init3 init3
;
655 struct fcoe_kwqe_conn_offload1 conn_offload1
;
656 struct fcoe_kwqe_conn_offload2 conn_offload2
;
657 struct fcoe_kwqe_conn_offload3 conn_offload3
;
658 struct fcoe_kwqe_conn_offload4 conn_offload4
;
659 struct fcoe_kwqe_conn_enable_disable conn_enable_disable
;
660 struct fcoe_kwqe_conn_destroy conn_destroy
;
661 struct fcoe_kwqe_destroy destroy
;
662 struct fcoe_kwqe_stat statistics
;
665 struct fcoe_mul_sges_ctx
{
666 struct regpair cur_sge_addr
;
667 #if defined(__BIG_ENDIAN)
671 #elif defined(__LITTLE_ENDIAN)
678 struct fcoe_s_stat_ctx
{
680 #define FCOE_S_STAT_CTX_ACTIVE (0x1<<0)
681 #define FCOE_S_STAT_CTX_ACTIVE_SHIFT 0
682 #define FCOE_S_STAT_CTX_ACK_ABORT_SEQ_COND (0x1<<1)
683 #define FCOE_S_STAT_CTX_ACK_ABORT_SEQ_COND_SHIFT 1
684 #define FCOE_S_STAT_CTX_ABTS_PERFORMED (0x1<<2)
685 #define FCOE_S_STAT_CTX_ABTS_PERFORMED_SHIFT 2
686 #define FCOE_S_STAT_CTX_SEQ_TIMEOUT (0x1<<3)
687 #define FCOE_S_STAT_CTX_SEQ_TIMEOUT_SHIFT 3
688 #define FCOE_S_STAT_CTX_P_RJT (0x1<<4)
689 #define FCOE_S_STAT_CTX_P_RJT_SHIFT 4
690 #define FCOE_S_STAT_CTX_ACK_EOFT (0x1<<5)
691 #define FCOE_S_STAT_CTX_ACK_EOFT_SHIFT 5
692 #define FCOE_S_STAT_CTX_RSRV1 (0x3<<6)
693 #define FCOE_S_STAT_CTX_RSRV1_SHIFT 6
696 struct fcoe_seq_ctx
{
697 #if defined(__BIG_ENDIAN)
699 struct fcoe_s_stat_ctx s_stat
;
701 #elif defined(__LITTLE_ENDIAN)
703 struct fcoe_s_stat_ctx s_stat
;
706 #if defined(__BIG_ENDIAN)
709 #elif defined(__LITTLE_ENDIAN)
718 struct fcoe_single_sge_ctx
{
719 struct regpair cur_buf_addr
;
720 #if defined(__BIG_ENDIAN)
723 #elif defined(__LITTLE_ENDIAN)
730 struct fcoe_single_sge_ctx single_sge
;
731 struct fcoe_mul_sges_ctx mul_sges
;
741 #define FCOE_SQE_TASK_ID (0x7FFF<<0)
742 #define FCOE_SQE_TASK_ID_SHIFT 0
743 #define FCOE_SQE_TOGGLE_BIT (0x1<<15)
744 #define FCOE_SQE_TOGGLE_BIT_SHIFT 15
749 struct fcoe_task_ctx_entry_tx_only
{
750 union fcoe_sgl_ctx sgl_ctx
;
753 struct fcoe_task_ctx_entry_txwr_rxrd
{
754 #if defined(__BIG_ENDIAN)
757 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_TASK_TYPE (0x7<<0)
758 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_TASK_TYPE_SHIFT 0
759 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_DEV_TYPE (0x1<<3)
760 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_DEV_TYPE_SHIFT 3
761 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_CLASS_TYPE (0x1<<4)
762 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_CLASS_TYPE_SHIFT 4
763 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_SINGLE_SGE (0x1<<5)
764 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_SINGLE_SGE_SHIFT 5
765 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_RSRV5 (0x3<<6)
766 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_RSRV5_SHIFT 6
768 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_TX_STATE (0xF<<0)
769 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_TX_STATE_SHIFT 0
770 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_RSRV4 (0xF<<4)
771 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_RSRV4_SHIFT 4
772 #elif defined(__LITTLE_ENDIAN)
774 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_TX_STATE (0xF<<0)
775 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_TX_STATE_SHIFT 0
776 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_RSRV4 (0xF<<4)
777 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_RSRV4_SHIFT 4
779 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_TASK_TYPE (0x7<<0)
780 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_TASK_TYPE_SHIFT 0
781 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_DEV_TYPE (0x1<<3)
782 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_DEV_TYPE_SHIFT 3
783 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_CLASS_TYPE (0x1<<4)
784 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_CLASS_TYPE_SHIFT 4
785 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_SINGLE_SGE (0x1<<5)
786 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_SINGLE_SGE_SHIFT 5
787 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_RSRV5 (0x3<<6)
788 #define FCOE_TASK_CTX_ENTRY_TXWR_RXRD_RSRV5_SHIFT 6
794 * Common section. Both TX and RX processing might write and read from it in
797 struct fcoe_task_ctx_entry_tx_rx_cmn
{
799 union fcoe_general_task_ctx general
;
800 #if defined(__BIG_ENDIAN)
802 struct fcoe_s_stat_ctx tx_s_stat
;
804 #elif defined(__LITTLE_ENDIAN)
806 struct fcoe_s_stat_ctx tx_s_stat
;
810 #define FCOE_TASK_CTX_ENTRY_TX_RX_CMN_CID (0xFFFFFF<<0)
811 #define FCOE_TASK_CTX_ENTRY_TX_RX_CMN_CID_SHIFT 0
812 #define FCOE_TASK_CTX_ENTRY_TX_RX_CMN_VALID (0x1<<24)
813 #define FCOE_TASK_CTX_ENTRY_TX_RX_CMN_VALID_SHIFT 24
814 #define FCOE_TASK_CTX_ENTRY_TX_RX_CMN_SEQ_INIT (0x1<<25)
815 #define FCOE_TASK_CTX_ENTRY_TX_RX_CMN_SEQ_INIT_SHIFT 25
816 #define FCOE_TASK_CTX_ENTRY_TX_RX_CMN_PEND_XFER (0x1<<26)
817 #define FCOE_TASK_CTX_ENTRY_TX_RX_CMN_PEND_XFER_SHIFT 26
818 #define FCOE_TASK_CTX_ENTRY_TX_RX_CMN_PEND_CONF (0x1<<27)
819 #define FCOE_TASK_CTX_ENTRY_TX_RX_CMN_PEND_CONF_SHIFT 27
820 #define FCOE_TASK_CTX_ENTRY_TX_RX_CMN_EXP_FIRST_FRAME (0x1<<28)
821 #define FCOE_TASK_CTX_ENTRY_TX_RX_CMN_EXP_FIRST_FRAME_SHIFT 28
822 #define FCOE_TASK_CTX_ENTRY_TX_RX_CMN_RSRV (0x7<<29)
823 #define FCOE_TASK_CTX_ENTRY_TX_RX_CMN_RSRV_SHIFT 29
826 struct fcoe_task_ctx_entry_rxwr_txrd
{
827 #if defined(__BIG_ENDIAN)
830 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_RX_STATE (0xF<<0)
831 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_RX_STATE_SHIFT 0
832 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_NUM_RQ_WQE (0x7<<4)
833 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_NUM_RQ_WQE_SHIFT 4
834 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_CONF_REQ (0x1<<7)
835 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_CONF_REQ_SHIFT 7
836 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_MISS_FRAME (0x1<<8)
837 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_MISS_FRAME_SHIFT 8
838 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_RESERVED0 (0x7F<<9)
839 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_RESERVED0_SHIFT 9
840 #elif defined(__LITTLE_ENDIAN)
842 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_RX_STATE (0xF<<0)
843 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_RX_STATE_SHIFT 0
844 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_NUM_RQ_WQE (0x7<<4)
845 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_NUM_RQ_WQE_SHIFT 4
846 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_CONF_REQ (0x1<<7)
847 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_CONF_REQ_SHIFT 7
848 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_MISS_FRAME (0x1<<8)
849 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_MISS_FRAME_SHIFT 8
850 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_RESERVED0 (0x7F<<9)
851 #define FCOE_TASK_CTX_ENTRY_RXWR_TXRD_RESERVED0_SHIFT 9
856 struct fcoe_task_ctx_entry_rx_only
{
857 struct fcoe_seq_ctx seq_ctx
;
858 struct fcoe_seq_ctx ooo_seq_ctx
;
860 union fcoe_sgl_ctx sgl_ctx
;
863 struct fcoe_task_ctx_entry
{
864 struct fcoe_task_ctx_entry_tx_only tx_wr_only
;
865 struct fcoe_task_ctx_entry_txwr_rxrd tx_wr_rx_rd
;
866 struct fcoe_task_ctx_entry_tx_rx_cmn cmn
;
867 struct fcoe_task_ctx_entry_rxwr_txrd rx_wr_tx_rd
;
868 struct fcoe_task_ctx_entry_rx_only rx_wr_only
;
878 #define FCOE_XFRQE_TASK_ID (0x7FFF<<0)
879 #define FCOE_XFRQE_TASK_ID_SHIFT 0
880 #define FCOE_XFRQE_TOGGLE_BIT (0x1<<15)
881 #define FCOE_XFRQE_TOGGLE_BIT_SHIFT 15
889 #if defined(__BIG_ENDIAN)
892 #elif defined(__LITTLE_ENDIAN)
901 * FCoE connection data base
903 struct fcoe_conn_db
{
904 #if defined(__BIG_ENDIAN)
907 #elif defined(__LITTLE_ENDIAN)
912 struct regpair cq_arm
;
921 #define FCOE_CQE_CQE_INFO (0x3FFF<<0)
922 #define FCOE_CQE_CQE_INFO_SHIFT 0
923 #define FCOE_CQE_CQE_TYPE (0x1<<14)
924 #define FCOE_CQE_CQE_TYPE_SHIFT 14
925 #define FCOE_CQE_TOGGLE_BIT (0x1<<15)
926 #define FCOE_CQE_TOGGLE_BIT_SHIFT 15
931 * FCoE error/warning resporting entry
933 struct fcoe_err_report_entry
{
934 u32 err_warn_bitmap_lo
;
935 u32 err_warn_bitmap_hi
;
938 struct fcoe_fc_hdr fc_hdr
;
943 * FCoE hash table entry (32 bytes)
945 struct fcoe_hash_table_entry
{
946 #if defined(__BIG_ENDIAN)
951 #elif defined(__LITTLE_ENDIAN)
957 #if defined(__BIG_ENDIAN)
961 #elif defined(__LITTLE_ENDIAN)
967 #if defined(__BIG_ENDIAN)
970 #elif defined(__LITTLE_ENDIAN)
975 #if defined(__BIG_ENDIAN)
979 #elif defined(__LITTLE_ENDIAN)
986 #define FCOE_HASH_TABLE_ENTRY_CID (0xFFFFFF<<0)
987 #define FCOE_HASH_TABLE_ENTRY_CID_SHIFT 0
988 #define FCOE_HASH_TABLE_ENTRY_RESERVED3 (0x7F<<24)
989 #define FCOE_HASH_TABLE_ENTRY_RESERVED3_SHIFT 24
990 #define FCOE_HASH_TABLE_ENTRY_VALID (0x1<<31)
991 #define FCOE_HASH_TABLE_ENTRY_VALID_SHIFT 31
995 * FCoE pending work request CQE
997 struct fcoe_pend_wq_cqe
{
999 #define FCOE_PEND_WQ_CQE_TASK_ID (0x3FFF<<0)
1000 #define FCOE_PEND_WQ_CQE_TASK_ID_SHIFT 0
1001 #define FCOE_PEND_WQ_CQE_CQE_TYPE (0x1<<14)
1002 #define FCOE_PEND_WQ_CQE_CQE_TYPE_SHIFT 14
1003 #define FCOE_PEND_WQ_CQE_TOGGLE_BIT (0x1<<15)
1004 #define FCOE_PEND_WQ_CQE_TOGGLE_BIT_SHIFT 15
1009 * FCoE RX statistics parameters section#0
1011 struct fcoe_rx_stat_params_section0
{
1013 u32 fcoe_rx_pkt_cnt
;
1014 u32 fcoe_rx_byte_cnt
;
1015 u32 fcoe_rx_drop_pkt_cnt
;
1020 * FCoE RX statistics parameters section#1
1022 struct fcoe_rx_stat_params_section1
{
1026 u32 seq_timeout_cnt
;
1028 u32 fcoe_rx_drop_pkt_cnt
;
1035 * FCoE TX statistics parameters
1037 struct fcoe_tx_stat_params
{
1038 u32 fcoe_tx_pkt_cnt
;
1039 u32 fcoe_tx_byte_cnt
;
1045 * FCoE statistics parameters
1047 struct fcoe_statistics_params
{
1048 struct fcoe_tx_stat_params tx_stat
;
1049 struct fcoe_rx_stat_params_section0 rx_stat0
;
1050 struct fcoe_rx_stat_params_section1 rx_stat1
;
1055 * FCoE t2 hash table entry (64 bytes)
1057 struct fcoe_t2_hash_table_entry
{
1058 struct fcoe_hash_table_entry data
;
1059 struct regpair next
;
1060 struct regpair reserved0
[3];
1064 * FCoE unsolicited CQE
1066 struct fcoe_unsolicited_cqe
{
1068 #define FCOE_UNSOLICITED_CQE_SUBTYPE (0x3<<0)
1069 #define FCOE_UNSOLICITED_CQE_SUBTYPE_SHIFT 0
1070 #define FCOE_UNSOLICITED_CQE_PKT_LEN (0xFFF<<2)
1071 #define FCOE_UNSOLICITED_CQE_PKT_LEN_SHIFT 2
1072 #define FCOE_UNSOLICITED_CQE_CQE_TYPE (0x1<<14)
1073 #define FCOE_UNSOLICITED_CQE_CQE_TYPE_SHIFT 14
1074 #define FCOE_UNSOLICITED_CQE_TOGGLE_BIT (0x1<<15)
1075 #define FCOE_UNSOLICITED_CQE_TOGGLE_BIT_SHIFT 15
1080 #endif /* __57XX_FCOE_HSI_LINUX_LE__ */