blob: fe2106c91c08585049da46972d53f8089dc2469f [file] [log] [blame]
Saurav Kashyap17d87c42014-07-03 08:18:28 -04001/* 57xx_hsi_bnx2fc.h: QLogic NetXtreme II 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.
4 *
5 * Copyright (c) 2008 - 2013 Broadcom Corporation
6 * Copyright (c) 2014, QLogic Corporation
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation.
11 *
12 */
13
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -080014#ifndef __57XX_FCOE_HSI_LINUX_LE__
15#define __57XX_FCOE_HSI_LINUX_LE__
16
17/*
18 * common data for all protocols
19 */
20struct b577xx_doorbell_hdr {
21 u8 header;
22#define B577XX_DOORBELL_HDR_RX (0x1<<0)
23#define B577XX_DOORBELL_HDR_RX_SHIFT 0
24#define B577XX_DOORBELL_HDR_DB_TYPE (0x1<<1)
25#define B577XX_DOORBELL_HDR_DB_TYPE_SHIFT 1
26#define B577XX_DOORBELL_HDR_DPM_SIZE (0x3<<2)
27#define B577XX_DOORBELL_HDR_DPM_SIZE_SHIFT 2
28#define B577XX_DOORBELL_HDR_CONN_TYPE (0xF<<4)
29#define B577XX_DOORBELL_HDR_CONN_TYPE_SHIFT 4
30};
31
32/*
33 * doorbell message sent to the chip
34 */
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +030035struct b577xx_doorbell {
36#if defined(__BIG_ENDIAN)
37 u16 zero_fill2;
38 u8 zero_fill1;
39 struct b577xx_doorbell_hdr header;
40#elif defined(__LITTLE_ENDIAN)
41 struct b577xx_doorbell_hdr header;
42 u8 zero_fill1;
43 u16 zero_fill2;
44#endif
45};
46
47
48
49/*
50 * doorbell message sent to the chip
51 */
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -080052struct b577xx_doorbell_set_prod {
53#if defined(__BIG_ENDIAN)
54 u16 prod;
55 u8 zero_fill1;
56 struct b577xx_doorbell_hdr header;
57#elif defined(__LITTLE_ENDIAN)
58 struct b577xx_doorbell_hdr header;
59 u8 zero_fill1;
60 u16 prod;
61#endif
62};
63
64
65struct regpair {
66 __le32 lo;
67 __le32 hi;
68};
69
70
71/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +030072 * ABTS info $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -080073 */
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +030074struct fcoe_abts_info {
75 __le16 aborted_task_id;
76 __le16 reserved0;
77 __le32 reserved1;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -080078};
79
80
81/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +030082 * Fixed size structure in order to plant it in Union structure
83 * $$KEEP_ENDIANNESS$$
84 */
85struct fcoe_abts_rsp_union {
86 u8 r_ctl;
87 u8 rsrv[3];
88 __le32 abts_rsp_payload[7];
89};
90
91
92/*
93 * 4 regs size $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -080094 */
95struct fcoe_bd_ctx {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +030096 __le32 buf_addr_hi;
97 __le32 buf_addr_lo;
98 __le16 buf_len;
99 __le16 rsrv0;
100 __le16 flags;
101 __le16 rsrv1;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800102};
103
104
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300105/*
106 * FCoE cached sges context $$KEEP_ENDIANNESS$$
107 */
108struct fcoe_cached_sge_ctx {
109 struct regpair cur_buf_addr;
110 __le16 cur_buf_rem;
111 __le16 second_buf_rem;
112 struct regpair second_buf_addr;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800113};
114
115
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300116/*
117 * Cleanup info $$KEEP_ENDIANNESS$$
118 */
119struct fcoe_cleanup_info {
120 __le16 cleaned_task_id;
121 __le16 rolled_tx_seq_cnt;
122 __le32 rolled_tx_data_offset;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800123};
124
125
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300126/*
127 * Fcp RSP flags $$KEEP_ENDIANNESS$$
128 */
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800129struct fcoe_fcp_rsp_flags {
130 u8 flags;
131#define FCOE_FCP_RSP_FLAGS_FCP_RSP_LEN_VALID (0x1<<0)
132#define FCOE_FCP_RSP_FLAGS_FCP_RSP_LEN_VALID_SHIFT 0
133#define FCOE_FCP_RSP_FLAGS_FCP_SNS_LEN_VALID (0x1<<1)
134#define FCOE_FCP_RSP_FLAGS_FCP_SNS_LEN_VALID_SHIFT 1
135#define FCOE_FCP_RSP_FLAGS_FCP_RESID_OVER (0x1<<2)
136#define FCOE_FCP_RSP_FLAGS_FCP_RESID_OVER_SHIFT 2
137#define FCOE_FCP_RSP_FLAGS_FCP_RESID_UNDER (0x1<<3)
138#define FCOE_FCP_RSP_FLAGS_FCP_RESID_UNDER_SHIFT 3
139#define FCOE_FCP_RSP_FLAGS_FCP_CONF_REQ (0x1<<4)
140#define FCOE_FCP_RSP_FLAGS_FCP_CONF_REQ_SHIFT 4
141#define FCOE_FCP_RSP_FLAGS_FCP_BIDI_FLAGS (0x7<<5)
142#define FCOE_FCP_RSP_FLAGS_FCP_BIDI_FLAGS_SHIFT 5
143};
144
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300145/*
146 * Fcp RSP payload $$KEEP_ENDIANNESS$$
147 */
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800148struct fcoe_fcp_rsp_payload {
149 struct regpair reserved0;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300150 __le32 fcp_resid;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800151 u8 scsi_status_code;
152 struct fcoe_fcp_rsp_flags fcp_flags;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300153 __le16 retry_delay_timer;
154 __le32 fcp_rsp_len;
155 __le32 fcp_sns_len;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800156};
157
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800158/*
159 * Fixed size structure in order to plant it in Union structure
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300160 * $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800161 */
162struct fcoe_fcp_rsp_union {
163 struct fcoe_fcp_rsp_payload payload;
164 struct regpair reserved0;
165};
166
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300167/*
168 * FC header $$KEEP_ENDIANNESS$$
169 */
170struct fcoe_fc_hdr {
171 u8 s_id[3];
172 u8 cs_ctl;
173 u8 d_id[3];
174 u8 r_ctl;
175 __le16 seq_cnt;
176 u8 df_ctl;
177 u8 seq_id;
178 u8 f_ctl[3];
179 u8 type;
180 __le32 parameters;
181 __le16 rx_id;
182 __le16 ox_id;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800183};
184
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300185/*
186 * FC header union $$KEEP_ENDIANNESS$$
187 */
188struct fcoe_mp_rsp_union {
189 struct fcoe_fc_hdr fc_hdr;
190 __le32 mp_payload_len;
191 __le32 rsrv;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800192};
193
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300194/*
195 * Completion information $$KEEP_ENDIANNESS$$
196 */
197union fcoe_comp_flow_info {
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800198 struct fcoe_fcp_rsp_union fcp_rsp;
199 struct fcoe_abts_rsp_union abts_rsp;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300200 struct fcoe_mp_rsp_union mp_rsp;
201 __le32 opaque[8];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800202};
203
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300204
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800205/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300206 * External ABTS info $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800207 */
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300208struct fcoe_ext_abts_info {
209 __le32 rsrv0[6];
210 struct fcoe_abts_info ctx;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800211};
212
213
214/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300215 * External cleanup info $$KEEP_ENDIANNESS$$
216 */
217struct fcoe_ext_cleanup_info {
218 __le32 rsrv0[6];
219 struct fcoe_cleanup_info ctx;
220};
221
222
223/*
224 * Fcoe FW Tx sequence context $$KEEP_ENDIANNESS$$
225 */
226struct fcoe_fw_tx_seq_ctx {
227 __le32 data_offset;
228 __le16 seq_cnt;
229 __le16 rsrv0;
230};
231
232/*
233 * Fcoe external FW Tx sequence context $$KEEP_ENDIANNESS$$
234 */
235struct fcoe_ext_fw_tx_seq_ctx {
236 __le32 rsrv0[6];
237 struct fcoe_fw_tx_seq_ctx ctx;
238};
239
240
241/*
242 * FCoE multiple sges context $$KEEP_ENDIANNESS$$
243 */
244struct fcoe_mul_sges_ctx {
245 struct regpair cur_sge_addr;
246 __le16 cur_sge_off;
247 u8 cur_sge_idx;
248 u8 sgl_size;
249};
250
251/*
252 * FCoE external multiple sges context $$KEEP_ENDIANNESS$$
253 */
254struct fcoe_ext_mul_sges_ctx {
255 struct fcoe_mul_sges_ctx mul_sgl;
256 struct regpair rsrv0;
257};
258
259
260/*
261 * FCP CMD payload $$KEEP_ENDIANNESS$$
262 */
263struct fcoe_fcp_cmd_payload {
264 __le32 opaque[8];
265};
266
267
268
269
270
271/*
272 * Fcp xfr rdy payload $$KEEP_ENDIANNESS$$
273 */
274struct fcoe_fcp_xfr_rdy_payload {
275 __le32 burst_len;
276 __le32 data_ro;
277};
278
279
280/*
281 * FC frame $$KEEP_ENDIANNESS$$
282 */
283struct fcoe_fc_frame {
284 struct fcoe_fc_hdr fc_hdr;
285 __le32 reserved0[2];
286};
287
288
289
290
291/*
292 * FCoE KCQ CQE parameters $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800293 */
294union fcoe_kcqe_params {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300295 __le32 reserved0[4];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800296};
297
298/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300299 * FCoE KCQ CQE $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800300 */
301struct fcoe_kcqe {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300302 __le32 fcoe_conn_id;
303 __le32 completion_status;
304 __le32 fcoe_conn_context_id;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800305 union fcoe_kcqe_params params;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300306 __le16 qe_self_seq;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800307 u8 op_code;
308 u8 flags;
309#define FCOE_KCQE_RESERVED0 (0x7<<0)
310#define FCOE_KCQE_RESERVED0_SHIFT 0
311#define FCOE_KCQE_RAMROD_COMPLETION (0x1<<3)
312#define FCOE_KCQE_RAMROD_COMPLETION_SHIFT 3
313#define FCOE_KCQE_LAYER_CODE (0x7<<4)
314#define FCOE_KCQE_LAYER_CODE_SHIFT 4
315#define FCOE_KCQE_LINKED_WITH_NEXT (0x1<<7)
316#define FCOE_KCQE_LINKED_WITH_NEXT_SHIFT 7
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800317};
318
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300319
320
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800321/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300322 * FCoE KWQE header $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800323 */
324struct fcoe_kwqe_header {
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800325 u8 op_code;
326 u8 flags;
327#define FCOE_KWQE_HEADER_RESERVED0 (0xF<<0)
328#define FCOE_KWQE_HEADER_RESERVED0_SHIFT 0
329#define FCOE_KWQE_HEADER_LAYER_CODE (0x7<<4)
330#define FCOE_KWQE_HEADER_LAYER_CODE_SHIFT 4
331#define FCOE_KWQE_HEADER_RESERVED1 (0x1<<7)
332#define FCOE_KWQE_HEADER_RESERVED1_SHIFT 7
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800333};
334
335/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300336 * FCoE firmware init request 1 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800337 */
338struct fcoe_kwqe_init1 {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300339 __le16 num_tasks;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800340 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300341 __le32 task_list_pbl_addr_lo;
342 __le32 task_list_pbl_addr_hi;
343 __le32 dummy_buffer_addr_lo;
344 __le32 dummy_buffer_addr_hi;
345 __le16 sq_num_wqes;
346 __le16 rq_num_wqes;
347 __le16 rq_buffer_log_size;
348 __le16 cq_num_wqes;
349 __le16 mtu;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800350 u8 num_sessions_log;
351 u8 flags;
352#define FCOE_KWQE_INIT1_LOG_PAGE_SIZE (0xF<<0)
353#define FCOE_KWQE_INIT1_LOG_PAGE_SIZE_SHIFT 0
354#define FCOE_KWQE_INIT1_LOG_CACHED_PBES_PER_FUNC (0x7<<4)
355#define FCOE_KWQE_INIT1_LOG_CACHED_PBES_PER_FUNC_SHIFT 4
356#define FCOE_KWQE_INIT1_RESERVED1 (0x1<<7)
357#define FCOE_KWQE_INIT1_RESERVED1_SHIFT 7
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800358};
359
360/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300361 * FCoE firmware init request 2 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800362 */
363struct fcoe_kwqe_init2 {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300364 u8 hsi_major_version;
365 u8 hsi_minor_version;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800366 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300367 __le32 hash_tbl_pbl_addr_lo;
368 __le32 hash_tbl_pbl_addr_hi;
369 __le32 t2_hash_tbl_addr_lo;
370 __le32 t2_hash_tbl_addr_hi;
371 __le32 t2_ptr_hash_tbl_addr_lo;
372 __le32 t2_ptr_hash_tbl_addr_hi;
373 __le32 free_list_count;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800374};
375
376/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300377 * FCoE firmware init request 3 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800378 */
379struct fcoe_kwqe_init3 {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300380 __le16 reserved0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800381 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300382 __le32 error_bit_map_lo;
383 __le32 error_bit_map_hi;
384 u8 perf_config;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800385 u8 reserved21[3];
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300386 __le32 reserved2[4];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800387};
388
389/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300390 * FCoE connection offload request 1 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800391 */
392struct fcoe_kwqe_conn_offload1 {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300393 __le16 fcoe_conn_id;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800394 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300395 __le32 sq_addr_lo;
396 __le32 sq_addr_hi;
397 __le32 rq_pbl_addr_lo;
398 __le32 rq_pbl_addr_hi;
399 __le32 rq_first_pbe_addr_lo;
400 __le32 rq_first_pbe_addr_hi;
401 __le16 rq_prod;
402 __le16 reserved0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800403};
404
405/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300406 * FCoE connection offload request 2 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800407 */
408struct fcoe_kwqe_conn_offload2 {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300409 __le16 tx_max_fc_pay_len;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800410 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300411 __le32 cq_addr_lo;
412 __le32 cq_addr_hi;
413 __le32 xferq_addr_lo;
414 __le32 xferq_addr_hi;
415 __le32 conn_db_addr_lo;
416 __le32 conn_db_addr_hi;
417 __le32 reserved1;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800418};
419
420/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300421 * FCoE connection offload request 3 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800422 */
423struct fcoe_kwqe_conn_offload3 {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300424 __le16 vlan_tag;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800425#define FCOE_KWQE_CONN_OFFLOAD3_VLAN_ID (0xFFF<<0)
426#define FCOE_KWQE_CONN_OFFLOAD3_VLAN_ID_SHIFT 0
427#define FCOE_KWQE_CONN_OFFLOAD3_CFI (0x1<<12)
428#define FCOE_KWQE_CONN_OFFLOAD3_CFI_SHIFT 12
429#define FCOE_KWQE_CONN_OFFLOAD3_PRIORITY (0x7<<13)
430#define FCOE_KWQE_CONN_OFFLOAD3_PRIORITY_SHIFT 13
431 struct fcoe_kwqe_header hdr;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800432 u8 s_id[3];
433 u8 tx_max_conc_seqs_c3;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800434 u8 d_id[3];
435 u8 flags;
436#define FCOE_KWQE_CONN_OFFLOAD3_B_MUL_N_PORT_IDS (0x1<<0)
437#define FCOE_KWQE_CONN_OFFLOAD3_B_MUL_N_PORT_IDS_SHIFT 0
438#define FCOE_KWQE_CONN_OFFLOAD3_B_E_D_TOV_RES (0x1<<1)
439#define FCOE_KWQE_CONN_OFFLOAD3_B_E_D_TOV_RES_SHIFT 1
440#define FCOE_KWQE_CONN_OFFLOAD3_B_CONT_INCR_SEQ_CNT (0x1<<2)
441#define FCOE_KWQE_CONN_OFFLOAD3_B_CONT_INCR_SEQ_CNT_SHIFT 2
442#define FCOE_KWQE_CONN_OFFLOAD3_B_CONF_REQ (0x1<<3)
443#define FCOE_KWQE_CONN_OFFLOAD3_B_CONF_REQ_SHIFT 3
444#define FCOE_KWQE_CONN_OFFLOAD3_B_REC_VALID (0x1<<4)
445#define FCOE_KWQE_CONN_OFFLOAD3_B_REC_VALID_SHIFT 4
446#define FCOE_KWQE_CONN_OFFLOAD3_B_C2_VALID (0x1<<5)
447#define FCOE_KWQE_CONN_OFFLOAD3_B_C2_VALID_SHIFT 5
448#define FCOE_KWQE_CONN_OFFLOAD3_B_ACK_0 (0x1<<6)
449#define FCOE_KWQE_CONN_OFFLOAD3_B_ACK_0_SHIFT 6
450#define FCOE_KWQE_CONN_OFFLOAD3_B_VLAN_FLAG (0x1<<7)
451#define FCOE_KWQE_CONN_OFFLOAD3_B_VLAN_FLAG_SHIFT 7
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300452 __le32 reserved;
453 __le32 confq_first_pbe_addr_lo;
454 __le32 confq_first_pbe_addr_hi;
455 __le16 tx_total_conc_seqs;
456 __le16 rx_max_fc_pay_len;
457 __le16 rx_total_conc_seqs;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800458 u8 rx_max_conc_seqs_c3;
459 u8 rx_open_seqs_exch_c3;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800460};
461
462/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300463 * FCoE connection offload request 4 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800464 */
465struct fcoe_kwqe_conn_offload4 {
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800466 u8 e_d_tov_timer_val;
467 u8 reserved2;
468 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300469 u8 src_mac_addr_lo[2];
470 u8 src_mac_addr_mid[2];
471 u8 src_mac_addr_hi[2];
472 u8 dst_mac_addr_hi[2];
473 u8 dst_mac_addr_lo[2];
474 u8 dst_mac_addr_mid[2];
475 __le32 lcq_addr_lo;
476 __le32 lcq_addr_hi;
477 __le32 confq_pbl_base_addr_lo;
478 __le32 confq_pbl_base_addr_hi;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800479};
480
481/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300482 * FCoE connection enable request $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800483 */
484struct fcoe_kwqe_conn_enable_disable {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300485 __le16 reserved0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800486 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300487 u8 src_mac_addr_lo[2];
488 u8 src_mac_addr_mid[2];
489 u8 src_mac_addr_hi[2];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800490 u16 vlan_tag;
491#define FCOE_KWQE_CONN_ENABLE_DISABLE_VLAN_ID (0xFFF<<0)
492#define FCOE_KWQE_CONN_ENABLE_DISABLE_VLAN_ID_SHIFT 0
493#define FCOE_KWQE_CONN_ENABLE_DISABLE_CFI (0x1<<12)
494#define FCOE_KWQE_CONN_ENABLE_DISABLE_CFI_SHIFT 12
495#define FCOE_KWQE_CONN_ENABLE_DISABLE_PRIORITY (0x7<<13)
496#define FCOE_KWQE_CONN_ENABLE_DISABLE_PRIORITY_SHIFT 13
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300497 u8 dst_mac_addr_lo[2];
498 u8 dst_mac_addr_mid[2];
499 u8 dst_mac_addr_hi[2];
500 __le16 reserved1;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800501 u8 s_id[3];
502 u8 vlan_flag;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800503 u8 d_id[3];
504 u8 reserved3;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300505 __le32 context_id;
506 __le32 conn_id;
507 __le32 reserved4;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800508};
509
510/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300511 * FCoE connection destroy request $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800512 */
513struct fcoe_kwqe_conn_destroy {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300514 __le16 reserved0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800515 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300516 __le32 context_id;
517 __le32 conn_id;
518 __le32 reserved1[5];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800519};
520
521/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300522 * FCoe destroy request $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800523 */
524struct fcoe_kwqe_destroy {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300525 __le16 reserved0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800526 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300527 __le32 reserved1[7];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800528};
529
530/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300531 * FCoe statistics request $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800532 */
533struct fcoe_kwqe_stat {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300534 __le16 reserved0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800535 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300536 __le32 stat_params_addr_lo;
537 __le32 stat_params_addr_hi;
538 __le32 reserved1[5];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800539};
540
541/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300542 * FCoE KWQ WQE $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800543 */
544union fcoe_kwqe {
545 struct fcoe_kwqe_init1 init1;
546 struct fcoe_kwqe_init2 init2;
547 struct fcoe_kwqe_init3 init3;
548 struct fcoe_kwqe_conn_offload1 conn_offload1;
549 struct fcoe_kwqe_conn_offload2 conn_offload2;
550 struct fcoe_kwqe_conn_offload3 conn_offload3;
551 struct fcoe_kwqe_conn_offload4 conn_offload4;
552 struct fcoe_kwqe_conn_enable_disable conn_enable_disable;
553 struct fcoe_kwqe_conn_destroy conn_destroy;
554 struct fcoe_kwqe_destroy destroy;
555 struct fcoe_kwqe_stat statistics;
556};
557
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573/*
574 * TX SGL context $$KEEP_ENDIANNESS$$
575 */
576union fcoe_sgl_union_ctx {
577 struct fcoe_cached_sge_ctx cached_sge;
578 struct fcoe_ext_mul_sges_ctx sgl;
579 __le32 opaque[5];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800580};
581
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300582/*
583 * Data-In/ELS/BLS information $$KEEP_ENDIANNESS$$
584 */
585struct fcoe_read_flow_info {
586 union fcoe_sgl_union_ctx sgl_ctx;
587 __le32 rsrv0[3];
588};
589
590
591/*
592 * Fcoe stat context $$KEEP_ENDIANNESS$$
593 */
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800594struct fcoe_s_stat_ctx {
595 u8 flags;
596#define FCOE_S_STAT_CTX_ACTIVE (0x1<<0)
597#define FCOE_S_STAT_CTX_ACTIVE_SHIFT 0
598#define FCOE_S_STAT_CTX_ACK_ABORT_SEQ_COND (0x1<<1)
599#define FCOE_S_STAT_CTX_ACK_ABORT_SEQ_COND_SHIFT 1
600#define FCOE_S_STAT_CTX_ABTS_PERFORMED (0x1<<2)
601#define FCOE_S_STAT_CTX_ABTS_PERFORMED_SHIFT 2
602#define FCOE_S_STAT_CTX_SEQ_TIMEOUT (0x1<<3)
603#define FCOE_S_STAT_CTX_SEQ_TIMEOUT_SHIFT 3
604#define FCOE_S_STAT_CTX_P_RJT (0x1<<4)
605#define FCOE_S_STAT_CTX_P_RJT_SHIFT 4
606#define FCOE_S_STAT_CTX_ACK_EOFT (0x1<<5)
607#define FCOE_S_STAT_CTX_ACK_EOFT_SHIFT 5
608#define FCOE_S_STAT_CTX_RSRV1 (0x3<<6)
609#define FCOE_S_STAT_CTX_RSRV1_SHIFT 6
610};
611
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300612/*
613 * Fcoe rx seq context $$KEEP_ENDIANNESS$$
614 */
615struct fcoe_rx_seq_ctx {
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800616 u8 seq_id;
617 struct fcoe_s_stat_ctx s_stat;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300618 __le16 seq_cnt;
619 __le32 low_exp_ro;
620 __le32 high_exp_ro;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800621};
622
623
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300624/*
625 * Fcoe rx_wr union context $$KEEP_ENDIANNESS$$
626 */
627union fcoe_rx_wr_union_ctx {
628 struct fcoe_read_flow_info read_info;
629 union fcoe_comp_flow_info comp_info;
630 __le32 opaque[8];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800631};
632
633
634
635/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300636 * FCoE SQ element $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800637 */
638struct fcoe_sqe {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300639 __le16 wqe;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800640#define FCOE_SQE_TASK_ID (0x7FFF<<0)
641#define FCOE_SQE_TASK_ID_SHIFT 0
642#define FCOE_SQE_TOGGLE_BIT (0x1<<15)
643#define FCOE_SQE_TOGGLE_BIT_SHIFT 15
644};
645
646
647
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800648/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300649 * 14 regs $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800650 */
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300651struct fcoe_tce_tx_only {
652 union fcoe_sgl_union_ctx sgl_ctx;
653 __le32 rsrv0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800654};
655
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300656/*
657 * 32 bytes (8 regs) used for TX only purposes $$KEEP_ENDIANNESS$$
658 */
659union fcoe_tx_wr_rx_rd_union_ctx {
660 struct fcoe_fc_frame tx_frame;
661 struct fcoe_fcp_cmd_payload fcp_cmd;
662 struct fcoe_ext_cleanup_info cleanup;
663 struct fcoe_ext_abts_info abts;
664 struct fcoe_ext_fw_tx_seq_ctx tx_seq;
665 __le32 opaque[8];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800666};
667
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300668/*
669 * tce_tx_wr_rx_rd_const $$KEEP_ENDIANNESS$$
670 */
671struct fcoe_tce_tx_wr_rx_rd_const {
672 u8 init_flags;
673#define FCOE_TCE_TX_WR_RX_RD_CONST_TASK_TYPE (0x7<<0)
674#define FCOE_TCE_TX_WR_RX_RD_CONST_TASK_TYPE_SHIFT 0
675#define FCOE_TCE_TX_WR_RX_RD_CONST_DEV_TYPE (0x1<<3)
676#define FCOE_TCE_TX_WR_RX_RD_CONST_DEV_TYPE_SHIFT 3
677#define FCOE_TCE_TX_WR_RX_RD_CONST_CLASS_TYPE (0x1<<4)
678#define FCOE_TCE_TX_WR_RX_RD_CONST_CLASS_TYPE_SHIFT 4
679#define FCOE_TCE_TX_WR_RX_RD_CONST_CACHED_SGE (0x3<<5)
680#define FCOE_TCE_TX_WR_RX_RD_CONST_CACHED_SGE_SHIFT 5
681#define FCOE_TCE_TX_WR_RX_RD_CONST_SUPPORT_REC_TOV (0x1<<7)
682#define FCOE_TCE_TX_WR_RX_RD_CONST_SUPPORT_REC_TOV_SHIFT 7
683 u8 tx_flags;
684#define FCOE_TCE_TX_WR_RX_RD_CONST_TX_VALID (0x1<<0)
685#define FCOE_TCE_TX_WR_RX_RD_CONST_TX_VALID_SHIFT 0
686#define FCOE_TCE_TX_WR_RX_RD_CONST_TX_STATE (0xF<<1)
687#define FCOE_TCE_TX_WR_RX_RD_CONST_TX_STATE_SHIFT 1
688#define FCOE_TCE_TX_WR_RX_RD_CONST_RSRV1 (0x1<<5)
689#define FCOE_TCE_TX_WR_RX_RD_CONST_RSRV1_SHIFT 5
690#define FCOE_TCE_TX_WR_RX_RD_CONST_TX_SEQ_INIT (0x1<<6)
691#define FCOE_TCE_TX_WR_RX_RD_CONST_TX_SEQ_INIT_SHIFT 6
692#define FCOE_TCE_TX_WR_RX_RD_CONST_RSRV2 (0x1<<7)
693#define FCOE_TCE_TX_WR_RX_RD_CONST_RSRV2_SHIFT 7
694 __le16 rsrv3;
695 __le32 verify_tx_seq;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800696};
697
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300698/*
699 * tce_tx_wr_rx_rd $$KEEP_ENDIANNESS$$
700 */
701struct fcoe_tce_tx_wr_rx_rd {
702 union fcoe_tx_wr_rx_rd_union_ctx union_ctx;
703 struct fcoe_tce_tx_wr_rx_rd_const const_ctx;
704};
705
706/*
707 * tce_rx_wr_tx_rd_const $$KEEP_ENDIANNESS$$
708 */
709struct fcoe_tce_rx_wr_tx_rd_const {
710 __le32 data_2_trns;
711 __le32 init_flags;
712#define FCOE_TCE_RX_WR_TX_RD_CONST_CID (0xFFFFFF<<0)
713#define FCOE_TCE_RX_WR_TX_RD_CONST_CID_SHIFT 0
714#define FCOE_TCE_RX_WR_TX_RD_CONST_RSRV0 (0xFF<<24)
715#define FCOE_TCE_RX_WR_TX_RD_CONST_RSRV0_SHIFT 24
716};
717
718/*
719 * tce_rx_wr_tx_rd_var $$KEEP_ENDIANNESS$$
720 */
721struct fcoe_tce_rx_wr_tx_rd_var {
722 __le16 rx_flags;
723#define FCOE_TCE_RX_WR_TX_RD_VAR_RSRV1 (0xF<<0)
724#define FCOE_TCE_RX_WR_TX_RD_VAR_RSRV1_SHIFT 0
725#define FCOE_TCE_RX_WR_TX_RD_VAR_NUM_RQ_WQE (0x7<<4)
726#define FCOE_TCE_RX_WR_TX_RD_VAR_NUM_RQ_WQE_SHIFT 4
727#define FCOE_TCE_RX_WR_TX_RD_VAR_CONF_REQ (0x1<<7)
728#define FCOE_TCE_RX_WR_TX_RD_VAR_CONF_REQ_SHIFT 7
729#define FCOE_TCE_RX_WR_TX_RD_VAR_RX_STATE (0xF<<8)
730#define FCOE_TCE_RX_WR_TX_RD_VAR_RX_STATE_SHIFT 8
731#define FCOE_TCE_RX_WR_TX_RD_VAR_EXP_FIRST_FRAME (0x1<<12)
732#define FCOE_TCE_RX_WR_TX_RD_VAR_EXP_FIRST_FRAME_SHIFT 12
733#define FCOE_TCE_RX_WR_TX_RD_VAR_RX_SEQ_INIT (0x1<<13)
734#define FCOE_TCE_RX_WR_TX_RD_VAR_RX_SEQ_INIT_SHIFT 13
735#define FCOE_TCE_RX_WR_TX_RD_VAR_RSRV2 (0x1<<14)
736#define FCOE_TCE_RX_WR_TX_RD_VAR_RSRV2_SHIFT 14
737#define FCOE_TCE_RX_WR_TX_RD_VAR_RX_VALID (0x1<<15)
738#define FCOE_TCE_RX_WR_TX_RD_VAR_RX_VALID_SHIFT 15
739 __le16 rx_id;
740 struct fcoe_fcp_xfr_rdy_payload fcp_xfr_rdy;
741};
742
743/*
744 * tce_rx_wr_tx_rd $$KEEP_ENDIANNESS$$
745 */
746struct fcoe_tce_rx_wr_tx_rd {
747 struct fcoe_tce_rx_wr_tx_rd_const const_ctx;
748 struct fcoe_tce_rx_wr_tx_rd_var var_ctx;
749};
750
751/*
752 * tce_rx_only $$KEEP_ENDIANNESS$$
753 */
754struct fcoe_tce_rx_only {
755 struct fcoe_rx_seq_ctx rx_seq_ctx;
756 union fcoe_rx_wr_union_ctx union_ctx;
757};
758
759/*
760 * task_ctx_entry $$KEEP_ENDIANNESS$$
761 */
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800762struct fcoe_task_ctx_entry {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300763 struct fcoe_tce_tx_only txwr_only;
764 struct fcoe_tce_tx_wr_rx_rd txwr_rxrd;
765 struct fcoe_tce_rx_wr_tx_rd rxwr_txrd;
766 struct fcoe_tce_rx_only rxwr_only;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800767};
768
769
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300770
771
772
773
774
775
776
777
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800778/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300779 * FCoE XFRQ element $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800780 */
781struct fcoe_xfrqe {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300782 __le16 wqe;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800783#define FCOE_XFRQE_TASK_ID (0x7FFF<<0)
784#define FCOE_XFRQE_TASK_ID_SHIFT 0
785#define FCOE_XFRQE_TOGGLE_BIT (0x1<<15)
786#define FCOE_XFRQE_TOGGLE_BIT_SHIFT 15
787};
788
789
790/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300791 * fcoe rx doorbell message sent to the chip $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800792 */
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300793struct b577xx_fcoe_rx_doorbell {
794 struct b577xx_doorbell_hdr hdr;
795 u8 params;
796#define B577XX_FCOE_RX_DOORBELL_NEGATIVE_ARM (0x1F<<0)
797#define B577XX_FCOE_RX_DOORBELL_NEGATIVE_ARM_SHIFT 0
798#define B577XX_FCOE_RX_DOORBELL_OPCODE (0x7<<5)
799#define B577XX_FCOE_RX_DOORBELL_OPCODE_SHIFT 5
800 __le16 doorbell_cq_cons;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800801};
802
803
804/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300805 * FCoE CONFQ element $$KEEP_ENDIANNESS$$
806 */
807struct fcoe_confqe {
808 __le16 ox_id;
809 __le16 rx_id;
810 __le32 param;
811};
812
813
814/*
815 * FCoE conection data base
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800816 */
817struct fcoe_conn_db {
818#if defined(__BIG_ENDIAN)
819 u16 rsrv0;
820 u16 rq_prod;
821#elif defined(__LITTLE_ENDIAN)
822 u16 rq_prod;
823 u16 rsrv0;
824#endif
825 u32 rsrv1;
826 struct regpair cq_arm;
827};
828
829
830/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300831 * FCoE CQ element $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800832 */
833struct fcoe_cqe {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300834 __le16 wqe;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800835#define FCOE_CQE_CQE_INFO (0x3FFF<<0)
836#define FCOE_CQE_CQE_INFO_SHIFT 0
837#define FCOE_CQE_CQE_TYPE (0x1<<14)
838#define FCOE_CQE_CQE_TYPE_SHIFT 14
839#define FCOE_CQE_TOGGLE_BIT (0x1<<15)
840#define FCOE_CQE_TOGGLE_BIT_SHIFT 15
841};
842
843
844/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300845 * FCoE error/warning reporting entry $$KEEP_ENDIANNESS$$
846 */
847struct fcoe_partial_err_report_entry {
848 __le32 err_warn_bitmap_lo;
849 __le32 err_warn_bitmap_hi;
850 __le32 tx_buf_off;
851 __le32 rx_buf_off;
852};
853
854/*
855 * FCoE error/warning reporting entry $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800856 */
857struct fcoe_err_report_entry {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300858 struct fcoe_partial_err_report_entry data;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800859 struct fcoe_fc_hdr fc_hdr;
860};
861
862
863/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300864 * FCoE hash table entry (32 bytes) $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800865 */
866struct fcoe_hash_table_entry {
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800867 u8 s_id_0;
868 u8 s_id_1;
869 u8 s_id_2;
870 u8 d_id_0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800871 u8 d_id_1;
872 u8 d_id_2;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300873 __le16 dst_mac_addr_hi;
874 __le16 dst_mac_addr_mid;
875 __le16 dst_mac_addr_lo;
876 __le16 src_mac_addr_hi;
877 __le16 vlan_id;
878 __le16 src_mac_addr_lo;
879 __le16 src_mac_addr_mid;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800880 u8 vlan_flag;
881 u8 reserved0;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300882 __le16 reserved1;
883 __le32 reserved2;
884 __le32 field_id;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800885#define FCOE_HASH_TABLE_ENTRY_CID (0xFFFFFF<<0)
886#define FCOE_HASH_TABLE_ENTRY_CID_SHIFT 0
887#define FCOE_HASH_TABLE_ENTRY_RESERVED3 (0x7F<<24)
888#define FCOE_HASH_TABLE_ENTRY_RESERVED3_SHIFT 24
889#define FCOE_HASH_TABLE_ENTRY_VALID (0x1<<31)
890#define FCOE_HASH_TABLE_ENTRY_VALID_SHIFT 31
891};
892
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300893
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800894/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300895 * FCoE LCQ element $$KEEP_ENDIANNESS$$
896 */
897struct fcoe_lcqe {
898 __le32 wqe;
899#define FCOE_LCQE_TASK_ID (0xFFFF<<0)
900#define FCOE_LCQE_TASK_ID_SHIFT 0
901#define FCOE_LCQE_LCQE_TYPE (0xFF<<16)
902#define FCOE_LCQE_LCQE_TYPE_SHIFT 16
903#define FCOE_LCQE_RESERVED (0xFF<<24)
904#define FCOE_LCQE_RESERVED_SHIFT 24
905};
906
907
908
909/*
910 * FCoE pending work request CQE $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800911 */
912struct fcoe_pend_wq_cqe {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300913 __le16 wqe;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800914#define FCOE_PEND_WQ_CQE_TASK_ID (0x3FFF<<0)
915#define FCOE_PEND_WQ_CQE_TASK_ID_SHIFT 0
916#define FCOE_PEND_WQ_CQE_CQE_TYPE (0x1<<14)
917#define FCOE_PEND_WQ_CQE_CQE_TYPE_SHIFT 14
918#define FCOE_PEND_WQ_CQE_TOGGLE_BIT (0x1<<15)
919#define FCOE_PEND_WQ_CQE_TOGGLE_BIT_SHIFT 15
920};
921
922
923/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300924 * FCoE RX statistics parameters section#0 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800925 */
926struct fcoe_rx_stat_params_section0 {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300927 __le32 fcoe_rx_pkt_cnt;
928 __le32 fcoe_rx_byte_cnt;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800929};
930
931
932/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300933 * FCoE RX statistics parameters section#1 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800934 */
935struct fcoe_rx_stat_params_section1 {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300936 __le32 fcoe_ver_cnt;
937 __le32 fcoe_rx_drop_pkt_cnt;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800938};
939
940
941/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300942 * FCoE RX statistics parameters section#2 $$KEEP_ENDIANNESS$$
943 */
944struct fcoe_rx_stat_params_section2 {
945 __le32 fc_crc_cnt;
946 __le32 eofa_del_cnt;
947 __le32 miss_frame_cnt;
948 __le32 seq_timeout_cnt;
949 __le32 drop_seq_cnt;
950 __le32 fcoe_rx_drop_pkt_cnt;
951 __le32 fcp_rx_pkt_cnt;
952 __le32 reserved0;
953};
954
955
956/*
957 * FCoE TX statistics parameters $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800958 */
959struct fcoe_tx_stat_params {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300960 __le32 fcoe_tx_pkt_cnt;
961 __le32 fcoe_tx_byte_cnt;
962 __le32 fcp_tx_pkt_cnt;
963 __le32 reserved0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800964};
965
966/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300967 * FCoE statistics parameters $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800968 */
969struct fcoe_statistics_params {
970 struct fcoe_tx_stat_params tx_stat;
971 struct fcoe_rx_stat_params_section0 rx_stat0;
972 struct fcoe_rx_stat_params_section1 rx_stat1;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300973 struct fcoe_rx_stat_params_section2 rx_stat2;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800974};
975
976
977/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300978 * FCoE t2 hash table entry (64 bytes) $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800979 */
980struct fcoe_t2_hash_table_entry {
981 struct fcoe_hash_table_entry data;
982 struct regpair next;
983 struct regpair reserved0[3];
984};
985
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300986
987
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800988/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300989 * FCoE unsolicited CQE $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800990 */
991struct fcoe_unsolicited_cqe {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300992 __le16 wqe;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800993#define FCOE_UNSOLICITED_CQE_SUBTYPE (0x3<<0)
994#define FCOE_UNSOLICITED_CQE_SUBTYPE_SHIFT 0
995#define FCOE_UNSOLICITED_CQE_PKT_LEN (0xFFF<<2)
996#define FCOE_UNSOLICITED_CQE_PKT_LEN_SHIFT 2
997#define FCOE_UNSOLICITED_CQE_CQE_TYPE (0x1<<14)
998#define FCOE_UNSOLICITED_CQE_CQE_TYPE_SHIFT 14
999#define FCOE_UNSOLICITED_CQE_TOGGLE_BIT (0x1<<15)
1000#define FCOE_UNSOLICITED_CQE_TOGGLE_BIT_SHIFT 15
1001};
1002
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -08001003#endif /* __57XX_FCOE_HSI_LINUX_LE__ */