blob: e1f1e3448f982faf5f7886aeef3604790052ae6b [file] [log] [blame]
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -08001#ifndef __57XX_FCOE_HSI_LINUX_LE__
2#define __57XX_FCOE_HSI_LINUX_LE__
3
4/*
5 * common data for all protocols
6 */
7struct b577xx_doorbell_hdr {
8 u8 header;
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
17};
18
19/*
20 * doorbell message sent to the chip
21 */
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +030022struct b577xx_doorbell {
23#if defined(__BIG_ENDIAN)
24 u16 zero_fill2;
25 u8 zero_fill1;
26 struct b577xx_doorbell_hdr header;
27#elif defined(__LITTLE_ENDIAN)
28 struct b577xx_doorbell_hdr header;
29 u8 zero_fill1;
30 u16 zero_fill2;
31#endif
32};
33
34
35
36/*
37 * doorbell message sent to the chip
38 */
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -080039struct b577xx_doorbell_set_prod {
40#if defined(__BIG_ENDIAN)
41 u16 prod;
42 u8 zero_fill1;
43 struct b577xx_doorbell_hdr header;
44#elif defined(__LITTLE_ENDIAN)
45 struct b577xx_doorbell_hdr header;
46 u8 zero_fill1;
47 u16 prod;
48#endif
49};
50
51
52struct regpair {
53 __le32 lo;
54 __le32 hi;
55};
56
57
58/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +030059 * ABTS info $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -080060 */
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +030061struct fcoe_abts_info {
62 __le16 aborted_task_id;
63 __le16 reserved0;
64 __le32 reserved1;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -080065};
66
67
68/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +030069 * Fixed size structure in order to plant it in Union structure
70 * $$KEEP_ENDIANNESS$$
71 */
72struct fcoe_abts_rsp_union {
73 u8 r_ctl;
74 u8 rsrv[3];
75 __le32 abts_rsp_payload[7];
76};
77
78
79/*
80 * 4 regs size $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -080081 */
82struct fcoe_bd_ctx {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +030083 __le32 buf_addr_hi;
84 __le32 buf_addr_lo;
85 __le16 buf_len;
86 __le16 rsrv0;
87 __le16 flags;
88 __le16 rsrv1;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -080089};
90
91
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +030092/*
93 * FCoE cached sges context $$KEEP_ENDIANNESS$$
94 */
95struct fcoe_cached_sge_ctx {
96 struct regpair cur_buf_addr;
97 __le16 cur_buf_rem;
98 __le16 second_buf_rem;
99 struct regpair second_buf_addr;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800100};
101
102
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300103/*
104 * Cleanup info $$KEEP_ENDIANNESS$$
105 */
106struct fcoe_cleanup_info {
107 __le16 cleaned_task_id;
108 __le16 rolled_tx_seq_cnt;
109 __le32 rolled_tx_data_offset;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800110};
111
112
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300113/*
114 * Fcp RSP flags $$KEEP_ENDIANNESS$$
115 */
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800116struct fcoe_fcp_rsp_flags {
117 u8 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
130};
131
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300132/*
133 * Fcp RSP payload $$KEEP_ENDIANNESS$$
134 */
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800135struct fcoe_fcp_rsp_payload {
136 struct regpair reserved0;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300137 __le32 fcp_resid;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800138 u8 scsi_status_code;
139 struct fcoe_fcp_rsp_flags fcp_flags;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300140 __le16 retry_delay_timer;
141 __le32 fcp_rsp_len;
142 __le32 fcp_sns_len;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800143};
144
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800145/*
146 * Fixed size structure in order to plant it in Union structure
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300147 * $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800148 */
149struct fcoe_fcp_rsp_union {
150 struct fcoe_fcp_rsp_payload payload;
151 struct regpair reserved0;
152};
153
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300154/*
155 * FC header $$KEEP_ENDIANNESS$$
156 */
157struct fcoe_fc_hdr {
158 u8 s_id[3];
159 u8 cs_ctl;
160 u8 d_id[3];
161 u8 r_ctl;
162 __le16 seq_cnt;
163 u8 df_ctl;
164 u8 seq_id;
165 u8 f_ctl[3];
166 u8 type;
167 __le32 parameters;
168 __le16 rx_id;
169 __le16 ox_id;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800170};
171
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300172/*
173 * FC header union $$KEEP_ENDIANNESS$$
174 */
175struct fcoe_mp_rsp_union {
176 struct fcoe_fc_hdr fc_hdr;
177 __le32 mp_payload_len;
178 __le32 rsrv;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800179};
180
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300181/*
182 * Completion information $$KEEP_ENDIANNESS$$
183 */
184union fcoe_comp_flow_info {
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800185 struct fcoe_fcp_rsp_union fcp_rsp;
186 struct fcoe_abts_rsp_union abts_rsp;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300187 struct fcoe_mp_rsp_union mp_rsp;
188 __le32 opaque[8];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800189};
190
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300191
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800192/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300193 * External ABTS info $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800194 */
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300195struct fcoe_ext_abts_info {
196 __le32 rsrv0[6];
197 struct fcoe_abts_info ctx;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800198};
199
200
201/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300202 * External cleanup info $$KEEP_ENDIANNESS$$
203 */
204struct fcoe_ext_cleanup_info {
205 __le32 rsrv0[6];
206 struct fcoe_cleanup_info ctx;
207};
208
209
210/*
211 * Fcoe FW Tx sequence context $$KEEP_ENDIANNESS$$
212 */
213struct fcoe_fw_tx_seq_ctx {
214 __le32 data_offset;
215 __le16 seq_cnt;
216 __le16 rsrv0;
217};
218
219/*
220 * Fcoe external FW Tx sequence context $$KEEP_ENDIANNESS$$
221 */
222struct fcoe_ext_fw_tx_seq_ctx {
223 __le32 rsrv0[6];
224 struct fcoe_fw_tx_seq_ctx ctx;
225};
226
227
228/*
229 * FCoE multiple sges context $$KEEP_ENDIANNESS$$
230 */
231struct fcoe_mul_sges_ctx {
232 struct regpair cur_sge_addr;
233 __le16 cur_sge_off;
234 u8 cur_sge_idx;
235 u8 sgl_size;
236};
237
238/*
239 * FCoE external multiple sges context $$KEEP_ENDIANNESS$$
240 */
241struct fcoe_ext_mul_sges_ctx {
242 struct fcoe_mul_sges_ctx mul_sgl;
243 struct regpair rsrv0;
244};
245
246
247/*
248 * FCP CMD payload $$KEEP_ENDIANNESS$$
249 */
250struct fcoe_fcp_cmd_payload {
251 __le32 opaque[8];
252};
253
254
255
256
257
258/*
259 * Fcp xfr rdy payload $$KEEP_ENDIANNESS$$
260 */
261struct fcoe_fcp_xfr_rdy_payload {
262 __le32 burst_len;
263 __le32 data_ro;
264};
265
266
267/*
268 * FC frame $$KEEP_ENDIANNESS$$
269 */
270struct fcoe_fc_frame {
271 struct fcoe_fc_hdr fc_hdr;
272 __le32 reserved0[2];
273};
274
275
276
277
278/*
279 * FCoE KCQ CQE parameters $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800280 */
281union fcoe_kcqe_params {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300282 __le32 reserved0[4];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800283};
284
285/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300286 * FCoE KCQ CQE $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800287 */
288struct fcoe_kcqe {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300289 __le32 fcoe_conn_id;
290 __le32 completion_status;
291 __le32 fcoe_conn_context_id;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800292 union fcoe_kcqe_params params;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300293 __le16 qe_self_seq;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800294 u8 op_code;
295 u8 flags;
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
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800304};
305
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300306
307
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800308/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300309 * FCoE KWQE header $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800310 */
311struct fcoe_kwqe_header {
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800312 u8 op_code;
313 u8 flags;
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
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800320};
321
322/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300323 * FCoE firmware init request 1 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800324 */
325struct fcoe_kwqe_init1 {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300326 __le16 num_tasks;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800327 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300328 __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;
332 __le16 sq_num_wqes;
333 __le16 rq_num_wqes;
334 __le16 rq_buffer_log_size;
335 __le16 cq_num_wqes;
336 __le16 mtu;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800337 u8 num_sessions_log;
338 u8 flags;
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
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800345};
346
347/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300348 * FCoE firmware init request 2 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800349 */
350struct fcoe_kwqe_init2 {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300351 u8 hsi_major_version;
352 u8 hsi_minor_version;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800353 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300354 __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;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800361};
362
363/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300364 * FCoE firmware init request 3 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800365 */
366struct fcoe_kwqe_init3 {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300367 __le16 reserved0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800368 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300369 __le32 error_bit_map_lo;
370 __le32 error_bit_map_hi;
371 u8 perf_config;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800372 u8 reserved21[3];
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300373 __le32 reserved2[4];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800374};
375
376/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300377 * FCoE connection offload request 1 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800378 */
379struct fcoe_kwqe_conn_offload1 {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300380 __le16 fcoe_conn_id;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800381 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300382 __le32 sq_addr_lo;
383 __le32 sq_addr_hi;
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;
388 __le16 rq_prod;
389 __le16 reserved0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800390};
391
392/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300393 * FCoE connection offload request 2 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800394 */
395struct fcoe_kwqe_conn_offload2 {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300396 __le16 tx_max_fc_pay_len;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800397 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300398 __le32 cq_addr_lo;
399 __le32 cq_addr_hi;
400 __le32 xferq_addr_lo;
401 __le32 xferq_addr_hi;
402 __le32 conn_db_addr_lo;
403 __le32 conn_db_addr_hi;
404 __le32 reserved1;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800405};
406
407/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300408 * FCoE connection offload request 3 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800409 */
410struct fcoe_kwqe_conn_offload3 {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300411 __le16 vlan_tag;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800412#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;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800419 u8 s_id[3];
420 u8 tx_max_conc_seqs_c3;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800421 u8 d_id[3];
422 u8 flags;
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
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300439 __le32 reserved;
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;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800445 u8 rx_max_conc_seqs_c3;
446 u8 rx_open_seqs_exch_c3;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800447};
448
449/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300450 * FCoE connection offload request 4 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800451 */
452struct fcoe_kwqe_conn_offload4 {
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800453 u8 e_d_tov_timer_val;
454 u8 reserved2;
455 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300456 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];
462 __le32 lcq_addr_lo;
463 __le32 lcq_addr_hi;
464 __le32 confq_pbl_base_addr_lo;
465 __le32 confq_pbl_base_addr_hi;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800466};
467
468/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300469 * FCoE connection enable request $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800470 */
471struct fcoe_kwqe_conn_enable_disable {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300472 __le16 reserved0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800473 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300474 u8 src_mac_addr_lo[2];
475 u8 src_mac_addr_mid[2];
476 u8 src_mac_addr_hi[2];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800477 u16 vlan_tag;
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
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300484 u8 dst_mac_addr_lo[2];
485 u8 dst_mac_addr_mid[2];
486 u8 dst_mac_addr_hi[2];
487 __le16 reserved1;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800488 u8 s_id[3];
489 u8 vlan_flag;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800490 u8 d_id[3];
491 u8 reserved3;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300492 __le32 context_id;
493 __le32 conn_id;
494 __le32 reserved4;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800495};
496
497/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300498 * FCoE connection destroy request $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800499 */
500struct fcoe_kwqe_conn_destroy {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300501 __le16 reserved0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800502 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300503 __le32 context_id;
504 __le32 conn_id;
505 __le32 reserved1[5];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800506};
507
508/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300509 * FCoe destroy request $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800510 */
511struct fcoe_kwqe_destroy {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300512 __le16 reserved0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800513 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300514 __le32 reserved1[7];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800515};
516
517/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300518 * FCoe statistics request $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800519 */
520struct fcoe_kwqe_stat {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300521 __le16 reserved0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800522 struct fcoe_kwqe_header hdr;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300523 __le32 stat_params_addr_lo;
524 __le32 stat_params_addr_hi;
525 __le32 reserved1[5];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800526};
527
528/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300529 * FCoE KWQ WQE $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800530 */
531union fcoe_kwqe {
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;
543};
544
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560/*
561 * TX SGL context $$KEEP_ENDIANNESS$$
562 */
563union fcoe_sgl_union_ctx {
564 struct fcoe_cached_sge_ctx cached_sge;
565 struct fcoe_ext_mul_sges_ctx sgl;
566 __le32 opaque[5];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800567};
568
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300569/*
570 * Data-In/ELS/BLS information $$KEEP_ENDIANNESS$$
571 */
572struct fcoe_read_flow_info {
573 union fcoe_sgl_union_ctx sgl_ctx;
574 __le32 rsrv0[3];
575};
576
577
578/*
579 * Fcoe stat context $$KEEP_ENDIANNESS$$
580 */
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800581struct fcoe_s_stat_ctx {
582 u8 flags;
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
597};
598
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300599/*
600 * Fcoe rx seq context $$KEEP_ENDIANNESS$$
601 */
602struct fcoe_rx_seq_ctx {
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800603 u8 seq_id;
604 struct fcoe_s_stat_ctx s_stat;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300605 __le16 seq_cnt;
606 __le32 low_exp_ro;
607 __le32 high_exp_ro;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800608};
609
610
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300611/*
612 * Fcoe rx_wr union context $$KEEP_ENDIANNESS$$
613 */
614union fcoe_rx_wr_union_ctx {
615 struct fcoe_read_flow_info read_info;
616 union fcoe_comp_flow_info comp_info;
617 __le32 opaque[8];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800618};
619
620
621
622/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300623 * FCoE SQ element $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800624 */
625struct fcoe_sqe {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300626 __le16 wqe;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800627#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
631};
632
633
634
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800635/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300636 * 14 regs $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800637 */
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300638struct fcoe_tce_tx_only {
639 union fcoe_sgl_union_ctx sgl_ctx;
640 __le32 rsrv0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800641};
642
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300643/*
644 * 32 bytes (8 regs) used for TX only purposes $$KEEP_ENDIANNESS$$
645 */
646union 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;
652 __le32 opaque[8];
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800653};
654
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300655/*
656 * tce_tx_wr_rx_rd_const $$KEEP_ENDIANNESS$$
657 */
658struct fcoe_tce_tx_wr_rx_rd_const {
659 u8 init_flags;
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
670 u8 tx_flags;
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
681 __le16 rsrv3;
682 __le32 verify_tx_seq;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800683};
684
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300685/*
686 * tce_tx_wr_rx_rd $$KEEP_ENDIANNESS$$
687 */
688struct 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;
691};
692
693/*
694 * tce_rx_wr_tx_rd_const $$KEEP_ENDIANNESS$$
695 */
696struct fcoe_tce_rx_wr_tx_rd_const {
697 __le32 data_2_trns;
698 __le32 init_flags;
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
703};
704
705/*
706 * tce_rx_wr_tx_rd_var $$KEEP_ENDIANNESS$$
707 */
708struct fcoe_tce_rx_wr_tx_rd_var {
709 __le16 rx_flags;
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
726 __le16 rx_id;
727 struct fcoe_fcp_xfr_rdy_payload fcp_xfr_rdy;
728};
729
730/*
731 * tce_rx_wr_tx_rd $$KEEP_ENDIANNESS$$
732 */
733struct 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;
736};
737
738/*
739 * tce_rx_only $$KEEP_ENDIANNESS$$
740 */
741struct fcoe_tce_rx_only {
742 struct fcoe_rx_seq_ctx rx_seq_ctx;
743 union fcoe_rx_wr_union_ctx union_ctx;
744};
745
746/*
747 * task_ctx_entry $$KEEP_ENDIANNESS$$
748 */
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800749struct fcoe_task_ctx_entry {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300750 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;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800754};
755
756
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300757
758
759
760
761
762
763
764
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800765/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300766 * FCoE XFRQ element $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800767 */
768struct fcoe_xfrqe {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300769 __le16 wqe;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800770#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
774};
775
776
777/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300778 * fcoe rx doorbell message sent to the chip $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800779 */
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300780struct b577xx_fcoe_rx_doorbell {
781 struct b577xx_doorbell_hdr hdr;
782 u8 params;
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;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800788};
789
790
791/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300792 * FCoE CONFQ element $$KEEP_ENDIANNESS$$
793 */
794struct fcoe_confqe {
795 __le16 ox_id;
796 __le16 rx_id;
797 __le32 param;
798};
799
800
801/*
802 * FCoE conection data base
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800803 */
804struct fcoe_conn_db {
805#if defined(__BIG_ENDIAN)
806 u16 rsrv0;
807 u16 rq_prod;
808#elif defined(__LITTLE_ENDIAN)
809 u16 rq_prod;
810 u16 rsrv0;
811#endif
812 u32 rsrv1;
813 struct regpair cq_arm;
814};
815
816
817/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300818 * FCoE CQ element $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800819 */
820struct fcoe_cqe {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300821 __le16 wqe;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800822#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
828};
829
830
831/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300832 * FCoE error/warning reporting entry $$KEEP_ENDIANNESS$$
833 */
834struct fcoe_partial_err_report_entry {
835 __le32 err_warn_bitmap_lo;
836 __le32 err_warn_bitmap_hi;
837 __le32 tx_buf_off;
838 __le32 rx_buf_off;
839};
840
841/*
842 * FCoE error/warning reporting entry $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800843 */
844struct fcoe_err_report_entry {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300845 struct fcoe_partial_err_report_entry data;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800846 struct fcoe_fc_hdr fc_hdr;
847};
848
849
850/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300851 * FCoE hash table entry (32 bytes) $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800852 */
853struct fcoe_hash_table_entry {
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800854 u8 s_id_0;
855 u8 s_id_1;
856 u8 s_id_2;
857 u8 d_id_0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800858 u8 d_id_1;
859 u8 d_id_2;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300860 __le16 dst_mac_addr_hi;
861 __le16 dst_mac_addr_mid;
862 __le16 dst_mac_addr_lo;
863 __le16 src_mac_addr_hi;
864 __le16 vlan_id;
865 __le16 src_mac_addr_lo;
866 __le16 src_mac_addr_mid;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800867 u8 vlan_flag;
868 u8 reserved0;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300869 __le16 reserved1;
870 __le32 reserved2;
871 __le32 field_id;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800872#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
878};
879
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300880
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800881/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300882 * FCoE LCQ element $$KEEP_ENDIANNESS$$
883 */
884struct fcoe_lcqe {
885 __le32 wqe;
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
892};
893
894
895
896/*
897 * FCoE pending work request CQE $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800898 */
899struct fcoe_pend_wq_cqe {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300900 __le16 wqe;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800901#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
907};
908
909
910/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300911 * FCoE RX statistics parameters section#0 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800912 */
913struct fcoe_rx_stat_params_section0 {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300914 __le32 fcoe_rx_pkt_cnt;
915 __le32 fcoe_rx_byte_cnt;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800916};
917
918
919/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300920 * FCoE RX statistics parameters section#1 $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800921 */
922struct fcoe_rx_stat_params_section1 {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300923 __le32 fcoe_ver_cnt;
924 __le32 fcoe_rx_drop_pkt_cnt;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800925};
926
927
928/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300929 * FCoE RX statistics parameters section#2 $$KEEP_ENDIANNESS$$
930 */
931struct fcoe_rx_stat_params_section2 {
932 __le32 fc_crc_cnt;
933 __le32 eofa_del_cnt;
934 __le32 miss_frame_cnt;
935 __le32 seq_timeout_cnt;
936 __le32 drop_seq_cnt;
937 __le32 fcoe_rx_drop_pkt_cnt;
938 __le32 fcp_rx_pkt_cnt;
939 __le32 reserved0;
940};
941
942
943/*
944 * FCoE TX statistics parameters $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800945 */
946struct fcoe_tx_stat_params {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300947 __le32 fcoe_tx_pkt_cnt;
948 __le32 fcoe_tx_byte_cnt;
949 __le32 fcp_tx_pkt_cnt;
950 __le32 reserved0;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800951};
952
953/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300954 * FCoE statistics parameters $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800955 */
956struct 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;
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300960 struct fcoe_rx_stat_params_section2 rx_stat2;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800961};
962
963
964/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300965 * FCoE t2 hash table entry (64 bytes) $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800966 */
967struct fcoe_t2_hash_table_entry {
968 struct fcoe_hash_table_entry data;
969 struct regpair next;
970 struct regpair reserved0[3];
971};
972
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300973
974
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800975/*
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300976 * FCoE unsolicited CQE $$KEEP_ENDIANNESS$$
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800977 */
978struct fcoe_unsolicited_cqe {
Vlad Zolotarov619c5cb2011-06-14 14:33:44 +0300979 __le16 wqe;
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800980#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
988};
989
Bhanu Gollapudi853e2bd2011-02-04 12:10:34 -0800990#endif /* __57XX_FCOE_HSI_LINUX_LE__ */